Intercepting Alarm Events and overriding the alarm function

We want to intercept the Alarm Events and write the Alarm information ( date time, text etc.) as it appears in the database to a text file.
For eg. If I configure a Alarm like Valve 1 is On and link it to a Tag-Valve1Tag then when Valve1Tag changes I get the information in the database - Time, Valve1 is On… .

We want to write this same information into a text file.

Whats the best way to do it? Which is the place to intercept the stanard Alarm function of Ignition and override it.

Best Regards

Well, there is no way to intercept the standard alarm function and override it. However, you can add tag change scripts (on the gateway side so it is one place) that listens for when the tag’s alert active meta property goes to 1. You can use all of the meta properties to log that to a text file using the system.file.writeFile function. That function can append to a file.

Just wanted to mention that if you are up to writing a module in the sdk, you probably could do this. You could create a listener that would get installed on the “Alert Bus” and would receive all alert info, which you could do what you wanted with.


Another option could be a trigger in the database that fires on a write. Then you can catch other* things that write to the alert table.

*other things could be non-ignition applications eg: voice alarm systems

We currently do this in one of our internal modules, responding to alerts on the bus.


Just to clarify, do you actually want to override the Alarm Function or do you just want to write the timestamp and some tag meta data to a text file when the tag goes into alarm?

Sorry for the confusion caused by the Override word. We would like to write the alert info to additional destination.

Best Regards