This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

"All Active Alerts" SQL query

Has anyone taken the time to put together a SQL query that returns the exact same information that I can see on the "All Active Alerts" page?

I've managed to get this far

select * from (select aa.AlertActiveID, n.IP_Address, n.Caption, n.DeviceType, n.EntityType, n.NodeID,

n.Application_Name, n.Application_Code, dateadd(hour, -6, aa.TriggeredDateTime) as AlertTime,  aa.TriggeredMessage

from AlertActive aa

inner join AlertObjects ao on aa.AlertObjectID=ao.AlertObjectID

inner join Nodes n on ao.RelatedNodeId=n.NodeID) one

order by AlertTime desc

but I am struggling to add the information if the alert is from SAM Components. It looks like one would need to join this information to the APM_Application table and then to the APM_Component table to display the component name if the alert is thrown by a failing SAM component.

Any help greatly appreciated.

Michael