So, I've been wondering about a few things concerning pipelines' notification blocks.
Imagine I have 2 users, one wants only critical notifications, the other one wants anything above medium.
For some reason, this is done through calculated rosters, something like
roster = []
if event.priority >= critical:
roster.append("jimmy.page@ledzep.com")
if event.priority >= medium:
roster.append("rblackmore@deep-purple.net")
return roster
Now, there's also a consolidation set up on this block.
Critical event comes in, both are added to the roster.
10 seconds later, high event comes in, only Ritchie is supposed to get it.
So, what happens there ? Will two different mails be sent, with Jimmy getting a standard one-alarm notification, and Ritchie getting a consolidated one ?
Next question: Can I access collection eventS properties from a calculated roster script ?
Like I'd reference the highest priority in the mail subject with {AlarmEvents.MaxPriority}, is there a way to get this information in the script ?
I haven't done anything like this, but due to how much you help out around here, I really want to lend you a hand. My question would be this: is "critical" a numeric value that can be evaluated with greater than or equal to operators? It looks more like a string value that would require the == operator.
If nothing else, at least I've bumped this back to the top.
That's pseudo-code, what it really does is irrelevant.
The point is, one execution of the script returns a different roster than the second one, in a time window that's shorter than the consolidation delay.
I wanna know what happens in this case. Who receives what.
Well... After testing this, I'm not happy with the results.
Let's take this calculated roster (I know the syntax isn't correct, that's not issue here):
roster = ["rblackmore@deep-purple.net"]
if event.priority >= critical:
roster.append("jimmy.page@ledzep.com")
return roster
With a consolidation.
Now let's say I send 2 alarms, one critical, one low. Everyone receive the same notification, with both alarms consolidated.
I'll try to think of a way to work around that, but it'd be cool if we had more details about how consolidation/calculated rosters work, and maybe a built-in way to tweak those things.
Sadly, we never found a solution and have had to leave consolidation disabled.
If push comes to shove, my next step is going to be to abandon Ignition pipelines almost entirely, and script EVERYTHING. I would leave a simple pipeline that sends the alarm events to a script, and do all the other management myself. There are APIs to send Twilio messages and emails, which i would use instead of the built-in alarm notification pipeline blocks.
I really wish the built-in consolidation features could consolidate per recipient email or phone-number, and not per event or per pipeline or whatever it does right now.