monit-general
[Top][All Lists]
Advanced

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

Re: monit unmonitor bug with check file match


From: Martin Pala
Subject: Re: monit unmonitor bug with check file match
Date: Fri, 9 Dec 2011 14:29:04 +0100

Hello Sergey,

the bug is fixed already, you can get the patched source code release here:
http://www.mmonit.com/tmp/monit-5.3.1p3.tar.gz

We'll release new official monit version soon which will include the fix.

Regards,
Martin




On Dec 9, 2011, at 2:24 PM, Sergey Bondarev wrote:

> Hello ,
> 
> monit 5.3.1
> config file:
> 
>  check file messages with path /var/log/pgbouncer.log
>    if match 'WARNING' then alert
>    if match 'WARNING' 10 times within for 60 cycles then exec "/bin/bash -c 
> '/usr/bin/monit unmonitor messages && /bin/sleep 600 && /usr/bin/monit 
> monitor messages'"
> 
> from log:
> [MSK Dec  9 16:33:25] info     : Shutting down monit HTTP server
> [MSK Dec  9 16:33:25] info     : monit HTTP server stopped
> [MSK Dec  9 16:33:25] info     : monit daemon with pid [21537] killed
> [MSK Dec  9 16:33:25] info     : 'd' Monit stopped
> [MSK Dec  9 16:33:25] info     : Starting monit daemon with http interface at 
> [*:2812]
> [MSK Dec  9 16:33:25] info     : Monit start delay set -- pause for 60s
> [MSK Dec  9 16:34:25] info     : Starting monit HTTP server at [*:2812]
> [MSK Dec  9 16:34:25] info     : monit HTTP server started
> [MSK Dec  9 16:34:25] info     : 'd' Monit started
> [MSK Dec  9 16:36:31] error    : 'messages' content match [WARNING 3 test 300]
> [MSK Dec  9 16:36:31] error    : 'messages' content match [WARNING 3 test 300]
> 
> ok.
> 
> and now i send cli-command
> monit unmonitor messages && sleep 120 && monit monitor messages
> 
> [MSK Dec  9 16:38:38] info     : 'messages' unmonitor on user request
> [MSK Dec  9 16:38:38] info     : monit daemon at 24359 awakened
> [MSK Dec  9 16:38:38] info     : Awakened by User defined signal 1
> [MSK Dec  9 16:38:38] info     : 'messages' unmonitor action done
> [MSK Dec  9 16:40:38] info     : 'messages' monitor on user request
> [MSK Dec  9 16:40:38] info     : monit daemon at 24359 awakened
> [MSK Dec  9 16:40:38] info     : Awakened by User defined signal 1
> [MSK Dec  9 16:40:38] info     : 'messages' monitor action done
> [MSK Dec  9 16:41:42] error    : 'messages' content match [WARNING monit test]
> [MSK Dec  9 16:41:42] error    : 'messages' content match [WARNING monit test]
>>>> [MSK Dec  9 16:41:42] info     : 'messages' content doesn't match 
>>>> [2011-12-08 00:22:34.317 16284 LOG Stats: 1149 req/s, in 199956 b/s, out 
>>>> 8718471 b/s,query 4592 us]
> [MSK Dec  9 16:41:42] error    : 'messages' content match [WARNING monit test]
> [MSK Dec  9 16:41:42] error    : 'messages' content match [WARNING monit test]
> [MSK Dec  9 16:41:42] error    : 'messages' content match [WARNING monit test]
> [MSK Dec  9 16:41:42] error    : 'messages' content match [WARNING monit test]
> [MSK Dec  9 16:41:42] error    : 'messages' content match [WARNING monit test]
> 
> 
> after re enabling monitor service, monit match content file from
> start (position=0), not from previous read position !!!
> 
> [/monit-5.3.1/src]# diff util.c util.c.orig
> 1762c1762
> < //        Util_resetInfo(s);
> ---
>>        Util_resetInfo(s);
> 
> С уважением,
> Бондарев Сергей
> ООО Фирма "Техно-Р" 
> т. +7(4732)539954                                 mailto:address@hidden
> 
> 
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general




reply via email to

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