Forum Discussion
Marcus_59536
Sep 04, 2009Nimbostratus
I don't know the name of the pool until I call [LB::server pool]. I changed the code to this:
when HTTP_REQUEST {
set current_pool [LB::server pool]
set response "$current_pool Pool Status - [clock format [clock seconds]]"
if {[HTTP::uri] eq "/status" } {
pool $current_pool
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 MEMBER:$current_member:$current_port
STATUS: DOWN
"
} else {
set response "$response NAME:$current_pool
CURRENT MEMBER:$current_member:$current_port
STATUS: UP
"
}
HTTP::respond 200 content $response "Content-Type" "text/html"
}
}
I still get:
when I go to the http://x.x.x.x/status page
NAME:askf5_80
CURRENT MEMBER::0
STATUS: UP
If I then go manually to the VIP normally and go back to http://x.x.x.x/status I get:
NAME:askf5_80
CURRENT MEMBER:65.61.115.222:80
STATUS: UP
Thanks
I need this to come up the first time I access this url.