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: Gilad Benjamini
Subject: RE: [monit] Starting monit from rc script
Date: Wed, 21 Jan 2009 12:16:58 -0800

This can lead to a race condition (mentioned by Martin in his response),
where, by the time monit starts the services haven't completed their
startup, and monit concludes that they are not running.


> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On
> Behalf Of rory
> Sent: Wednesday, January 21, 2009 12:05 PM
> To: This is the general mailing list for monit
> Subject: Re: [monit] Starting monit from rc script
> 
> Since you need init scripts anyway, have your init scripts start
> everything in the order they need to be started and start monit last.
> 
> 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





reply via email to

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