I would like to create an alert that triggers only when greater than a certain number of group members are down at the same time. The kicker is that each Group will have a different threshold for that number. I'm thinking that a custom property that sets the threshold of members down for the group will work, but I'm not sure how to write the Trigger query to compare the number of Group members currently down to that group's threshold.
Any ideas friends? Thank you.
If you create a new integer custom property for the groups, e.g. DownThreshold, you can use the following alert SWQL condition. This will provide the group ID where the number of down nodes is greater than or equal to your custom property value.
WHERE Groups.ContainerID IN ( SELECT g.ContainerID FROM Orion.Groups g WHERE g.Members.Status = 2 -- Down status AND g.Members.MemberEntityType = 'Orion.Nodes' GROUP BY g.ContainerID HAVING COUNT(g.Members.MemberPrimaryID) >= g.CustomProperties.DownThreshold )
The reset condition you can use the "Reset when trigger condition is no longer true" or you can use the query and change the >= to <
Note that it won't trigger for any group with an empty custom property - only the groups where you input the threshold value.
Also, if you want to include all group member objects instead of only nodes, you can remove the " AND g.Members.MemberEntityType = 'Orion.Nodes'" line.
SolarWinds solutions are rooted in our deep connection to our user base in the THWACK® online community. More than 150,000 members are here to solve problems, share technology and best practices, and directly contribute to our product development process.