Forum Discussion
Kevin_Stewart
Jun 24, 2014Employee
There are a few additional options to consider:
-
Fallback Host: Inside the HTTP profile is an option called Fallback Host. This option, when defined, will send a 302 redirect to the specified address if all pool members are down. No iRules needed.
-
active_members check: a simple active_members check of the pool and then whatever you need to happen if all members are down:
when CLIENT_ACCEPTED { set default_pool [LB::server pool] } when HTTP_REQUEST { if { [active_members $default_pool] < 1 } { send a redirect or output HTML content here } }
-
Time-based outage: based on the following post:
https://devcentral.f5.com/questions/irule-to-disable-a-pool-to-new-connections
when RULE_INIT { set static::START_OFF_TIME "Saturday 09:00 AM" set static::END_OFF_TIME "Saturday 11:00 AM" } when HTTP_REQUEST { set start_off_time [clock scan $static::START_OFF_TIME] set end_off_time [clock scan $static::END_OFF_TIME] set now [clock seconds] if { ( [expr $now > $start_off_time] ) and ( [expr $now < $end_off_time] ) } { HTTP::respond 200 content "Maintenance ModeMaintenance mode..." } }