# Add Alarms records in alarms History

**URL:** <https://forum.inductiveautomation.com/t/add-alarms-records-in-alarms-history/12616>\
**Category:** Ignition\
**Created:** [January 27, 2017, 7:30pm UTC](https://forum.inductiveautomation.com/t/add-alarms-records-in-alarms-history/12616 "2017-01-27T19:30:35Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [January 27, 2017, 7:30pm UTC](https://forum.inductiveautomation.com/t/add-alarms-records-in-alarms-history/12616/1 "2017-01-27T19:30:35Z")

</div>

I’m looking for a way to add alarms records in alarms History.  
No script function or SDK entry point in alarm manager ? ![:scratch:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/76d1620bec252bfac07050c889ff5a91dc8a9c25.gif ":scratch:")

---

<div class="post-metadata">

**Author:** ![greg.simpson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/greg.simpson/32/3135_2.png) [@greg.simpson](https://forum.inductiveautomation.com/u/greg.simpson)\
**Post date:** [February 3, 2017, 6:07pm UTC](https://forum.inductiveautomation.com/t/add-alarms-records-in-alarms-history/12616/2 "2017-02-03T18:07:43Z")

</div>

If you are looking for a way to manually enter alarms you should be able to do this with an insert query to the alarm\_events and alarm\_events\_data tables. The only part that may be an issue is coming up with a uuid for the event you are entering. So theoretically I don’t see why you couldn’t add alarm records.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [February 3, 2017, 6:36pm UTC](https://forum.inductiveautomation.com/t/add-alarms-records-in-alarms-history/12616/3 "2017-02-03T18:36:27Z")

</div>

How to generate the uuid ?

---

<div class="post-metadata">

**Author:** ![greg.simpson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/greg.simpson/32/3135_2.png) [@greg.simpson](https://forum.inductiveautomation.com/u/greg.simpson)\
**Post date:** [February 3, 2017, 7:23pm UTC](https://forum.inductiveautomation.com/t/add-alarms-records-in-alarms-history/12616/4 "2017-02-03T19:23:21Z")

</div>

You could use Python and the uuid.py library (included in your install). Should look like

`import uuid
print uuid.uuid4()`

You could also use Java.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [February 3, 2017, 7:39pm UTC](https://forum.inductiveautomation.com/t/add-alarms-records-in-alarms-history/12616/5 "2017-02-03T19:39:20Z")

</div>

😛 I did not dare to insert directly into alarms history table. I really like this solution, I will give it a try as soon as possible !

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [October 10, 2017, 1:35pm UTC](https://forum.inductiveautomation.com/t/add-alarms-records-in-alarms-history/12616/6 "2017-10-10T13:35:33Z")

</div>

Hi @greg.simpson ,  
what are the possible value for the eventflag and eventtype columns of the alarm\_events table ?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [October 10, 2017, 4:10pm UTC](https://forum.inductiveautomation.com/t/add-alarms-records-in-alarms-history/12616/7 "2017-10-10T16:10:17Z")

</div>

These columns are described in the user manual here: [https://docs.inductiveautomation.com/display/DOC79/Journal+Properties+and+Tables](https://docs.inductiveautomation.com/display/DOC79/Journal+Properties+and+Tables)

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [October 10, 2017, 4:20pm UTC](https://forum.inductiveautomation.com/t/add-alarms-records-in-alarms-history/12616/8 "2017-10-10T16:20:17Z")

</div>

Thanks a lot @paul-griffith !

---

<div class="post-metadata">

**Author:** ![EricProvBRP](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ericprovbrp/32/6352_2.png) [@EricProvBRP](https://forum.inductiveautomation.com/u/EricProvBRP)\
**Post date:** [September 17, 2020, 6:28pm UTC](https://forum.inductiveautomation.com/t/add-alarms-records-in-alarms-history/12616/9 "2020-09-17T18:28:43Z")

</div>

@mazeyrat Can you share an exemple of you code ?
