ltm rule command TCP analyticsΒΆ

iRule(1)					  BIG-IP TMSH Manual					     iRule(1)

TCP::analytics
       Enable/disable AVR TCP stat reporting, and/or attach a user-defined string to categorize the connection for
       statistics collection purposes.

SYNOPSIS
       TCP::analytics (enable | disable | key (KEY)?)

DESCRIPTION
       Enables or disables AVR TCP stat reporting ("analytics") for this connection and/or assigns user-defined keys.

       TCP::analytics enable
	   Enables analytics on this connection. AVR must be provisioned and the virtual must have a tcp-analytics
       profile attached. Collection will use the configuration in the profile. If the profile is configured to
       disable analytics by default, this gives users the ability to collect statistics by exception only.

       TCP::analytics disable
	   Disables analytics on this connection. If AVR is provisioned and the virtual has a tcp-analytics profile
       that enables analytics by default, this allows users to disable collection by exception only.

       TCP::analytics key 
	   Attaches a user-provided string as an analytics entity. All statistics reported after executing this
       command will be separable from all statistics that do not have the key attached. Replaces any existing key
       attached to this connection. If analytics is not enabled, AVR is provisioned, and the virtual has a tcp-
       analytics profile attached, this command also enables analytics.

       TCP::analytics key
	   Removes any user-provided analytics entity attached via a previous TCP::analytics command. If analytics is
       not enabled, AVR is provisioned, and the virtual has a tcp-analytics profile attached, this command also
       enables analytics.

RETURN VALUE
VALID DURING
       ANY_EVENT

EXAMPLES
	# start collection for one subnet only.
	when CLIENT_ACCEPTED {
	    if [IP::addr [IP::client_addr]/8 equals 10.0.0.0] {
		TCP::analytics enable
	    }
	}
	when HTTP_REQUEST {
	    # must check subnet again to avoid starting for all
	    # connections
	    if [IP::addr [IP::client_addr]/8 equals 10.0.0.0] {
		# make stats queryable by URI
		TCP::analytics key "[HTTP::uri]"
	    }
	}

HINTS
       Statistics on connection duration will only reflect the time which analytics is enabled.

SEE ALSO
CHANGE LOG
       @BIGIP-12.1.0
	   -- First introduced the command.

BIG-IP						      2020-06-23					     iRule(1)