|
From: <buc...@us...> - 2009-10-26 13:49:53
|
Revision: 156
http://devmon.svn.sourceforge.net/devmon/?rev=156&view=rev
Author: buchanmilne
Date: 2009-10-26 12:34:38 +0000 (Mon, 26 Oct 2009)
Log Message:
-----------
Ignore SNMP failures where the snmp error string is empty. This allows us, in
the case where we get no data for one test (e.g., MIB is not supported/configured)
to keep polling the other tests. Tests for which there is no data will then appear
clear, while tests for which there is data will not (without this change, tests
for which there is data available would appear clear, and finding the test with
missing data was non-trivial).
Modified Paths:
--------------
trunk/modules/dm_snmp.pm
Modified: trunk/modules/dm_snmp.pm
===================================================================
--- trunk/modules/dm_snmp.pm 2009-10-26 11:59:58 UTC (rev 155)
+++ trunk/modules/dm_snmp.pm 2009-10-26 12:34:38 UTC (rev 156)
@@ -554,10 +554,12 @@
my $snmp_err;
do_log("DEBUG SNMP: $SNMP_Session::errmsg",0) if $g{'debug'};
($snmp_err = $SNMP_Session::errmsg) =~ s/\n.*//s;
- my $error_str =
- "Error walking $oid for $dev ($snmp_err)";
- $data_out{'error'}{$error_str} = 0;
- ++$failed_query;
+ if ($snmp_err ne '') {
+ my $error_str =
+ "Error walking $oid for $dev ($snmp_err)";
+ $data_out{'error'}{$error_str} = 0;
+ ++$failed_query;
+ }
}
else {
# Record our maxrep value for our next poll cycle
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|