I don't think 'unmonitor' would help here. We do need to monitor, but stop
if running.
Cheers,
Vadym
Sent from Android
Hi,
you can use "mode manual" for services, which will be started only on
request (can be automated):
--8<--
#
# 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/postgresql.pid
start program = "/etc/init.d/postgresql start"
stop program = "/etc/init.d/postgresql stop"
depends hafs
mode manual
group ha
--8<--
you can then enable the monitoring using "monit -g ha monitor all" and
disable it using "monit -g ha unmonitor all"
Regards,
Martin
> On 04 Feb 2016, at 12:52, Vadym Chepkov <[email protected]> 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:
> https://lists.nongnu.org/mailman/listinfo/monit-general
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general