Ad Widget

Collapse

Update time interval according to trigger

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mcataldo
    Junior Member
    • Mar 2023
    • 4

    #1

    Update time interval according to trigger

    Hello

    I wanted to see if it is possible to change the time intervals that I have predefined in a host, when a trigger is activated. For example I have a UPS that does not change much over time and I monitor its ITEMs by SNMP every hour. But when an outage occurs it sends me a SNMPTRAP and the trigger is activated and I change the interval values to a 1m. When it recovers again it returns to normality again. Is this possible?

    Translated with www.DeepL.com/Translator (free version)​
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    The task is not solved by regular zabbix means.

    Comment

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

      #3
      That can be done by adding an action, which will update item interval over API.
      I think some years ago someone had similar topic in presentation in Zabbix conference...

      Comment


      • Hamardaban
        Hamardaban commented
        Editing a comment
        I didn't find a method for updating the interval of item in the API documentation.
    • cyber
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2006
      • 4806

      #4
      delay string Update interval of the item.
      Accepts seconds or a time unit with suffix (30s,1m,2h,1d).
      Optionally one or more custom intervals can be specified either as flexible intervals or scheduling.
      Multiple intervals are separated by a semicolon.
      User macros may be used. A single macro has to fill the whole field. Multiple macros in a field or macros mixed with text are not supported.
      Flexible intervals may be written as two macros separated by a forward slash (e.g. {$FLEX_INTERVAL}/{$FLEX_PERIOD}).

      Property behavior:
      - required if type is set to "Zabbix agent" (0), "Simple check" (3), "Zabbix internal" (5), "External check" (10), "Database monitor" (11), "IPMI agent" (12), "SSH agent" (13), "TELNET agent" (14), "Calculated" (15), "JMX agent" (16), "HTTP agent" (19), "SNMP agent" (20), "Script" (21), or if type is set to "Zabbix agent (active)" (7) and key_ does not contain "mqtt.get"

      Comment


      • Hamardaban
        Hamardaban commented
        Editing a comment
        I was looking for “interval” and here “delay” …. :-(
    • mcataldo
      Junior Member
      • Mar 2023
      • 4

      #5
      Thank you for your answers. I think it's not what I'm looking for. I will continue my search.
      Regards​

      Comment

      • LenR
        Senior Member
        • Sep 2009
        • 1005

        #6
        It's possible, but would require an API script to change the interval that would be called from a trigger action. I used a script to update some inventory fields at auto registration, so this would be only at a trigger action instead.

        Another option might be to use throttling, "discard unchanged with heartbeat", with a more frequent delay but only changed items would be stored in the database.

        Comment

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

          #7
          Originally posted by LenR
          Another option might be to use throttling, "discard unchanged with heartbeat", with a more frequent delay but only changed items would be stored in the database.
          This does not affect polling, just the amount of data, what is stored...

          Comment

          Working...