monit-general
[Top][All Lists]
Advanced

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

Re: PID file and restart only if not running for 2 cycles?


From: Raphael Bauduin
Subject: Re: PID file and restart only if not running for 2 cycles?
Date: Wed, 23 Feb 2011 15:52:16 +0100

On Wed, Feb 23, 2011 at 3:21 PM, Martin Pala <address@hidden> wrote:
> Hello,
>
> the config which you showed bellow is possible, it requires Monit 5.2 or 
> newer (latest is 5.2.4).
>
> The safe way is to disable monitoring during upgrade:
>
> 1.) monit unmonitor sphinx_searchd_myapp
> 2.) <perform upgrade>
> 3.) monit monitor sphinx_searchd_myap


ok, I was with 5.0.
thanks for the unmonitor tip! I'm discovering monit and wasn't aware of this.

Raph

>
>
> Regards,
> Martin
>
>
> On Feb 23, 2011, at 2:54 PM, Raphael Bauduin wrote:
>
>> Hi,
>>
>> I have a web application running sphinx, which is monitored by monit.
>> When deploying a new version of the app, we stop sphinx, deploy the
>> new code and restart sphinx.
>> Sometimes monit restarts sphinx during the deployment of the new code,
>> and when the deploy procedure wants to start sphinx, it complains it's
>> already running. To solve this, I would like to tell monit to restart
>> sphinx only if it is not running for 2 cycles. I have not found a way
>> to do that (I've seen example when testing services by trying to
>> connect to the tcp port eg, but not for plain pid checks). Here's the
>> kind of config I'd like to use (though this is not recognised by
>> monit):
>>
>> check process sphinx_searchd_myapp
>>  with pidfile /var/run/sphinx/myapp.pid
>>  if does not exist 5 cycles then restart
>>
>> Is this kind of config possible with "check process with pidfile"?
>>
>> Thanks
>>
>> raph
>> --
>> Web database: http://www.myowndb.com
>> Free Software Developers Meeting: http://www.fosdem.org
>>
>> --
>> To unsubscribe:
>> http://lists.nongnu.org/mailman/listinfo/monit-general
>
>
> --
> To unsubscribe:
> http://lists.nongnu.org/mailman/listinfo/monit-general
>



-- 
Web database: http://www.myowndb.com
Free Software Developers Meeting: http://www.fosdem.org



reply via email to

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