Ad Widget

Collapse

How to avoid defects in the use of trigger function 'avg' ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gary.W
    Junior Member
    • Aug 2018
    • 29

    #1

    How to avoid defects in the use of trigger function 'avg' ?

    Ver 4.4.8 on centos7

    Hi guys, I use 'avg' Function to trigger the alarm, use {ITEM.VALUE} in the action macro, but often found {ITEM.VALUE} and {ITEM.LASTVALUE} has deviated from the trigger value,how should I avoid this problem?

    For Example:
    value1 0:00:00 750M avg(#3)=716M
    value2 0:00:15 720M
    value3 0:00:30 680M
    value4 0:00:45 690M  
    I hope the value of the received alarm message is trigger value=[avg(#3)=716M] not value3=680M

    ps:
    Is anyone familiar with the 4.4 new macro {EVENT.OPDATA} , is this macro suitable for my scenario?

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~
    Item:
    Item Key:if.in[602]
    Update interval:15s

    Trigger:
    Triggers Expression:{xxx:if.in[602].avg(#3)}>700M and {xxx:if.in[602].count(45,700M,ge)}>2

    Action:
    Problem:

    Host:{HOST.NAME1}-{HOST.IP1}
    Message:{ITEM.NAME}:{ITEM.VALUE}
    Event time:{EVENT.DATE} {EVENT.TIME}
    Event id:{EVENT.ID}
    【{TRIGGER.DESCRIPTION}】

    Recovery:

    Host:{HOST.NAME1}-{HOST.IP1}
    Message:{ITEM.NAME}:{ITEM.VALUE}
    Event time:{EVENT.DATE} {EVENT.TIME}
    Event age:{EVENT.AGE}
    Event id:{EVENT.ID}
    【{TRIGGER.DESCRIPTION}】

    Last edited by Gary.W; 09-07-2020, 03:49.
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    I think I understand what you're asking about, but I'm not 100% certain, so if this suggestion isn't relevant to what you want, please follow up again.

    Would using a calculated item do what you need: https://www.zabbix.com/documentation...pes/calculated ?

    I agree that ITEM.VALUE and ITEM.LASTVALUE have become quite confusing:




    Note that the 2nd issue (4942) has some good discussion about EVENT.OPDATA.

    Comment

    Working...