Hello,
currently there are essentially two methods, that I know of, to retrieve active alarms:
querying the db, i.e.: " SELECT * FROM alarm_events" with a fixed polling time
looping with a python script, i.e. " system.alarm.queryStatus()" and then sleeping in between or similar.
both of these methods are looping/polling methods and they are quite expensive (we use the db polling at the moment with a 5 minutes delay and we are quickly reaching millions of queries per hour on each of our Aurora RDS cluster).
Is there some event based / subscription method for fetching alarms which is less taxing and more realtime? something like system.alarm.subscribe(tag_path) which fires when an alarm is ever raised or reenters?
Not from inside the Ignition runtime, but it’s possible using the module SDK to register a listener that receives active, clear, and acknowledge notification for events as they occur.