Ad Widget

Collapse

Help with Zabbix Trigger to Alert on the Second Metric Check

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • prubens01
    Junior Member
    • Jan 2025
    • 1

    #1

    Help with Zabbix Trigger to Alert on the Second Metric Check

    Hi, everyone! I’m trying to configure a trigger in Zabbix to monitor a metric and generate an alert only if, on the second consecutive check, the value is equal to or greater than X. I’ve tried some expressions using count() and last(), but I’ve encountered issues, such as errors with operators in the third parameter of the count() function.

    What I need:
    • The trigger should check the last two values.
    • If both are greater than or equal to X, the alert should be triggered.

      My latest attempt was:
    • count(/item_name,#2,">=X")=2

      This expression is not working as expected, and I’m getting the error: "operator not supported for function COUNT".

      Can anyone help me fix the expression or guide me in the right direction? Thanks in advance!



  • skeletor
    Junior Member
    • May 2016
    • 12

    #2
    You have incorrect syntax. From documentation

    Comment

    • cyber
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2006
      • 4807

      #3
      min (/host/key,(sec|#num)<:time shift>)
      Lowest value of an item within the defined evaluation period.
      Code:
      min(/host/item,#2)>=X

      Comment

      Working...