APM - Track clicks on webtop resources
Problem this snippet solves: This configuration sample provide to the administrator a way to log all APM webtop resources clicked by a logged-in user. Those logs can be exported to external systems ...
Updated Jun 06, 2023
Version 2.0Yann_Desmarest
Cirrus
Joined September 11, 2012
Stanislas_Piro2
Aug 15, 2017Cumulonimbus
Hi Yann,
you can use
ACCESS_ACL_ALLOWED
instead of HTTP_REQUEST
. it prevent session lookup and limit irule suspend in high load architectures.
when ACCESS_ACL_ALLOWED {
if { [HTTP::path] eq "/analytics" } {
set time [clock format [expr { [URI::query [HTTP::uri] "d"]/1000 }] -format "%D %T"]
set res [b64decode [URI::decode [URI::query [HTTP::uri] "r"]]]
set user [ACCESS::session data get session.logon.last.username]
set session [HTTP::cookie value LastMRH_Session]
set clientip [ACCESS::session data get session.user.clientip]
log local0. "time=$time, clientip=$clientip, user=$user, session=$session, res=$res"
ACCESS::respond 200 noserver
}
}