Issue with plugins

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
developerx9
Posts: 20
Joined: Sun Jun 05, 2016 9:07 am

Issue with plugins

Post by developerx9 »

Hi,

We are currently migrating our hosts from 2012.R9 to the latest version of nagios.
We have a bunch of custom checks, and it appears most of them (all of them?) are failing.

example:
(No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_json, ...) failed. errno is 2: No such file or directory

Even though:

# ls -lah /usr/local/nagios/libexec/check_json
-rwxr-xr-x 1 apache nagios 2,4K Svi 6 2015 /usr/local/nagios/libexec/check_json


In the commands conf we have:

define command {
command_name check_json
command_line $USER1$/check_json -h $HOSTADDRESS$ -p $ARG1$ -u $ARG2$
}


And service is defined within the hosts properly.

When I execute it via command line, it works fine:

root@nagios:/usr/local/nagios/libexec
# ruby ./check_json -h 10.11.12.13 -p 8080 -u /check
Service is running


Not sure what's the issue here. Any help would be appreciated.
developerx9
Posts: 20
Joined: Sun Jun 05, 2016 9:07 am

Re: Issue with plugins

Post by developerx9 »

So, this happened.

This is a ruby script, and location was specified as "#!/usr/local/bin/ruby" , while this machine was running /usr/bin/ruby.
Error is kind of misleading imho, but at least we figured it out.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Issue with plugins

Post by hsmith »

Thanks for letting us know what the fix was. Would you like us to close this thread?
Former Nagios Employee.
me.
developerx9
Posts: 20
Joined: Sun Jun 05, 2016 9:07 am

Re: Issue with plugins

Post by developerx9 »

Hi,

Sorry for the late reply.
Sure thing - it's resolved now.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Issue with plugins

Post by mcapra »

Closing this up!
Former Nagios employee
https://www.mcapra.com/
Locked