Page 1 of 1

help with snmpv3

Posted: Thu Dec 10, 2015 5:05 am
by rican-linux
I am trying to poll with snmpv3. I get success when I do the check_snmp comman manually

Code: Select all

root@debian-vm:/etc/nagios3# /usr/lib/nagios/plugins/check_snmp -H hostname -P 3 -L authPriv -U username -a SHA -x AES -A pass -X pass -o iso.3.6.1.2.1.1.3.0 -m RFC1213-MIB
SNMP OK - Timeticks: (2009543) 5:34:55.43 | 
Here is how I have defined the command and the service

Code: Select all

command.cfg
# 'check_snmp v3' command
define command{
        command_name    check_snmpv3
        command_line    $USER1$/check_snmp -H $HOSTADDRESS$ -P 3 -L authPriv -U $USER5$ -a SHA -x AES -A $USER6$ -X $USER6$  -o $ARG1$
        }

server.cfg
define service{
	use			generic-service	; Inherit values from a template
	host_name	hostname
	service_description	Port en0 Link Status
	check_command		check_snmpv3!iso.3.6.1.2.1.2.2.1.8.1 -r 1 -m RFC1213-MIB
	}
Am I missing anything?

Re: help with snmpv3

Posted: Thu Dec 10, 2015 10:35 am
by hsmith
Can you try to do the check from the command line as the 'nagios' user instead of root?

Re: help with snmpv3

Posted: Thu Dec 10, 2015 4:07 pm
by rican-linux
I think it just needed a restart of the service. I am all good.