[Top][All Lists]

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

Re: pidfile/start: wait for X cycles before restart

From: Martin Pala
Subject: Re: pidfile/start: wait for X cycles before restart
Date: Mon, 11 Jun 2007 22:25:53 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20070217 Iceape/1.1.1 (Debian-1.1.1-2)


the solution is to restart the service via monit (for example "monit restart myservice") ... this can be done easily by modification of the logrotate script for the given service.

This approach is natural and can be seen in many different process monitors as well - any mangling of the process should be done via the process monitor's interface. For example Sun Cluster or SMF behavior is the same, other cluster frameworks will behave most probably same way.


dAniel hAhler wrote:
> Hello,
> monitoring a service with "pidfile" and having a "start" command
> given, monit will start this process, if it does not exist anymore.
> I'd like to give a number of cycles for how long monit should wait
> before it restarts the service, similar to the general "[<X>] <Y>
> CYCLES". E.g., monit would wait for 1 cycle before restarting (instead
> of 0).
> The reason is just in the process of being manually restarted, e.g. by
> logcheck and monit should not conflict with it.
> I see that a workaround to this would be to no bypass monit in e.g.
> "logrotate" or when manually restarting a service, but think that this
> is only a workaround, no solution.
> I'm not sure if the optional <X> here would make sense and where to
> add it: maybe to the "start" command?
> What do you think?

reply via email to

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