diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 70e5282278..ec94a285b3 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,10 @@ +2009-04-28 Ramon Novoa + + * lib/PandoraFMS/SNMPServer.pm: Disabled output from snmptrapd. + + * lib/PandoraFMS/Core.pm: Allow string comparisons for equal/not_equal + alerts. + 2009-04-27 Ramon Novoa * lib/PandoraFMS/Core.pm: Generate one event for each alert (instead diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 4c922e3267..4793c3e3a6 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -164,8 +164,8 @@ sub pandora_evaluate_alert ($$$$$$) { $data <= $alert->{'max_value'}); } - return $status if ($alert->{'type'} eq "equal" && $data != $alert->{'value'}); - return $status if ($alert->{'type'} eq "not_equal" && $data == $alert->{'value'}); + return $status if ($alert->{'type'} eq "equal" && $data ne $alert->{'value'}); + return $status if ($alert->{'type'} eq "not_equal" && $data eq $alert->{'value'}); if ($alert->{'type'} eq "regex") { return $status if ($alert->{'matches_value'} == 1 && $data =~ m/$alert->{'value'}/i); diff --git a/pandora_server/lib/PandoraFMS/SNMPServer.pm b/pandora_server/lib/PandoraFMS/SNMPServer.pm index 60a1835276..fe6089b5aa 100644 --- a/pandora_server/lib/PandoraFMS/SNMPServer.pm +++ b/pandora_server/lib/PandoraFMS/SNMPServer.pm @@ -47,7 +47,7 @@ sub new ($$;$) { return undef unless $config->{'snmpconsole'} == 1; # Start snmptrapd - if (system ($config->{'snmp_trapd'} . ' -t -On -n -a -Lf ' . $config->{'snmp_logfile'} . ' -p /var/run/pandora_snmptrapd.pid -F %4y-%02.2m-%l[**]%02.2h:%02.2j:%02.2k[**]%a[**]%N[**]%w[**]%W[**]%q[**]%v\\\n 2>/dev/null') != 0) { + if (system ($config->{'snmp_trapd'} . ' -t -On -n -a -Lf ' . $config->{'snmp_logfile'} . ' -p /var/run/pandora_snmptrapd.pid -F %4y-%02.2m-%l[**]%02.2h:%02.2j:%02.2k[**]%a[**]%N[**]%w[**]%W[**]%q[**]%v\\\n >/dev/null 2>&1') != 0) { print " [E] Could not start snmptrapd.\n\n"; return undef; }