Forum Discussion
Abed_AL-R
Cirrostratus
Mar 13, 2021table incr timeout
Hi Is there any way to create the 'table incr' entry without timeout according to f5 documentation it will have timeout of 180 seconds is there any other syntax i can use instead of it to not ha...
Abed_AL-R
Cirrostratus
Mar 13, 2021OK, solved
I used this syntax:
set srcip [IP::remote_addr]
set curtime [clock second]
set hash $curtime
set key "count:$srcip:$hash"
if { [ASM::violation count] > 0 } {
table add -subtable "countvio" $key "inserted" indef
set getCount [table keys -subtable "countvio" -count]
if { $getCount< $static::maxRate } {
incr getCount 1
} else {
table delete -all -subtable "countvio"
}}So the stategy was to create a subtable and insert a new unique key value (used current time seconds for that). And then counted the values in the subtable.
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
