[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
timestamp test not work
From: |
Tatsuya Nonogaki |
Subject: |
timestamp test not work |
Date: |
Sat, 24 Mar 2007 17:23:28 +0900 |
Show me the way, please.
It seems that Monit(4.9) ignores `timestamp <operator> SECOND'
test if 'changed timestamp' test is used in the same check block.
With the definition below, log shows only 'apache_stat timestamp
was changed' and timestamp <op> rule does nothing;
check file apache_stat path /var/monit/apache.stat
group www
if timestamp < 90 seconds 3 times within 3 cycles
then exec "/sbin/ifdown eth0"
else if passed 2 times within 2 cycles
then exec "/sbin/ifup eth0"
if changed timestamp 8 times within 8 cycles
then unmonitor
When I delete 'changed timestamp' test (last two lines),
'timestamp < 90 seconds' works as I expected. Monit logs
'apache_stat timestamp test faild'.
Monit is run in daemon mode with interval 60 sec.
apache.stat file is 'touch'ed every time apache is restarted by
the CHECK below;
check host apache address localhost
group www
depends on apache_stat
if failed port 80 protocol HTTP
request "/monitcheck/token" timeout 10 seconds
then exec "/etc/monit.d/restart_apache"
where restart_apache is a short shell script;
#!/bin/sh
/etc/rc.d/init.d/httpd restart
touch /var/monit/apache.stat
Eventually what I want to do is;
*1) Restart apache if it is not functional,
*2) Three consecutive restarts make this server invisible by
means of PING from other hosts (load balancer treatment),
*3) Make it visible again when apache came back certainly,
*4) But too many malfunctions make Monit UNMONITOR these checks.
What is a solution?
~//^^//^^//^^//^^//^^//^^//^^//^^//^^//^^//^^//^^//^^//^^//^^//
Tatsuya Nonogaki
E-Mail: address@hidden
H-Page: http://www.asahi-net.or.jp/~aa4t-nngk/
~//^^//^^//^^//^^//^^//^^//^^//^^//^^//^^//^^//^^//^^//^^//^^//
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- timestamp test not work,
Tatsuya Nonogaki <=