I go the following rule to work. It times out after 10 seconds, which is the value I used to test:
I sent curl commands with 2 different values for the header and it created 2 different persist records.
when HTTP_REQUEST {
set hVal [HTTP::header value "SessionId"]
if { $hVal ne "" } {
persist uie $hVal 10
}
}
root@(localhost)(cfg-sync Standalone)(Active)(/Common)(tmos) show ltm persistence persist-records all-properties
Sys::Persistent Connections
universal - 192.168.1.105:80 - 172.16.0.100:80
TMM 1
Mode universal
Value 45345dddd
Age (sec.) 3
Virtual Name /Common/test
Virtual Addr 192.168.1.105:80
Node Addr 172.16.0.100:80
Pool Name /Common/dvwa-secure
Client Addr 192.168.1.100
Owner entry
universal - 192.168.1.105:80 - 172.16.0.100:80
TMM 0
Mode universal
Value 12345
Age (sec.) 4
Virtual Name /Common/test
Virtual Addr 192.168.1.105:80
Node Addr 172.16.0.100:80
Pool Name /Common/dvwa-secure
Client Addr 192.168.1.100
Owner entry
Total records returned: 2