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: Andrew Holt
Subject: Re: Add a service in unmonitored state
Date: Fri, 15 Jul 2011 15:58:46 +0100

Hi,

Is there some way a start script for “myservice” could know it had been 
configured ? e.g the existence of a config file.

The existence of this plus "monit summary | grep myservice”

So if the config exists & monit does not control it then monit reload

HTH,
Andrew

On 15 Jul 2011, at 14:49, 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
> 

=============================
Andrew Holt

Email: address@hidden

De Omnibus Dubitandum
=============================






reply via email to

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