Forum Discussion

DevP's avatar
DevP
Icon for Altostratus rankAltostratus
Sep 07, 2023

session.client.hostname

Hello to all,

For some reason I am not able to log the APM session variable session.client.hostname

For instance the session.client.type does get logged. For teste I  put them both in the irule.
Any ideas about this? The variable is available as seen under Access > Overview > Active Sessions > View Variables.

when ACCESS_SESSION_STARTED {
set hostname [ACCESS::session data get "session.client.hostname"]
set type [ACCESS::session data get "session.client.type"]
log local0. "device-machine=$hostname , type=$type"
}

From /var/log/ltm :
Sep 7 15:12:34 bigip2 info tmm1[12534]: Rule /Common/_irule_log_variables <ACCESS_SESSION_STARTED>: device-machine= , type=Standalone

 

 

  • Hi,

    I think this is because of the used event, try using when Access_ACL_Allowed instead. This is mainly because at Access_Session_Started event, that's very early in the Hud chain, so the available info is mainly the client IP address, but to get the remaining session variables, whether to use the Access_ACL_Allowed  or Access_Policy_Agent_Event and use iRule box in the VPE referencing the iRule ID.

    I hope this helps,

    Thanks,

1 Reply

  • Hi,

    I think this is because of the used event, try using when Access_ACL_Allowed instead. This is mainly because at Access_Session_Started event, that's very early in the Hud chain, so the available info is mainly the client IP address, but to get the remaining session variables, whether to use the Access_ACL_Allowed  or Access_Policy_Agent_Event and use iRule box in the VPE referencing the iRule ID.

    I hope this helps,

    Thanks,