Page 1 of 1

check_snmp oddity

Posted: Wed Mar 04, 2015 9:00 am
by merrittr
when I run snmpwalk using v2 or v1 on IP172.168.101.139 OID:.1.3.6.1.2.1.1.3 i get the sysUpTime.0

when i do the same with check_snmp i get the message There is no such variable name in this MIB.
is there some formatting for check_snmp that I need?


P.S. this however does work:
# /usr/lib/nagios/plugins/check_snmp -H 172.168.101.139 -C public -o .1.3.6.1.2.1.25.5.1.1.1.1
SNMP OK - 1654 | iso.3.6.1.2.1.25.5.1.1.1.1=1654



# snmpwalk -v2c -c public 172.168.101.139 .1.3.6.1.2.1.1.3
iso.3.6.1.2.1.1.3.0 = Timeticks: (59448377) 6 days, 21:08:03.77
# /usr/lib/nagios/plugins/check_snmp -H 172.168.101.139 -C public -o .1.3.6.1.2.1.1.0.1
External command error: Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: iso.3.6.1.2.1.1.0.1

Re: check_snmp oddity

Posted: Wed Mar 04, 2015 9:48 am
by jdalrymple
check_snmp is not intended to work like snmpwalk or snmpgetnext, it can only return 1 OID.

Your command should look like:

Code: Select all

./check_snmp -H 172.168.101.139 -C public -o 1.3.6.1.2.1.1.3.0
Does that help?

Re: check_snmp oddity

Posted: Wed Mar 04, 2015 9:52 am
by rhassing
You are using two different oid's:

Code: Select all

snmpwalk -v2c -c public 172.168.101.139 .1.3.6.1.2.1.1.3

Code: Select all

/usr/lib/nagios/plugins/check_snmp -H 172.168.101.139 -C public -o .1.3.6.1.2.1.1.0.1
If you change your check to use .1.3.6.1.2.1.1.3.0 as well instead of .1.3.6.1.2.1.1.0.1. It should work.

Re: check_snmp oddity

Posted: Wed Mar 04, 2015 12:32 pm
by merrittr
thanks guys


/usr/lib/nagios/plugins/check_snmp -H 172.168.101.139 -C public -o 1.3.6.1.2.1.1.3.0

did the trick

Re: check_snmp oddity

Posted: Wed Mar 04, 2015 12:56 pm
by abrist
Great, locking 'er up!