monit-general
[Top][All Lists]
Advanced

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

Re: Restarting service on http request timeout


From: Tino Hendricks
Subject: Re: Restarting service on http request timeout
Date: Wed, 14 Sep 2016 10:01:14 +0200

I’ve only been successful with something like (translated to your data)

   if failed url
       http://www.binostore.com/index.php
       and content == 'whatever_text_you_normally_get'
       then alert


Take care

Tino



Am 14. September 2016 um 09:48:52, Fabio Bozzo 
(address@hidden(mailto:address@hidden)) schrieb:

>  
> One of my monit configuration files looks like that:
>  
> check process lucee with pidfile /opt/lucee/tomcat/work/tomcat.pid start 
> program = "/etc/init.d/lucee_ctl start" with timeout 60 seconds stop program 
> = "/etc/init.d/lucee_ctl stop" if failed host 
> www.binostore.com(http://www.binostore.com) port 80 with protocol http and 
> request "/" with timeout 10 seconds then restart  
>  
> It actually works when process crashes or is killed.
>  
>  
> Unfortunately, the second part doesn't work at all!
>  
>  
> I want monit to ping the homepage of my website and restart immediately in 
> case it takes more than 10 seconds to give a response.
>  
>  
> I tried putting a "sleep(15)" in the homepage to simulate performance 
> degradation, with no luck: I didn't see anything happening in monit.log.
>  
>  
> Thank you --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general



reply via email to

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