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: Eric Pailleau
Subject: Re: Add a service in unmonitored state
Date: Fri, 15 Jul 2011 17:12:41 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20110620 Thunderbird/5.0b2

Le 15/07/2011 15:49, Marco a écrit :
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.

Hello, don't know if it can help, but as far I can remember,
when specifying 'every x cycle' (on recent monit version until ???),
monit don't try to check the service immediately at start, but wait the x cycle 
to do it.

Personnaly I don't move file, only linking those I need :


In /etc/monit/monitrc I have :  include /etc/monit/plugins-enabled/*

In /etc/monit/plugins-available/  all my plugins for monit.

In /etc/monit/plugins-enabled/ are links in ../plugins-available/ to plugins 
that I want to be active.

APART
Only issue (may be it could be fixed in next release ?) 'include' needs at 
least one file, even empty.

So an empty file /etc/monit/plugins-enabled/keepme always exists.

It would be nice, like GNU Make, to have the difference between 'include' 
(Mandatory) and '-include' (Optional)... :>) ...
/APART

Maybe your daemon start script can link either a special one with 'every x 
cycle' (x can be high) in order to let manual config to be done,
and check the daemon a long time after, allowing a warning that config is left 
and daemon still not start (but the cycle is always x cycle in this case).
After configuration, a link to a 'normal' plugin (without x cycle) can be done 
and a monit reload done .

Service in each plugin must have different names, I guess...

Regards





reply via email to

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