Forum Discussion
Satoshino
Oct 27, 2020Cirrus
Irule log session time
Hi everyone, I am looking for a way to log, when it is close, a duration of an APM session via irule, do you know if it is possible to do this? Thanks you
Satoshino
Oct 27, 2020Cirrus
update, i create this irule:
when ACCESS_SESSION_CLOSED {
set sessionId [ACCESS::session data get session.user.sessionid]
set startSession [ACCESS::session data get session.user.starttime]
set endSession [clock seconds]
set seconds = int($endSession - $startSession)
set minutes = expr [$seconds / 60]
set hours = expr [$minutes / 60]
if { $minutes > 60 } {log local0. "the session duration is $hours hours" }
else { log local0. "the session duration is $minutes minutes"}
}
but i receive this error:
01070151:3: Rule [/Common/session_log] error: /Common/session_log:6: error: [wrong # args][set seconds = int($endSession - $startSession)]
/Common/session_log:7: error: [wrong # args][set minutes = expr [$seconds / 60]]
/Common/session_log:8: error: [wrong # args][set hours = expr [$minutes / 60]]
what can be the cause?
Thanks you
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