# How to get alarm journal datasource?

**URL:** <https://forum.inductiveautomation.com/t/how-to-get-alarm-journal-datasource/72397>\
**Category:** Module Development\
**Tags:** ignition81\
**Created:** [April 13, 2023, 9:24am UTC](https://forum.inductiveautomation.com/t/how-to-get-alarm-journal-datasource/72397 "2023-04-13T09:24:51Z")\
**Posts on this page:** 5\
**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:** [April 13, 2023, 9:24am UTC](https://forum.inductiveautomation.com/t/how-to-get-alarm-journal-datasource/72397/1 "2023-04-13T09:24:51Z")

</div>

I don't find a way to get alarm journal datasource with script or the SDK

---

<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:** [April 13, 2023, 2:50pm UTC](https://forum.inductiveautomation.com/t/how-to-get-alarm-journal-datasource/72397/2 "2023-04-13T14:50:53Z")

</div>

It's because you would have to know/cast the generic alarm journal into a db alarm journal, or, if dealing with the ORM, retrieve the DB specific settings record for the given profile name.

---

<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:** [April 13, 2023, 3:06pm UTC](https://forum.inductiveautomation.com/t/how-to-get-alarm-journal-datasource/72397/3 "2023-04-13T15:06:16Z")

</div>

I would like to avoid ORM, I found [com.inductiveautomation.ignition.gateway.alarming.journal](https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.23/com/inductiveautomation/ignition/gateway/alarming/journal/package-summary.html) but I don't find any specific "db alarm journal" class ?

---

<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:** [April 13, 2023, 3:32pm UTC](https://forum.inductiveautomation.com/t/how-to-get-alarm-journal-datasource/72397/4 "2023-04-13T15:32:00Z")

</div>

The class is `com.inductiveautomation.ignition.gateway.alarming.journal.DatabaseAlarmJournal`, but it's not public in the SDK. Also, it doesn't expose the datasource name anyways.

---

<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:** [April 13, 2023, 3:44pm UTC](https://forum.inductiveautomation.com/t/how-to-get-alarm-journal-datasource/72397/5 "2023-04-13T15:44:58Z")

</div>

Thanks, nevermind, I will add a parameter for the database associated to my alarm journal.  
I want to check the database connection was ok before process a query
