Alarm and Event value query

I want to run a query from outside Ignition on the MySQL database to get the active alarms and the event value that trigger the event.
I am able to get the Active alarms and the Timestamp by this query.
‘SELECT * FROM alarm_events WHERE eventtype=2 OR eventtype=3 GROUP BY source’
How can I modify the query to include the event value?

SELECT * FROM alarm_events  
inner join alarm_event_data on =
WHERE eventtype=2 OR eventtype=3
GROUP BY source

I got bit in the rear end by this, so I thought I'd clarify something:

If you want the active alarms, the eventtype is 0. NOT 2 and 3.
You need to check that page, which describes the "alarm_event" table:

not this one, which describes the parameters for system.alarm.queryJournal:

The states and types are NOT the same thing.

1 Like