Records Inserted Directly into alarm_events Table Not Visible in Perspective Alarm Journal Table

Hi all,

I am working on a solution to log operator actions (tag writes) into the Ignition Alarm Journal for audit trail purposes. My approach is to insert records directly into the alarm_events and alarm_event_data tables using a Named Query called from a Python script.

The inserts are working correctly β€” I can see the records in the database using SSMS. However the records are not visible via system.alarm.queryJournal() or in the Perspective Alarm Journal Table component, even though Ignition-generated alarm records for the same tags appear without issue.

Here is what I have verified:

  • My inserted records are structurally identical to Ignition-generated records in both alarm_events and alarm_event_data

  • The source and displaypath values exactly match those written by Ignition for real alarms on the same tags, including the :/alm:Alarm suffix on the source path

  • The eventid is a randomly generated UUID via SQL NEWID()

  • eventtype, eventflags, and priority all match Ignition-generated records

My question is: Why won't my custom and simingly valid alarm_events and alarm_event_data table entries show up in the Perspective Alarm Journal table.

Any guidance would be greatly appreciated!

I would guess (but much more than a wag) that you are making untrue assumptions. For speed, I would expect Ignition to treat those tables as a log of events and details, not the primary source for further use. That is, Ignition is certainly caching events it inserts, and only queries the tables when data outside its memory model is requested. IIRC, journals participate in S&F, so the system would therefore have to work this way.

My question is why aren't you using the built in audit logging that exists and automatically does this for you? There's no need to script this functionality.

2 Likes
  1. In my case the audit journal only logs things like "joe logged on/off", "joe saved view soAndSo"

  2. Iteroperabilty with higher level enterprise software dictates that operator actions be logged in the alarm journal as Diagnostic alarms.

As I'm sure you know, Perspective's Alarm Journal component displays the list of past alarms/events stored in whatever database you have your gateway configured for. I simply want to included operator tag writes events in the gateway alarm journal. This would allow supervisors to see who wrote what to which PLC tag from Ignition.

But more importantly it is a requirement of higher-level enterprise software that generates reports from MS SQL tables and Canary historian. That part works fine BTW. I'm just trying to make those same events available in the Perspective Alarm Journal component.

Ignition does this in the audit subsystem, not in alarms.

Based on your OP, it actually doesn't, unless you ask it to show a timeframe that the alarm subsystem hasn't cached. :man_shrugging:

1 Like