Hi Everyone,
Can someone Please help me to get the list of top 5 sites by active alert. For example in any site there is 100 active alert then those 100 active alert list should be reflecting along with these details caption, ObjectName, AlertMessage, osn.IncidentNumber, osn.IncidentUrl, n.DetailsUrl, osn.State, osn.AssignedTo,
I tried my way to get the list only but not getting alert details , I am only getting list of sites with alert count with below query :
SELECT Top 5 n.CustomProperties.Company +'-' + n.CustomProperties.City AS siteLocation,
COUNT(ObjectName) AS myCount
FROM Orion.AlertStatus oas
INNER JOIN Orion.AlertObjects oao ON oas.AlertObjectID = oao.AlertObjectID
INNER JOIN Orion.nodes n ON n.nodeid = oao.RelatedNodeId
WHERE ((oao.AlertConfigurations.DisplayName LIKE('Network%')))
GROUP BY n.CustomProperties.Company +'-' + n.CustomProperties.City
ORDER BY COUNT(ObjectName) DESC
Please someone help me to twick this query to get the alert details as well