Ad Widget

Collapse

How to detect if X latest items are increasing on Zabbix 5?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lbon
    Junior Member
    • Dec 2022
    • 14

    #1

    How to detect if X latest items are increasing on Zabbix 5?

    I have created an item that pulls number of messages from a queue. I want to monitor if this queue is not decreasing. I cannot find the correct trigger for this. Anyone?
    Last edited by lbon; 09-06-2023, 12:22.
  • lbon
    Junior Member
    • Dec 2022
    • 14

    #2
    No solutions?

    Comment

    • PeterZielony
      Senior Member
      • Nov 2022
      • 146

      #3
      you can have a go with

      monoinc(/host/key,(sec|#num)<:time shift>,<mode>)


      https://www.zabbix.com/documentation...istory#monoinc

      I've got few things I wanted to set this up with but had no chance yet to configure this function but it should suit your needs.

      You can set [HASHTAG="t19"]num[/HASHTAG] to 2 to compare the current with the previous value received and detect an increase in your trigger
      Last edited by PeterZielony; 14-06-2023, 14:31.

      Hiring in the UK? Drop a message

      Comment

      • lbon
        Junior Member
        • Dec 2022
        • 14

        #4
        Thanks... but seems only to work in Zabbix 6.

        No solutions in 5?

        Comment

        • PeterZielony
          Senior Member
          • Nov 2022
          • 146

          #5
          Oh sorry, didn't know it was introduced in 6




          try it maybe like this :
          max(#3)-min(#3)>0

          this will detect if max and min differences are bigger than 0 between last 3 values (it picks the biggest and smaller value). This will get your trigger up. It might not be correct syntax but you can work out this logic ​
          Last edited by PeterZielony; 14-06-2023, 15:24.

          Hiring in the UK? Drop a message

          Comment

          • Semiadmin
            Senior Member
            • Oct 2014
            • 1625

            #6
            You may create for an item (for example, queue) a dependent one (for example, queue_delta) with simple change in preprocessing and compare number of values per period.
            The idea is that the values of the dependent item with a negative change will be discarded.
            There is a small problem that the trigger condition will be calculated when the master-item receives a new value, and the dependent one does not yet.
            Therefore, it is necessary to add a small delay to the trigger. I assume that the update interval is at least a minute.
            Problem: queue.count(1h)<>queue_delta.count(1h) and queue.nodata(30)
            Recovery: queue.count(1h)=queue_delta.count(1h)
            If you need to monitor a continued growth (like monoinc() in strict mode), use queue_delta.count(1h,0,ne)​

            Comment

            Working...