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.

Displaying Alert History for Component

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.

  • I have found a way to display this on the component page in SolarWinds by doing the following:

    • Have the alerts write to the NPM Event Log
    • create a custom query resource on the view
    • use this query to display history

    SELECT E.EventTime, N.Caption, C.Name, E.Message

    FROM Orion.Events E

    JOIN Orion.APM.Component C on C.ComponentID=E.NetObjectID

    JOIN Orion.Nodes N on N.NodeId=E.NetworkNode

    Where E.NetObjectID=${ComponentID}

    order by EventTime desc

    Hope that this is helpful to anyone else that needs/wants to display component history.