TCP::analytics¶
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.
Syntax¶
TCP::analytics (enable | disable | key (KEY)?)
TCP::analytics (enable | disable | key (KEY)?)¶
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]"
}
}