Forum Discussion

dwayne_22491's avatar
dwayne_22491
Icon for Nimbostratus rankNimbostratus
Jan 25, 2011

Remote execution of script from GTM

I have two sites, one of which is the primary and the other which is secondary. I have MySQL databases at both and need to be able to keep track of which site is currently the primary and execute scripts on the MySQL servers in the event of a failure which will take care of necessary locking/unlocking/cleanup/etc of the database. What is the best way to accomplish this (sample code in addition to the methodology would be greatly appreciated)?

 

 

1 Reply

  • Hi Dwayne,

     

     

    You could potentially use an EAV monitor which references a shell script. The script could check the pool members to see if each is active.

     

     

    I'm not sure how you'd want to detect a "recent" failure. Perhaps it would be better to have a majority of that logic set up on the servers themselves and just have the monitoring done from GTM.

     

     

    Here is a related AskF5 solution:

     

     

    SOL8154: The BIG-IP GTM EAV monitor considerations

     

    http://support.f5.com/kb/en-us/solutions/public/8000/100/sol8154.html?sr=12322442

     

     

    And here is a template EAV. It should work the same for GTM as LTM:

     

     

    http://devcentral.f5.com/wiki/default.aspx/AdvDesignConfig/TemplateForExternalLtmMonitors.html

     

     

    Aaron