[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
monit unmonitor bug with check file match
From: |
Sergey Bondarev |
Subject: |
monit unmonitor bug with check file match |
Date: |
Fri, 9 Dec 2011 17:24:13 +0400 |
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
- monit unmonitor bug with check file match,
Sergey Bondarev <=