Page 1 of 1

No output in NagiosXI from command

Posted: Sat May 16, 2015 3:37 pm
by cambevis
I've got a new plugin I'm trying to get running. I've done quite a few that ran through NRPE on another machine. I'm running this one on the local Nagios server, first one I've done custom on the local server, should be even easier?
The code just basically runs a sql query, getting a scalar value back and writing a message, exiting with 0,1,2 (etc. ).

Here's the output from the command line.

[nagios@nagiosxi ~]$ mono /usr/local/nagios/libexec/GenericSqlPlugin/GenericSqlPlugin.exe /usr/local/nagios/etc/Config.xml
22 orders in GccOrders

Here are the perms

[nagios@nagiosxi ~]$ ls -la /usr/local/nagios/libexec/GenericSqlPlugin/
-rwsr-xr-- 1 root nagios 7168 May 16 09:17 GenericSqlPlugin.exe
-rwsr-xr-- 1 root nagios 209 May 16 09:17 GenericSqlPlugin.exe.config


Here's what Nagios says during test.

Testing check from command line...

COMMAND: mono /usr/local/nagios/libexec/GenericSqlPlugin/GenericSqlPlugin.exe /usr/local/nagios/etc/Config.xml
OUTPUT:

I can't see why the test wouldn't work.

Any help is welcome.

Cam

Re: No output in NagiosXI from command

Posted: Sun May 17, 2015 11:39 pm
by Box293
"Test Check Command" button in CCM doesn't always work. Best test is to Apply Configuration and then go and search for the service under Home > Details > Service Detail. Click on the service and then "Schedule a forced immediate check"

As for file permissions, I would try:

Code: Select all

chown -R nagios:nagcmd /usr/local/nagios/libexec/GenericSqlPlugin

Re: No output in NagiosXI from command

Posted: Mon May 18, 2015 11:08 am
by cambevis
Actually it still wasn't running correctly, but you are right, I got a better error message. Thanks!

Note to others as absent minded as I:
Make sure you have your command in the PATH!!! :)

Re: No output in NagiosXI from command

Posted: Mon May 18, 2015 11:13 am
by abrist
Nice! Can we assume that this issue is indeed resolved?