Forum Discussion
Teerarat
Cirrostratus
Aug 29, 2018Count data that match with event
Hi can i cound data that match with event, Example i would like to count how many client that match with network address.
youssef1
Cumulonimbus
Aug 29, 2018Hi,
You can also do it with table session:
when HTTP_REQUEST {
set tablesvalues [table lookup count]
if {$tablesvalues == ""} {
table set count 1
} else {
set new_count_value [expr {$tablesvalues + 1}]
table set count $new_count_value
}
log local0. "[table lookup count]"
if { ( [HTTP::uri] equals "/countpage" ) } {
HTTP::respond 200 content "[table lookup count]"
}
}
the advantage with this irule is that you can add conditions (by IP, by URI, ...).
I let you a log in irule you can remove it an check count directly using your browser:
Hope it help you. let me know if you need more details...
regards
You can also remove
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