Problems with nrpe2 signals and plugin cleanup

Bill Moran wmoran at collaborativefusion.com
Tue Feb 26 15:51:50 CET 2008


In response to "Einar Indridason" <einar.indrida at gmail.com>:

> 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.

We do this with some other checks, but I find it painfully convoluted and
prefer to avoid it.

Thanks for the suggestion.

-- 
Bill Moran
Collaborative Fusion Inc.
http://people.collaborativefusion.com/~wmoran/

wmoran at collaborativefusion.com
Phone: 412-422-3463x4023

-------------------------------------------------------------------------
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/




More information about the Developers mailing list