v17.0.0 v16.0.0 v15.0.0 v13.0.0

  • General
  • Commands
  • Modules

On this page:
  • ltm rule command BOTDEFENSE cookie age
  • CloudDocs Home > F5 TMSH Reference > ltm rule command BOTDEFENSE cookie age

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				  2018-07-19			      iRule(1)