diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index c44d3ad6bc..f2813ab6d2 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,9 @@ +2009-08-24 Sancho Lerena + + * lib/PandoraFMS/Core.pm: Condition trigger for WARNING and + CRITICAL status was inverted. Fixed. + + 2009-08-24 Ramon Novoa * lib/PandoraFMS/Config.pm, diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 8113aba5d5..8469fc6d14 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -173,8 +173,8 @@ sub pandora_evaluate_alert ($$$$$$) { return $status if ($data !~ m/$alert->{'value'}/i); } - return $status if ($last_status == 1 && $alert->{'type'} eq 'critical'); - return $status if ($last_status == 2 && $alert->{'type'} eq 'warning'); + return $status if ($last_status != 1 && $alert->{'type'} eq 'critical'); + return $status if ($last_status != 2 && $alert->{'type'} eq 'warning'); } # Compound alert elsif (pandora_evaluate_compound_alert($pa_config, $alert->{'id'}, $dbh) == 0) { @@ -185,7 +185,7 @@ sub pandora_evaluate_alert ($$$$$$) { return 2 if (($alert->{'internal_counter'} < $alert->{'min_alerts'}) || ($alert->{'times_fired'} >= $alert->{'max_alerts'})); - return 0; + return 0; #Launch the alert } ##########################################################################