Cisco Temp No Such Instance currently exists at this OID

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
perric
Posts: 161
Joined: Fri Mar 28, 2014 10:37 am

Cisco Temp No Such Instance currently exists at this OID

Post 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
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Cisco Temp No Such Instance currently exists at this OID

Post 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?
Former Nagios Employee.
me.
perric
Posts: 161
Joined: Fri Mar 28, 2014 10:37 am

Re: Cisco Temp No Such Instance currently exists at this OID

Post 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
perric
Posts: 161
Joined: Fri Mar 28, 2014 10:37 am

Re: Cisco Temp No Such Instance currently exists at this OID

Post 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
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Cisco Temp No Such Instance currently exists at this OID

Post 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?
Former Nagios Employee.
me.
perric
Posts: 161
Joined: Fri Mar 28, 2014 10:37 am

Re: Cisco Temp No Such Instance currently exists at this OID

Post by perric »

It is no problem to use snmpwalk. It just seemed weird that check_snmp would not work.

Thanks.

David
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Cisco Temp No Such Instance currently exists at this OID

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
perric
Posts: 161
Joined: Fri Mar 28, 2014 10:37 am

Re: Cisco Temp No Such Instance currently exists at this OID

Post by perric »

Thanks.

I tried the -m all option. I received the same result as before with check_snmp and version 1.

David
User avatar
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

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked