Forum Discussion
aghazi
Jun 21, 2017Nimbostratus
iRule F5 logging for Maintenance page redirects
I need to edit 3 iRules to add logging to match Apache for these attributes. Example Format:X-Forwarded-For; EventTime; Request; HTTP Status Code; Referer; User-Agent; Request Time; Host Woul...
P_K
Jun 22, 2017Altostratus
Anthony-
Below iRule will log everything except your event times/durations.
when HTTP_REQUEST {
set LogString "Client [IP::client_addr]:[TCP::client_port] -> [HTTP::host][HTTP::uri]"
log local0. "============================================="
log local0. "$LogString (request)"
foreach aHeader [HTTP::header names] {
log local0. "$aHeader: [HTTP::header value $aHeader]"
}
log local0. "============================================="
}
when HTTP_RESPONSE {
log local0. "HTTP Status Code: [HTTP::status]"
}
Hope this helps!
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