Forum Discussion
Tore_Anderson_9
Nov 27, 2012Nimbostratus
For what it's worth, here's my current debugging iRule. To reproduce issue 5, do first one call to /incr, then perform repeated calls to /get. The reported counter value will oscillate between 0 and 1, until finally settling on the value 1.
Next, to reproduce 5, do one call to /set42. Assuming the value of the counter was 1 to begin with, you'll see the counter increase by 42 and report the value 43, rather than being set to exactly 42. Also you can try a call to /reset and see that it has no effect whatsoever.
when HTTP_REQUEST {
switch [HTTP::uri] {
"/get" {
HTTP::respond 200 content "counter is now: [ISTATS::get "x y counter z"]
the gauge is: [ISTATS::get "x y gauge z"]
"
}
"/incr" {
ISTATS::incr "x y counter z" 1
HTTP::respond 200 content "counter increased by 1, current value: [ISTATS::get "x y counter z"]
"
}
"/reset" {
ISTATS::set "x y counter z" 0
HTTP::respond 200 content "counter set to 0, current value: [ISTATS::get "x y counter z"]
"
}
"/set42" {
ISTATS::set "x y counter z" 42
HTTP::respond 200 content "counter set to 42, current value: [ISTATS::get "x y counter z"]
"
}
}
}