We have multiple Ignition servers, each with multiple Projects. Some of the projects overlap, so there are many tags that exist on more than one server.
All servers connect to the same SQL server, so all servers write their alarms into the same alarm_events table.
This results in apparent duplication of alarms in the alarm_events table. Is there a way I can determine which server flagged the alarm, so I can filter the alarms by gateway in my alarms management tool?
Is my approach wrong? I want to have all alarms going into the same table to simplify my overall alarm management system.
I suppose I could have each Gateway write into their own alarm_events and alarm_event_data tables, and a View to combine them into one, but to me it seems simpler to have them all write to one table.
Is this a good candidate for a feature request "Add Gateway_name column to alarm_events table"?
Yes. Use the setting in your alarm journal configuration to set custom table names.
If necessary, make the names a view that pulls from a common table by gateway name. Then have an insert trigger on each view that alters the insert to include the table name.
Ah, I see.
Create a pair of Views on my SQL Server for each gateway. Have each gateway write to it's own Views. And have all the pairs of Views connected to my pair of master tables, adding their View name to the records written through them.
I've only ever used Views as one-way read-only, so this is new to me, but it sounds workable enough.
Thanks, I'll give it a try.
I still think it would be far simpler if Ignition could just include the gateway name in the records it writes......
When I get some time I'll mess with it and see what I come up with.
I'll probably start with creating table(s) for each gateway (because I don't know how to create bidirectional Views with update triggers, and I have limited time to work on this), and create a view to combine the tables for my alarm manager - I know how to do that.
It may be a week or so before I can get to it, I'll try to remember to update here when I learn more.
Thanks.