2014-08-11 Hirofumi Kosaka <kosaka@rworks.jp>
* lib/PandoraFMS/Core.pm: Fixed modules would have ignored ff_threshold when the module shifted from normal to critical while its status remained unknown. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10394 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
8c7ac00f14
commit
33563f350e
|
@ -1,3 +1,9 @@
|
|||
2014-08-11 Hirofumi Kosaka <kosaka@rworks.jp>
|
||||
|
||||
* lib/PandoraFMS/Core.pm: Fixed modules would have ignored
|
||||
ff_threshold when the module shifted from normal to critical
|
||||
while its status remained unknown.
|
||||
|
||||
2014-08-07 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* util/recon_scripts/snmp-recon.pl,
|
||||
|
|
|
@ -1103,6 +1103,11 @@ sub pandora_process_module ($$$$$$$$$;$) {
|
|||
$min_ff_event = $module->{'min_ff_event_warning'} if ($new_status == 2);
|
||||
}
|
||||
|
||||
# replace $new_status with $last_known_status when recovering from 'unknown'
|
||||
if ($status == 3) {
|
||||
$new_status = $last_known_status;
|
||||
}
|
||||
|
||||
if ($last_status == $new_status) {
|
||||
|
||||
# Avoid overflows
|
||||
|
@ -1132,15 +1137,24 @@ sub pandora_process_module ($$$$$$$$$;$) {
|
|||
# Update module status count
|
||||
pandora_mark_agent_for_module_update ($dbh, $agent->{'id_agente'});
|
||||
}
|
||||
# Set not-init or unknown modules to its current status even if min_ff_event is not matched the first time they receive data
|
||||
elsif ($status == 3 || $status == 4) {
|
||||
# Set not-init modules to normal status even if min_ff_event is not matched the first time they receive data.
|
||||
# if critical or warning status, just pass through here and wait the time min_ff_event will be matched.
|
||||
elsif ($status == 4) {
|
||||
generate_status_event ($pa_config, $processed_data, $agent, $module, 0, $status, $last_known_status, $dbh);
|
||||
$status = 0;
|
||||
|
||||
# Update module status count
|
||||
pandora_mark_agent_for_module_update ($dbh, $agent->{'id_agente'});
|
||||
}
|
||||
# If unknown modules receive data, restore status even if min_ff_event is not matched.
|
||||
elsif ($status == 3) {
|
||||
generate_status_event ($pa_config, $processed_data, $agent, $module, $new_status, $status, $last_known_status, $dbh);
|
||||
$status = $new_status;
|
||||
|
||||
# Update module status count
|
||||
pandora_mark_agent_for_module_update ($dbh, $agent->{'id_agente'});
|
||||
}
|
||||
|
||||
|
||||
$last_status = $new_status;
|
||||
|
||||
# tagente_estado.last_try defaults to NULL, should default to '1970-01-01 00:00:00'
|
||||
|
|
Loading…
Reference in New Issue