Forum Discussion
tarsier_90410
Nimbostratus
Aug 25, 2009way to list pools?
I am trying to find a way for an irule (9.x LTM) to query for a list of all pools on the system, but so far have not found a way to do so. Is this possible?
Kevin_Stewart
Employee
Aug 26, 2009Not to be a post hog, but here's another version of the iRule that turns it into an RSS feed:
http://bigip-vip/status
when HTTP_REQUEST {
set response ""
set response "$response BigIP Server Pool Status"
set response "$response Server Pool Status"
set response "$response en"
set response "$response [clock format [clock seconds]]"
set response "$response 60"
if { [HTTP::uri] eq "/status" } {
foreach { selectedpool } [class get pooltest] {
set thispool [getfield $selectedpool " " 1]
if { [catch {
if { [active_members $thispool] < 1 } {
set response "$response "
set response "$response $thispool status"
set response "$response $thispool is DOWN"
set response "$response "
} else {
set response "$response "
set response "$response $thispool status"
set response "$response $thispool is UP"
set response "$response "
}
} errmsg ] } {
set response "$response "
set response "$response $thispool ERROR"
set response "$response Invalid pool name: $thispool"
set response "$response "
}
}
set response "$response "
set response "$response "
HTTP::respond 200 content $response "Content-Type" "text/xml"
}
}
Kevin
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
