monit-general
[Top][All Lists]
Advanced

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

Re: Automatically starting dependent services


From: Martin Pala
Subject: Re: Automatically starting dependent services
Date: Sat, 1 Apr 2017 11:12:21 +0200

Hi,

i think it will be better to put the whole dependency group into one service 
group, for example:

        check process A with pidfile ...
                group mycluster

        check process B with pidfile ...
                group mycluster
                depends on A

        check process C with pidfile ...
                group mycluster
                depends on A

Now you can start/stop/restart the whole group (monit will handle the 
dependencies):

        monit -g mycluster stop
        monit -g mycluster start

Best regards,
Martin


> On 31 Mar 2017, at 18:00, dan <address@hidden> wrote:
> 
> Issue #248 reversed a bug which I would actually have found useful to
> remain in the code!
> 
> When a service is started, any dependent services are no longer started.
> I can see that this is the correct behaviour most of the time.
> 
> However, we sometimes have "helper" services, hanging off a main
> service, which everyone forgets about. They stop the main service with
> the client "monit stop main-service", fix this or that, and turn the
> main service back on again "monit start main-service" and forget that
> the helpers would now be stopped.
> 
> In this case auto-starting of dependents would be great. I'm considering
> writing a patch which adds syntax into the dependency line "with
> autostart", or somesuch, which re-enables this propagation for those
> dependencies.
> 
> Before I do so, is this a good idea? Is there some cunning method of
> getting this behaviour already such that a patch is not required? Any
> general guidelines for a newbie to the monit source for conditionally
> reversing #248?
> 
> At the moment we have to restart all to make sure everything is running,
> which isn't ideal as it's not symmetrical and maybe all slightly too
> many services? Also alerts help, but not getting into an alerting
> situation is better!
> 
> Thanks,
> Dan.
> 
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general




reply via email to

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