Forum Discussion
K-Dubb
Jun 13, 2011Nimbostratus
Pool_Member_Status_Page_on_a_Virtual_Server (Topic Changed)
Hi,
I am trying to use this from windows command line: http://devcentral.f5.com/wiki/default.aspx/iControl/pyControlQuickPoolStatus.html. I have python installed on the server. I saved the ...
hooleylist
Jun 20, 2011Cirrostratus
Can you use curl from the command line to make a request to the virtual server?
curl -v 1.1.1.1/status
If that doesn't return anything, can you check the datagroup to see if it has been populated?
b class pool_member_status_list list
If the datagroup is populated, but the VS still doesn't work, can you try this update:
when HTTP_REQUEST {
switch [HTTP::uri] {
"/status" {
set response "BIGIP Pool Member Status - \
[clock format [clock seconds]]BIGIP Pool Member Status - [clock format [clock seconds]]\
StatusPool NameMemberPort"
foreach { selectedpool } $::pool_member_status_list {
if { [catch {
scan $selectedpool {%[^/]/%[^:]:%s} poolname addr port
switch -glob [LB::status pool $poolname member $addr $port] {
"up" {
append response "UP\
[string tolower $poolname]$addr$port"
}
"down" {
append response "DOWN\
[string tolower $poolname]$addr$port"
}
"session_enabled" {
append response "ENABLED\
[string tolower $poolname]$addr$port"
}
"session_disabled" {
append response "DISABLED\
[string tolower $poolname]$addr$port"
}
Default {
append response "INVALID\
[string tolower $poolname]$addr$port"
}
}
SWITCH END
} errmsg] } {
append response "INVALID\
[string tolower $poolname]$addr$port"
}
}
append response ""
HTTP::respond 200 content $response "Content-Type" "text/html" "Cache-Control" "no-cache, must-revalidate" "Expires" "Mon, 26 Jul 1997 05:00:00 GMT"
}
"/rss" {
set response " \
BigIP Server Pool StatusServer Pool Status \
en[clock format [clock seconds]]\60"
foreach { selectedpool } $::pool_member_status_list {
if { [catch {
scan $selectedpool {%[^/]/%[^:]:%s} poolname addr port
switch -glob [LB::status pool $poolname member $addr $port] {
"up" {
append response "[string tolower $poolname] Status \
Member $addr:$port is UP"
}
"down" {
append response "[string tolower $poolname] Status \
Member $addr:$port is DOWN"
}
"session_enabled" {
append response "[string tolower $poolname] Status \
Member $addr:$port is ENABLED"
}
"session_disabled" {
append response "[string tolower $poolname] Status \
Member $addr:$port is DISABLED"
}
Default {
append response "[string tolower $poolname] Status \
Member $addr:$port is INVALID"
}
}
SWITCH END
} errmsg] } {
append response "[string tolower $poolname] StatusMember $addr:$port is \
INVALID"
}
}
append response ""
HTTP::respond 200 content $response "Content-Type" "text/xml" "Cache-Control" "no-cache, must-revalidate" "Expires" "Mon, 26 Jul 1997 05:00:00 GMT"
}
default {
HTTP::respond 200 content {Pool status VSPool status page
Select a URI}
}
}
}
Aaron
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