monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: monit & log rotation


From: Jan-Henrik Haukeland
Subject: Re: monit & log rotation
Date: Wed, 25 Jul 2007 17:30:04 +0200

On 25. jul. 2007, at 16.20, Nick Upson wrote:

I have defined a log for monit to write and it does but when logrotate
moves the first log aside monit continues to write to the old file
with the new name.

I tried doing a "monit reload" which usually works but sometimes monit
seems to get confused and stop writing to any logfile at all.

Can someone please tell me what I'm doing wrong

Unfortunately there is a bug in monit 4.9 that after a monit reload has the log function use an uninitialized mutex. Sounds like you found that bug :) It is fixed in CVS and you can try this snapshot version of monit:

http://tildeslash.com/monit/dist/snapshot/monit-4.10-cvs.tar.gz

Otherwise, after a logrotate, calling 'monit reload' is the correct way to do this. This way, monit reopens its log file. If you don't call 'monit reload' monit will continue writing to the old log file even if it was renamed.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]