how to clean nagios tar file good

Marc Powell marc at ena.com
Wed Aug 17 17:08:31 CEST 2005



> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of jotando at free.fr
> Sent: Wednesday, August 17, 2005 4:47 AM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] how to clean nagios tar file good
> 
> Hi everyone,
> 
> Westerday by boss ask me about the capability to clean the nagios log
> files or
> shedule a period like every 12 month it raise the files of the least
13th
> month(only this 13h month like january 2004 if you are on january
2005) to
> able
> to view only the notification of each year and don't store all.
> 
> I thinks I wasn't too clear but if you have a subject that's look like
an
> answear please let me know that cause I've to stop my job at the end
of
> this
> month.

You can't within nagios but 'find' + 'cron' is your friend --

0 15 * * * /usr/bin/find /usr/local/nagios/var/archives/ -mtime +396
-type f -exec \rm {} \; &> /dev/null

The above should check and delete any archive files older than 396 days
(1 year + 31 days).

--
Marc


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
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