[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question about restart/stop
From: |
V.Krishn |
Subject: |
Re: Question about restart/stop |
Date: |
Tue, 5 Nov 2013 19:59:49 +0530 |
User-agent: |
KMail/1.13.7 (Linux/3.9.6-64; KDE/4.8.4; x86_64; ; ) |
On Tuesday, November 05, 2013 04:09:12 PM you wrote:
> If there will be standalone restart program, it'll also have some timeout
> => there is no difference between start/stop/restart in that point.
>
> If the stop/start timed out, the error event is send and Monit can retry
> next cycle.
Does that mean if in 30s "stop" does not succeed monit sends alert to global
email ?
So to avoid 'false positive alerts' one needs to set cycle explicitly ?
eg.
apache settings become:
check process apache with pidfile /var/run/httpd.pid
start program = "/etc/init.d/httpd start"
stop program = "/etc/init.d/httpd stop"
if failed port 80 then restart
if failed port 443 with timeout 15 seconds then restart
if failed port 80 for 3 times within 5 cycles then alert
if failed port 443 for 3 times within 5 cycles then alert
above would be ok, or do I need do if... then... else ?
--
Regards.
V.Krishn