monit-general
[Top][All Lists]
Advanced

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

Re: restart process only if it isn't running 2 cycles in a row?


From: Martin Pala
Subject: Re: restart process only if it isn't running 2 cycles in a row?
Date: Tue, 26 Oct 2010 12:38:00 +0200

With monit 5.2.1 you can use this:

check process myapp ...
   if does not exist for 2 cycles then restart

(default is restart on 1st error)

When you installing new version of monitored appplication, it is better to 
disable its monitoring before you stop it:

monit unmonitor myapp

and as soon as upgrade is finished:

monit monitor myapp


Martin


On Oct 25, 2010, at 11:29 PM, bulbous wrote:

> 
> I'm wondering if there is any way to easily tell monit to restart a process
> only if it hasn't been running for 2 cycles in a row.
> 
> The scenario I'm thinking of is when we are deploying a new version of our
> application.  We shut it down briefly, and then bring up the new one.  It
> may take 20 seconds or so to bring up the new one, and I'd like to keep
> monit from attempting to restart it during that time.  (I have thought of
> some hack ways to do this, but it seems likely that monit has some way to
> specify this in the config -- am I right?)
> -- 
> View this message in context: 
> http://old.nabble.com/restart-process-only-if-it-isn%27t-running-2-cycles-in-a-row--tp30052057p30052057.html
> Sent from the monit-general mailing list archive at Nabble.com.
> 
> 
> --
> To unsubscribe:
> http://lists.nongnu.org/mailman/listinfo/monit-general




reply via email to

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