ltm rule command BOTDEFENSE cookie age
iRule(1) BIG-IP TMSH Manual iRule(1)
BOTDEFENSE::cookie_age
Returns the age of the Bot Defense cookie in seconds.
SYNOPSIS
BOTDEFENSE::cookie_age
DESCRIPTION
Returns the age of the Bot Defense cookie in seconds. This is only
relevant if the value of BOTDEFENSE::cookie_status is either "valid" or
"expired"; otherwise, -1 is returned.
Syntax
BOTDEFENSE::cookie_age
RETURN VALUE
Returns the age of the Bot Defense cookie in seconds, or -1 if not
applicable.
VALID DURING
BOTDEFENSE_REQUEST, BOTDEFENSE_ACTION
EXAMPLES
# EXAMPLE: In case of an expired cookie, log the age of the cookie
when BOTDEFENSE_REQUEST {
if {[BOTDEFENSE::cookie_status] eq "expired"} {
set log "expired botdefense cookie (from [BOTDEFENSE::cookie_age]"
append log " seconds ago) from IP [IP::client_addr]"
HSL::send $hsl $log
}
}
HINTS
SEE ALSO
CHANGE LOG
@BIGIP-12.1 --First introduced the command.
BIG-IP 2017-01-31 iRule(1)