FW: log rotation - how many files are kept?

Marc Powell marc at ena.com
Thu Jan 18 15:00:48 CET 2007



> -----Original Message-----
> From: nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-
> bounces at lists.sourceforge.net] On Behalf Of Sjaak Nabuurs
> Sent: Thursday, January 18, 2007 6:49 AM
> To: Wheeler, JF (Jonathan)
> Cc: nagios-users at lists.sourceforge.net
> Subject: Re: [Nagios-users] FW: log rotation - how many files are
kept?
> 
> 
> 
> Wheeler, JF (Jonathan) wrote:
> 
> >-----Original Message-----
> >From: nagios-users On Behalf Of Stijn Gruwier
> >Sent: 18 January 2007 07:37
> >


> >I also came across this problem and have written a script to organise
> >our archived logs.  At present I run it manually, but it could be a
cron
> >script.  What is does is to keep up to 180 logs (1 per day for 6
> >months), but all but most recent 5 are zipped.  The numbers in the
> >previous sentence are parameters at the head of the script.
> >Unfortunately the form of the name of the archived logs is not
suitable
> >for processing with standard logrotate.  I am happy to let others use
> >this script if a) no one has anything better, and b) if someone can
tell
> >me where to submit it.
> >
> >
> Is it not that nagios is extracting data from these logs for different
> type reporting ?

Yes, nagios uses the archived log files for historical reporting
(availability, etc) and expects them to have a particular name and be in
a particular location. If you modify either then you break the reports*.
Since the furthest time period you can go back in the reports is 'Last
Year', you'd need at most 2 years of log files to obtain accurate
reports. If you don't need reporting for that long, it's a simple matter
to use find to remove or move old logs.

* location is special in that you can specify the directory that
contains all the archive log files in nagios.cfg

--
Marc

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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