Forum Discussion
Siddarth_84779
Jan 28, 2011Nimbostratus
iRule for maintenance page
Hi guys,
I want to write an irule for maintenance page such that the single iRule can be applied to multiple VS. Presently we are using the below irule
when HTTP_REQUEST {
if {[ac...
DenisG_22372
Historic F5 Account
I think a better way would be to do a check if there are pool members before you select the pool. I would look at the example:
when HTTP_REQUEST {
switch -- [string tolower [HTTP::host]] {
"www.example.com" {
if { [active_members www.example2.com_pool] < 1 } {
If there are no members available, generate a long Maintenance Page
HTTP::respond ...
} else {
pool www.example.com_pool
}
"www.example2.com" {
pool www.example2.com_pool
...
}
}
}
Hopefully this will get you started to getting this working
JG
Feb 10, 2015Cumulonimbus
This is certainly better! I cut-and-pasted the code from two of my other servers each of which had very different requirements and different strategies. In one I did not have a default pool configured, and in the other I did not want to specify the name of the pool. I should not consider either here.
Thanks!
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