Trouble with a simple plug-in I wrote ...

Marc Powell marc at ena.com
Tue Mar 2 16:26:14 CET 2004


On Tuesday, March 02, 2004 7:08 AM, Novick, Jeff shared with us:

> Hi,
> I wrote a plug-in, although not complete to plug-in specs, I believe
> it should be working as it works from the command line. The problem
> is that it always exits with an unknown status, which is in the last
> two lines in the script, whenever it is executed from within nagios. 
> 
> I have build my first nagios (1.2) server but still have some legacy
> netsaint boxes running and would like to check that the netsaint
> process is still running. I also thought this would be a good test
> for writing a plug-in.   
> 
> The debug file from the scripts contains the following when run from
> the command line: --------------------------
> HOST: pingsaint1.tru.com
> COMMAND: /usr/local/netsaint/libexec/check_netsaint
> /usr/local/netsaint/var/status.log 5
> '/usr/local/netsaint/bin/netsaint' 
> ERRORS:
> RSH RESULTS:
>  NetSaint ok: located 7 processes, status log updated 2 seconds ago
> 
> --------------------------
> 
> and when executed from within NagIOS
> 
> --------------------------
> HOST: pingsaint1.tru.com
> COMMAND: /usr/local/netsaint/libexec/check_netsaint
> /usr/local/netsaint/var/status.log 5
> '/usr/local/netsaint/bin/netsaint' 
> ERRORS:
>  at /usr/local/nagios/libexec/check_netsaint.pl line 24 RSH RESULTS:


What's happening on or about line 24 of your script? Could it be that
whatever is being done there can not be done as the nagios user? More
importantly, does your script print a line to standard out and exit with
the proper exit code for Nagios to determine the status? There is
documentation on http://nagiosplug.sourceforge.net on how to properly
exit and/or you could look at an existing plugin.

--
Marc




-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list