delete old logfiles
Marc Powell
marc at ena.com
Sun Mar 27 18:12:30 CEST 2005
> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of richard lucassen
> Sent: Sunday, March 27, 2005 4:07 AM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] Re: delete old logfiles
>
> On Sat, 26 Mar 2005 18:25:07 -0600
> "Marc Powell" <marc at ena.com> wrote:
>
> > > The log are rotated daily, but older logs are still kept in the
> > > "archives" directory. Is there a Nagios-way to get rid of old
> > > logfiles other than a daily cronjob starting
> > >
> > > find /var/log/nagios/archives/ -mtime +${LOG_MAX_DAYS} -exec rm -f
> > > {}
> > \;
> > >
> > > to delete these older logfiles?
> >
> > No, there isn't. Be aware that all of Nagios' historical data is
> > maintained in those log files so you would be removing the
information
> > used to generate many of the reports. Reports will still run but
will
> > only include information in existing log files.
>
> Of course, but what happens if nagios is running for a few months
> checking hundreds of sites? Nagios will sooner or later fill up your
> '/var' partition. That's not a very good idea IMHO ;-)
Seriously? It's not as if you are completely helpless here... Create or
use a partition that is more suited to whatever retention schedule you
are wanting. That should be an obvious solution.
[nagios at betelgeuse var]$ pwd; du -sh archives/
/usr/local/nagios/var
1.7G archives
The above directory contains archives beginning in June of 2002 for
about 2800 services on 1800 devices. It's overkill as the standard
reports will go back no further than 2 years but I need to keep about 5
years worth. I still have > 10 Gigs of space for archive storage and
another 17 or so years to go before I have to worry about space.
--
Marc
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
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