<br><br><div class="gmail_quote">On Mon, Feb 25, 2008 at 9:17 PM, Bill Moran <<a href="mailto:wmoran@collaborativefusion.com">wmoran@collaborativefusion.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
I'm writing a custom plugin for our application that runs under nrpe2.<br>
<br>
This bugger deals with a lot of data (potentially several G) thus nrpe2<br>
is configured with a large timeout (300s) and it's impractical to keep<br>
all the data in RAM, so I'm using temp files.<br>
<br>
My problem is that sometimes network problems cause the script to take<br>
longer than 300 seconds to run.  In this case, I want to receive an<br>
alert, so all is well.  The problem here is that nrpe2 terminates the<br>
script so the temp files are left lying around.<br>
</blockquote><br>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:<br>   - 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.<br>
   - 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.<br>
<br>--<br>EinarI<br><br></div><br>