diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 14f7ff4793..53a09c272d 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,8 @@ +2012-09-13 Sergio Martin + + * lib/PandoraFMS/Core.pm: Generate events when a + module changes to unknown status + 2012-09-11 Dario Rodriguez * util/plugin/iface_bandwith.pl: First version of diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index dfa5f74e72..2aaa9c708a 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -3455,6 +3455,13 @@ sub pandora_module_unknown ($$) { else { logger($pa_config, "Alerts inhibited for agent '" . $agent->{'nombre'} . "'.", 10); } + + # Generate event with severity minor + my ($event_type, $severity) = ('going_unknown', 5); + my $description = "Module " . safe_output($module->{'nombre'}) . " is going to UNKNOWN"; + pandora_event ($pa_config, $description, $agent->{'id_grupo'}, $module->{'id_agente'}, + $severity, 0, $module->{'id_agente_modulo'}, $event_type, 0, $dbh, 'Pandora', '', '', '', '', $module->{'critical_instructions'}, $module->{'warning_instructions'}, $module->{'unknown_instructions'}); + } }