Forum Discussion

SteveD1979's avatar
Oct 18, 2023

Disabling a pool nightly for maintenance

Is there a way to automate disabling and then re-enabling a pool member nightly say between 10pm and 7am for maintenance?

3 Replies

  • SteveD1979 I'm not aware of performing a nightly pool member disable. Assuming this is a webserver the better option would be to use the "receive down" string to pull the pool member out of rotation prior to the maintenance starting.

  • iCall module allows you to create a scheduler (periodic handlers) in order to execute a specific bash script that you've installed on the BIG-IP. You might use this to run TMSH disable commands, and configure a second scheduler to run the enable command as well.

    Scripting it like this would use static variables, so it works as long as you don't need this to be dynamic for different apps. I do agree with Paulius that using a receive down string on the monitor might still be a better option.

    • P_Kueppers's avatar
      P_Kueppers
      Icon for MVP rankMVP

      To get this simpler, just log in to your bigip with ssh and write the command into crontab

      ForceOffline:

      tmsh modify ltm pool *pool_name* members modify { *1.1.1.1:80* { session user-disabled state user-down } }

      Disable:

      tmsh modify ltm pool *pool_name* members modify { *1.1.1.1:80* { session user-disabled state user-down } }