zabbix触发器函数 count

转摘至梅总文章

一直没用过这个函数,今天研究了下,确实很有用(用过的忽略);
之前很多功能都是用max,min,avg曲线实现的,其实用count最合理(如典典刚用的高防持续N次ping超时)。
 
举例:监控weburl返回值,正常返回200,连续3次(3分钟)返回值都不是200,报警:
生成的函数:
{192.168.75.130:web.test.time[7881URLL,m-goods-list,resp].count(#3,200,ne,0)}=3
函数说明:
count (sec|#num,<pattern>,<operator>,<time_shift>)
 
operator说明:
eq - equal
ne - not equal
gt - greater
ge - greater or equal
lt - less
le - less or equal
like - matches if contains pattern (case-sensitive)
band - bitwise AND
原文地址:https://www.cnblogs.com/itfat/p/8408862.html