ADC Advanced Policy Expressions

STREAM_T

Stream

This topic lists the expressions that are provided by this class.

BANDWIDTH

Returns the bandwidth on an object.

Returns: unsigned_long_at

CHECK_BREACH_THRESHOLD(stream_transaction_track_mode_emode)

Returns true if an object corresponding to the stream identifier

has hit maximum breaching transactions threshold.

Transaction Tracking needs to be enabled in stream identifier configuration to use this expression.

Transaction Tracking mode: RESPONSE TIME in milli seconds.

add stream identifier sid -interval 5 -tracktransactions RESPTIME -maxTransactionThreshold 100 -BreachThreshold 10

 Expression: ANALYTIC.STREAM("sid").CHECK_BREACH_THRESHOLD(RESPONSE_TIME)

<!--NeedCopy-->

Parameters(expressions not allowed):

mode -

                        CHECK BREACH mode

Returns: bool_at

CHECK_LIMIT(stream_mode_emode, ip_address_atmaxthreshold)

Returns true if an object corresponding to the stream identifier

has hit the limit parameter.

mode: BANDWIDTH in kbps, RESPONSE TIME in milli seconds, REQUEST RATE in Requests/second,

CONNECTIONS i.e. Total Active Connections.

add stream identifier sid -interval 5

 Expression: ANALYTIC.STREAM("sid").check_limit(BANDWIDTH, 100000)

<!--NeedCopy-->

Note: maxthreshold should always be greater than 0.

Parameters(expressions not allowed):

mode -

                        Check Limit mode

maxthreshold -

                        Check Limit maximum threshold

Returns: bool_at

CHECK_LIMIT(stream_mode_emode, num_atmaxthreshold)

Returns true if an object corresponding to the stream identifier

has hit the limit parameter.

mode: BANDWIDTH in kbps, RESPONSE TIME in milli seconds, REQUEST RATE in Requests/second,

CONNECTIONS i.e. Total Active Connections.

add stream identifier sid -interval 5

 Expression: ANALYTIC.STREAM("sid").check_limit(BANDWIDTH, 100000)

<!--NeedCopy-->

Note: maxthreshold should always be greater than 0.

Parameters(expressions not allowed):

mode -

                        Check Limit mode

maxthreshold -

                        Check Limit maximum threshold

Returns: bool_at

CHECK_LIMIT(stream_mode_emode, time_atmaxthreshold)

Returns true if an object corresponding to the stream identifier

has hit the limit parameter.

mode: BANDWIDTH in kbps, RESPONSE TIME in milli seconds, REQUEST RATE in Requests/second,

CONNECTIONS i.e. Total Active Connections.

add stream identifier sid -interval 5

 Expression: ANALYTIC.STREAM("sid").check_limit(BANDWIDTH, 100000)

<!--NeedCopy-->

Note: maxthreshold should always be greater than 0.

Parameters(expressions not allowed):

mode -

                        Check Limit mode

maxthreshold -

                        Check Limit maximum threshold

Returns: bool_at

CHECK_LIMIT(stream_mode_emode, unsigned_long_atmaxthreshold)

Returns true if an object corresponding to the stream identifier

has hit the limit parameter.

mode: BANDWIDTH in kbps, RESPONSE TIME in milli seconds, REQUEST RATE in Requests/second,

CONNECTIONS i.e. Total Active Connections.

add stream identifier sid -interval 5

 Expression: ANALYTIC.STREAM("sid").check_limit(BANDWIDTH, 100000)

<!--NeedCopy-->

Note: maxthreshold should always be greater than 0.

Parameters(expressions not allowed):

mode -

                        Check Limit mode

maxthreshold -

                        Check Limit maximum threshold

Returns: bool_at

CHECK_LIMIT(stream_mode_emode, ip_address_atminthreshold, ip_address_atmaxthreshold)

Returns true if an object corresponding to the stream identifier

has hit the limit parameter.

mode: BANDWIDTH in kbps, RESPONSE TIME in milli seconds, REQUEST RATE in Requests/second,

CONNECTIONS i.e. Total Active Connections.

add stream identifier sid -interval 5

 Expression: ANALYTIC.STREAM("sid").check_limit(REQUEST_RATE, 10, 1000)

<!--NeedCopy-->

Note: maxthreshold and minthreshold cannot be negative. maxthreshold cannot be less than minthreshold.

Note: If maxthreshold is 0, then max threshold is not applied. minthreshold and maxthreshold cannot both be zero.

Example: ANALYTIC.STREAM("sid").check_limit(REQUEST_RATE, 10, 0)

<!--NeedCopy-->

Above expression returns true only if Request Rate is less than 10 requests per second. There is no upper limit here.

Parameters(expressions not allowed):

mode -

                        Check Limit Mode

minthreshold -

                        Check Limit min threshold

maxthreshold -

                        Check Limit maximum threshold

Returns: bool_at

CHECK_LIMIT(stream_mode_emode, ip_address_atminthreshold, num_atmaxthreshold)

Returns true if an object corresponding to the stream identifier

has hit the limit parameter.

mode: BANDWIDTH in kbps, RESPONSE TIME in milli seconds, REQUEST RATE in Requests/second,

CONNECTIONS i.e. Total Active Connections.

add stream identifier sid -interval 5

 Expression: ANALYTIC.STREAM("sid").check_limit(REQUEST_RATE, 10, 1000)

<!--NeedCopy-->

Note: maxthreshold and minthreshold cannot be negative. maxthreshold cannot be less than minthreshold.

Note: If maxthreshold is 0, then max threshold is not applied. minthreshold and maxthreshold cannot both be zero.

Example: ANALYTIC.STREAM("sid").check_limit(REQUEST_RATE, 10, 0)

<!--NeedCopy-->

Above expression returns true only if Request Rate is less than 10 requests per second. There is no upper limit here.

Parameters(expressions not allowed):

mode -

                        Check Limit Mode

minthreshold -

                        Check Limit min threshold

maxthreshold -

                        Check Limit maximum threshold

Returns: bool_at

CHECK_LIMIT(stream_mode_emode, ip_address_atminthreshold, time_atmaxthreshold)

Returns true if an object corresponding to the stream identifier

has hit the limit parameter.

mode: BANDWIDTH in kbps, RESPONSE TIME in milli seconds, REQUEST RATE in Requests/second,

CONNECTIONS i.e. Total Active Connections.

add stream identifier sid -interval 5

 Expression: ANALYTIC.STREAM("sid").check_limit(REQUEST_RATE, 10, 1000)

<!--NeedCopy-->

Note: maxthreshold and minthreshold cannot be negative. maxthreshold cannot be less than minthreshold.

Note: If maxthreshold is 0, then max threshold is not applied. minthreshold and maxthreshold cannot both be zero.

Example: ANALYTIC.STREAM("sid").check_limit(REQUEST_RATE, 10, 0)

<!--NeedCopy-->

Above expression returns true only if Request Rate is less than 10 requests per second. There is no upper limit here.

Parameters(expressions not allowed):

mode -

                        Check Limit Mode

minthreshold -

                        Check Limit min threshold

maxthreshold -

                        Check Limit maximum threshold

Returns: bool_at

CHECK_LIMIT(stream_mode_emode, ip_address_atminthreshold, unsigned_long_atmaxthreshold)

Returns true if an object corresponding to the stream identifier

has hit the limit parameter.

mode: BANDWIDTH in kbps, RESPONSE TIME in milli seconds, REQUEST RATE in Requests/second,

CONNECTIONS i.e. Total Active Connections.

add stream identifier sid -interval 5

 Expression: ANALYTIC.STREAM("sid").check_limit(REQUEST_RATE, 10, 1000)

<!--NeedCopy-->

Note: maxthreshold and minthreshold cannot be negative. maxthreshold cannot be less than minthreshold.

Note: If maxthreshold is 0, then max threshold is not applied. minthreshold and maxthreshold cannot both be zero.

Example: ANALYTIC.STREAM("sid").check_limit(REQUEST_RATE, 10, 0)

<!--NeedCopy-->

Above expression returns true only if Request Rate is less than 10 requests per second. There is no upper limit here.

Parameters(expressions not allowed):

mode -

                        Check Limit Mode

minthreshold -

                        Check Limit min threshold

maxthreshold -

                        Check Limit maximum threshold

Returns: bool_at

CHECK_LIMIT(stream_mode_emode, num_atminthreshold, ip_address_atmaxthreshold)

Returns true if an object corresponding to the stream identifier

has hit the limit parameter.

mode: BANDWIDTH in kbps, RESPONSE TIME in milli seconds, REQUEST RATE in Requests/second,

CONNECTIONS i.e. Total Active Connections.

add stream identifier sid -interval 5

 Expression: ANALYTIC.STREAM("sid").check_limit(REQUEST_RATE, 10, 1000)

<!--NeedCopy-->

Note: maxthreshold and minthreshold cannot be negative. maxthreshold cannot be less than minthreshold.

Note: If maxthreshold is 0, then max threshold is not applied. minthreshold and maxthreshold cannot both be zero.

Example: ANALYTIC.STREAM("sid").check_limit(REQUEST_RATE, 10, 0)

<!--NeedCopy-->

Above expression returns true only if Request Rate is less than 10 requests per second. There is no upper limit here.

Parameters(expressions not allowed):

mode -

                        Check Limit Mode

minthreshold -

                        Check Limit min threshold

maxthreshold -

                        Check Limit maximum threshold

Returns: bool_at

CHECK_LIMIT(stream_mode_emode, num_atminthreshold, num_atmaxthreshold)

Returns true if an object corresponding to the stream identifier

has hit the limit parameter.

mode: BANDWIDTH in kbps, RESPONSE TIME in milli seconds, REQUEST RATE in Requests/second,

CONNECTIONS i.e. Total Active Connections.

add stream identifier sid -interval 5

 Expression: ANALYTIC.STREAM("sid").check_limit(REQUEST_RATE, 10, 1000)

<!--NeedCopy-->

Note: maxthreshold and minthreshold cannot be negative. maxthreshold cannot be less than minthreshold.

Note: If maxthreshold is 0, then max threshold is not applied. minthreshold and maxthreshold cannot both be zero.

Example: ANALYTIC.STREAM("sid").check_limit(REQUEST_RATE, 10, 0)

<!--NeedCopy-->

Above expression returns true only if Request Rate is less than 10 requests per second. There is no upper limit here.

Parameters(expressions not allowed):

mode -

                        Check Limit Mode

minthreshold -

                        Check Limit min threshold

maxthreshold -

                        Check Limit maximum threshold

Returns: bool_at

CHECK_LIMIT(stream_mode_emode, num_atminthreshold, time_atmaxthreshold)

Returns true if an object corresponding to the stream identifier

has hit the limit parameter.

mode: BANDWIDTH in kbps, RESPONSE TIME in milli seconds, REQUEST RATE in Requests/second,

CONNECTIONS i.e. Total Active Connections.

add stream identifier sid -interval 5

 Expression: ANALYTIC.STREAM("sid").check_limit(REQUEST_RATE, 10, 1000)

<!--NeedCopy-->

Note: maxthreshold and minthreshold cannot be negative. maxthreshold cannot be less than minthreshold.

Note: If maxthreshold is 0, then max threshold is not applied. minthreshold and maxthreshold cannot both be zero.

Example: ANALYTIC.STREAM("sid").check_limit(REQUEST_RATE, 10, 0)

<!--NeedCopy-->

Above expression returns true only if Request Rate is less than 10 requests per second. There is no upper limit here.

Parameters(expressions not allowed):

mode -

                        Check Limit Mode

minthreshold -

                        Check Limit min threshold

maxthreshold -

                        Check Limit maximum threshold

Returns: bool_at

CHECK_LIMIT(stream_mode_emode, num_atminthreshold, unsigned_long_atmaxthreshold)

Returns true if an object corresponding to the stream identifier

has hit the limit parameter.

mode: BANDWIDTH in kbps, RESPONSE TIME in milli seconds, REQUEST RATE in Requests/second,

CONNECTIONS i.e. Total Active Connections.

add stream identifier sid -interval 5

 Expression: ANALYTIC.STREAM("sid").check_limit(REQUEST_RATE, 10, 1000)

<!--NeedCopy-->

Note: maxthreshold and minthreshold cannot be negative. maxthreshold cannot be less than minthreshold.

Note: If maxthreshold is 0, then max threshold is not applied. minthreshold and maxthreshold cannot both be zero.

Example: ANALYTIC.STREAM("sid").check_limit(REQUEST_RATE, 10, 0)

<!--NeedCopy-->

Above expression returns true only if Request Rate is less than 10 requests per second. There is no upper limit here.

Parameters(expressions not allowed):

mode -

                        Check Limit Mode

minthreshold -

                        Check Limit min threshold

maxthreshold -

                        Check Limit maximum threshold

Returns: bool_at

CHECK_LIMIT(stream_mode_emode, time_atminthreshold, ip_address_atmaxthreshold)

Returns true if an object corresponding to the stream identifier

has hit the limit parameter.

mode: BANDWIDTH in kbps, RESPONSE TIME in milli seconds, REQUEST RATE in Requests/second,

CONNECTIONS i.e. Total Active Connections.

add stream identifier sid -interval 5

 Expression: ANALYTIC.STREAM("sid").check_limit(REQUEST_RATE, 10, 1000)

<!--NeedCopy-->

Note: maxthreshold and minthreshold cannot be negative. maxthreshold cannot be less than minthreshold.

Note: If maxthreshold is 0, then max threshold is not applied. minthreshold and maxthreshold cannot both be zero.

Example: ANALYTIC.STREAM("sid").check_limit(REQUEST_RATE, 10, 0)

<!--NeedCopy-->

Above expression returns true only if Request Rate is less than 10 requests per second. There is no upper limit here.

Parameters(expressions not allowed):

mode -

                        Check Limit Mode

minthreshold -

                        Check Limit min threshold

maxthreshold -

                        Check Limit maximum threshold

Returns: bool_at

CHECK_LIMIT(stream_mode_emode, time_atminthreshold, num_atmaxthreshold)

Returns true if an object corresponding to the stream identifier

has hit the limit parameter.

mode: BANDWIDTH in kbps, RESPONSE TIME in milli seconds, REQUEST RATE in Requests/second,

CONNECTIONS i.e. Total Active Connections.

add stream identifier sid -interval 5

 Expression: ANALYTIC.STREAM("sid").check_limit(REQUEST_RATE, 10, 1000)

<!--NeedCopy-->

Note: maxthreshold and minthreshold cannot be negative. maxthreshold cannot be less than minthreshold.

Note: If maxthreshold is 0, then max threshold is not applied. minthreshold and maxthreshold cannot both be zero.

Example: ANALYTIC.STREAM("sid").check_limit(REQUEST_RATE, 10, 0)

<!--NeedCopy-->

Above expression returns true only if Request Rate is less than 10 requests per second. There is no upper limit here.

Parameters(expressions not allowed):

mode -

                        Check Limit Mode

minthreshold -

                        Check Limit min threshold

maxthreshold -

                        Check Limit maximum threshold

Returns: bool_at

CHECK_LIMIT(stream_mode_emode, time_atminthreshold, time_atmaxthreshold)

Returns true if an object corresponding to the stream identifier

has hit the limit parameter.

mode: BANDWIDTH in kbps, RESPONSE TIME in milli seconds, REQUEST RATE in Requests/second,

CONNECTIONS i.e. Total Active Connections.

add stream identifier sid -interval 5

 Expression: ANALYTIC.STREAM("sid").check_limit(REQUEST_RATE, 10, 1000)

<!--NeedCopy-->

Note: maxthreshold and minthreshold cannot be negative. maxthreshold cannot be less than minthreshold.

Note: If maxthreshold is 0, then max threshold is not applied. minthreshold and maxthreshold cannot both be zero.

Example: ANALYTIC.STREAM("sid").check_limit(REQUEST_RATE, 10, 0)

<!--NeedCopy-->

Above expression returns true only if Request Rate is less than 10 requests per second. There is no upper limit here.

Parameters(expressions not allowed):

mode -

                        Check Limit Mode

minthreshold -

                        Check Limit min threshold

maxthreshold -

                        Check Limit maximum threshold

Returns: bool_at

CHECK_LIMIT(stream_mode_emode, time_atminthreshold, unsigned_long_atmaxthreshold)

Returns true if an object corresponding to the stream identifier

has hit the limit parameter.

mode: BANDWIDTH in kbps, RESPONSE TIME in milli seconds, REQUEST RATE in Requests/second,

CONNECTIONS i.e. Total Active Connections.

add stream identifier sid -interval 5

 Expression: ANALYTIC.STREAM("sid").check_limit(REQUEST_RATE, 10, 1000)

<!--NeedCopy-->

Note: maxthreshold and minthreshold cannot be negative. maxthreshold cannot be less than minthreshold.

Note: If maxthreshold is 0, then max threshold is not applied. minthreshold and maxthreshold cannot both be zero.

Example: ANALYTIC.STREAM("sid").check_limit(REQUEST_RATE, 10, 0)

<!--NeedCopy-->

Above expression returns true only if Request Rate is less than 10 requests per second. There is no upper limit here.

Parameters(expressions not allowed):

mode -

                        Check Limit Mode

minthreshold -

                        Check Limit min threshold

maxthreshold -

                        Check Limit maximum threshold

Returns: bool_at

CHECK_LIMIT(stream_mode_emode, unsigned_long_atminthreshold, ip_address_atmaxthreshold)

Returns true if an object corresponding to the stream identifier

has hit the limit parameter.

mode: BANDWIDTH in kbps, RESPONSE TIME in milli seconds, REQUEST RATE in Requests/second,

CONNECTIONS i.e. Total Active Connections.

add stream identifier sid -interval 5

 Expression: ANALYTIC.STREAM("sid").check_limit(REQUEST_RATE, 10, 1000)

<!--NeedCopy-->

Note: maxthreshold and minthreshold cannot be negative. maxthreshold cannot be less than minthreshold.

Note: If maxthreshold is 0, then max threshold is not applied. minthreshold and maxthreshold cannot both be zero.

Example: ANALYTIC.STREAM("sid").check_limit(REQUEST_RATE, 10, 0)

<!--NeedCopy-->

Above expression returns true only if Request Rate is less than 10 requests per second. There is no upper limit here.

Parameters(expressions not allowed):

mode -

                        Check Limit Mode

minthreshold -

                        Check Limit min threshold

maxthreshold -

                        Check Limit maximum threshold

Returns: bool_at

CHECK_LIMIT(stream_mode_emode, unsigned_long_atminthreshold, num_atmaxthreshold)

Returns true if an object corresponding to the stream identifier

has hit the limit parameter.

mode: BANDWIDTH in kbps, RESPONSE TIME in milli seconds, REQUEST RATE in Requests/second,

CONNECTIONS i.e. Total Active Connections.

add stream identifier sid -interval 5

 Expression: ANALYTIC.STREAM("sid").check_limit(REQUEST_RATE, 10, 1000)

<!--NeedCopy-->

Note: maxthreshold and minthreshold cannot be negative. maxthreshold cannot be less than minthreshold.

Note: If maxthreshold is 0, then max threshold is not applied. minthreshold and maxthreshold cannot both be zero.

Example: ANALYTIC.STREAM("sid").check_limit(REQUEST_RATE, 10, 0)

<!--NeedCopy-->

Above expression returns true only if Request Rate is less than 10 requests per second. There is no upper limit here.

Parameters(expressions not allowed):

mode -

                        Check Limit Mode

minthreshold -

                        Check Limit min threshold

maxthreshold -

                        Check Limit maximum threshold

Returns: bool_at

CHECK_LIMIT(stream_mode_emode, unsigned_long_atminthreshold, time_atmaxthreshold)

Returns true if an object corresponding to the stream identifier

has hit the limit parameter.

mode: BANDWIDTH in kbps, RESPONSE TIME in milli seconds, REQUEST RATE in Requests/second,

CONNECTIONS i.e. Total Active Connections.

add stream identifier sid -interval 5

 Expression: ANALYTIC.STREAM("sid").check_limit(REQUEST_RATE, 10, 1000)

<!--NeedCopy-->

Note: maxthreshold and minthreshold cannot be negative. maxthreshold cannot be less than minthreshold.

Note: If maxthreshold is 0, then max threshold is not applied. minthreshold and maxthreshold cannot both be zero.

Example: ANALYTIC.STREAM("sid").check_limit(REQUEST_RATE, 10, 0)

<!--NeedCopy-->

Above expression returns true only if Request Rate is less than 10 requests per second. There is no upper limit here.

Parameters(expressions not allowed):

mode -

                        Check Limit Mode

minthreshold -

                        Check Limit min threshold

maxthreshold -

                        Check Limit maximum threshold

Returns: bool_at

CHECK_LIMIT(stream_mode_emode, unsigned_long_atminthreshold, unsigned_long_atmaxthreshold)

Returns true if an object corresponding to the stream identifier

has hit the limit parameter.

mode: BANDWIDTH in kbps, RESPONSE TIME in milli seconds, REQUEST RATE in Requests/second,

CONNECTIONS i.e. Total Active Connections.

add stream identifier sid -interval 5

 Expression: ANALYTIC.STREAM("sid").check_limit(REQUEST_RATE, 10, 1000)

<!--NeedCopy-->

Note: maxthreshold and minthreshold cannot be negative. maxthreshold cannot be less than minthreshold.

Note: If maxthreshold is 0, then max threshold is not applied. minthreshold and maxthreshold cannot both be zero.

Example: ANALYTIC.STREAM("sid").check_limit(REQUEST_RATE, 10, 0)

<!--NeedCopy-->

Above expression returns true only if Request Rate is less than 10 requests per second. There is no upper limit here.

Parameters(expressions not allowed):

mode -

                        Check Limit Mode

minthreshold -

                        Check Limit min threshold

maxthreshold -

                        Check Limit maximum threshold

Returns: bool_at

COLLECT_STATS

Returns true if statistics collection on an object was successful.

Returns: bool_at

COLLECT_STATS(uint amplification_factor)

Returns true if statistics collection on an object was successful.

Parameters(expressions not allowed):

amplification_factor -

                        Amplification factor

Returns: bool_at

COLLECT_STATS(text_tmode, uint max_threshold, stream_action_eaction)

Returns true if statistics collection on an object was

successful.

This expression is used to rate limit connections per packet

level. When an object/connection corresponding to the stream

identifier has received more than configured percentage

(max_threshold) of bad packets, configured action is

triggered.

add stream identifier packetcreditrateidentifier packetcreditrateselector -interval 1

 add responder policy packetcreditratesessionpolicy "ANALYTICS.STREAM(\"packetcreditrateidentifier\").COLLECT_STATS(\"PACKET_CREDITS\", 75, RESET)" NOOP

<!--NeedCopy-->

Valid mode: PACKET_CREDITS

Valid action: RESET/DROP

Valid max_threshold: 0-100

Parameters(expressions not allowed):

mode -

                        stream mode

max_threshold -

                        maximum threshold percentage of bad packets.

action -

                        Action

Returns: bool_at

COLLECT_STATS(text_tmode, uint max_threshold, stream_action_eaction, uint type)

Returns true if statistics collection on an object was

successful.

This expression is used to rate limit packets per second.

When an object/connection corresponding to the stream

identifier has received more than configured (max_threshold)

number of packets, configured action is triggered.

add stream identifier packetrateidentifier packetrateselector -interval 1

 add responder policy packetratesessionpolicy "ANALYTICS.STREAM(\"packetrateidentifier\").COLLECT_STATS(\"PACKET_LIMIT\", 5000, RESET, 1)" NOOP

<!--NeedCopy-->

Valid mode: PACKET_LIMIT

Valid action: RESET/DROP

Valid max_threshold: strictly greater than zero.

Valid type: 0/1 0 for bursty 1 for smooth

Parameters(expressions not allowed):

mode -

                        stream mode

max_threshold -

                        maximum threshold of packets per second.

action -

                        Action

type -

                        rate limiting type like smooth/bursty.

Returns: bool_at

CONNECTIONS

Returns the number of connections on an object.

Returns: unsigned_long_at

IS_TOP_FREQUENTS(uint n)

Returns true if a given object is in the top n of a identifier.

Parameters(expressions not allowed):

n -

                        Given object must be in the top n frequents of the collected objects.

Returns: bool_at

IS_TOP(uint n)

Returns true if a given object is in the top n of a identifier.

Parameters(expressions not allowed):

n -

                        Given object must be in the top n of the collected objects.

Returns: bool_at

REQUESTS

Returns the number of requests on an object.

Returns: unsigned_long_at

RESPTIME

Returns the average response time of an object.

Returns: unsigned_long_at

STREAM_T

In this article