Forum Discussion
Daniel2010_1501
Nimbostratus
Wrote a simple iRule to redirect to an external webserver's maintenance page when all nodes in the pool are unavailable. The original iRule that we modified to create the iRule below is from https://devcentral.f5.com/questions/redirect-based-on-monitor-status
Hope this help you guys also.
when HTTP_REQUEST {
if { [active_members [LB::server pool]] == 0 }
{ HTTP::redirect "http://maintenance.host.url/dir/dir/file" }
}
Joe_5599_134300
Mar 03, 2017Nimbostratus
Simple maintenance page irule that includes the message in the irule. I was able to get this working on my lab box. Add to your VS then disable all pool members to test.
when HTTP_REQUEST { if { [active_members [LB::server pool]] == 0 } { set http_reply "You have reached [HTTP::host],
This site is currently under maintenance March 4th 10:00pm EST - March 5th 6:00am EST
Please contact XYZ Corp Help Desk at 1-800-123-4567 if you continue to experience issues after this maintenance window. window." HTTP::respond 200 content $http_reply
} }