Page 1 of 1

Check interpretation in the GUI

Posted: Tue Jun 25, 2019 3:42 pm
by emartine
On the commandline I can run

/usr/local/nagios/libexec/check_nrpe -H <serverip> -c check_drivesize "perf-config=*(unit:g)" -a "crit=free<10%" "warn=free<15%" drive=all-drives "filter=type in ('fixed')"
OK All 2 drive(s) are ok|'C:\ free'=18.86457GB;13.48491;8.98994;0;89.89941 'C:\ free %'=21%;15;10;0;100 'E:\ free'=13.53947GB;7.49955;4.9997;0;49.99706 'E:\ free %'=27%;15;10;0;100

or

/usr/local/nagios/libexec/check_nrpe -H <serverip> -c check_drivesize "perf-config=*(unit:g)" -a "crit=free<10%" "warn=free<15%" drive=all-drives "filter=type in ('fixed')" exclude=C:\\
OK All 1 drive(s) are ok|'E:\ free'=13.53947GB;7.49955;4.9997;0;49.99706 'E:\ free %'=27%;15;10;0;100

This works fine. In the GUI however I get a Notice.

My command is this without giving it any arguments

$USER1$/check_nrpe -H $HOSTADDRESS$ -c check_drivesize "perf-config=*(unit:g)" -a "crit=free<10%" "warn=free<15%" drive=all-drives "filter=type in ('fixed')" exclude=C:\\

Clicking on Run Check Command gets

/usr/local/nagios/libexec/check_nrpe -H <serverIP> -c check_drivesize "perf-config=*(unit:g)" -a "crit=free<10%" "warn=free<15%" drive=all-drives "filter=type in ('fixed')" exclude=C:\\

Notice: Undefined variable: output in /usr/local/nagiosxi/html/includes/components/ccm/command_test.php on line 180


Any idea what is going on?

Re: Check interpretation in the GUI

Posted: Tue Jun 25, 2019 4:13 pm
by lmiltchev
Have you enabled error logging by chance in the /etc/php.ini file?

Make sure you have:

Code: Select all

display_errors = Off

Re: Check interpretation in the GUI

Posted: Tue Jun 25, 2019 4:55 pm
by emartine
I added the command you gave me but I am still getting the Notice. Screenshot attached.

Re: Check interpretation in the GUI

Posted: Wed Jun 26, 2019 10:10 am
by jomann
You should restart apache to apply the display errors change in the php.ini, however it looks like the error is coming from the help doc section of the command_test.php file. When you click the run check command does it ever return the values from the check?

Re: Check interpretation in the GUI

Posted: Wed Jun 26, 2019 2:12 pm
by emartine
I restarted httpd and now the command is just blank.

Re: Check interpretation in the GUI

Posted: Wed Jun 26, 2019 2:34 pm
by jomann
What version of XI are you using? Normally commands run through the cmdsubsys so you should be able to run a tail -f /usr/local/nagiosxi/var/cmdsubsys.log and watch when you click the run button to see if there is some sort of error happening.