I don't think 'unmonitor' would help here. We do need to monitor, but stop if running.
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
check process postgresql with pidfile /var/run/postgresql.pid
start program = "/etc/init.d/postgresql start"
stop program = "/etc/init.d/postgresql stop"
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
> 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.
> To unsubscribe: