2009-08-24 Sancho Lerena <slerena@artica.es>

* lib/PandoraFMS/Core.pm: Condition trigger for WARNING and
        CRITICAL status was inverted. Fixed.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1878 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
slerena 2009-08-24 21:24:13 +00:00
parent f146163618
commit a7dfd4814b
2 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2009-08-24 Sancho Lerena <slerena@artica.es>
* lib/PandoraFMS/Core.pm: Condition trigger for WARNING and
CRITICAL status was inverted. Fixed.
2009-08-24 Ramon Novoa <rnovoa@artica.es> 2009-08-24 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/Config.pm, * lib/PandoraFMS/Config.pm,

View File

@ -173,8 +173,8 @@ sub pandora_evaluate_alert ($$$$$$) {
return $status if ($data !~ m/$alert->{'value'}/i); return $status if ($data !~ m/$alert->{'value'}/i);
} }
return $status if ($last_status == 1 && $alert->{'type'} eq 'critical'); 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 != 2 && $alert->{'type'} eq 'warning');
} }
# Compound alert # Compound alert
elsif (pandora_evaluate_compound_alert($pa_config, $alert->{'id'}, $dbh) == 0) { 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'}) || return 2 if (($alert->{'internal_counter'} < $alert->{'min_alerts'}) ||
($alert->{'times_fired'} >= $alert->{'max_alerts'})); ($alert->{'times_fired'} >= $alert->{'max_alerts'}));
return 0; return 0; #Launch the alert
} }
########################################################################## ##########################################################################