Get history of alerts for a node

Version 3

    I wanted a resource that would show me the history of all alerts on a node, including inactive alerts. To do this, I created a custom query resource with the following custom SWQL. The node name and message texts are clickable links to the alert detail page.

     

    select AlertHistory.AlertObjects.AlertConfigurations.Name as [Alert Name], 
    Message, 
    AlertHistory.AlertObjects.EntityCaption as [Triggering Object],
    ToLocal(Timestamp) as [Time],
    AlertHistory.AlertObjects.RelatedNodeCaption as [Related Node],
    'https://solarwinds.ci.northwestern.edu/Orion/NetPerfMon/ActiveAlertDetails.aspx?NetObject=AAT:'+ToString(AlertObjectID) as [_linkfor_Message],
    'https://solarwinds.ci.northwestern.edu/Orion/NetPerfMon/ActiveAlertDetails.aspx?NetObject=AAT:'+ToString(AlertObjectID) as [_linkfor_Alert Name]
    from Orion.AlertHistory 
    where AlertHistory.AlertObjects.RelatedNodeID='${NodeID}'
    and EventType = 0
    order by TimeStamp desc
    

     

    To enable searching by alert message content or date, put this SWQL in the "Search SWQL Query" box:

     

    select AlertHistory.AlertObjects.AlertConfigurations.Name as [Alert Name], 
    Message, 
    AlertHistory.AlertObjects.EntityCaption as [Triggering Object],
    ToLocal(Timestamp) as [Time],
    AlertHistory.AlertObjects.RelatedNodeCaption as [Related Node],
    'https://solarwinds.ci.northwestern.edu/Orion/NetPerfMon/ActiveAlertDetails.aspx?NetObject=AAT:'+ToString(AlertObjectID) as [_linkfor_Message],
    'https://solarwinds.ci.northwestern.edu/Orion/NetPerfMon/ActiveAlertDetails.aspx?NetObject=AAT:'+ToString(AlertObjectID) as [_linkfor_Alert Name]
    from Orion.AlertHistory 
    where AlertHistory.AlertObjects.RelatedNodeID='${NodeID}'
    and (Message like '%${SEARCH_STRING}%'
    or Timestamp like '%${SEARCH_STRING}%')
    and EventType = 0
    order by TimeStamp desc
    

     

    The resulting resource looks like this:

    Historical_Alerts.jpg