web GUI and command differ in snmp test results

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
tecnalb
Posts: 133
Joined: Tue May 03, 2011 12:53 pm

web GUI and command differ in snmp test results

Post 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?
tecnalb
Posts: 133
Joined: Tue May 03, 2011 12:53 pm

Re: web GUI and command differ in snmp test results

Post 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.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: web GUI and command differ in snmp test results

Post 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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
tecnalb
Posts: 133
Joined: Tue May 03, 2011 12:53 pm

Re: web GUI and command differ in snmp test results

Post 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...
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: web GUI and command differ in snmp test results

Post 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!
Former Nagios employee
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: web GUI and command differ in snmp test results

Post by sreinhardt »

Ha, it's ok, it happens to us all! Let us know how it goes.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked