Forum Discussion

JF_179206's avatar
JF_179206
Icon for Nimbostratus rankNimbostratus
Dec 05, 2014
Solved

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 vs...
  • James_Thomson_1's avatar
    Jan 12, 2015

    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