Urgent nagios plugin testing issue

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
kingshaul
Posts: 1
Joined: Sun Feb 20, 2011 7:15 am

Urgent nagios plugin testing issue

Post by kingshaul »

Hello everyone,
I use Nagios on a linux server and I wrote my own plugin in php.

I need a quick solution for these problems:
1. I need a way to make nagios run my php script by demand so I can debug it faster.
I tried setting all the intervals to 1 second so that Nagios will try invoking the script as it starts up but it doesn't work. I need to wait each time.
2. Nagios doesn't print to log service alerts if their status is OK. I need the output so I can know for sure that the test was executed.
3. Sometimes Nagios returns Return code of 126 is out of bounds - plugin may be missing. The script isn't missing and I don't know why.

Thanks for the help,
Shaul.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Urgent nagios plugin testing issue

Post by mguthrie »

Put the script in the same directory as your plugins and run it manually from the command line. Make sure the script has executable permissions and that it has the

#!/usr/bin/php

at the top so that the shell knows what to do with it.

Also look up on sourceforge for the Developer Guidelines for nagios plugins.
Locked