Forum Discussion
iStats
Hi everyone, I'm trying to get my head around iStats, in particular how a key is constructed. Colin's article here is very confusing: https://devcentral.f5.com/tech-tips/articles/introduction-to-istats-part-1-overview. For instance, Measure Type is described twice with each definition being different;
"Measure Type - The statistics you want to gather about the subject, I.E. connections, requests, etc."
"Measure Type is counter, or "c" for shorthand"
So, which is it?
I've managed to derive this much;
· Keyspace – dotted tmsh command and module path to the object type you are gathering statistics on (for instance ltm.virtual or ltm.pool)
· Subject Name – the actual name of the object you want to gather statistics on including its Administrative Partition path (for instance /Common/vs_test or /Custom/test_pool)
· Subject Value/Measure – ???
· Measure Type – counter, gauge or string
· Measure Name – a user-defined name for the key
But this doesn't seem to match Colin's examples;
client 1.2.3.4 counter hits
src_ip 1.2.3.4 c Connections
In those two examples what would the keyspace be?
Very confused. Any known working examples anyone has would be great. Thanks
- What_Lies_Bene1CirrostratusBump
- What_Lies_Bene1CirrostratusThanks Aaron, that helps a lot.
- Matt_Jannusch_1Nimbostratus
Is there a way to remove an ISTAT or set a counter back to zero from an iRule? Can't seem to find a way to do it. I can do "istats remove "ltm.virtual /Common/ counter hits" from the cli, for example, but there doesn't seem to be an associated command available to iRules to do the same thing.
BTW, there really needs to be some cleanup and expansion on the documentation for ISTATs here. What little information is available is pretty confusing, and often contradicting.
- James_Deucker_2Historic F5 AccountCurrently there is no way to directly set an iSTAT to a number, you can only read and increment by the negative of the get.
- Matt_Jannusch_1NimbostratusThanks James, I ended up incrementing the counter by the negative of the counter and that worked fine! I wanted to keep all the functionality in an iRule as that is easier to maintain (for my customers) than the iCall script method.
- ruiqiang_lu_121Historic F5 Account
Yes. You can use { exec istats remove "ltm.pool /Common/test_pool member /Common/44.1.1.26:6800 string flag" } in irules.
- Matt_Jannusch_1NimbostratusAre you doing that in an iCall script, or direct in the iRule? When I try to do it from within the iRule I get "error: [command is disabled: "exec"]". Seems like incrementing by a negative number might get the job done all in the iRule. I'm running v11.4.1, if that makes any difference.
- ruiqiang_lu_121Historic F5 Accountsorry, i make a mistake, i use it in icall script v11.4.1
- ruiqiang_lu_121Historic F5 Account
i have used it in my customer.
- LEON_LI_38034NimbostratusMorning,Lu. What a coincidence! lilong
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