[Top][All Lists]

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

Re: MONIT Startup

From: Martin Pala
Subject: Re: MONIT Startup
Date: Fri, 14 Feb 2003 15:59:04 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021203

I sent response yeasterday too, but it was lost somewhere on the net and didn't arrived to the list :(

There's yet again:

Hi Russell,

requested behavior can be satisfied by configuring these processes in 'manual' monitoring mode. If you request monit to start 'manual' mode services and they are already running, monit will just start monitoring them (enter active mode) without any initial intervention.

Correct order which will satisfy your needs:

1.) configure your services and set their monitoring mode to 'manual'
2.) configure monit to run from init (thereafter you can run 'telinit q' to start monit without whole system restart) 3.) start your services outside monit (monit won't monitor the service in that point - it will just wait to to be instructed to do so)
4.) start monit daemon
5.) as soon as you desided to start monitoring the sevices, you can run 'monit start [service]' which will enable services monitoring (in active mode). If the services are not running, monit will start them. If the services are already running, monit will just start monitoring them. I think the best way to do it is probably let monit start as last service (for example S99monit - optionaly with initial sleep) OR as you noted add monit's deamon startup at the end of your startup script.

NOTE: there's one problem regarded to monitoring which is stateless between monit restart in all monit's version (version 3.2 which is scheduled for monday included). This behavior has now workaround in 3.2 - if there are some 'manual' services running at the monit's daemon startup, monit will start monitoring them imediately the same way as if you called 'monit start [service]'. This workaround will work fine for you and won't affect your requested monit's behavior - only the step 5.) can be ommited in Monit 3.2 if the services are already running at monit's daemon startup. This will be fixed soon - i think we will solve it in upcoming 3.3 (discussed in more detail yeasterday on the developers list).


Jan-Henrik Haukeland wrote:

The trick is simply to start monit after all startup scripts has
started, as mentioned here by Mark:

Russell Adams <address@hidden> writes:

I'm configuring MONIT to run on my Gentoo servers, and had a
question. I'm trying to use MONIT to keep certain critical processes
running at all times.

I'd like MONIT to start with init, but not autostart the various
processes it should monitor. I'd like Gentoo's startup scripts to
finish loading everything, then MONIT start monitoring everything.

There are a few reasons for doing this, but the biggest is how picky
Gentoo's startup/shutdown procs are for individual programs. It caches

Is there a method to delay MONIT from starting active monitoring for 5
minutes after launch? Perhaps can i start MONIT in passive mode, and
then move to active? It would be bad for MONIT to start a service
before its been called in the startup.

Or finally, should I just set all my services to monitor as manual,
and as the last thing in the Gentoo start scripts call MONIT to start
them? Would MONIT choke if they were already started when its called
with the start parameter?



reply via email to

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