Forum Discussion
How to use values from session table to do a lookup on persist table
Thanks for your answer. The session command is working but I have one last issue. My session add command is adding to the persistence table
*session add uie $sessionid [list $calling_station_id $sessionid] $persist_ttl
*PERSIST TABLE
*universal c8:3c:85:d1:f6:cc 10.xx.xx.xx%1:1645 10.xx.xx.xx%1:any
from a 2nd VS, I'm pulling the correct value from the session table $calling_station_id (c8:3c:85:d1:f6:cc) but I'm trying to use it to do a lookup in the persist table to get the pool member that it was persisted on. I'm getting a blank value
set session_table [session lookup uie $sessionid]
set session_id [lindex $session_table 1]
set session_mac [lindex $session_table 0]
set table [persist lookup uie $session_mac]
log local0. " Session_mac = $table" give a blank value
1 Reply
- PeteWhite
Employee
The peristence table will do a lookup on the current VS. You need to use the options to tell it to look across all VSs. See https://clouddocs.f5.com/api/irules/persist.html
 
persist lookup [all|node|port|pool] "all" or no specification returns a list containing the node, port and pool name. Specifying any of the other return types will return the specified item only. = | { [any virtual|service|pool] [pool ] } the latter key specification is used to access persistence entries across virtuals, services, or pools.
 
So you want to use
 
set table [persist lookup uie $session_mac any virtual]
Recent Discussions
Related Content
* 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