Forum Discussion
James_Ramsey_10
Nimbostratus
May 31, 2007maintenance
I would like to setup an rule to send all traffic to http://maintenance.mysite.com from a virtual server when all 6 pools are down. Could anyone help me out?
Thanks
May 31, 2007
You can always get the number of active members in the current pool with the active_members command. Something like this should work for you...
when HTTP_REQUEST {
if { 0 == [active_members [LB::server pool]] } {
HTTP::redirect "http://backup_domain/maintenance.html"
}
}Then, just disable all members in the pool and the active_members count will go to zero and the redirect will occur.
Keep in mind, that you could also embed a HTML page directly in the iRule and return that with a HTTP::respond. See the "Custom Reporting with iRules" tech tip I wrote a while back...
http://devcentral.f5.com/Default.aspx?tabid=63&articleType=ArticleView&articleId=66
Click hereThe only gotcha is that you can't store any images on the BIG-IP, the response will have to be the entire content.
-Joe
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects