Active Alarm count based on priority selection

Hi,
I am trying to get the Alarm count based on priority (I want only High priority Alarm count).
Below Image Active alarm count variable I am trying to map to another variable.
image

I try reading [System]Gateway/Alarming/Active and Unacked but it gives total active count.

and from database I am not understanding even Where condition of filtering based on priority not giving desired output.

Any suggestions or help appreciated.

Have you looked into this function?

https://docs.inductiveautomation.com/display/DOC81/system.alarm.queryJournal

You can use it inside a query and process result dataset however you need to.

I am trying the find a way to get counts like Total number of Low, High, Critical priority Alarms separately.

You can query alarms with this:
https://docs.inductiveautomation.com/display/DOC81/system.alarm.queryStatus

Then grab the relevant data you need. Keep in mind, calling this function a bunch can get expensive, so use it sparingly or call it once and store in a top level variable or tag.

2 Likes