Forum Discussion
Display number of current connections for a pool
Hello, I currently have an iRule to display the status of the members of a pool used by a third-party who I can give access to the box. This works fine but I wrote so long ago I can't remember most of it.
What I need now is to display the number of connections for each pool member either within the same iRule or individual iRules for each member.
To use this iRule I simply create a VIP and attach this without any pools.
browse to http://[ip]/F5-status
when HTTP_REQUEST {
set response "
BIGIP Pool Status for FP Prod/Stby - [clock format [clock seconds]]</div>
<div>
<span class="Apple-tab-span" style="white-space:pre">
</span>
"
if {[HTTP::uri] eq "/F5-status" } {
foreach { selectedpool } [LB::server pool] {
pool [LB::server pool]
if { [active_members [LB::server pool] ] < 1 } {
append response "$response DOWN - $selectedpool
"
} else {
append response "$response UP - $selectedpool
"
}
append response "Number of members=[active_members [LB::server pool] ]
"
}
HTTP::header replace Cache-Control "no-cache, must-revalidate"
HTTP::respond 200 content $response "Content-Type" "text/html"
}
}
- nitassEmployeein 10.x, i understand we have to count it manually something like what kevin does in the discussion topic below.
- JoeBlogs1759_10NimbostratusForgot to mention what I'm running...
BIG-IP 9.4.8 Build 407.0 Hotfix HF4
- hooleylistCirrostratusIn 9.4.x the only option I can think of for this is to write a shell script that calls bigpipe and writes the current connection counts to a data group every X seconds. You could then read the data group from the iRule.
- JoeBlogs1759_10Nimbostratus
Thanks Aaron and others.
Aaron I assume you are saying:
Create a cron job to call a script which runs a bigpipe command to query the members of X pool and writes the output to a file.
I can then use a VIP and iRule to display this file to the users.
I don't want a hand-out, unless you are willing toooo. But do you have a sample script and relevant iRule I can hack to achieve this and what's the bigpipe command I need to call?
Thanks...
Recent Discussions
Related Content
* 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