1 Reply Latest reply on Aug 16, 2016 4:13 PM by RichardLetts

    Alert on Group and NOT nodes

    blbrewer

      We have a number of Field Office sites.  The sites have two edge devices, primary and backup.  I have a group created with both edge devices in it and the group will alert when both devices are down, this works.  I also get alerts when either node goes down regardless of the group status. 

       

      What I would like to do is get a Group down alert but suppress the node down alerts if the group is showing as down.

       

      So if one node is down I would get a node down alert on that device.

      If both nodes are down I would NOT get a node down alert but would get the group down alert.

       

      I think setting the group down alert to trigger after the group has been down for 10 minutes and the node down alert to trigger after being down 12 minutes would keep them from triggering simultaneously.  And if the node down trigger condition is evaluated after the group is already marked down this should work.

       

      Just trying to figure out the trigger condition to place in the node down alert that would have it evaluate the condition of the group.  IE; group is up then alert, group is down then don't alert.

        • Re: Alert on Group and NOT nodes
          RichardLetts

          You can only do this as a custom SQL alert <-- by now people will realize that this is my answer to any tricky alerting question.

           

          something like [UNTESTED -- as we don't have anything down right now to try this on!]

           

          Node Down alert:

          Set:

          SELECT *

          FROM   nodes

          WHERE  nodeid IN (SELECT nodeid

                            FROM   nodesdata ND

                            WHERE  ND.status = 2

                                   AND ND.unmanaged = 0

                                   AND NOT EXISTS (SELECT 1

                                                   FROM   containers C

                                                          INNER JOIN containermembersnapshots CMS

                                                                  ON CMS.containerid = c.containerid

                                                   WHERE  c.status = 2

                                                          AND cms.entityid = ND.nodeid

                                                          AND cms.entitytype = 'Orion.Nodes'))

           

          Explain:

          get the set of nodeid of down nodes (status=2) that are currently managed and are not a member of ANY [leaf] container that is currently down

           

           

          Reset:

          WHERE  nodeid NOT IN (SELECT nodeid

                            FROM   nodesdata ND

                            WHERE  ND.status = 2

                                   AND ND.unmanaged = 0

                                   AND NOT EXISTS (SELECT 1

                                                   FROM   containers C

                                                          INNER JOIN containermembersnapshots CMS

                                                                  ON CMS.containerid = c.containerid

                                                   WHERE  c.status = 2

                                                          AND cms.entityid = ND.nodeid

                                                          AND cms.entitytype = 'Orion.Nodes'))