[Top][All Lists]

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

Re: Conditional services

From: Vadym Chepkov
Subject: Re: Conditional services
Date: Fri, 5 Feb 2016 05:13:16 -0500

I don't think 'unmonitor' would help here. We do need to monitor, but stop if running.


Sent from Android


you can use "mode manual" for services, which will be started only on request (can be automated):

# active/passive services cluster
check device hafs with path /dev/sdb1
    start program  = "/etc/ha.d/resource.d/ha-fs start"
    stop program  = "/etc/ha.d/resource.d/ha-fs stop"
    if space usage > 80% then alert
    mode  manual
    group ha

check process postgresql with pidfile /var/run/
    start program = "/etc/init.d/postgresql start"
    stop program  = "/etc/init.d/postgresql stop"
    depends hafs
    mode  manual
    group ha

you can then enable the monitoring using "monit -g ha monitor all"  and disable it using "monit -g ha unmonitor all"


> On 04 Feb 2016, at 12:52, Vadym Chepkov <address@hidden> wrote:
> Hi,
> Can somebody give an advice how to implement active/standby configuration using monit.
> There are some services which can't run from multiple locations for various reasons. To solve this problem, we have a script, which can be used to check if current location is active or standby via exit code. cron wrapper uses it to determine if cron job should run or not, for instance.
> But how does one tell monit to start/monitor  services if server becomes active and stop, make sure they are not running if server is in standby mode.
> This should be applied only to 'volatile' services, not all of them.
> Thank you.
> Cheers,
> Vadym
> --
> To unsubscribe:

To unsubscribe:

reply via email to

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