Forum Discussion
Marcus_59536
Nimbostratus
Jun 04, 2010Checking if pool is up before using LB::SELECT in HTTP_REQUEST
I was wondering if there is any way to check if the virtual server is up before implementing LB::SELECT inside of an HTTP_REQUEST event of an iRule?
code:
when HTTP_REQUEST {
if { [HTTP::uri] eq...
Michael_Yates
Nimbostratus
Jun 04, 2010Sure. You can do that.
when HTTP_REQUEST {
if { [active_members mypool] == 0 } {
HTTP::redirect "http://www.google.com"
}
else {
do something...
}
}
See the wiki entry for active_members for additional examples: http://devcentral.f5.com/Wiki/default.aspx/iRules/active_members.html
or
A a Code Share iRule posted by Hoolio: http://devcentral.f5.com/wiki/default.aspx/iRules/LTM_sorry_page_image_when_no_pool_members_available.html
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