Ad Widget

Collapse

Trigger on both max(,60s) and change() <> 0

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • db100
    Member
    • Feb 2023
    • 61

    #1

    Trigger on both max(,60s) and change() <> 0


    i am trying to set a trigger that would fire if a metric changes and if its end value goes above a threshold for more than 60 seconds.

    so for example firing when a value goes from 0 to 1 and stays 1 for at least 60 seconds (this is because i want to avoid intermittency).

    The value comes in at a variable frequency but definitely more often than once per minutes, so the problem now is that changes() will only be true before 60 seconds have elapsed ....

    how to deal with this situation ?
  • Answer selected by db100 at 01-10-2025, 09:14.
    db100
    Member
    • Feb 2023
    • 61

    discussed in here: https://www.zabbix.com/forum/zabbix-...e-0#post507657

    this post need closure

    Comment

    • db100
      Member
      • Feb 2023
      • 61

      #2
      btw i have tried in many ways to achieve this and while doing this i have encountered a lot of strange behaviors on functions like:

      * avg(change(<key>), 60s) --> always returns "60"
      * count(change(<key>), 60s) --> item cannot be created
      * max(changecount(<key>, 60s), 60s) --> always returns "60"


      and so on ...

      perhaps aggregate functions are not meant to be used in a nested way ?

      Comment

      • AndrewAnderson
        Junior Member
        • Sep 2025
        • 5

        #3
        Originally posted by db100
        so for example firing when a value goes from 0 to 1 and stays 1 for at least 60 seconds (this is because i want to avoid intermittency).
        Wouldn't min(item,1m)>=1 be sufficient for this? a.k.a minimum value for an item was >=1 for last 60s?

        Comment

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

          #4
          THats what I suggested in other same topic... (should be merged maybe)... And I think it shoudl be ok for "in at a variable frequency but definitely more often than once per minutes" situation, but there was later described a case, where gap was longer, so it does not fit this original setup any more..
          So maybe count of values for a minute has to be more than 2 and min value more than 1? that would rule out the case, when there is longer gap, and first incoming value after that is 1...

          Comment

          • db100
            Member
            • Feb 2023
            • 61

            #5
            discussed in here: https://www.zabbix.com/forum/zabbix-...e-0#post507657

            this post need closure

            Comment

            Working...