Forum Discussion
Getting active pool member connections using Python
The stats are pulled from the pool or member itself. Try this for an example:
!/usr/bin/env python3
from f5.bigip import ManagementRoot
from getpass import getpass
from pprint import pprint
hostname = 'my.f5.ltm.net'
username = 'foo'
mgmt = ManagmentRoot(hostname, username, getpass())
pool = mgmt.tm.ltm.pools.pool.load(name='my_pool_name')
poolstats = pool.stats.load()
pprint(poolstats.raw)
members = pool.members_s.get_collection()
member0_stats = members[0].stats.load()
pprint(member0_stats.raw)
Ahhh... Okay, sorry, I'm picking up what you're putting down now.
 
I don't think that the Python SDK supports this but you can do it with REST calls (using
requests
or your preference). 
Here are a couple pages describing this:
 
https://devcentral.f5.com/s/articles/connection-list-via-icontrolrest-api
 
https://devcentral.f5.com/s/articles/demystifying-icontrol-rest-part-3-how-to-pass-query-parameters-and-tmsh-optionss (example 4 is exactly what you're trying to do, I think)
 
I suggest opening an RFE on the GitHub page:
 
https://github.com/F5Networks/f5-common-python/issues
 
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