Page 1 of 1

Fresh install of nagios (ubuntu), check_snmp syntax is wrong

Posted: Thu Nov 08, 2012 4:06 pm
by Digitalmocking
Installing nagios from scratch for a new client, I've done this a few times now, but this is the first time I've seen this error.

I followed the steps in this guide: http://assets.nagios.com/downloads/nagi ... Source.pdf

(snmp was installed prior to going through the plugin installation)

Any time I use check_snmp it hangs, so first thing I did was make sure snmpget worked to the host in question:

Code: Select all

administrator@itnetmon1:/usr/local/nagios/libexec$ snmpget -t 1 -r 5 -v 2c -c tempread 172.16.5.1 iso.3.6.1.2.1.99.1.1.1.7.11
iso.3.6.1.2.1.99.1.1.1.7.11 = Timeticks: (2151662213) 249 days, 0:50:22.13
issuing the following command with check_snmp hangs:

Code: Select all

administrator@itnetmon1:/usr/local/nagios/libexec$ ./check_snmp -H 172.16.5.1 -o iso.3.6.1.2.1.99.1.1.1.7.11 -C tempread -P2c
Looking at the -v output:

Code: Select all

 administrator@itnetmon1:/usr/local/nagios/libexec$ ./check_snmp -H 172.16.5.1 -o iso.3.6.1.2.1.99.1.1.1.7.11 -C tempread -P2c -v
/usr/bin/snmpget -t 1 -r 5 -m ALL -v 2c [authpriv] 172.16.5.1:161 iso.3.6.1.2.1.99.1.1.1.7.11
That's not the right syntax at all, does anyone have any idea what's going on? This is outside of my wheelhouse.

Re: Fresh install of nagios (ubuntu), check_snmp syntax is w

Posted: Fri Nov 09, 2012 11:36 am
by agriffin
That is pretty strange, and I can't say I've seen that behavior before. I wasn't able to reproduce it, anyway. This is what I get:

Code: Select all

[root@localhost libexec]# ./check_snmp -H 172.16.5.1 -o iso.3.6.1.2.1.99.1.1.1.7.11 -C tempread -P2c -v
/usr/bin/snmpget -t 1 -r 5 -m ALL -v 2c -c tempread 172.16.5.1:161  iso.3.6.1.2.1.99.1.1.1.7.11
Can you try just recompiling? If it still doesn't work, post the output you get from compiling.