Deletion of the performance data log files.

Ben Clewett Ben at clewett.org.uk
Tue May 18 12:12:40 CEST 2004


Dear group,

I have a problem parsing the Nagios performance data and wonder if any 
member can suggest a solution.  These have the default file names 
'serviceperf.log' and 'hostperf.log'.

I wish to parse and delete these every minute.  But I cannot delete them 
as Nagios holds the file open.  Stopping and starting Nagios every 
minute is not really an option.

Really I want to pass a command to Nagios to request the deletion of 
these files.  However, if there is a delay between Nagios getting the 
command, and Nagios deleting the files, information will be lost. 
Because my program is sitting waiting for the deletion without parsing.

Ideally, I would want Nagios to write to a tmp file, then on getting a 
command, close the file, move it to the true file, and open up a new tmp 
file for it's self.  Or get Nagios to continuously close the file after 
every write, making it delete-safe.  But this might effect performance??

If any member has any ideas, I would be extremely interested.

Kind regards, Ben.


-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click




More information about the Developers mailing list