1. Get all configuration through API instead of a specific Pool. (https://18.104.22.168/mgmt/tm/ltm/pool/members/stats)
2.This can only obtain Common Partition, and other Partitions cannot be obtained. Obtaining each API separately incurs too much performance overhead on the device (https://22.214.171.124/mgmt/tm/ltm/pool/members/stats)
3.Alternatively, it can support obtaining Pool Members for a specific Partition.
4. Can URLs support adding parameters, such as https://126.96.36.199/mgmt/tm/ltm/pool/members/stats?partition=aaa But? partition=aaa parameter not valid.
Here is an example :
SO the idea is the use a schema like this:
/mgmt/tm/ltm/pool/~<partition name>~<pool name>/stats
There is no way to get all the stats for all partitions (see https://community.f5.com/t5/technical-forum/f5-icontrol-rest-api-to-get-state-and-status-of-all-ltm-...) from iControl REST. However, two options for you:
@long_zhao another option I'm noodling on is running a tmsh script locally on BIG-IP that will write to a file that you can then download via the REST interface in a single call. This is more steps than building an iControl LX package, but simpler to implement.
If you change directory to root in tmsh and then do a show /ltm pool recursive members, you'll get all the stats for pool and pool members. If you do that in a tmsh script, you can then just pull out the stats from the pools and members you need, and then write to file. I'm going to do a live coding session on Friday at 9am pacific to work through this if you want to tune in, but if we solve it I'll post back here.
@long_zhao code from the live session: https://community.f5.com/t5/codeshare/collect-all-partition-pool-member-stats-with-tmsh/ta-p/315506
We were able to collect pool member stats (just bits-in/out and pkts-in/out, but you can add the others you care about) from all pool members in multiple partitions via tmsh script and then download via python.