log rotation

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
csb999
Posts: 1
Joined: Fri Jun 18, 2010 8:41 am

log rotation

Post 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?
jimavery
Posts: 15
Joined: Thu Jul 15, 2010 2:40 pm

Re: log rotation

Post 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.
Locked