Forum Discussion
Craig_Jackson_2
Nimbostratus
Feb 11, 2009Initializing Statistics Profiles
How does one initialize a Statistics Profile?
I note that the STATS commands can't be used in RULE_INIT.
I'd like to keep a "max" value in a stats profile, but it has to start out at zero.
Craig
5 Replies
- Craig_Jackson_2
Nimbostratus
Ok, I just found "b profile stats reset".
But it would be nice to be able to tie it to an iRule initialization.
Craig - Deb_Allen_18Historic F5 AccountHey Craig -
Not the most optimal method, perhaps, since it uses a global var & has to test the var for each new conn, but give this a try:when RULE_INIT { set ::stats_rst 1 } when CLIENT_ACCEPTED { if { $::stats_rst == 1 }{ STATS::set profilename fieldname 0 set ::stats_rst 0 } }
/deb - Deb_Allen_18Historic F5 Accountoops, value for STATS::set cmd obviously s/b 0, corrected code sample above...
- hoolio
Cirrostratus
We ran into the same issue in an iRule, so thanks for the workaround.
We opened an RFE request case and got back CR117956 which requests the ability to set a stats profile field to arbitrary values in the RULE_INIT event.
Aaron - Deb_Allen_18Historic F5 Accountnice, thanks for doing that, will be a very useful add
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects