monit-general
[Top][All Lists]
Advanced

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

Re: [monit] Starting monit from rc script


From: Martin Pala
Subject: Re: [monit] Starting monit from rc script
Date: Wed, 21 Jan 2009 23:00:58 +0100

Yes, beta6 is current (replaced beta4).

The start all should be called after you started monit deamon.


On Jan 21, 2009, at 10:49 PM, Gilad Benjamini wrote:

- The site mentions beta6, and points only to it. You mention beta4. I
assume beta6 is the one to use
- Should I call "start all" before or after starting the daemon ?

Thanks
Gilad

-----Original Message-----
From: address@hidden
[mailto:address@hidden On
Behalf Of Martin Pala
Sent: Wednesday, January 21, 2009 1:04 PM
To: This is the general mailing list for monit
Subject: Re: [monit] Starting monit from rc script

"stop all" is necessary to stop the services gracefully if monit has
full control.

You are right that since monit-5.0_beta4 keeps the monitoring mode, it
will unmonitor all services (even non-manual) and will require "start
all" next time to enable monitoring.


On Jan 21, 2009, at 9:41 PM, Gilad Benjamini wrote:

With 5.0, will I still have to call "stop all" before stopping monit
?
AFAIK this would stop monitoring on these services (i.e. make them
"manual"), and would prevent
them from starting next time.

-----Original Message-----
From: address@hidden
[mailto:address@hidden
On
Behalf Of Martin Pala
Sent: Wednesday, January 21, 2009 12:06 PM
To: This is the general mailing list for monit
Subject: Re: [monit] Starting monit from rc script

You can disable starting of services from by init in given run
levels
and let monit start them.

By default the monitoring mode is automatic which will enable
monitoring of all service by default and if the service is not
running, it will start it. The "start all" command is thus not
necessary unless you have some services in manual monitoring mode.

There are important fixes in upcoming monit-5.0 (you can get beta
here:
http://mmonit.com/monit/dist/beta/

It fixes the described race condition where monit tried to start the
service but before the start was finished, the monitoring thread
detected that the service is not running and tried to restart it (in
parallel to pending start action).


Martin


On Jan 21, 2009, at 8:47 PM, Gilad Benjamini wrote:

Hi,
I am trying to find the right way to start monit on my system.
My requirements are simple: start all services at boot time, stop
all of
them when shutting down.
Using monit 4.10.1

The documentation recommends running monit from init. I find this
problematic as it lacks the flexibility of /etc/rc.d scripts to
determine
the order of execution. I can choose to run monit before or after
init
scripts, but nowhere in between.
Is there any way around it ?

Assuming there isn't, I have a few issues with my /etc/init.d/ monit
script

The FAQ includes a comment (suggested by myself...) to "start all"
as part
of the init script.
Should this be called before or after starting the monit daemon ?
I tried both combination. In both I seem to run into situations
where, by
the time the second command runs, services haven't completed their
startup,
and the second command tries to restart the service.
I tried this with both "start all" and "monitor all", with similar
results.

What's the clean solution ?
Perhaps to remove the state file and then start the daemon ? Will
that do it
? When monit starts, in the lack of a state file, does it assume
that all
services are monitored and should be started ?

Thanks in advance
Gilad







--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general



--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general



--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general



--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general



--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general





reply via email to

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