Forum Discussion
How to get interface and system stats that are part of the F5-SYSTEM-MIB via REST API?
I am looking to get the counters / global statistics for the interfaces and system that are available via SNMP. I can see them using the F5 tmsh cli in the console. I can als get pools, nodes and vservers related configuration and stats data using the REST API. How do I get the interface in system stats?
Thx!
Did you see this in the iControl REST user guide?
To obtain statistics for a resource, this example queries the /Common/my-Pool object for current statistics. The response that contains the statistical output appears in the second block. GET https://192.168.25.42/mgmt/tm/ltm/pool/~Common~my-Pool/stats
So for interface stats for example, you could do this:
curl -k -u "admin:admin" https://10.1.0.213/mgmt/tm/net/interface/stats -H "Content-Type:application/json" -X GET
Other than interface, what do you need? Things like CPU and mem are the the sys section, so
curl -k -u "admin:admin" https://10.1.0.213/mgmt/tm/sys/cpu/stats -H "Content-Type:application/json" -X GET
- adityoari_14383Historic F5 AccountHave you tried looking into F5-BIGIP-SYSTEM-MIB ? For example, interface statistics can be found under OID of .1.3.6.1.4.1.3375.2.1.2.4.4.3.1
- JF_179206NimbostratusThe problem is that I am trying to get those statistics via the REST API like I can do for the pools, nodes and vservers.
- James_ThomsonEmployee
Did you see this in the iControl REST user guide?
To obtain statistics for a resource, this example queries the /Common/my-Pool object for current statistics. The response that contains the statistical output appears in the second block. GET https://192.168.25.42/mgmt/tm/ltm/pool/~Common~my-Pool/stats
So for interface stats for example, you could do this:
curl -k -u "admin:admin" https://10.1.0.213/mgmt/tm/net/interface/stats -H "Content-Type:application/json" -X GET
Other than interface, what do you need? Things like CPU and mem are the the sys section, so
curl -k -u "admin:admin" https://10.1.0.213/mgmt/tm/sys/cpu/stats -H "Content-Type:application/json" -X GET
- JF_179206NimbostratusWorks great! Thank you.
- James_Thomson_1Historic F5 Account
Did you see this in the iControl REST user guide?
To obtain statistics for a resource, this example queries the /Common/my-Pool object for current statistics. The response that contains the statistical output appears in the second block. GET https://192.168.25.42/mgmt/tm/ltm/pool/~Common~my-Pool/stats
So for interface stats for example, you could do this:
curl -k -u "admin:admin" https://10.1.0.213/mgmt/tm/net/interface/stats -H "Content-Type:application/json" -X GET
Other than interface, what do you need? Things like CPU and mem are the the sys section, so
curl -k -u "admin:admin" https://10.1.0.213/mgmt/tm/sys/cpu/stats -H "Content-Type:application/json" -X GET
- JF_179206NimbostratusWorks great! Thank you.
- 27Sumit_313006Nimbostratus
Hi there, I too am trying to get cpu stats of BIG IP F5 version 12 via either Rest API or SNMP command.
I am being told that only admin user can extract cpu stats via rest API call. Cannot there be a read only user who can get the cpu stats out of F5?
Can you actually send me the exact (snmpget/snmpwalk command I could run to get the F5 cpu stats please.
I will appreciate the same. many thanks Sumit
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