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
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
Ok, I just found “b profile stats reset”.
But it would be nice to be able to tie it to an iRule initialization.
Craig
Hey 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
oops, value for STATS::set cmd obviously s/b 0, corrected code sample above…
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
nice, thanks for doing that, will be a very useful add