I do have a trigger that will fire when external check output will contain "Servers 1/3 UP" or "2/3 UP" combined with OR. This is one of them:
({Zabbix server :server-check.regexp(Servers 1/3 UP, #2)})<>0
But it doesn't work. How do I make the trigger fire only when the last two outputs do contain these strings? Thanks
Function regexp(Servers 1/3 UP, #2)
checks whether any of the last two values have a regular expression Servers 1/3 UP
in them.
You can instead use function count(#2, Servers 1/3 UP)
and compare its result to 2
.
Please see function documentation for Zabbix 3.0 for more information. Note that since Zabbix 3.2 regular expression matching is also supported in function count()
(see function documentation for Zabbix 3.2).