[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
restart counter not working with check host ?
From: |
Eric Pailleau |
Subject: |
restart counter not working with check host ? |
Date: |
Mon, 14 Nov 2011 09:14:37 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20110620 Thunderbird/5.0b2 |
Hello,
I got a problem with Monit version 5.2.3 :
I have below monitoring set.
In the log I can see more than 3 restarts but the sms alert is never launch...
Is there something wrong with the "check host syntax" ?
Note : I'm not sure of what exit code the myscript returns
(I can see some 'exit' without any code in the script).
What the behaviour of monit with simple 'exit' ?
Is the restart counter dependant of start command return code ?
-------8<------------------------------------------------------------------
check host myscript with address 127.0.0.1
start program = "/bin/su - user -c '~/etc/init.d/myscript start'"
stop program = "/bin/su - user -c '~/etc/init.d/myscript stop'"
if 3 restarts within 3 cycles then exec "/root/scripts/sms_alert"
if failed port 33300 with timeout 30 seconds then restart
if 10 restarts within 10 cycles then timeout
depends on proxy
-------8<------------------------------------------------------------------
Thanks for your help.
Regards.