From 9f8ae07a3d2fd6f39f7b465efeb993b8209f0b80 Mon Sep 17 00:00:00 2001 From: ramonn Date: Fri, 9 Oct 2009 12:12:16 +0000 Subject: [PATCH] 2009-10-09 Ramon Novoa * lib/PandoraFMS/Core.pm, bin/pandora_server: Re-enabled multicast reports (Enterprise feature). git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2014 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 5 +++++ pandora_server/bin/pandora_server | 1 + pandora_server/lib/PandoraFMS/Core.pm | 5 +++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 841ba8f2d5..f7a9681f50 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,8 @@ +2009-10-09 Ramon Novoa + + * lib/PandoraFMS/Core.pm, bin/pandora_server: Re-enabled multicast + reports (Enterprise feature). + 2009-10-09 Ramon Novoa * lib/PandoraFMS/Server.pm, bin/pandora_server: Small fixes to avoid diff --git a/pandora_server/bin/pandora_server b/pandora_server/bin/pandora_server index 37bf5bf171..df0faf58d6 100755 --- a/pandora_server/bin/pandora_server +++ b/pandora_server/bin/pandora_server @@ -177,6 +177,7 @@ while (1) { pandora_planned_downtime (\%Config, $DBH); pandora_exec_forced_alerts (\%Config, $DBH); pandora_module_keep_alive_nd (\%Config, $DBH); + enterprise_hook('mcast_status_report', [\%Config, $DBH]); }; # Restart on error or auto restart diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index fe91098fc8..49bcfd2550 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -1103,12 +1103,12 @@ sub generate_status_event ($$$$$$$) { if ($status == 0) { ($event_type, $severity) = ('going_down_normal', 2); $description .= "going down to NORMAL"; - + enterprise_hook('mcast_change_report', [$pa_config, $module->{'nombre'}, $module->{'custom_id'}, strftime ("%Y-%m-%d %H:%M:%S", localtime()), 'OK', $dbh]); # Critical } elsif ($status == 1) { ($event_type, $severity) = ('going_up_critical', 4); $description .= "going up to CRITICAL"; - + enterprise_hook('mcast_change_report', [$pa_config, $module->{'nombre'}, $module->{'custom_id'}, strftime ("%Y-%m-%d %H:%M:%S", localtime()), 'ERR', $dbh]); # Warning } elsif ($status == 2) { @@ -1125,6 +1125,7 @@ sub generate_status_event ($$$$$$$) { # Unknown last_status return; } + enterprise_hook('mcast_change_report', [$pa_config, $module->{'nombre'}, $module->{'custom_id'}, strftime ("%Y-%m-%d %H:%M:%S", localtime()), 'WARN', $dbh]); } else { # Unknown status return;