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

How can I force Zabbix to warn about disaster alert after 4 attemps?

· 52CE 我爱测

I use Zabbix 3.4 and I am trying to configure Zabbix to send an alarm only after 4 attemps . This alarm checks if the HTTP server returns 200 code. I have tried to set up a Web Scenario, but in the Zabbix Docs they say this: The …

问题原文

原帖链接 · ras212 · CC BY-SA 4.0

I use Zabbix 3.4 and I am trying to configure Zabbix to send an alarm only after 4 attemps. This alarm checks if the HTTP server returns 200 code. I have tried to set up a Web Scenario, but in the Zabbix Docs they say this:

The number of attempts for executing web scenario steps. In case of network problems (timeout, no connectivity, etc) Zabbix can repeat executing a step several times. The figure set will equally affect each step of the scenario. Up to 10 attempts can be specified, default value is 1. Note: Zabbix will not repeat a step because of a wrong response code or the mismatch of a required string. This parameter is supported starting with Zabbix 2.2.

已采纳解答

原帖链接 · Richlv · CC BY-SA 4.0

The quoted section is about retrying inside the web scenario. You will have to use trigger functions.

Checking the return code item, you can use in the expression count(#4,200)=0.

While this question is a bit different, the ultimate solution is the same as in https://stackoverflow.com/questions/43605281/how-to-teach-zabbix-to-be-smart-about-short-spikes-in-events .

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

资料来源与适用范围

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

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

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