delete old logfiles

richard lucassen mailinglists at lucassen.org
Sun Mar 27 12:06:38 CEST 2005


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 ;-)

R.

-- 
___________________________________________________________________
Mac OS X proves that it's easier to make UNIX pretty than it is to
make Windows secure.

+------------------------------------------------------------------+
| Richard Lucassen, Utrecht                                        |
| Public key and email address:                                    |
| http://www.lucassen.org/mail-pubkey.html                         |
+------------------------------------------------------------------+


-------------------------------------------------------
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_id=6595&alloc_id=14396&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