For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Lucern's avatar
Lucern
Icon for Nimbostratus rankNimbostratus
Oct 05, 2019

Automatic Maintenance (Sorry) Page triggered via monitor

All,

 

I see there are tons of different ways to automatically display a VIP maintenance page when all members of a pool are down. What I'm looking for is a way to automatically display a maintenance page if the response status of a monitor changes for one or all of the members of a pool.

 

What I'm thinking is that I would attach a monitor that would look for a file say: /status.html

 

When everything is normal the file output would be: NORMAL

 

When I want the maintenance page enabled someone would change the file to read: MAINTENANCE

 

Then when the monitor would check it would know to put up the maintenance page, when they change the back to: NORMAL it would take it down.

 

Something to that effect, I just have no idea how I would implement it since I do not have iRule skills! :)

 

Any help is greatly appreciated!

 

2 Replies

  • Hi Lucern,

    when HTTP_REQUEST {
        if { [active_members pool_example] < X } {
            log local0. "pool_example: At least one member offline"
            HTTP::respond 503 content "MAINTENANCE"
        }
    }

    X = number of members in pool_example

    • Lucern's avatar
      Lucern
      Icon for Nimbostratus rankNimbostratus

      Oh wow! That doesn't seem too complicated! I will give that a shot! Thank you so much!