Ad Widget

Collapse

Issues when configuring AND as the condition with Triggers

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Shane Hutter
    Junior Member
    • Apr 2021
    • 3

    #1

    Issues when configuring AND as the condition with Triggers

    Hi Zabbix community,

    I've been having issues getting an Action to work when using AND in the condition with triggers.

    My Triggers:
    I have setup 5 squid, non-caching web proxies that my Zabbix server has access to use. I have then set up 5 Httptests, each check for a string on a site, and each proxy through one of the squid proxies.

    My Action:
    Click image for larger version

Name:	action1.png
Views:	168
Size:	56.0 KB
ID:	423293
    I have set this action up to check if all the triggers are set off, then a Slack message will be sent out. If I set it up using AND for the operation type, no Slack message is sent. If I set this up with OR, I will receive 5 simultaneous Slack messages, when I take the site offline.

    I've kept my eye on the triggers, and they all go off, very near each other (in a matter of milliseconds)

    Is there a time frame in which these triggers need to go off for the AND to be accepted?
    Do you have any advice on how I could get this AND condition to work?

    Thank you in advance.
  • Shane Hutter
    Junior Member
    • Apr 2021
    • 3

    #2
    I've worked out the issue for this. You cannot use the `and` condition for multiple triggers in an action. Instead, I needed to create a single trigger, with and for each of the expressions in the other 5 triggers.

    Code:
    ({zabbix_host:web.test.fail[zabbixtest.intentropycs.com_be_1].last()}=1 and {zabbix_host:web.test.fail[zabbixtest.intentropycs.com_me_1].last()}=1 and {zabbix_host:web.test.fail[zabbixtest.intentropycs.com_nz_1].last()}=1 and {zabbix_host:web.test.fail[zabbixtest.intentropycs.com_pe_1].last()}=1 and {zabbix_host:web.test.fail[zabbixtest.intentropycs.com_sy_proxy].last()}=1)
    Then I create an action that looks for this single trigger.

    Comment

    Working...