Page 1 of 1

log rotation

Posted: Tue Jun 29, 2010 11:20 pm
by csb999
I am using 3.2.1 with:

Code: Select all

log_rotation_method=d
log_archive_path=/usr/nagios/var/archives
perms on /var/log/nagios.log are 664 (nagios/nagios)

Each day, nagios archives the file /var/log/nagios.log to the specified archive path, but doesn't remove the original. What ends up happening is that the existing /var/log/nagios.log is appended to forever. I have turned on debugging (level=-1 with verbosity=2) but don't see anything obvious. So, I'm assuming this is not the expected behavior... ideas?

Re: log rotation

Posted: Thu Jul 15, 2010 3:58 pm
by jimavery
Check the permissions on the parent directory. If the nagios daemon doesn't have write permission it won't be able to delete the file.

I think there was a thread on this subject fairly recently on the nagios-users email list. If you're still stuck check out the archives at https://lists.sourceforge.net/lists/lis ... gios-users and consider joining the email list - for the time being it's busier there than it is here.