2009-04-28 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/SNMPServer.pm: Disabled output from snmptrapd. * lib/PandoraFMS/Core.pm: Allow string comparisons for equal/not_equal alerts. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1659 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
14ab110878
commit
c8b7b367ed
|
@ -1,3 +1,10 @@
|
|||
2009-04-28 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* 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 <rnovoa@artica.es>
|
||||
|
||||
* lib/PandoraFMS/Core.pm: Generate one event for each alert (instead
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue