Page 1 of 1
Cisco Temp No Such Instance currently exists at this OID
Posted: Fri Feb 05, 2016 9:44 am
by perric
Hello,
When I query a CIsco switch temperature value via snmpwalk, I get the following response:
snmpwalk -mALL -v1 -cpublic 192.168.0.10 .2 1.3.6.1.4.1.9.9.13.1.3.1.3
CISCO-ENVMON-MIB::ciscoEnvMonTemperatureStatusValue.1006 = Gauge32: 31 degrees Celsius
When I do the same using check_snmp from a bash script (see script details below), I get "SNMP OK - Such Instance currently exists at this OID |".
switch_temp="$(/usr/local/nagios/libexec/check_snmp 192.168.0.10 -P 2c -C public -o 1.3.6.1.4.1.9.9.13.1.3.1.3)"
echo "$switch_temp"
Can you help me to figure out why I am seeing a difference?
David
Re: Cisco Temp No Such Instance currently exists at this OID
Posted: Fri Feb 05, 2016 10:45 am
by hsmith
One difference that is popping out at me...
perric wrote:snmpwalk -mALL -v1
perric wrote:/usr/local/nagios/libexec/check_snmp 192.168.0.10 -P 2c - C public -o 1.3.6.1.4.1.9.9.13.1.3.1.3
Are you using different versions of SNMP for a particular reason?
Re: Cisco Temp No Such Instance currently exists at this OID
Posted: Fri Feb 05, 2016 11:41 am
by perric
Thanks for your reply. That is a typo, but I am still seeing the same issue with snmp v2c used on both. I was wondering if it was a Gauge32 compatibility issue with check_snmp, because I do not see an issue when the value is an integer.
# snmpwalk -mALL -v2c -cpublic 192.168.0.10 1.3.6.1.4.1.9.9.13.1.3.1.3
CISCO-ENVMON-MIB::ciscoEnvMonTemperatureStatusValue.1006 = Gauge32: 24 degrees Celsius
# /usr/local/nagios/libexec/check_snmp 192.168.0.10 -P 2c -C public -o 1.3.6.1.4.1.9.9.13.1.3.1.3
SNMP OK - Such Instance currently exists at this OID |
David
Re: Cisco Temp No Such Instance currently exists at this OID
Posted: Fri Feb 05, 2016 12:03 pm
by perric
Also, if I use SNMP v1, I get the following slightly different result:
# snmpwalk -mALL -v1 -cpublic 192.168.0.10 1.3.6.1.4.1.9.9.13.1.3.1.3
CISCO-ENVMON-MIB::ciscoEnvMonTemperatureStatusValue.1006 = Gauge32: 23 degrees Celsius
# /usr/local/nagios/libexec/check_snmp 192.168.0.10 -P 1 -C public -o 1.3.6.1.4.1.9.9.13.1.3.1.3
External command error: Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: iso.3.6.1.4.1.9.9.13.1.3.1.3
David
Re: Cisco Temp No Such Instance currently exists at this OID
Posted: Fri Feb 05, 2016 1:58 pm
by hsmith
I've seen an issue like this before, and in the end, the answer was just to use walk in a script instead of get. I've spent some time researching it, but without having your device I can't give a great answer. Is there a reason to not run walk instead of get in your script, since it works?
Re: Cisco Temp No Such Instance currently exists at this OID
Posted: Fri Feb 05, 2016 2:31 pm
by perric
It is no problem to use snmpwalk. It just seemed weird that check_snmp would not work.
Thanks.
David
Re: Cisco Temp No Such Instance currently exists at this OID
Posted: Fri Feb 05, 2016 3:02 pm
by tgriep
The check_snmp plugin has the option to specifying to all of the mibs, try running it like this.
Code: Select all
/usr/local/nagios/libexec/check_snmp 192.168.0.10 -P 1 -C public -o 1.3.6.1.4.1.9.9.13.1.3.1.3 -m all
Re: Cisco Temp No Such Instance currently exists at this OID
Posted: Fri Feb 05, 2016 3:13 pm
by perric
Thanks.
I tried the -m all option. I received the same result as before with check_snmp and version 1.
David
Re: Cisco Temp No Such Instance currently exists at this OID
Posted: Sun Feb 07, 2016 10:48 pm
by Box293
Does this work:
Code: Select all
/usr/local/nagios/libexec/check_snmp 192.168.0.10 -P 2c -C public -o 1.3.6.1.4.1.9.9.13.1.3.1.3.0
All I've added is a
.0 at the end.