Forum Discussion
Request Logging Other (APM) Information
Hi,
I had the same need and the first solution I found was to configure ACL with log "packet" and create a log filter to send cal log to HSL pool.
the problem with ACL log is there is no username information but session ID and I needed to create a correlation tool to match username / session ID / ACL.
After reading the Kevin's irule, I modified it to log RESPONSE instead of REQUEST to get response code.
The new irule is :
when CLIENT_ACCEPTED {
set user "-"
}
when ACCESS_ACL_ALLOWED {
set user [ACCESS::session data get session.logon.last.username]
}
when HTTP_RESPONSE {
HTTP::header insert "USER" $user
}
when HTTP_RESPONSE_RELEASE {
HTTP::header remove "USER"
}The "-" default value is to replace username by - if request is not authenticated. I configured RESPONSE Template with:
$CLIENT_IP - ${USER} $DATE_NCSA $HTTP_REQUEST $HTTP_STATCODE $RESPONSE_SIZE $Referer 0 $CookieThis is the NCSA_COMBINED template with the second "-" replaced by ${USER}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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