Ad Widget

Collapse

Downside to Using "Discard Unchanged with Heartbeat?"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • aav_sjm
    Junior Member
    • Oct 2023
    • 2

    #1

    Downside to Using "Discard Unchanged with Heartbeat?"

    Hello there!

    I have been using and configuring Zabbix for several months now. I was customizing a template when I came across the Discard Unchanged with Heartbeat preprocessing rule. I looked it up in the documentation and it sounds like it would be highly useful in reducing the storage overhead for our Zabbix server. I looked for some item prototypes that I think would benefit from this -- frequent queries with mostly the same data -- and there are quite a few. Before I went crazy adding this rule everywhere, I thought it would be prudent to think about the tradeoffs this might bring. I suspect there's a slight performance cost, but then again it would help dodge the costs associated with database writes. The host data in the UI would look like it hasn't been updated for however long the heartbeat interval is, but as long as the triggers still work and enough data for accurate trend data is available, then this doesn't seem like much of a problem to me. Is this an accurate assessment or am I missing something?

    Thanks!
    Last edited by aav_sjm; 23-10-2023, 19:14.
  • ISiroshtan
    Senior Member
    • Nov 2019
    • 324

    #2
    There is a possible downside if triggers are not written with this in mind. As some of more simple examples:

    I had a case where custom template was created and handed down through history. Items were modified to include "Discard unchanged with heartbeat" and value was set to 1h. Triggers were written with wrong assumption that last(,#3) would evaluate last 3 values, not the 3rd value from the end. As result this alerts fired and resolved with unexpected delays (unexpected not by me, but by the engineer who added "Discard unchanged with heartbeat") ¯\_(ツ)_/¯

    ​Another example: for trigger hysteresis on items that only have two states, 1 or 0, the functions min(,#X) and max(,#X) are often used. If you add "Discard unchanged with heartbeat" to items which have such triggers you are adding delays for alert firing/resolving(depends on exact trigger function) as from trigger perspective new values come in only as often as your heartbeat and the min/max threshold would be breached way later ¯\_(ツ)_/¯

    Comment

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

      #3
      Graphs also may show row of dots instead of a line. But "missing data -> connected" in widget config cures that...

      Comment

      • dimir
        Zabbix developer
        • Apr 2011
        • 1080

        #4
        Another way is to use TimescaleDB with compression instead of Discard unchanged. That would delegate the work to the database and you'll get nice graphs.

        Comment

        • aav_sjm
          Junior Member
          • Oct 2023
          • 2

          #5
          Thanks for the replies, I really appreciate the help!

          Comment

          Working...