Problem with Log rotation

I did a search and was unable to find anything on this.

I am having a problem with log rotation, Nagios is creating the new log files but the ‘current’ log file still contains all of the old alert records.

Does anyone have any ideas as to what is happening?

Here is a example of the alert history problem.

Log File Navigation
Fri Dec 19 00:00:00 MST 2008
to
Present…

File: nagios.log

December 19, 2008 14:00 	

Program Start[12-19-2008 14:40:21] Nagios 2.11 starting… (PID=22828)
Program End[12-19-2008 14:40:21] Caught SIGTERM, shutting down…

December 19, 2008 13:00 	

Program Start[12-19-2008 13:56:18] Nagios 2.11 starting… (PID=5143)
Program End[12-19-2008 13:56:17] Caught SIGTERM, shutting down…

December 18, 2008 14:00 	

Program Start[12-18-2008 14:16:31] Nagios 2.11 starting… (PID=19619)
Program End[12-18-2008 14:16:29] Caught SIGTERM, shutting down…

December 03, 2008 17:00 	

Program Start[12-03-2008 17:02:53] Nagios 2.11 starting… (PID=4427)
Program End[12-03-2008 17:02:51] Caught SIGTERM, shutting down…

December 02, 2008 16:00 	

Program Start[12-02-2008 16:51:30] Nagios 2.11 starting… (PID=1858)
Program End[12-02-2008 16:51:29] Caught SIGTERM, shutting down…

December 01, 2008 10:00 	

Program Start[12-01-2008 10:09:02] Nagios 2.11 starting… (PID=22593)
Program End[12-01-2008 10:09:02] Caught SIGTERM, shutting down…

How didi you set the log_rotation_method option in nagios.cfg

Sorry, yes log_rotation_method=d. Like I said it creates the new files it just does not clean out the original when it does.

Hm, very strange, haven’t seen this ever…
Have you tried to reinstall Nagios or check the permissions on the nagios.log file and it’s folder?

I have not tried to reinstall nagios, the file is set to:

ls -la nagios.log

-rw-r–r-- 1 nagios nagios 2704710 2008-12-23 08:40 nagios.log