Page 1 of 1

web GUI and command differ in snmp test results

Posted: Tue Apr 15, 2014 3:15 pm
by tecnalb
OK, so earlier I figured out how to perform an alternate test of a host being up... I configured another host the same way, but my command fails ONLY IN THE GUI. It passes from the command line:

Command line:

nagios libexec]# ./check_snmp -H xx.xx.xx.xx -p 161 -P 2c -C public -m DISMAN-EVENT-MIB -o sysUpTimeInstance -r "Timeticks"
SNMP OK - Timeticks: (555273800) 64 days, 6:25:38.00 |


GUI:

COMMAND: /usr/local/nagios/libexec/check_smtp -H xx.xx.xx.xx -p 161 -P 2c -C public -m DISMAN-EVENT-MIB -o sysUpTimeInstance -r "Timeticks"
OUTPUT: Usage:check_smtp -H host [-p port] [-e expect] [-C command] [-f from addr][-A authtype -U authuser -P authpass] [-w warn] [-c crit] [-t timeout]
[-S] [-D days] [-n] [-v] [-4|-6]


Any ideas?

Re: web GUI and command differ in snmp test results

Posted: Tue Apr 15, 2014 3:20 pm
by tecnalb
Let me clarify one item....

The first system I configured, I used the SNMP Walk wizard.

This one (with the failing GUI) I used the router/switch wizard.

I examined both hosts in the GUI to ensure the fields are the same, yet this one fails from the GUI.

Re: web GUI and command differ in snmp test results

Posted: Tue Apr 15, 2014 4:50 pm
by sreinhardt
First thing I would note, is that your second command is check_smtp not check_snmp. Second item, I would highly suggest against using the test command button as it is not run via the nagios daemon, but instead via apache and a php script which will potentially alter your command.

Re: web GUI and command differ in snmp test results

Posted: Tue Apr 15, 2014 4:55 pm
by tecnalb
OK, yea, that would make sense... I have stared at that 1000 times today.... I'll go bury my head in the sand now...

Re: web GUI and command differ in snmp test results

Posted: Tue Apr 15, 2014 5:02 pm
by tmcdonald
We've all had long days :)

I'll be closing this thread now, but feel free to open another if you need anything in the future!

Re: web GUI and command differ in snmp test results

Posted: Tue Apr 15, 2014 5:04 pm
by sreinhardt
Ha, it's ok, it happens to us all! Let us know how it goes.