monit-general
[Top][All Lists]
Advanced

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

Re: Add a service in unmonitored state


From: Martin Pala
Subject: Re: Add a service in unmonitored state
Date: Fri, 15 Jul 2011 16:56:34 +0200

You can use the "mode manual" statement which keeps the service in unmonitored 
state until "monit monitor <service>" is called.

Regards,
Martin


On Jul 15, 2011, at 3:49 PM, Marco wrote:

> As the subject says, is it possible? I have a daemon that installs and
> drops some files under /etc/monit.d (to restart the daemon if it
> crashes). However, the program requires some manual configuration
> before being started, and during this time monit should not attempt to
> restart it.
> 
> So far I can only think of:
> 
> <add files in /etc/monit.d>
> monit reload
> monit unmonitor myservice
> 
> but that seems to be racy as some times the "unmonitor" command fails
> as monit hasn't read the new service definition yet; sleeping in
> between isn't good either since monit may be able to start the daemon
> during that time.
> 
> Alternatively, I may change the installation routine so monit isn't
> reloaded at install time, and edit the daemon's initscript so it
> issues a "monit reload" just after the daemon itself has started, but
> it doesn't look like the cleanest solution to me.
> 
> Any help is appreciated.
> 
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general




reply via email to

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