I have been struggling to find a way to alert on Application status, but provide Component status in the alert e-mail. I know that there are several macros that give me some of this information (ComponentsWithProblems, etc), but that is not enough. I want the error message associated with each component.
I found the field I need in dbo.APM_AlertsAndReportsData.StatusOrErorDescription. I attempted to design my own query that would pull this data based on the ApplicationID (which is unique to each assigned application monitor). However, my testing only returns the first value. I feel I am close, but just need some help with the SQL.
${SQL:SELECT [StatusOrErrorDescription] FROM [EG-ORION].[dbo].[APM_AlertsAndReportsData] where ApplicationId = ${ID}}