F5 Sites
  • F5.com
  • LearnF5
  • NGINX
  • MyF5
  • Partner Central
Contact
  • Under Attack?
  • F5 Support
  • DevCentral Support
  • F5 Sales
  • NGINX Sales
  • F5 Professional Services
Skip to contentBrand Logo
Forums
CrowdSRC
Articles
Groups
EventsSuggestionsHow Do I...?
RegisterSign In
  1. DevCentral
  2. CrowdSRC
  3. CodeShare

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.0
application delivery
BIG-IP Access Policy Manager (APM)
iRules
security
Yann_Desmarest's avatar
Yann_Desmarest
Icon for Cirrus rankCirrus
Joined September 11, 2012
View Profile
Stanislas_Piro2's avatar
Stanislas_Piro2
Icon for Cumulonimbus rankCumulonimbus
Aug 15, 2017

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
    }
}

ABOUT DEVCENTRAL

DevCentral NewsTechnical ForumTechnical ArticlesTechnical CrowdSRCCommunity GuidelinesDevCentral EULAGet a Developer Lab LicenseBecome a DevCentral MVP

RESOURCES

Product DocumentationWhite PapersGlossaryCustomer StoriesWebinarsFree Online CoursesF5 CertificationLearnF5 Training

SUPPORT

Manage SubscriptionsProfessional ServicesProfessional ServicesCreate a Service RequestSoftware DownloadsSupport Portal

PARTNERS

Find a Reseller PartnerTechnology AlliancesBecome an F5 PartnerLogin to Partner Central

F5 logo©2024 F5, Inc. All rights reserved.
TrademarksPoliciesPrivacyCalifornia PrivacyDo Not Sell My Personal Information