The average value of items during the defined evaluation period.
Format: avg (sec | # num, <time_shift>)
Sec or # num)
Supported value types: floating, INT
Example:
Avg (#5): 5 latest average values
Avg (1 h): Average value within one hour
Avg (1 h, 1d): Average value of one hour before a day
I. Example:
1, hourly average
{Www.111cn.net: nginx. http. avg (1 h) }= 30000
The hourly average value of nginx http key is triggered if = 30000
2, number of times in time
{Www.111cn.net: nginx. http. avg (#20) }= 300000
The nginx http key is triggered when the average value of the last 10 times is 300000 (assume that the value of each time is 30 seconds, that is, the value of 30 at a time is 300000, and a total of 20 times are obtained)
3, time_thrift
{Www.111cn.net: nginx. http. avg (1 h, 1d }= 30000
The average value of the nginx http key in one hour before one day is 30000.
4, within minutes
{Www.111cn.net: nginx. http. avg (#30000 m)} <
If the average value of nginx http key is less than 30000 in the last 10 minutes (in this period, if the value is updated to 1 minute, #10 is equal to, 1 ~ 10 minutes)