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. "in HTTP_REQUEST"
I am trying to log everytime traffic from the above header passes inbound. I read that the log file can be very large. All I need is to identify what time traffic from this header passes. Will the above iRule do this or is it to basic?
Thanks
Mark
- James_Quinby_46Historic F5 AccountYou might try this:
when HTTP_REQUEST { Log the start of a new HTTP request set LogString "Client [IP::client_addr]:[TCP::client_port] -> [HTTP::host][HTTP::uri]" log local0. "$LogString (request)" }
- Mark_62437
Nimbostratus
Thanks jquinby! - James_Quinby_46Historic F5 AccountThe rule could be as short as:
when HTTP_REQUEST { if { [HTTP::header exists "True-Client-IP"] } { set LogString "[IP::client_addr]" log local0. "$LogString" } }
Dec 10 11:43:09 bigip tmm tmm[1653]: Rule simple_timestamp : 10.10.10.102
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