[FEATURE] Summarise Alarms in single rows in Alarm Journal Table (Vision & Perspective)

At the moment, looking at a history of alarms is difficult to piece together when all the events associated with an alarm occur as all of these are reported on individual rows (e.g. for active, acked, cleared).

It would be far simpler if unique alarm events only displayed on a single row, with the associated events simply adding to the same row in different columns (e.g. Ack Time, Cleared Time). What would also be good is to show the time to ack and time to clear as the time it took from first activation to be ackd/cleared.

Idea:

4 Likes

Is this a thing yet? I've been banging my head against the wall seeing if this was possible using columnsAssociated or attempting to use the Alarm Status Table to display historical alarms.

You can do a view or a query, something like this:

CREATE VIEW [dbo].[vwAlarmDurationEndTime]
AS
SELECT     TOP (100) PERCENT
	a.displaypath, SUM(DATEDIFF(SECOND, a.eventtime, COALESCE (c.eventtime, CURRENT_TIMESTAMP))) AS duration_sec, a.eventtime, a.priority, a.source,  DATEADD(ss, DATEDIFF(SECOND, a.eventtime, COALESCE (c.eventtime, 
                  CURRENT_TIMESTAMP)), a.eventtime) AS EndDate
FROM   dbo.alarm_events AS a 
                 LEFT OUTER JOIN
                  dbo.alarm_events AS c ON c.eventid = a.eventid AND c.eventtype = 1
WHERE     (a.eventtype = 0) AND (((DATEPART(DW, a.eventtime) + @@DATEFIRST) % 7) NOT IN (0, 1))

GROUP BY a.displaypath, a.eventtime, a.priority, a.source, LEFT(a.displaypath, 8), DATEADD(ss, DATEDIFF(SECOND, a.eventtime, COALESCE (c.eventtime, CURRENT_TIMESTAMP)), a.eventtime)

ORDER BY duration_sec DESC, a.displaypath```
1 Like