Forum Discussion
Mar 30, 2007
Sure can, but keep in mind that there are no build-in safeguards for overwriting the values across connections. Counters and totals are fine as they aren't connection specific. You could do something like this:
when RULE_INIT {
set ::total_requests 0
}
when HTTP_REQUEST {
incr ::total_requests 1
}
A better approach though would be to use the Statistics Profile to build your own name/value pairs. This data is peristent and is accessible from within iRules with the STATS::get and STATS::set commands as well as through iControl. Take a look at the Docs section for my latest tech tip on custome reporting with iRules.
-Joe