Marcus_59536
Sep 03, 2009Nimbostratus
iRUle to check current pool member and show if its up.
I currently can see if the current pool is up and name, but I can't see the pool server IP until I actually manually make the F5 make a LB decision.
How can I make that decision within/before this HTTP_REQUEST?
HTTP_REQUEST:
when HTTP_REQUEST {
set current_pool [LB::server pool]
set response "$current_pool Pool Status - [clock format [clock seconds]]"
if {[HTTP::uri] eq "/status" } {
set current_port [LB::server port]
set current_member [LB::server addr]
if { [active_members [LB::server pool] ] < 1 } {
set response "$response POOL NAME:$current_pool
CURRENT SERVER:$current_member:$current_port
STATUS: DOWN
"
} else {
set response "$response NAME:$current_pool
CURRENT SERVER:$current_member:$current_port
STATUS: UP
"
}
HTTP::respond 200 content $response "Content-Type" "text/html"
}
}
These all show up as NULL until I manually make a LB decision. How can I change this to work as I planned?
Thanks