Is there an easy way way to create a trigger that fires when a certain number of hosts fail?
We use Zabbix to perform web checks from multiple hosts over zabbix proxies. That way we can probe a web API from three different sites.
We want Zabbix to raise an alert, when the web checks on 2 of the 3 hosts fail.
Currently we run three web check hosts: wch1, wch2 and wch3.
We create the trigger by connecting the single host triggers with logical and and or.
({wch1:web.test.fail[api check].count(#3,0,gt)}>1 and {wch2:web.test.fail[api check].count(#3,0,gt)}>1) or
({wch1:web.test.fail[api check].count(#3,0,gt)}>1 and {wch3:web.test.fail[api check].count(#3,0,gt)}>1) or
({wch3:web.test.fail[api check].count(#3,0,gt)}>1 and {wch3:web.test.fail[api check].count(#3,0,gt)}>1)
That way we test if two of the three checks fail it works.
But this logical construction is getting more complicated the more hosts you want to check.
It would be great if there would be some way to configure a trigger that fires, if there is a defined subset failing.
For example define a list of five trigers and fire an alarm if three of the five fail.
I did not find any elegant solution yet.
Thanks for your help
Felix Schäfer
------------------------------------------------------
Zabbix Version: 5.0.8
We use Zabbix to perform web checks from multiple hosts over zabbix proxies. That way we can probe a web API from three different sites.
We want Zabbix to raise an alert, when the web checks on 2 of the 3 hosts fail.
Currently we run three web check hosts: wch1, wch2 and wch3.
We create the trigger by connecting the single host triggers with logical and and or.
({wch1:web.test.fail[api check].count(#3,0,gt)}>1 and {wch2:web.test.fail[api check].count(#3,0,gt)}>1) or
({wch1:web.test.fail[api check].count(#3,0,gt)}>1 and {wch3:web.test.fail[api check].count(#3,0,gt)}>1) or
({wch3:web.test.fail[api check].count(#3,0,gt)}>1 and {wch3:web.test.fail[api check].count(#3,0,gt)}>1)
That way we test if two of the three checks fail it works.
But this logical construction is getting more complicated the more hosts you want to check.
It would be great if there would be some way to configure a trigger that fires, if there is a defined subset failing.
For example define a list of five trigers and fire an alarm if three of the five fail.
I did not find any elegant solution yet.
Thanks for your help
Felix Schäfer
------------------------------------------------------
Zabbix Version: 5.0.8
Comment