monit-general
[Top][All Lists]
Advanced

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

Re: How to check for a path in a url and restart runit if fails


From: Bernd Wurst
Subject: Re: How to check for a path in a url and restart runit if fails
Date: Thu, 12 Apr 2012 07:05:38 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1

Hi.

Am 11.04.2012 20:43, schrieb David Montgomery:
> I am trying to stress test my server.
> I have a process under the control of monit and runit.
> Here is my monit config file for the process
> 
> check process pixelServer
>    with pidfile "/etc/sv/pixelServer/supervise/pid"
>    start program = "/usr/bin/sv up pixelServer"
>    stop program = "/usr/bin/sv kill pixelServer"
>    if failed host 127.0.0.1/pixel port 80 protocol HTTP then exec "sv
> up pixelServer"
>    depends on nginx.
> 
> Here is the log....
> 
> I am checking process every 10 seconds.
> 
> [UTC Apr 11 18:29:37] error    : Error: Could not execute sv
> [UTC Apr 11 18:29:47] error    : 'pixelServer' failed, cannot open a
> connection to INET[127.0.0.1/pixel:80] via TCP

I read the other answers and wondered why nobody mentioned the
  IF FAILED URL
notation?

From you example, I think this is exacly what you should use.

See
http://mmonit.com/monit/documentation/monit.html#connection_testing_using_the_url_notation
for documentation.


- Bernd

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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