monit-general
[Top][All Lists]
Advanced

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

Re: Is it possible to temporarily time out?


From: Michael Johnson - MJ
Subject: Re: Is it possible to temporarily time out?
Date: Fri, 25 Jan 2013 02:42:39 -0800

I don't know of a way to do eactly what you are asking, but I have suggestion that might be suitable for your situation.  You could simply delay attempts between restarts to make it never try to restart once every 15 minutes.  To do this, you would simply add 'with timeout 900' to the end of your 'restart = /etc/init.d/apache2' line (or what every your restart line is.  This will cause apache to still get checked every cycle, but never try to restart more than once every 15 minutes.

Like I said, it's not exactly what you were asking for, but it seems like it might serve your purpose.



On Thu, Jan 24, 2013 at 4:14 AM, Callum Macdonald <address@hidden> wrote:
We had a network outage on one of our servers this week. The result was
that when monit tried it's usual HTTP check to the server's IP, the
check failed. Monit then tried to restart apache, but the check still
failed. Monit tried a few times and then hit the timeout wall. We have a
"if X restarts in X checks, timeout" rule.

I'm realising it's probably a bad thing to be constantly restarting
apache, but also probably worse to timeout on a production machine.

I'm wondering if there's a way we can timeout for say 15 checks. So
instead of unmonitoring the service altogether, just unmonitor it for a
while, and then monitor it again and repeat.

I guess I could hack something up to this effect using cron and monit
status / monit monitor, but wondered if there was such a feature in
monit already, or plans to implement something like that.

Cheers - Callum.



--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general



--
Michael Johnson - MJ

reply via email to

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