Automonitoration modules fixes

This commit is contained in:
Calvo 2023-10-23 15:11:23 +02:00
parent 48c314669a
commit 3261b1c279
1 changed files with 6 additions and 8 deletions

View File

@ -6680,18 +6680,16 @@ sub pandora_installation_monitoring($$) {
$module->{'description'} = 'MySQL: Questions - Reads (#): Number of read questions'; $module->{'description'} = 'MySQL: Questions - Reads (#): Number of read questions';
$module->{'data'} = $select->{'Value'}; $module->{'data'} = $select->{'Value'};
$module->{'unit'} = 'qu'; $module->{'unit'} = 'qu';
$module->{'type'} = 'generic_data_inc';
push(@modules, $module); push(@modules, $module);
undef $module; undef $module;
s
# Mysql Questions - Writes # Mysql Questions - Writes
my $question_writes = 0;
if(($writes + $select) > 0) {
$question_writes = (($writes * 10000) / ($select + $writes)) / 100;
}
$module->{'name'} = "mysql_questions_writes"; $module->{'name'} = "mysql_questions_writes";
$module->{'description'} = 'MySQL: Questions - Writes (#): Number of writed questions'; $module->{'description'} = 'MySQL: Questions - Writes (#): Number of writed questions';
$module->{'data'} = $question_writes; $module->{'data'} = $writes;
$module->{'unit'} = 'qu'; $module->{'unit'} = 'qu';
$module->{'type'} = 'generic_data_inc';
push(@modules, $module); push(@modules, $module);
undef $module; undef $module;
@ -6831,7 +6829,7 @@ sub pandora_installation_monitoring($$) {
$dbh, $dbh,
'SELECT COUNT(id_evento) 'SELECT COUNT(id_evento)
FROM tevento FROM tevento
WHERE timestamp >=UNIX_TIMESTAMP(NOW() - INTERVAL 1 DAY)' WHERE utimestamp >=UNIX_TIMESTAMP(NOW() - INTERVAL 1 DAY)'
); );
$module->{'name'} = "last_events_24h"; $module->{'name'} = "last_events_24h";
$module->{'description'} = 'Last 24h events'; $module->{'description'} = 'Last 24h events';