Need assistance creating an alerting modern dashboard

Similar to the below, but for the alerting section, like active alert, which application, server, node triggering more alert like that. 

Do we have any swql query for that?

Parents
  • SELECT aa.AlertActiveID,
    CASE 
      WHEN ao.AlertConfigurations.Severity = 2 then '<b><p style="color:red;font-size:16px">Critical</p></b>'
      WHEN ao.AlertConfigurations.Severity = 3 then '<b><p style="color:orangered;font-size:16px">Serious</p></b>'
      WHEN ao.AlertConfigurations.Severity = 1 then '<b><p style="color:Orange;font-size:16px">Warning</p></b>'
      WHEN ao.AlertConfigurations.Severity = 0 then '<p style="font-size:16px">Informational</p>'
      WHEN ao.AlertConfigurations.Severity = 4  then '<p style="font-size:16px">Notice</p>'
      ELSE concat(ao.AlertConfigurations.Severity, '')
      END AS [Severity]
    , CONCAT('<p style="font-size:16px"><a href="/Orion/NetPerfMon/ActiveAlertDetails.aspx?NetObject=AAT:', a.AlertObjectID, '">' , ao.AlertConfigurations.DisplayName, '</a></p>') AS Alert 
    , a.triggertimestamp
    , a.TriggerCount AS [Recent Alert Count]
    , CASE
        WHEN Minutediff(a.triggertimestamp,GETUTCDATE()) BETWEEN 0 AND 119 THEN concat('<p style="font-size:16px">',Minutediff(a.triggertimestamp,GETUTCDATE()), ' Minutes Ago</p>') 
        WHEN HOURDIFF(a.TriggerTimeStamp,GETUTCDATE()) BETWEEN 2 AND 48 THEN concat('<p style="font-size:16px">',HOURDIFF(a.triggertimestamp,GETUTCDATE()), ' Hours Ago</p>') 
        ELSE concat('<p style="font-size:16px">',DAYDIFF(a.triggertimestamp,GETUTCDATE()), ' Days Ago</p>') 
    --  ELSE concat('<p style="font-size:16px">',a.TriggerTimeStamp,'</p>') 
        END AS [Trigger Time] 
    , concat('<p style="font-size:16px">',ao.AlertNote,'</p>') as [Ticket]
    , concat('<p style="font-size:16px">',ao.AlertActive.AcknowledgedBy,'</p>') as [Acknoledged By]
    , concat('<p style="font-size:16px">',ao.AlertActive.AcknowledgedDateTime,'</p>') as [Acknoledged Time]
    , CASE 
      WHEN ao.RelatedNodeCaption IS NULL then  CONCAT('<p style="font-size:16px"><a href="',ao.EntityDetailsUrl, '">',ao.EntityCaption, '</a></p>') 
      WHEN ao.EntityCaption = ao.RelatedNodeCaption then  CONCAT('<p style="font-size:16px"><a href="',ao.EntityDetailsUrl, '">',ao.EntityCaption, '</a></p>') 
      ELSE CONCAT('<p style="font-size:16px"><a href="',ao.EntityDetailsUrl,  '">',ao.EntityCaption, '</a> on ','<a href="', ao.RelatedNodeDetailsUrl, '">', ao.RelatedNodeCaption,'</a></p>') 
      END AS [On]
    
    FROM Orion.AlertActive aa
    LEFT JOIN Orion.AlertStatus a on aa.AlertObjectID = a.AlertObjectID
    LEFT JOIN Orion.AlertObjects ao on a.AlertObjectID = ao.AlertObjectID

Reply Children