Forum Discussion
zielik88_270153
Jun 15, 2016Nimbostratus
Get current connection of pool members
Hi, I tried write a script (python) to checking numeber current connection and when is 0 mark member 'disabled'.
How can I get only value of current connection and then check is 0 ?
member_s...
Arnaud_Lemaire
Jun 15, 2016Employee
no a python expert but here is loop example :
res = b.LocalLB.Pool.get_all_member_statistics(pool_names = ['/Common/pool_turnkey'])
for statistic in res[0].statistics:
print "member ip:port " + statistic.member.address + ":%s" % statistic.member.port
print statistic.statistics[4].type
print statistic.statistics[4].value
if statistic.statistics[4].value.high == 0: print "can be disabled"
output:
member ip:port: /Common/172.16.20.1
STATISTIC_SERVER_SIDE_CURRENT_CONNECTIONS
(Common.ULong64){
high = 0
low = 0
}
can be disabled
member ip:port: /Common/172.16.20.3
STATISTIC_SERVER_SIDE_CURRENT_CONNECTIONS
(Common.ULong64){
high = 0
low = 0
}
can be disabled
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