UTM 9.6 active/passive cluster - run script on the "new" master after switchover

Hi,

I am looking for a solution to run a script everytime one node of the active/passive cluster becomes the new master ( wether it is after a failover or after a cold boot of the cluster ).

The script will update a custom dyndns account which is not part of the Sophos builtin DynDNS Accounts.

Can someone give me a hint where / how to implement this?

Thanks in advance

Thomas

  • Hi  

    You can add this script in the crontab. Please refer to this KBA Sophos UTM: how to monitor resource utilization history via atop to check the part regarding cron job. You can find different ways to condition the script and it will be then repeated as long as it is added in crontab.

    However, please check with Sophos Support first as doing such changes may void your device warranty.

  • In reply to Jaydeep:

    Hi Jaydeep,

    thanks for the tip with the crontab.
    I am just wondering if this works for the active/passive scenario ... isn´t the crontab always executed on both machines, wether it is the master or the slave?

    So you mean I can put the script into the crontab and let it check wether or not it is executed on the master or slave and then do the things accordingly?

    Thanks

    Thomas

  • In reply to ThomasHendrich:

    Hi  

    To be honest, I don't have an HA setup to test this. You can set up the script to ping or log certain things and monitor on both devices and see how it goes. This might require a "Trial and error" method.