Ad Widget

Collapse

Trigger activate after x minutes when value exceeds x

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JackoAC
    Member
    • May 2023
    • 35

    #1

    Trigger activate after x minutes when value exceeds x

    Hello,
    I have a little question.

    I'm using Zabbix 6.0 on Debian 11.
    i have a template that monitor my mail Q.​

    My values appear like this

    Click image for larger version

Name:	Capture d'écran 2023-09-01 134642.png
Views:	1018
Size:	4.1 KB
ID:	469750

    values are then separated according to the spools. (incoming, filtering, outgoing)
    I have triggers that activate when the number of mails in one of the Q exceeds 9.

    But I would like to avoid false positives and say that the trigger only activates if the value is greater than 9 for 5 minutes​
    I tried with different trigger but it doesn't work as intended

    For example with this trigger "count(/<template>,300)>=3" the trigger fired directly while my data is at 2 and only after 30 seconds.

    Can someone Help me ?

    Thank in advance
    Attached Files
  • Answer selected by JackoAC at 04-09-2023, 09:11.
    tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    Originally posted by JackoAC
    But I would like to avoid false positives and say that the trigger only activates if the value is greater than 9 for 5 minutes​
    Look at the documentation for the trigger functions, in particular the min() function. In fact, the very first example in the Trigger expression section of the documentation shows an example similar to what you want to do: "the min value is greater than X for 5 minutes". The list of functions and what arguments they take is available in the link in the "Functions" section of that page.

    Comment


    • JackoAC
      JackoAC commented
      Editing a comment
      Hello, thank for the your answer.
      i tried with the documentation you just send and it work, i just needed to change the format of data (text to number) so i could have the min function.
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    Originally posted by JackoAC
    But I would like to avoid false positives and say that the trigger only activates if the value is greater than 9 for 5 minutes​
    Look at the documentation for the trigger functions, in particular the min() function. In fact, the very first example in the Trigger expression section of the documentation shows an example similar to what you want to do: "the min value is greater than X for 5 minutes". The list of functions and what arguments they take is available in the link in the "Functions" section of that page.

    Comment


    • JackoAC
      JackoAC commented
      Editing a comment
      Hello, thank for the your answer.
      i tried with the documentation you just send and it work, i just needed to change the format of data (text to number) so i could have the min function.
Working...