My goal is to have a scheduled report that shows only Alerts that have not been acknowledged. The below SWQL will show me the Acknowledged Alerts but I am looking for the opposite.
SELECT
o.AlertConfigurations.Name AS [ALERT NAME]
,'/Orion/NetPerfMon/ActiveAlertDetails.aspx?NetObject=AAT:' + ToString(o.AlertObjectID) AS [_LinkFor_ALERT NAME]
,o.EntityCaption AS [ALERT OBJECT]
,o.EntityDetailsURL AS [_LinkFor_ALERT OBJECT]
,o.RelatedNodeCaption AS [RELATED NODE]
,o.RelatedNodeDetailsURL AS [_LinkFor_RELATED NODE]
,ToLocal(o.AlertActive.TriggeredDateTime) AS [ALERT TRIGGER TIME]
,o.AlertActive.TriggeredMessage AS [ALERT MESSAGE]
,o.AlertActive.Acknowledged AS [Ack]
,CASE o.AlertConfigurations.Severity
WHEN 0 THEN 'Informational'
WHEN 1 THEN 'Warning'
WHEN 2 THEN 'Critical'
WHEN 3 THEN 'Serious'
WHEN 4 THEN 'Notice'
ELSE CONCAT('Unknown Severity: ', o.AlertConfigurations.Severity)
END AS [Severity]
-- ,N.CustomProperties.NodeRegion
FROM Orion.AlertObjects AS o
LEFT JOIN Orion.Nodes AS N ON N.Caption = o.RelatedNodeCaption
WHERE o.AlertActive.Acknowledged = 1 AND o.AlertConfigurations.Name LIKE 'SL%'
ORDER by o.AlertActive.TriggeredDateTime DESC
The " o.AlertActive.Acknowledged = 1" seems to select the Acknowledged Alerts but I cannot seem to find how to get the opposite of this. Tried 0, <> 1, Like '%null%' any help would be greatly apreciated.
Stephen