Testing snmp_check plugin - No variable in MIB

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Testing snmp_check plugin - No variable in MIB

Postby hbackus » Wed Jul 11, 2018 3:10 pm

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?
User avatar
hbackus
 
Posts: 32
Joined: Tue May 17, 2011 5:02 pm

Re: Testing snmp_check plugin - No variable in MIB

Postby scottwilkerson » Wed Jul 11, 2018 4:54 pm

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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 12331
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Testing snmp_check plugin - No variable in MIB

Postby hbackus » Thu Jul 12, 2018 7:01 am

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? :?
User avatar
hbackus
 
Posts: 32
Joined: Tue May 17, 2011 5:02 pm

Re: Testing snmp_check plugin - No variable in MIB

Postby scottwilkerson » Thu Jul 12, 2018 7:06 am

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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 12331
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Testing snmp_check plugin - No variable in MIB

Postby hbackus » Thu Jul 12, 2018 11:56 am

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
User avatar
hbackus
 
Posts: 32
Joined: Tue May 17, 2011 5:02 pm

Re: Testing snmp_check plugin - No variable in MIB

Postby scottwilkerson » Thu Jul 12, 2018 2:50 pm

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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 12331
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises


Return to Nagios Core

Who is online

Users browsing this forum: sampan1 and 33 guests