ltm rule command ISTATS incrΒΆ

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



ISTATS::incr
       Increments the specified key by the given value.

SYNOPSIS
       ISTATS::incr KEY VALUE

DESCRIPTION
       Increments the specified key by the given value. The increment value
       must be non-negative for a counter.

       Note that text string iStats may not be incremented.

       Syntax

       ISTATS::incr  

	    * Increments the specified iStats key by the given value.

	    Note that there is no default increment value, so the value is
	    required, not optional.

RETURN VALUE
VALID DURING
       ANY_EVENT

EXAMPLES
	when HTTP_REQUEST {
		if { [string tolower [HTTP::uri]] equals "/12345" } {
			ISTATS::incr "uri /12345 counter Requests" 1
			HTTP::uri "/"
			HTTP::redirect "http://www.mysite.com"
		} elseif { [string tolower [HTTP::uri]] equals "/stats" } {
			  HTTP::respond 200 content "Requests for /12345: [ISTATS::get "uri /12345 counter Requests"]"
		}
	}

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



BIG-IP				  2017-01-31			      iRule(1)