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
Cisco Temp No Such Instance currently exists at this OID
Re: Cisco Temp No Such Instance currently exists at this OID
One difference that is popping out at me...
perric wrote:snmpwalk -mALL -v1
Are you using different versions of SNMP for a particular reason?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
Former Nagios Employee.
me.
me.
Re: Cisco Temp No Such Instance currently exists at this OID
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
# 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
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
# 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
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?
Former Nagios Employee.
me.
me.
Re: Cisco Temp No Such Instance currently exists at this OID
It is no problem to use snmpwalk. It just seemed weird that check_snmp would not work.
Thanks.
David
Thanks.
David
Re: Cisco Temp No Such Instance currently exists at this OID
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 allBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Cisco Temp No Such Instance currently exists at this OID
Thanks.
I tried the -m all option. I received the same result as before with check_snmp and version 1.
David
I tried the -m all option. I received the same result as before with check_snmp and version 1.
David
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Cisco Temp No Such Instance currently exists at this OID
Does this work:
All I've added is a .0 at the end.
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.0As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.