Forum Discussion
Count data that match with event
One super easy way to do this is with a stats profile.
-
Create a stats profile -> Local Traffic -> Profiles -> Other -> Statistics. Give it a name and define at least one field. (ex. "stats-test", field 1 = "triggered")
-
Assign the stats profile to the VIP.
-
In an iRule, in the event you want to capture, increment the stats profile field(s).
STATS::incr stats-test triggered
After some time, look at the accumulated value in TMSH:
tmsh show ltm profile statistics test-stats
Example output:
-----------------------------------
Ltm::Profile Statistics: test-stats
-----------------------------------
triggered 14
.
You could also do this with iStats, a later and more powerful version of the above: https://devcentral.f5.com/wiki/iRules.ISTATS.ashx .
Or you could increment a table value, which you'd then be able to read from an iRule.
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