monit-general
[Top][All Lists]
Advanced

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

Re[2]: monit unmonitor bug with check file match


From: Sergey Bondarev
Subject: Re[2]: monit unmonitor bug with check file match
Date: Wed, 14 Dec 2011 16:47:11 +0400

Hello Martin,

Friday, December 9, 2011, 5:29:04 PM, you wrote:

Senk you.

This bag is fixed, but
on first start of monit, when no file "id" and "state"

monit check file scanning log file from beginning, and alerting on messages in 
the past

In documentation say: "On startup the read position is set to the end
of the file and Monit continue to scan to the end of file on each cycle"

MP> Hello Sergey,

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

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

MP> Regards,
MP> Martin




MP> 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



С уважением,
 Бондарев Сергей
 ООО Фирма "Техно-Р" 
 т. +7(4732)539954                                 mailto:address@hidden




reply via email to

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