Page 1 of 1

Trying to setup a router that only uses SNMP v3

Posted: Thu Aug 09, 2012 1:27 pm
by rriche
Hi, I'm trying to setup a Cisco router in Nagois XI. The router will only accept SNMP v3 queries. I used the SNMP wizard selected uptime and ifOperStatus.1. Added sysLocation.0 and sysContact.0. Selected 3 under version, selected authPriv under security level, entered Username, Privacy Password, and Authentication Password, and selected SHA under Authentication Protocol. Once device and services are discovered, the device is green - up, but the services come back with unknown and the following in status information - Usage:check_snmp -H <ip_address> -o <OID> [-w warn_range] [-c crit_range].

The configuration line looks like this - check_xi_service_snmp! -o sysContact.0 -C netwatch -P 3 --seclevel=authPriv --secname=name --authproto=SHA --authpassword=password --privpassword=password

I've changed the line to have the --privproto=AES and receive the same error/status.

What am I doing wrong?

Thanks

Rex Richey

Re: Trying to setup a router that only uses SNMP v3

Posted: Thu Aug 09, 2012 3:17 pm
by lmiltchev
Can you show us the actual command that you are using and its output in the command line? (Hide sensitive data).

You can see how to test check commands here:
http://support.nagios.com/wiki/index.ph ... mmand-line

Re: Trying to setup a router that only uses SNMP v3

Posted: Fri Aug 10, 2012 3:15 pm
by rriche
Here's the results of the check. It erred on the -x value. Removed the -x value and received error - SNMP problem - No data received from host. -x is the privproto.


[root@WYO-NagiosXI rriche]# su -c '/usr/local/nagios/libexec/check_snmp -H IP address -o sysLocation.0 -C string -P 3 -L authPriv -U user name -a SHA -A password -x AES -X password -m SNMPv2-MIB' nagios
/usr/local/nagios/libexec/check_snmp: invalid option -- 'x'
Usage:check_snmp -H <ip_address> -o <OID> [-w warn_range] [-c crit_range]
[-C community] [-s string] [-r regex] [-R regexi] [-t timeout] [-e retries]
[-l label] [-u units] [-p port-number] [-d delimiter] [-D output-delimiter]
[-m miblist] [-P snmp version] [-L seclevel] [-U secname] [-a authproto]
[-A authpasswd] [-X privpasswd]
[root@WYO-NagiosXI rriche]# su -c '/usr/local/nagios/libexec/check_snmp -H IP address -o sysLocation.0 -C String -P 3 -L authPriv -U user name -a SHA -A password -X password -m SNMPv2-MIB' nagios
SNMP problem - No data received from host
CMD: /usr/bin/snmpget -t 1 -r 5 -m SNMPv2-MIB -v 3 [authpriv] IP address:161 sysLocation.0

Re: Trying to setup a router that only uses SNMP v3

Posted: Fri Aug 10, 2012 4:55 pm
by scottwilkerson
Lets try wrapping you passwords and usernames in single quotes to make sure we don't have special characters messing with us

Re: Trying to setup a router that only uses SNMP v3

Posted: Fri Aug 10, 2012 5:01 pm
by nscott
rriche,

A couple of things:

Can you run /usr/local/nagios/libexec/check_snmp -V and return to us the output? We ran into an issue where one version ( check_snmp v2021 (nagios-plugins 1.4.13) ) did NOT have the -x option, while the newer version (check_snmp v1.4.15-46-gefa2 (nagios-plugins 1.4.15)) DID have the -x option, this may be a versioning issue.

Also, its slightly confusing to use both a community string (-C) and all the SNMPv3 credentials. I would suggest removing the -C directive as that may be forcing check_snmp into v2 or v1 mode.

Re: Trying to setup a router that only uses SNMP v3

Posted: Fri Aug 10, 2012 5:42 pm
by rriche
We were on version 1.4.13 of the plugin. Updated to version 1.4.16. This fixed the problem. Getting SNMP data from the router. Thanks for the help

Re: Trying to setup a router that only uses SNMP v3

Posted: Fri Aug 10, 2012 8:52 pm
by scottwilkerson
Excellent. Glad you got it working