2014-08-05 Hirofumi Kosaka <kosaka@rworks.jp>

* lib/PandoraFMS/Core.pm: Suppress "going to normal (warning,
	critical)" events from "unknown" status, if you disable "Throw
	unknown events" at the Console.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10380 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
hkosaka 2014-08-05 07:15:52 +00:00
parent a6f9efa740
commit c9b396f8be
2 changed files with 19 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2014-08-05 Hirofumi Kosaka <kosaka@rworks.jp>
* lib/PandoraFMS/Core.pm: Suppress "going to normal (warning,
critical)" events from "unknown" status, if you disable "Throw
unknown events" at the Console.
2014-08-05 Hirofumi Kosaka <kosaka@rworks.jp>
* lib/PandoraFMS/Core.pm: Fixed that unknown modules would be

View File

@ -3436,6 +3436,19 @@ sub generate_status_event ($$$$$$$$) {
return;
}
# disable event just recovering from 'Unknown' without status change
if($last_status == 3 && $status == $last_known_status && $module->{'disabled_types_event'} ) {
my $disabled_types_event;
eval {
local $SIG{__DIE__};
$disabled_types_event = decode_json($module->{'disabled_types_event'});
};
if ($disabled_types_event->{'going_unknown'}) {
return;
}
}
# Mark as "validated" any previous event for this module
pandora_validate_event ($pa_config, $module->{'id_agente_modulo'}, $dbh);