Forum Discussion
gianluca_gozzi
Feb 14, 2011Nimbostratus
Monitor virtual server with a lot of pool configured in une Irule
Hi Guys I've made a virtual server HTTP that have no default pool assigned because I assign the pool with an Irule This Irule is made to reflect the requirement of real server that respo...
Chris_Miller
Feb 14, 2011Altostratus
Something like this should work. I moved your log statement too...just a personal preference.
when HTTP_REQUEST {
log local0. "TEST - l'HOST is [HTTP::host], l'URI is [HTTP::uri]"
switch -glob [HTTP::host] {
"*domain1.it" -
"*domain2.it" {
if { [active_members pool-1] > 0 } {
pool pool-1
log local0. "TEST - l'HOST e' [HTTP::host], inside pool-1"
} else { HTTP::respond 200 "Pool-1 is down" }
}
"*domain3.it" -
"*domain4.it" {
if { [active_members pool-2] > 0 } {
pool pool-2
log local0. "TEST - l'HOST e' [HTTP::host], inside pool-2"
} else { HTTP::respond 200 "Pool-2 is down" }
}
}
}
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