On Thu, Jan 29, 2009 at 7:56 PM, Rahul Nabar <rpna...@gmail.com> wrote: > I was trying to monitor my Dell Power Connect Switch via nagios. I used the > default templates and have this check_command in my switch.cfg: > check_command check_snmp!-C public -o ifOperStatus.1 -r 1 -m > RFC1213-MIB > > Unfortunately the web-interface shows: "SNMP CRITICAL - *down(2)* " > > Now I tried a naked SNMP query on this switch: > > snmpwalk -v1 -c public switch3 -m ALL.1 > /tmp/switch3.snmp.log > > The switch does respond with reams of output! But I am not really sure what > I should be looking for in there. I tried grepping on " ifOperStatus.1" but > that is not to be found. > > Any other suggestions how to monitor this recalcitrant Dell switch?
The OID that maps to ifOperStatus from RFC1213-MIB is 1.3.6.1.2.1.2.2.1.8 So grep for 1.3.6.1.2.1.2.2.1.8.1 if the interface you want to look at is indeed at index 1 :). When running a check within Nagios, for performance reasons it generally is preferable to document what the name of the OID is in the service comments and use the dotted notation in the check .. as otherwise the command, which I think just cals a Net-SNMP command, has to then load and parse the whole MIB file just to turn your single OID name into the numeric representation. If you are just running this for one port on one switch, then loading the MIB is no biggie, if you plan to monitor hundreds or thousands of ports, would be better to use the numeric form of the OID and run an ePN plugin using the perl Net::SNMP or NSNMP library or a plugin that implements the C Net-SNMP libraries directly To view the mappings of OID descriptions to OIDs from the CLI you can use the Net-SNMP snmptranslate tool: snmptranslate -Tz -m RFC1213-MIB Gives a nice output format .. e.g. first 20 or so lines from the above: "org" "1.3" "dod" "1.3.6" "internet" "1.3.6.1" "directory" "1.3.6.1.1" "mgmt" "1.3.6.1.2" "mib-2" "1.3.6.1.2.1" "system" "1.3.6.1.2.1.1" "sysDescr" "1.3.6.1.2.1.1.1" "sysObjectID" "1.3.6.1.2.1.1.2" "sysUpTime" "1.3.6.1.2.1.1.3" "sysContact" "1.3.6.1.2.1.1.4" "sysName" "1.3.6.1.2.1.1.5" "sysLocation" "1.3.6.1.2.1.1.6" "sysServices" "1.3.6.1.2.1.1.7" "sysORLastChange" "1.3.6.1.2.1.1.8" "sysORTable" "1.3.6.1.2.1.1.9" "sysOREntry" "1.3.6.1.2.1.1.9.1" - Max ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null