Check_snmp with snmpv3 protocol giving “Unkown Report message” error

check-snmpnagiossnmp

I'm trying to add a nagios command to use snmpv3 for monitoring printer status messages. When using the check_snmp command, I get the following error:

External command error: snmpget:
Unknown Report message

Here is the command I'm typing in:

./check_snmp -P 3 -H <hostname> -L authPriv -U snmpuser -A snmppassword -X snmppassword -o 1.3.6.1.4.1.11.2.4.3.1.2.0 -C public -d "STRING:" -a MD5

These values for auth key, private key, username, etc all work when using snmpwalk. Can someone enlighten me as to what that error message really means?

EDIT: It looks like check_snmp isn't taking my v3 credentials when passing over to snmpget. Here is my input with the verbose option:

./check_snmp -H <hostname> -o 1.3.6.1.2.1.2.2.1.10.1 -C public -m ALL -P 3 -L authPriv -U snmpuser -a MD5 -A snmppassword -x DES -X snmppassword -v

And here is the output:

/usr/bin/snmpget -t 1 -r 5 -m ALL -v 3 [authpriv] <hostname>:161 1.3.6.1.2.1.2.2.1.10.1
External command error: snmpget: Unknown Report message

So I guess now my question would be: why isn't check_snmp passing all the commandline options to snmpget?

Best Answer

Strange that it isn't passing all the arguments for you. Old version of nagios-plugins, perhaps?

Fortunately you can probably re-use something I just put together that solves a different problem. check_snmp doesn't obey your smnp.conf file.

I wrote a check_snmp.pl script that behaves similarly to check_snmp, and works with snmp v3, and uses the values in your snmp.conf file. Here is the synopsis:

http://cormander.com/2011/11/a-nagios-snmp-plugin-that-obeys-snmp-conf/

And a direct link to the check_snmp.pl script:

http://cormander.com/wp-content/uploads/2011/11/check_snmp.pl_.txt

Hope somebody finds this useful.