No output in NagiosXI from command

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
cambevis
Posts: 25
Joined: Wed Nov 06, 2013 10:21 am

No output in NagiosXI from command

Post 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
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: No output in NagiosXI from command

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
cambevis
Posts: 25
Joined: Wed Nov 06, 2013 10:21 am

Re: No output in NagiosXI from command

Post 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!!! :)
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: No output in NagiosXI from command

Post by abrist »

Nice! Can we assume that this issue is indeed resolved?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked