# Has Alarms been added yet?

**URL:** <https://forum.inductiveautomation.com/t/has-alarms-been-added-yet/21106>\
**Category:** Ignition Early Access\
**Tags:** ignition80\
**Created:** [November 28, 2018, 9:26am UTC](https://forum.inductiveautomation.com/t/has-alarms-been-added-yet/21106 "2018-11-28T09:26:52Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [February 19, 2019, 2:22pm UTC](https://forum.inductiveautomation.com/t/has-alarms-been-added-yet/21106/6 "2019-02-19T14:22:02Z")

</div>

This thread is the last update I've seen on it.

> [@Perspective Alarming work around](http://forum.inductiveautomation.com/t/perspective-alarming-work-around/21742):
>
> With the lack of Alarm components in perspective I was wondering what others have used for showing alarm status/events.

If you do that you'll have alarms in a logging table in your database. You can display a history of that by querying the table and displaying the results in a data grid control.

I wrote this query to display alarm information from the logging tables logging to a Microsoft SQL Server database (in case it's helpful to you). It just displays the alarm name, start time and end time. You could potentially get incorrect results if you have multiple alarms with the same name.

SELECT  
SUBSTRING(AE.source, PATINDEX('%alm:%', AE.source) + 4, LEN(AE.source) - PATINDEX('%alm:%', AE.source)) AS Alarm,  
AE.eventtime AS Alarmed,  
(  
SELECT TOP 1 MAX(AEC.eventtime)  
FROM alarm\_events AS AEC  
WHERE  
AEC.eventtype = 1  
AND SUBSTRING(AEC.source, PATINDEX('%alm:%', AEC.source) + 4, LEN(AEC.source) - PATINDEX('%alm:%', AEC.source)) = SUBSTRING(AE.source, PATINDEX('%alm:%', AE.source) + 4, LEN(AE.source) - PATINDEX('%alm:%', AE.source))  
AND AEC.eventtime \> AE.eventtime  
) AS Cleared,  
(  
SELECT TOP 1 MAX(AEA.eventtime)  
FROM alarm\_events AS AEA  
WHERE  
AEA.eventtype = 2  
AND SUBSTRING(AEA.source, PATINDEX('%alm:%', AEA.source) + 4, LEN(AEA.source) - PATINDEX('%alm:%', AEA.source)) = SUBSTRING(AE.source, PATINDEX('%alm:%', AE.source) + 4, LEN(AE.source) - PATINDEX('%alm:%', AE.source))  
AND AEA.eventtime \> AE.eventtime  
) AS Acknowledged  
FROM alarm\_events AS AE  
INNER JOIN alarm\_event\_data as ED  
ON AE.id = ED.id  
WHERE AE.eventtype = 0 AND ED.dtype = 0  
ORDER BY AE.eventtime DESC

---

_[View the full topic](https://forum.inductiveautomation.com/t/has-alarms-been-added-yet/21106)._
