Forum Discussion
TimRiker
Cirrocumulus
Oct 14, 2019log persistence mode in iRule
Is there an iRule way to query the current persistence mode? I'm looking to add this to our logging rule. https://devcentral.f5.com/s/articles/logging-irule-1180
Andrew-F5
Employee
Oct 16, 2019There doesn't appear to be a way to directly query a persistence type via iRule commands.
You might be able to leverage 'persist lookup' using if..else logic to check each persistence type returning true for a match.
#pseudo code
when HTTP_REQUEST {
if { persist lookup cookie == $cookievalue }{
log local0. "Persistence type Cookie"
}
else { persist lookup simple == $simplevalue }{
log local0. "Persistence type Simple"
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
