Ad Widget

Collapse

Triggers - Last 'n' values above exact value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ivanni
    Junior Member
    • Mar 2015
    • 15

    #1

    Triggers - Last 'n' values above exact value

    Hello, Zabbix users,

    I want to know how to do the following:

    I have an item, say CPU steal time, with refresh interval of 60 seconds. I want to create a trigger, which activates only when the last 5 values are above 20% (in my case the last 5 values represent 5 minutes), i.e., every value of the last 5 values is greater than 20. For example:

    21 25 24 25 29
    |----|----|----|----| >>> TRUE

    21 5 24 25 6
    |----|----|----|----| >>> FALSE

    I know I can use this:
    system.cpu.util[,steal].last(#1)}>20 and
    system.cpu.util[,steal].last(#2)}>20 and
    system.cpu.util[,steal].last(#3)}>20 ... (etc.)

    But that's a lot of typing and what about if I want the last 20 values - I am not going to type 20 lines of expressions.

    How to do that easily? Thank you!
  • ingus.vilnis
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Mar 2014
    • 908

    #2
    Hello,

    Please try this expression.
    Code:
    system.cpu.util[,steal].min(5m)}>20
    This will be true if the values for the last 5 minutes have not been lower than 20.

    Best Regards,
    Ingus

    Comment

    • ivanni
      Junior Member
      • Mar 2015
      • 15

      #3
      Thank you, it is working!

      Comment

      Working...