I am relatively new to SAM and SolarWinds.
What I am trying to do is display every alert that a component has triggered in the last 2 weeks. This display needs to include the alert message, as a lot of the scripts that we use are custom written and we are not able to rely on the statistics alone.
So far this is a sample query that I have that gathers all the information that I need:
SELECT
AH.TimeStamp AS "Time Stamp",
AH.Message AS "Alert Message",
AH.EntityCaption AS "Alert Object",
AH.RelatedNodeCaption AS "Node",
AH.EntityNetObjectId AS "Net Object ID"
FROM AlertHistoryView AH
WHERE AH.TimeStamp >= (DATEADD(week,-2,GETDATE()))
AND AH.EventTypeWord = 'Triggered'
--AND AH.EntityNetObjectId = '' --need to add in the ID number for the Component here
--AND AH.EntityDetailUrl = '' --or can place the url to the web page here
ORDER BY AH.TimeStamp DESC
All that I need is to be able to pass either the Component ID# or the details URL for the component.
Any assistance, or a better way of going about this, would be greatly appreciated.
P.S. I also know that there is a report from the report writer called "Triggered Alerts - Last 30 Days", however that report is not able to display the Alert/Component Message.