[hobbit] UPS monitoring using devmon

Buchan Milne bgmilne at staff.telkomsa.net
Thu Sep 17 12:39:19 CEST 2009


----- "David Baldwin" <david.baldwin at ausport.gov.au> wrote:

> thorsten.erdmann at daimler.com wrote:

> > 3.  message test is yellow: "primary OID upsAlarmDescrTxt in table
> is 
> > a non-repeater", I don't know how to solve that
> Rest assured, when there IS an alarm, you will see them - I had 2 this
> 
> morning.
> 
> At the moment devmon doesn't handle empty repeaters well. I had some 
> discussions with Buchan a while ago.

If this is the usual "many tests go clear when one test uses OIDs not available" issue, I think this patch should be an adequate fix. At least, it allows me to use the linux-netsnmp template (in svn) against my laptop, for which I haven't configured lmsensors, and get data for the working tests without disabling the 'temp' test.

I would appreciate it if someone else could test this change as well, I haven't currently got access to that many affected devices. If it works for someone else, I will commit in svn. It might also be worthwhile logging an issue on the SF tracker.

Regards,
Buchan

(I would also prefer to keep devmon topics on the devmon list ...)

Index: modules/dm_snmp.pm
===================================================================
--- modules/dm_snmp.pm  (revision 150)
+++ modules/dm_snmp.pm  (working copy)
@@ -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



More information about the Xymon mailing list