大网数据广告活动
服务器运维问答

Zabbix Trigger Hysteresis - Incorrect trigger expression

· 52CE 我爱测

I am trying to use the following expressions: ({TRIGGER.VALUE}=0&{Template App Zabbix Agent:agent.ping.nodata(5m)}=1) | ({TRIGGER.VALUE}=1&{Template App Zabbix Agent:agent.ping.min(20m)}=1) But i get the following error: Incorrec…

问题原文

原帖链接 · morleyc · CC BY-SA 3.0

I am trying to use the following expressions:

({TRIGGER.VALUE}=0&{Template App Zabbix Agent:agent.ping.nodata(5m)}=1) | ({TRIGGER.VALUE}=1&{Template App Zabbix Agent:agent.ping.min(20m)}=1)

But i get the following error: Incorrect trigger expression. Check expression part starting from "0&{Template App Zabbix Agent:agent.ping.nodata(5m)}=1)|({TRIGGER.VALUE}=1&{Template App Zabbix Agent:agent.ping.min(20m)}=1)".

Any idea what i am doing wrong?

已采纳解答

原帖链接 · Simone Zabberoni · CC BY-SA 3.0

The issue comes from the "&" and "|", you can see the full list of supported expressions for 3.2 here: https://www.zabbix.com/documentation/3.2/manual/config/triggers/expression

That's my sample trigger for temperature hysteresis:

({TRIGGER.VALUE}=0 and {Template Sensor:temp.T1.last(5m)}>{$MAX_TEMP_T1}) or 
        ({TRIGGER.VALUE}=1 and {Template Sensor:temp.T1.last(5m)}>{$MAX_TEMP_T1_HYST})

With these template macros:

{$MAX_TEMP_T1} = 28
{$MAX_TEMP_T1_HYST} = 25

Also, from 3.2 you can use the "Recovery Expression" feature: https://www.zabbix.com/documentation/3.2/manual/introduction/whatsnew320#easier_trigger_hysteresis

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-05-26)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。