19-Mar-2020
04:09
- last edited on
22-Nov-2022
15:13
by
JimmyPackets
I'm developing a custom dashboard for F5 Big-IP device on python. Right now I'm using the following API endpoints to fetch throughput data:
mgmt/tm/sys/performance/throughput/In
mgmt/tm/sys/performance/throughput/Out
But these endpoints give the data in pkts/sec format. I need to get the data in bits/sec or bytes/sec format. I tried to execute tmsh command 'tmsh show sys performance throughput' inside python but when i run the code it disables the F5 Big-IP interface on web browser so we don't want that to happen. Is there a way to achieve getting the data in bits/sec or bytes/sec format without using tmsh commands? If yes then which endpoints or commands can i use?
Tmos version of my device is 14.1.2.3.
20-Mar-2020
11:11
- last edited on
05-Jun-2023
02:59
by
JimmyPackets
Try running it via the bash command:
curl -sk -u 'admin:admin' -H 'Content-Type: application/json' -X POST \
-d '{"command": "run", "utilCmdArgs": "-c \"tmsh -q show sys performance throughput\""}' \
https://<BIG-IP>/mgmt/tm/util/bash | jq .
22-Mar-2020 23:35
Thanks for your answer but i asked specifically whether i can do this without running tmsh commands, you are offering me to use tmsh commands but just in a different environment.
23-Mar-2020 00:15
23-Mar-2020 00:20
Okay thank you for your time.
28-Sep-2021 15:44
Realize this is some time ago; however, this call will get you what you're looking for - https://mgmt_IP/mgmt/tm/sys/performance/throughput
For additional stats a get to "/mgmt/tm/sys/performance" will show many other stats as well.
Enjoy!