Quantcast
Channel: THWACK: Popular Discussions - Orion SDK
Viewing all articles
Browse latest Browse all 3719

Filter: where node is not muted

$
0
0

Thank you in advance.

 

Since the default "Active Alerts View" does not automatically clear the instance of the alert once that node has been set to mute; I have replicated (somewhat) the Active Alerts View to filter in the alerts that needs to be visible to the NOC.  So when the NOC sees the alert, it gets escalated, then the engineer would "mute" the alert, thus, would also remove the alert from view.

 

In the SWQL code below, when I run the query it takes a loooong time to complete.

 

Question.  Is there a simple way to filter out if the node has been muted? 

 

 

Thanks again.

 

 

SELECT  DISTINCT

 

  o.AlertConfigurations.Name AS [ALERT NAME] 

    ,'/Orion/NetPerfMon/ActiveAlertDetails.aspx?NetObject=AAT:' + ToString(o.AlertObjectID) AS [_LinkFor_ALERT NAME]

,Case

WHEN o.AlertConfigurations.Severity = '0' THEN ('/Orion/images/ActiveAlerts/Serious.png')

WHEN o.AlertConfigurations.Severity = '1' THEN ('/Orion/images/ActiveAlerts/Warning.png')

WHEN o.AlertConfigurations.Severity = '2' THEN ('/Orion/images/ActiveAlerts/Critical.png')

WHEN o.AlertConfigurations.Severity = '3' THEN ('/Orion/images/ActiveAlerts/InformationalAlert.png')

WHEN o.AlertConfigurations.Severity = '4' THEN ('/Orion/images/ActiveAlerts/Notice.png')

End as [_IconFor_ALERT NAME]

 

  ,o.AlertActive.TriggeredMessage AS [ALERT MESSAGE] 

  ,o.EntityCaption AS [ALERT OBJECT] 

  ,o.EntityDetailsURL AS [_LinkFor_ALERT OBJECT]

 

,CASE WHEN o.AlertActive.TriggeredDateTime IS NULL THEN NULL ELSE (

    TOSTRING(FLOOR(MINUTEDIFF(o.AlertActive.TriggeredDateTime,GETUTCDATE())/60.0)) + 'h ' +

    TOSTRING(MINUTEDIFF(o.AlertActive.TriggeredDateTime,GETUTCDATE())%60) + 'm'

) END AS [ACTIVE TIME]

 

    ,o.RelatedNodeCaption AS [RELATED NODE] 

,o.RelatedNodeDetailsURL AS [_LinkFor_RELATED NODE] 

 

FROM Orion.AlertObjects o 

left join orion.nodes n on n.caption = o.EntityCaption

 

LEFT OUTER JOIN Orion.AuditingEvents AS AE ON AE.AuditEventMessage LIKE CONCAT('%', CASE

          WHEN EntityUri LIKE 'swis://%/Orion/Orion.Nodes/NodeID=%' AND EntityUri NOT LIKE 'swis://%/Orion/Orion.Nodes/NodeID=%/%'

             THEN N.NodeName

                    ELSE 'Wrong'

       END, '%') AND [EntityUri] LIKE CONCAT('%=', AE.NetObjectID)

INNER JOIN Orion.AuditingActionTypes AS AT ON AE.ActionTypeID = AT.ActionTypeID

 

WHERE o.AlertActive.TriggeredMessage <> '' and o.AlertConfigurations.Name = 'Critical' and [AT].ActionTypeDisplayName not like '%mute%'

 

ORDER by o.AlertActive.TriggeredDateTime


Viewing all articles
Browse latest Browse all 3719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>