Forum Discussion
Amit585731
Nimbostratus
Jan 10, 2016issue with irule
Dear Experts,
we are having an issue where application team requested us to log source IP address whenever user hits specific page. We created an irule to implement this but whenever I am hitting t...
Vernon_97235
Jan 10, 2016Historic F5 Account
If HTTP Keep-Alive is in use in the client-side (and it probably is) then the client may make multiple requests over a single TCP connection. In that case, HTTP_REQUEST will fire for each client HTTP request. If you want it to happen only once per TCP connection:
when CLIENT_ACCEPTED {
set hit_test 0
}
when HTTP_REQUEST {
if { [HTTP::path starts_with "/xyz" and !$hit_test } {
log local0. "..."
set hit_test 1
}
}
You should also consider remote logging using High Speed Logging, rather than local logging.
- Amit585731Jan 11, 2016
Nimbostratus
Vernon, Thanks for your reply. But after adding this irule as well I am seeing that same IP address getting logged multiple times. Thanks
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