The Nagios-provided check_ifstatus plugin doesn't appear to support
'2c' as the SNMP version (it only accepts 1, 2, 3), which breaks
things if you use the $SNMP_VERSION$ macro in the command line.  A
quick and dirty patch is below (could probably be done better).

--- check_ifstatus.orig 2010-07-06 14:36:21.000000000 -0400
+++ check_ifstatus      2010-07-06 14:36:42.000000000 -0400
@@ -280,7 +280,7 @@
        $status = GetOptions(
                "V"   => \$opt_V, "version"    => \$opt_V,
                "h"   => \$opt_h, "help"       => \$opt_h,
-               "v=i" => \$snmp_version, "snmp_version=i"  => \$snmp_version,
+               "v=s" => \$snmp_version, "snmp_version=s"  => \$snmp_version,
                "C=s" => \$community,"community=s" => \$community,
                "L=s" => \$seclevel, "seclevel=s" => \$seclevel,
                "a=s" => \$authproto, "authproto=s" => \$authproto,
@@ -317,6 +317,8 @@
                $timeout = $TIMEOUT;
        }

+        $snmp_version = 2 if $snmp_version eq '2c';
+
        if ($snmp_version !~ /[123]/){
                $state='UNKNOWN';
                print ("$state: No support for SNMP v$snmp_version yet\n");

B*


--
Brian C Landers
http://www.packetslave.com/
CCIE #23115
_______________________________________________
Opsview-users mailing list
[email protected]
http://lists.opsview.org/lists/listinfo/opsview-users

Reply via email to