Problems with nrpe2 signals and plugin cleanup

Einar Indridason einar.indrida at gmail.com
Tue Feb 26 11:24:29 CET 2008


On Mon, Feb 25, 2008 at 9:17 PM, Bill Moran <wmoran at collaborativefusion.com>
wrote:

>
> I'm writing a custom plugin for our application that runs under nrpe2.
>
> This bugger deals with a lot of data (potentially several G) thus nrpe2
> is configured with a large timeout (300s) and it's impractical to keep
> all the data in RAM, so I'm using temp files.
>
> My problem is that sometimes network problems cause the script to take
> longer than 300 seconds to run.  In this case, I want to receive an
> alert, so all is well.  The problem here is that nrpe2 terminates the
> script so the temp files are left lying around.
>

I had a similar need... A long running check might time out.  And apart from
pushing results to Nagios via NCSA, which I didn't use.  I solved this like:
   - On the machine in question, I run the long running test now and then,
possible with a lock file, to prevent more than one test running at the same
time.  The running test writes a status output to a known location.
   - The NRPE test is pretty basic, it checks the age of the status output
file, and if too old, it outputs WARNING or CRITICAL.  If the status output
file is not too old, the status file is read, and the output from that
status file is sent back.

--
EinarI
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20080226/ae62da69/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list