Forum Discussion
User iControl Rest to retreive iRule Stats
I am currently using iControl to retrieve iRule statistics like number of execututions and CPU Cycles. My goal is to switch to iControl REST to retrieve the same information without the overhead of iControl. Most modules within the REST api allow for /stats to be placed at the end of the URL which return module stats. Here are some working examples:
curl -k https://f5.somewhere.com/mgmt/tm/ltm/virtual/myvip.somewhere.com/stats
curl -k https://f5.somewhere.com/mgmt/tm/ltm/pool/myvip-pool/statsBut, for iRules, I am unable to retrieve the stats using the following command:
curl -k https://f5.somewhere.com/mgmt/tm/ltm/rule/~Common~myirule/statsIn response, I get:
{"code":404,"message":"Object not found - /Common/myirule","errorStack":[]}F5 Version: 11.5.3.
What am I doing wrong?
Brent
1 Reply
- amolari
Cirrostratus
I have 11.6.0 HF4 and it's working fine (for a simple irule.. result below). Which eventType do you have in your iRule?
{ "entries": { "aborts": { "value": 0 }, "avgCycles": { "value": 0 }, "eventType": { "description": "ACCESS_POLICY_AGENT_EVENT" }, "failures": { "value": 0 }, "maxCycles": { "value": 0 }, "minCycles": { "value": 0 }, "priority": { "value": 500 }, "tmName": { "description": "/Common/masked___" }, "totalExecutions": { "value": 0 } }, "generation": 1,
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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