Nagios check syntax

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
alceryes
Posts: 41
Joined: Wed Sep 28, 2011 11:05 am

Nagios check syntax

Post by alceryes »

Is there a way see the actual command that Nagios runs when it performs a check? I have a situation where a check works perfectly if I run it manually but it always fails when Nagios runs the check.

TIA!
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: Nagios check syntax

Post by jsmurphy »

I'm assuming this is related to your exchange post but for the sake of others who might search the forums for the answer... You can run "su - nagios" to swap to impersonate the Nagios user and run the commands yourself. Usually Nagios failing to run a command is the result of a permissions issue on the script or a permissions issue with a command line utility in the script.

It can also however be caused by the embedded Nagios perl processor if it is a perl script in rare circumstances, if you think that may be the case try turning off the embedded processor in your nagios.cfg.
alceryes
Posts: 41
Joined: Wed Sep 28, 2011 11:05 am

Re: Nagios check syntax

Post by alceryes »

Could you give me some more info on turning off the embedded pearl processor?

TIA!
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: Nagios check syntax

Post by jsmurphy »

In your nagios.cfg file there will be a line named something along the lines of enable_embedded_perl=1 change it to 0 and that will disable the embedded processor.
Locked