SQL query to merge AlertHistory to show AlertID and not just alert Actions.
AlertLog table is no longer in NPM 11.5 as it has been replaced with AlertHistory table. However, AlertHistory table does not show the AlertID like AlertLog used to, only ActionID.
NPM 11.5 and later
Run the following SQL query against the Orion database:
SELECT ac.AlertID, ac.Name, ao.EntityUri, ao.EntityCaption, ao.LastTriggeredDateTime, aa.TriggeredDateTime, aa.TriggeredMessage, ah.*
FROM AlertHistory ah
JOIN AlertObjects ao ON ao.AlertObjectID = ah.AlertObjectID
LEFT JOIN AlertActive aa ON aa.AlertObjectID = ao.AlertObjectID
JOIN AlertConfigurations ac ON ac.AlertID = ao.AlertID