How about something like this…
check program server-status with path /usr/local/bin/state.sh
every “5 * * * *"
if status = x then exec /usr/bin/bash -c "/usr/local/bin/foo.sh (x)”
if status = y then exec /usr/bin/bash -c "/usr/local/bin/foo.sh (y)"
‘state.sh” determines the
It has come to my mind to have two different configs, but I was hoping
monit had a more elegant solution. Thanks.
Cheers,
Vadym
Sent from Android
On Feb 4, 2016 7:47 AM, "Phil Townes" wrote:
> I use two different monit configuration files. One for standby state, and
> one for active state.
> In
then just replace "unmonitor" action with "stop" and "monitor" action with
"start"
Regards,
Martin
> On 05 Feb 2016, at 11:13, Vadym Chepkov wrote:
>
> I don't think 'unmonitor' would help here. We do need to monitor, but stop if
> running.
>
> Cheers,
> Vadym
>
> Sent from Android
>
> Hi
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 /
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"
I use two different monit configuration files. One for standby state, and
one for active state.
In the event that it is determined that a standby server is to become
active, the monit configuration file is overwritten with the config file
for an 'active' server, and monit is reloaded.
I use a cust
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 cod