[Nagiosplug-devel] Re: Re: PluginHelp: php scripts give "Status:404"
Stanley Hopcroft
Stanley.Hopcroft at IPAustralia.Gov.AU
Mon Mar 7 01:41:05 CET 2005
Dear Sir,
I am writing to thank you for your letter and say,
On Mon, Mar 07, 2005 at 09:58:51AM +0100, Karim Vaes wrote:
> Anybody an idea how to get php checks working with nagios?
>
Service checks can be written in any language capable of
1 writing to stdout
2 calling the POSIX exit function.
Have you had a look at the plugin developers guide on the plugins page
on SourceForge ?
All your plugin needs do is
1 check the service somehow
2 report its conclusions to
2.1 Nagios by calling exit() with the appropriate return code
2.2 People by outputting some text.
Plugins only really have two problems
1 they don't work from the CLI (check $? and the message) - they just
plain don't work.
2 they don't work when Nagios runs them since the Path is wrong, Perms
are wrong etc
I expect I could write a plugin in MIX or on a (1003.1 compliant) Turing
Machine Simulator; PHP _must_ be easier than these and if it isn't there
are lots of good alternatives.
>From what you have posted, your problem looks like prob 2. UNKNOWN is
the status if
1 your plugin died somehow (eg raised a SEGV, was looping [killed by
Nag])
2 your plugin exited with return code 1 or 3.
Yours sincerely.
--
Stanley Hopcroft
IP Australia
Ph: (02) 6283 3189 Fax: (02) 6281 1353
PO Box 200 Woden ACT 2606
http://www.ipaustralia.gov.au
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: disclaimer.txt
URL: <http://nagios-plugins.org/archive/devel/attachments/20050307/e7c5638a/attachment.txt>
More information about the Devel
mailing list