Forum Discussion
ryan_rockwell_1
Nimbostratus
Apr 18, 2014active members check on multiple pools
I have an iRule that redirects traffic to another pool by uri. I want to be able to mark the site offline with a placeholder if the default pool is unavailable. I have a seperate pool for my placeh...
nitass
Employee
Apr 18, 2014It works fine for the default pool offline but not if I try the redirected pool.
can you give an example which does not work?
by the way, did you forget to put special sequences (e.g. asterisk question mark), in the switch glob case?
iRules 101 - 04 - Switch by Joe Pruitt
https://devcentral.f5.com/articles/irules-101-04-switch.U1FXpledGCQ when HTTP_REQUEST {
set DEBUG 0
if { $DEBUG } { log local0. "Request: [HTTP::uri]" }
if { [active_members QA-HC-HTTP] < 1} {
pool QA-PH
return
}
if { $DEBUG } { log local0. "Request: [HTTP::uri]" }
switch -glob [string tolower [HTTP::uri]] {
"/portals/" -
"/js/" -
"/controls/" -
"/uk/" -
"/us/" -
"/ca/" -
"/admin/controlpanel/" -
"/webresource" -
"/scriptresource" -
"/resources/" -
"/providers/" -
"/linkclick" -
"/documentation/" -
"/desktopmodule/" -
"/config/" -
"/components/" -
"/bin/" -
"/app_themes/" -
"/app_globalResources/" -
"/app_data/" -
"/app_code/" -
"/app_browser/" -
"/dnnaadmin/" -
"/contactus/" -
"/resourcecenter/i" -
"/resourcecenter/r" -
"/resourcecenter/j" -
"/resourcecenter/e" {
if { $DEBUG } {log local0. "Sending request to QA-HC-HTTPDNN" }
if { [active_members QA-HC-HTTP] < 1} {
pool QA-PH
return
}
pool QA-HC-HTTPDNN
}
default {
pool QA-HC-HTTP
}
}
}
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