Ad Widget

Collapse

Elegant way of comparing the last X items in a trigger

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • moshikoy
    Member
    • Aug 2017
    • 56

    #1

    Elegant way of comparing the last X items in a trigger

    Hi,
    I was wondering if there is more elegant way of comparing the last X items in a trigger.

    For example, alert if last 3 items of some.metric > another.metric,

    {My Template:some.metric.last(#1)}>{My Template:another.metric.last(#1)} and
    {My Template:some.metric.last(#2)}>{My Template:another.metric.last(#2)} and
    {My Template:some.metric.last(#3)}>{My Template:another.metric.last(#3)}
    Thanks,
    Mosh
    Last edited by moshikoy; 26-11-2020, 14:08.
  • acarus
    Junior Member
    • May 2016
    • 6

    #2
    HI moshikoy , You can try with sum

    Code:
    {My Template:some.metric.sum(#3)}>{My Template:another.metric.sum(#3)}
    Thanks.

    Comment

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

      #3
      sum will not work as expected.

      Comment

      Working...