Page 1 of 1

snmp walk works but snmp get doesnt

Posted: Wed Dec 19, 2018 11:45 am
by benhank
Ok so I have run the snmp walk wizard:
Capture.PNG
And it worked just fine.
however...

Code: Select all

[root@lkennagiost01 ~]# /usr/local/nagios/libexec/check_snmp -H 172.22.191.190 -C I$ilonpublic -P 2c -o enterprises.12124.2.52.1.5.1
SNMP problem - No data received from host
[update]
I have verified that the receiving server is correct configured to receive snmp queries, my network guys have assured me that there are no issues with our firewalls, I have iptables disabled on my test box, which is polling other devices via snmp.
I just dont get why xi can do a snmpwalk and get the data I need, but the checks that I create with the wizards fail, and running the check from the command line fails.

Re: snmp walk works but snmp get doesnt

Posted: Wed Dec 19, 2018 5:30 pm
by tgriep
Try increasing the timeout for the check_snmp plugin by adding -t 59 to the command and see if that works.

Re: snmp walk works but snmp get doesnt

Posted: Wed Dec 19, 2018 5:36 pm
by tgriep
Another thing to try is to put single quotes around the community string as it has a $ in it.

Code: Select all

 /usr/local/nagios/libexec/check_snmp -H 172.22.191.190 -C 'I$ilonpublic' -P 2c -o enterprises.12124.2.52.1.5.1
The wizard is escaping and that is why it is working there.

Re: snmp walk works but snmp get doesnt

Posted: Thu Dec 20, 2018 11:16 am
by benhank
200w.gif
Another thing to try is to put single quotes around the community string as it has a $ in it.

Code: Select all
/usr/local/nagios/libexec/check_snmp -H 172.22.191.190 -C 'I$ilonpublic' -P 2c -o enterprises.12124.2.52.1.5.1

Capture.PNG
200.gif

THANKS MAN!

Re: snmp walk works but snmp get doesnt

Posted: Thu Dec 20, 2018 11:28 am
by benhank
you can lock it up WHO00ooooOOOOOO!