Forum Discussion
Jason_Nance
Nimbostratus
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)
Jason_Nance
Jun 06, 2018Nimbostratus
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/codeshare/connection-list-via-icontrolrest-api
https://devcentral.f5.com/articles/demystifying-icontrol-rest-part-3-how-to-pass-query-parameters-and-tmsh-options (example 4 is exactly what you're trying to do, I think)
I suggest opening an RFE on the GitHub page: