Merge branch 'ent-12307-automonitorizacion-mysql-reads' into 'develop'
Ent 12307 automonitorizacion mysql reads See merge request artica/pandorafms!6604
This commit is contained in:
commit
37a25c4873
|
@ -6740,24 +6740,23 @@ sub pandora_installation_monitoring($$) {
|
|||
my $data_size = get_db_value($dbh, 'SELECT SUM(data_length)/(1024*1024) FROM information_schema.TABLES');
|
||||
my $index_size = get_db_value($dbh, 'SELECT SUM(index_length)/(1024*1024) FROM information_schema.TABLES');
|
||||
my $writes = $insert->{'Value'} + $update->{'Value'} + $replace->{'Value'} + $delete->{'Value'} ;
|
||||
my $reads = $select->{'Value'};
|
||||
|
||||
# Mysql Questions - Reads
|
||||
$module->{'name'} = "mysql_questions_reads";
|
||||
$module->{'description'} = 'MySQL: Questions - Reads (#): Number of read questions';
|
||||
$module->{'data'} = $select->{'Value'};
|
||||
$module->{'unit'} = 'qu';
|
||||
$module->{'data'} = $reads;
|
||||
$module->{'unit'} = 'qu/s';
|
||||
$module->{'type'} = 'generic_data_inc';
|
||||
push(@modules, $module);
|
||||
undef $module;
|
||||
|
||||
# Mysql Questions - Writes
|
||||
my $question_writes = 0;
|
||||
if(($writes + $select) > 0) {
|
||||
$question_writes = (($writes * 10000) / ($select + $writes)) / 100;
|
||||
}
|
||||
$module->{'name'} = "mysql_questions_writes";
|
||||
$module->{'description'} = 'MySQL: Questions - Writes (#): Number of writed questions';
|
||||
$module->{'data'} = $question_writes;
|
||||
$module->{'unit'} = 'qu';
|
||||
$module->{'data'} = $writes;
|
||||
$module->{'unit'} = 'qu/s';
|
||||
$module->{'type'} = 'generic_data_inc';
|
||||
push(@modules, $module);
|
||||
undef $module;
|
||||
|
||||
|
@ -6897,7 +6896,7 @@ sub pandora_installation_monitoring($$) {
|
|||
$dbh,
|
||||
'SELECT COUNT(id_evento)
|
||||
FROM tevento
|
||||
WHERE timestamp >=UNIX_TIMESTAMP(NOW() - INTERVAL 1 DAY)'
|
||||
WHERE utimestamp >=UNIX_TIMESTAMP(NOW() - INTERVAL 1 DAY)'
|
||||
);
|
||||
$module->{'name'} = "last_events_24h";
|
||||
$module->{'description'} = 'Last 24h events';
|
||||
|
|
Loading…
Reference in New Issue