Forum Discussion
Mark_62437
Nimbostratus
Dec 03, 2008Identifying specific Header and logging time they attach?
I have created the following iRule:
Keep in mind first kick at the cat.
when HTTP_REQUEST {
if { [HTTP::header] contains "True-Client-IP" }
log local0. "...
James_Quinby_46
Dec 10, 2008Historic F5 Account
The rule could be as short as:
when HTTP_REQUEST {
if { [HTTP::header exists "True-Client-IP"] } {
set LogString "[IP::client_addr]"
log local0. "$LogString"
}
}
The date and timestamp would be added by your logging facility, yielding lines that should look something like this:
Dec 10 11:43:09 bigip tmm tmm[1653]: Rule simple_timestamp : 10.10.10.102
(the odd character is the forum trying to render the PID as a control character of some kind)
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