Forum Discussion
JJ_47859
Nimbostratus
Oct 03, 2007setting up a maintenance page using LB_FAILED
Hello DevCentral,
I've trying to create a maintenance page that will be displayed if our web servers go offline or if we take them down for maintenace. I was testing with LB_FAILED using this code:
when LB_FAILED {
HTTP::redirect "http://www.yahoo.com"
}
but can't seem to get LB_FAILED to work. I've setup an HTTP profile that does a basic GET to the web server and then shutdown the world wide web service on the web server which caused the pool to turn red.
Is the syntax correct? If so, what do I need to do to cause LB_FAILED to work?
Thanks!
- Andy_Herrman_22
Nimbostratus
Do you have health monitors set up for your nodes/pools? I'm not sure what exact instances LB_FAILED will be triggered, but you might have better luck with it if you have HTTP health monitors set up so that the load balancer knows when the servers go down. - JJ_47859
Nimbostratus
Yes, I have HTTP health monitor configured to monitor the pool. I then stopped the WWW service and noted that my pool and virtual server had turned to status of red in the LTM but the iRule would not work. I've been doing a lot of searching today but haven't been able to come up with how LB_FAILED is triggered. Any thoughts are much appreciated. Thanks. - Colin_Walker_12Historic F5 AccountThe problem is due to the fact that you don't want to use LB_FAILED for this. You want something in the HTTP_REQUEST section that checks the number of active pool members.
when HTTP_REQUEST { if {[active_members myHTTPPool] < 1 } { HTTP::redirect "http://www.yahoo.com" } }
- JJ_47859
Nimbostratus
Thank you Colin, that should work out well for us. Thanks for the quick turn around!
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