Testing snmp_check plugin - No variable in MIB

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
User avatar
hbackus
Posts: 36
Joined: Tue May 17, 2011 5:02 pm

Testing snmp_check plugin - No variable in MIB

Post by hbackus »

snmp_check plugin returns an error when snmpwalk does not; I am confused if it is an issue with the plugin or the syntax I am using.

SNMPWALK returns a value for the OID I am checking:

snmpwalk -v 2c -c public 10.34.100.11 1.3.6.1.4.1.1991.1.1.1.1.18
SNMPv2-SMI::enterprises.1991.1.1.1.1.18.0 = INTEGER: 96

SNMP_CHECK returns multiple errors:

/usr/local/nagios/libexec/check_snmp -C public -H 10.34.100.11 -o 1.3.6.1.4.1.1991.1.1.1.1.18
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.1991.1.1.1.1.18

plugin version is 2.2.1
/usr/local/nagios/libexec/check_snmp -V
check_snmp v2.2.1 (nagios-plugins 2.2.1)

The MIB information that SNMPWALK uses is in the /usr/share/snmp/mibs directory.

So my first questions is the syntax I am using for snmp_check correct?
Second question does snmp_check use the same MIB data that snmpwalk is using?

If both commands use the same MIB data, why is snmp_check throwing errors?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Testing snmp_check plugin - No variable in MIB

Post by scottwilkerson »

you did not include your SNMP version -P 2c

Code: Select all

/usr/local/nagios/libexec/check_snmp -C public -H 10.34.100.11 -P 2c -o 1.3.6.1.4.1.1991.1.1.1.1.18
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
User avatar
hbackus
Posts: 36
Joined: Tue May 17, 2011 5:02 pm

Re: Testing snmp_check plugin - No variable in MIB

Post by hbackus »

Thank you for your response.

I get the same message with the -P (snmp_version) argument.

# /usr/local/nagios/libexec/check_snmp -C public -H 10.34.100.11 -P 2c -o 1.3.6.1.4.1.1991.1.1.1.1.18
SNMP OK - No Such Instance currently exists at this OID |

What do you think? :?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Testing snmp_check plugin - No variable in MIB

Post by scottwilkerson »

Just re looked at your OP, you did a walk and what returned was the actual OID has another .0 at the end
run

Code: Select all

/usr/local/nagios/libexec/check_snmp -C public -H 10.34.100.11 -P 2c -o 1.3.6.1.4.1.1991.1.1.1.1.18.0
The walk will find all sub items, and the parent likely doesn't have a value
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
User avatar
hbackus
Posts: 36
Joined: Tue May 17, 2011 5:02 pm

Re: Testing snmp_check plugin - No variable in MIB

Post by hbackus »

Thanks,

I obviously am missing the subtlety of SNMP? :oops:

I don't know if I would have ever caught the trailing .0.

Best Regards
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Testing snmp_check plugin - No variable in MIB

Post by scottwilkerson »

hbackus wrote:Thanks,

I obviously am missing the subtlety of SNMP? :oops:

I don't know if I would have ever caught the trailing .0.

Best Regards
I almost missed it, SNMP is very finicky, everything has to be just so....

Glad it is resolved.

Locking
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked