I currently use the nagios.cfg defaults:
log_rotation_method=d
log_archive_path=/usr/local/nagios/var/archives/
I get nagios-<MM>-<DD>-<YYYY>-00.log as expected once per day. Is there a setting to say only archive the last 30 or 60 days (i.e. 30 day rotating archive)? My other option would be to set up a cron job to remove any Nagios archive file older than 30 or 60 days. Is the log archive designed to keep going until there is no room left on the partition?
Thanks.
Nagios Log Archive Maintenance
-
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Nagios Log Archive Maintenance
No nagios options.
in cron should do fine for you. Adjust 365 as you see fit.
Code: Select all
find /usr/local/nagios/var/archives -mtime +365 -exec rm {} \;