ltm rule command STATS setΒΆ

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

STATS::set
       Sets the value of a Statistics profile setting.

SYNOPSIS
       STATS::set PROFILE_NAME FIELD_NAME (VALUE)?

DESCRIPTION
       Sets the value of the specified setting (field), in the specified Statistics profile, to the specified value.
       If you do not specify a value, the BIG-IP system sets the value to 0.

       Syntax

       STATS::set   []

	    * Sets the value of a Statistics profile field.

RETURN VALUE
VALID DURING
EXAMPLES
	when HTTP_REQUEST {
	  if {[string tolower [HTTP::uri]] starts_with "/enable"} {
	    STATS::set stats_profile_1 "my_first_field" "val1"
	  }
	}

	# Workaround for CR117956 (see version specific notes below for details)
	when RULE_INIT {
	    set ::stats_rst 1
	}
	when CLIENT_ACCEPTED {
	   if { $::stats_rst == 1 }{
	      STATS::set profilename fieldname 0
	      set ::stats_rst 0
	   }
	}

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

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