I'm trying to create an alert that is generated when the count of other active alerts reaches a certain number. I can get exactly what I need with this SWQL query, but the alert engine requires me to wrap it in a Nodes (or other) query. This then requires multiple joins with other tables, which I have yet to figure out. (Note: I do not want to count the number of alerts per node, just the total number of alerts with the same message.)
SELECT COUNT(*) as AlertsPer, AlertActive.TriggeredMessage AS Message
FROM Orion.AlertActive
Where TriggeredMessage like 'The primary or backup link for this site has failed or is degraded.'
group by Message
HAVING COUNT(*) >= 2
Which returns:
Any help is appreciated.