SWQL query to return Active Alerts with Acknowledge Notes

Hi,

I'd like to show Alerts with Acknowledged Status and Acknowledged Note in Dashboard but having no luck.

Please can somebody help me?

This is what I came up with:

SELECT [SA].AlertConfigurations.Name AS [Name]
     , [SA].AlertConfigurations.Severity AS [Name_Severity]
     , [SA].EntityCaption AS [Object]
     , [SA].Node.STATUS AS [Object_Status]
     , [SA].RelatedNodeDetailsURL AS [Related Node_URL]
     , [SA].Node.STATUS AS [Related Node_Status]
     , [SA].AlertActive.Acknowledged AS [Acknowledged]
     , [SA].AlertActive.AcknowledgedNote AS [Acknowledge Note]
     , [SA].RelatedNodeCaption AS [RELATED NODE]
     , TOSTRING(TOLOCAL([SA].AlertActive.TriggeredDateTime)) AS [Time]
     , TOLOCAL([SA].AlertActive.TriggeredDateTime) AS [Time_SORT]
FROM Orion.AlertObjects AS [SA]
WHERE [SA].AlertActive.AlertActiveID > 0
ORDER BY [SA].AlertActive.TriggeredDateTime DESC

Parents
  • I thought this looked much like the SolarWinds Active Alert Dashboard .  You just want to extend that and bring in the Ack Note?

  • On my version (2024.1), you need to pull in the AlertStatus entity...

    SELECT [SA].AlertConfigurations.Name AS [Name]
         , [SA].AlertConfigurations.Severity AS [Name_Severity]
         , [SA].EntityCaption AS [Object]
         , [SA].Node.Status AS [Object_Status]
         , [SA].RelatedNodeDetailsURL AS [Related Node_URL]
         , [SA].Node.Status AS [Related Node_Status]
         , [SA].AlertActive.Acknowledged AS [Acknowledged]
         , [Status].Notes AS [Acknowledge Note]
         , [SA].RelatedNodeCaption AS [RELATED NODE]
         , TOSTRING(TOLOCAL([SA].AlertActive.TriggeredDateTime)) AS [Time]
         , TOLOCAL([SA].AlertActive.TriggeredDateTime) AS [Time_SORT]
    FROM Orion.AlertObjects AS [SA]
    LEFT JOIN Orion.AlertStatus AS [Status]
      ON [SA].AlertConfigurations.AlertRefID = [Status].AlertDefID
      AND [SA].AlertObjectID = [Status].AlertObjectID
    WHERE [SA].AlertActive.AlertActiveID > 0
    ORDER BY [SA].AlertActive.TriggeredDateTime DESC

Reply
  • On my version (2024.1), you need to pull in the AlertStatus entity...

    SELECT [SA].AlertConfigurations.Name AS [Name]
         , [SA].AlertConfigurations.Severity AS [Name_Severity]
         , [SA].EntityCaption AS [Object]
         , [SA].Node.Status AS [Object_Status]
         , [SA].RelatedNodeDetailsURL AS [Related Node_URL]
         , [SA].Node.Status AS [Related Node_Status]
         , [SA].AlertActive.Acknowledged AS [Acknowledged]
         , [Status].Notes AS [Acknowledge Note]
         , [SA].RelatedNodeCaption AS [RELATED NODE]
         , TOSTRING(TOLOCAL([SA].AlertActive.TriggeredDateTime)) AS [Time]
         , TOLOCAL([SA].AlertActive.TriggeredDateTime) AS [Time_SORT]
    FROM Orion.AlertObjects AS [SA]
    LEFT JOIN Orion.AlertStatus AS [Status]
      ON [SA].AlertConfigurations.AlertRefID = [Status].AlertDefID
      AND [SA].AlertObjectID = [Status].AlertObjectID
    WHERE [SA].AlertActive.AlertActiveID > 0
    ORDER BY [SA].AlertActive.TriggeredDateTime DESC

Children
No Data