Ad Widget

Collapse

Multiple Event Generation Mode and a dummy item in trigger expression

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mateusz
    Junior Member
    • Mar 2022
    • 14

    #1

    Multiple Event Generation Mode and a dummy item in trigger expression

    Hi Fellows,

    I have an interesting problem today. I'm trying to monitor alarms from Audiocodes SBC via HTTP API. I have two items

    1. one item downloads list of alarms from SBC and stores them as text: [{"Alarm 1"},{"Alarm 2"},{"etc"}]
    2. second item calls the same API method but I use preprocessing to count the alarms to efficiently create events

    Here is my trigger expression:
    Code:
    min(/sbc01/audiocodes.sbc.alarms.count,#5)>last(/sbc01/audiocodes.sbc.alarms.count,#6) and nodata(/sbc01/audiocodes.sbc.alarms,7200)=0
    The first part "min(,#5)>last(,#6)" is the actual expression that I need and it works fine and gives me what I need (trigger a problem when count of alarms for 5 most recent checks remains greater than one before it)
    The second part with "nodata()" is only a dummy item. I have done this to have the possibility of using macro {ITEM.VALUE2} in an event created by this expression. This gives me possibility to send list of current alarms along with notification.

    On top of that I must also use "Event Generation Mode: Multiple", because I could have a situation where we already have some SBC alarms and another one appears: then we need to know about it so new event must be created. With "Event Generation Mode: Multiple" and an expression like this I will always get two events (for every single SBC alarm): one event is created when first item value changes (audiocodes.sbc.alarms.count), then trigger is calculated again and creates second event when second item is updated (audiocodes.sbc.alarms)

    I'm keen to know if anyone has an idea how to solve this puzzle Thanks a lot in advance.
    Last edited by Mateusz; 08-11-2023, 15:15.
Working...