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 18:59:18 +0200


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

Thanks, so if I always do a reload after the logrotate I can avoid the bug?

No, if you do a monit reload you will encounter the bug. The confusing bit here is that calling monit reload is the correct thing to do after a logrotate, but will provoke the bug. Update to the CVS version or quit and restart monit after logrotate.


On 25/07/07, Jan-Henrik Haukeland <address@hidden> wrote:
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]