I. count
Number of defined values within a period of time.
Field: (sec | # num, <time_shift>)
II. sec, num
1. sec, num
(Seconds, # value) --> (sec | # num,
The evaluation period is measured in seconds or with the latest collected values (starting)
2, (optional)-required pattern (integer item-exact match; float item-inner 0.000001 match)
3, operator (optional) optional
III. Supported options (case sensitive)
Equal to eq
Ne is not equal
Greater
Ge is greater than or equal
Lt less-less than or equal
Le is smaller than or EQUA
Default eq (default), ne, gt, ge, lt, le all support integers and floating-point numbers, eq, ne
String, text, and log entries
Regular expressions support integer project EQ (default), NE, GT, GE, LT, LE regular expressions
EQ, NE, regular expression, iregexp supports strings, text, and log items
Regexp: a case-sensitive regular expression.
Iregexp: a case-insensitive regular expression
IV. Supported value types:
Floating, INT, STR, text, log
V. Example:
Here, the value can be m in seconds)
Count (10 m) number of values in the last 10 minutes
Count (600) number of values in the last 10 minutes
COUNT () the value obtained in the last 10 minutes is 12.
Count (10 m, 12) the value obtained in the last ten minutes is 12.
Count (, 12, "gt") gets a value greater than 12 in the last 10 minutes
Count (#10, 12, "gt") the number of the last 10 values greater than 12
Count (86400, "gt",) number of values greater than 12 in 10 minutes before 24 hours
Count (110/7, "band")-thenumberofvaluesforlast10minuteshaving '000000' (inbinary) inthe3leastsignificantbits.
Count (600, 86400) the number of data values in 10 minutes before 24 hours
VI. Instance
1. True and false examples
Assume that the current value is 1 real, 0 false.
{111cn.net: runing. count (2 m, 0)}> 3
111cn.net: runing is items
If the value obtained within 2 minutes is 0, it is triggered if it is greater than 3 times. I think you should understand that the value of 1 you get must be true.
Note that if you use count, the number of times that the value is 0 in 2 minutes. If the value is greater than 3, the trigger is based on that you can detect at least 3 times in two minutes in itmes. You may need to modify the actual itmes value, otherwise it doesn't make sense
2, icmpping
{Www.111cn.net: icmpping. count (5 m, 0)}> 2
Ping is 1, and ping is 0.
Here we use icmpping. The time here is the last 5 minutes. We assume that we can ping once every 30 seconds and ping 10 times per 5, we assume that if two ping operations are performed differently in the last five minutes
3, gt
{Www.111cn.net: redis [, avg1]. count (10 m, 10, "gt")}> 2
If the average value of the last 10 minutes is greater than 10 times and exceeds 2 times
{Www.111cn.net: redis. count (#86400, "gt",)}> 2
If the number of values with the most 10 values greater than 5 before 24 hours is greater than twice