Ad Widget

Collapse

How to control when time based triggers are evaluated?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Olli
    Junior Member
    • Nov 2017
    • 17

    #1

    How to control when time based triggers are evaluated?

    We have an item that Update interval is 0s and custom interval to chek at every 10 minutes during work hours (1-5,08:00-16:00).

    Then there is nodata(30m)=1 trigger that points to that item.

    Trigger fires outside of work hours. Is there way to stop that, other that adding check times to trigger expression as well, or creating maintenance period?

    Same thing with fuzzytime, an item returns unix timestamp, and we use fuzzytime to calculate how old that timestamp is. That also gets evaluated outside of item's check interval and fires false positive alerts.
  • Olli
    Junior Member
    • Nov 2017
    • 17

    #2
    Anyone? This is really frustrating problem.

    Comment

    • Semiadmin
      Senior Member
      • Oct 2014
      • 1625

      #3
      If time-based functions (nodata(), date(), dayofmonth(), dayofweek(), time(), now()) are used in the expression, the trigger is recalculated every 30 seconds by a Zabbix history syncer process. If both time-based and non-time-based functions are used in an expression, it is recalculated when a new value is received and every 30 seconds

      Comment

      • Olli
        Junior Member
        • Nov 2017
        • 17

        #4
        Thanks, I know that and that makes no sense at all. If item has set time when it is collected (read: when something is monitored), it makes no sense to fire alerts outside of that time.

        I tried to ask how to control when trigger gets evaluated. There must (or should?) be way to control when alerts are generated, other than setting complicated maintenance schedules for everything.


        Comment

        • Olli
          Junior Member
          • Nov 2017
          • 17

          #5
          You can set Flexible and/or specific schedule for checks. For example flexible with Interval=60s and Period=1-5,08:00-16:00. So item is only checked during normal work hours. No alerts should be outside of this time.

          Maintenance or time check to Trigger expression are ambiguous solutions. When item check time is changed, user needs to remember to change it in several places.

          Can I have some example use cases when current behaviour is useful? if no new check are (should have been) performed, how could there suddenly be problem?

          Comment

          • Semiadmin
            Senior Member
            • Oct 2014
            • 1625

            #6
            You suspect some extra intelligence in time-based trigger function like nodata. It knows nothing about item's update interval. To avoid numerous changes in trigger functions like time or dayofweek you may use user macros for thresholds.

            Comment

            • Olli
              Junior Member
              • Nov 2017
              • 17

              #7
              No intelligence is needed. Just process triggers when releated item data is collected or fails to collect (timeout or some other collection problem). Not separately or randomly. Makes way more sense and is more efficient.

              Comment

              • Olli
                Junior Member
                • Nov 2017
                • 17

                #8
                Yeah, I will create feature request for this. But I disagree that this would increase load. Currently triggers are processed at every 30 seconds. For example one of our Zabbix installations has about 7000 triggers. 7000*2*60*24 = 20 160 000. Most of our items collect data at every 1-10 minutes, so most of those trigger evaluations are not needed, extra workload for server. And this is not biggest installation we have.

                Comment

                Working...