diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 0510659c7c..6524448dac 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,8 @@ +2009-05-27 Ramon Novoa + + * lib/PandoraFMS/Core.pm: Disabled string comparisons for + equal/not_equal alerts (use regex instead). + 2009-05-27 Ramon Novoa * lib/PandoraFMS/DataServer.pm: Fixed timestamps for data lists. Made diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 142d3699b6..8947a1d4c5 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -165,9 +165,8 @@ sub pandora_evaluate_alert ($$$$$$) { $data <= $alert->{'max_value'}); } - return $status if ($alert->{'type'} eq "equal" && $data ne $alert->{'value'}); - return $status if ($alert->{'type'} eq "not_equal" && $data eq $alert->{'value'}); - + return $status if ($alert->{'type'} eq "equal" && $data != $alert->{'value'}); + return $status if ($alert->{'type'} eq "not_equal" && $data == $alert->{'value'}); if ($alert->{'type'} eq "regex") { return $status if ($alert->{'matches_value'} == 1 && $data =~ m/$alert->{'value'}/i);