This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Need to create a dynamic alert for Group members Down

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.

  • I have an alert setup for a certain number type device being down, but it's a static number.  I'd be very interested in making this dynamic though if that's possible.  

  • 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
    )

    shuth_2-1593011069635.png

    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.