Hi everyone!
This is my current irule:
when HTTP_REQUEST {
sets the timer to return client to host URL
set sectime 10
Use the Host header value for the responses if it’s set. If not, use the VIP address.
if {[string length [HTTP::host]]}{
set host [HTTP::host]
} else {
set host [IP::local_addr]
}
Check if the URI is /maintenance
switch [HTTP::uri] {
“/maintenance” {
Send an HTTP 200 response with a Javascript meta-refresh pointing to the host using a refresh time
HTTP::respond 200 content \
"Maintenance page\
Sorry! This site is down for maintenance.
" “Content-Type” “text/html”
return
}
}
If the pool_testLB is down, redirect to the maintenance page
if { [active_members E1PD ] < 1 } {
HTTP::redirect “http://$host/maintenance”
return
}
}
I’m trying to rewrite it so it uses a data group list for the active_members pool. That way I don’t have to have one rule for each pool, I can have a single irule and have it match the value in the data group list. I’m a noob to the F5 platform and irules, so any help or advice appreciated.