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
Would someone help me?
when HTTP_REQUEST {
if {
([active_members [LB::server pool]] < 1)
} then {
log local0. "Client on Maintenance Page: [IP::client_addr]"
HTTP::respond 200 content [ifile get portal_maintenance.html]
}
}
- aghaziNimbostratus
To clarify X-Forward for the IP where they're coming from and going to EventTime for the time of the event Request for the GET file GIF etc that they're requesting HTTPStatuscode self explanatory Referer is the previous URL link User Agent has the browser OS Request Time for the duration of the request. Host is the main URL
- dragonflymrCirrostratus
Hi,
Sorry to say but some of data you need will not be easily retrievable without some smart iRule codding - check this link Apache Style Logging with HSL.
Should be good starting point.
Piotr
- P_KAltostratus
Anthony-
Below iRule will log everything except your event times/durations.
when HTTP_REQUEST {
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