monit-general
[Top][All Lists]
Advanced

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

Add a service in unmonitored state


From: Marco
Subject: Add a service in unmonitored state
Date: Fri, 15 Jul 2011 15:49:54 +0200

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.



reply via email to

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