13 Replies Latest reply on Feb 28, 2012 8:17 AM by handbrake2

    Alerting Based on Node Groups rather than Custom Properties

    mazydizzle2K10

      Hi all,

      we want to do away with our custom properties as we have just come accross the grouping with dynamic SQL queries which we feel is a better way to group our nodes dynamicly and automaticly.

      However...

      In Alert Manager, I cannot seem to base an Alert Trigger condition on Node Groups. Is this possible?

      THanks

      Mario

        • Re: Alerting Based on Node Groups rather than Custom Properties
          netlogix

          Right now there isn't a way using the standard alerts pages, but you can use a custom SQL alert and use this:

          (
          Caption in (Select ContainerMemberSnapshots.Name
                       from ContainerMemberSnapshots
                          inner join Containers on
                          Containers.ContainerID = ContainerMemberSnapshots.ContainerID
                       where Containers.Name = '<*****PUT YOUR GROUP NAME HERE*****>')
          ) and (
          Not Caption in (Select ContainerMemberSnapshots.Name
                       from ContainerMemberSnapshots
                          inner join Containers on
                          Containers.ContainerID = ContainerMemberSnapshots.ContainerID
                       where Containers.Name = '<*****GROUP NAME TO IGNORE HERE*****>')
          )

          @Solarwinds - I don't know if this has made it to your features to add list, but add it, please.

            • Re: Alerting Based on Node Groups rather than Custom Properties
              mazydizzle2K10

              Hi Netlogix,

              thanks a lot for that script...

              Can you just explain what the second condition is for?

              Just to give you am example of what I am trying to achieve.

              We will have 3 dynamic groups

              -Access Switches

              -Distribution Switches

              -Core Switches

              I would like to trigger interface down alerts on Core and Distribution switches, but not access switches.

              How would I modify your code to achieve something like that?

              thanks again

              Mario

                • Re: Alerting Based on Node Groups rather than Custom Properties
                  mazydizzle2K10

                  OK...

                  this is what my WHERE statement looks like now...

                   

                  where (interfaces.Status = 0) AND (

                  Caption in (Select ContainerMemberSnapshots.Name

                  from ContainerMemberSnapshots

                  inner join Containers on

                  Containers.ContainerID = ContainerMemberSnapshots.ContainerID

                  where Containers.Name = 'XXX Distribution Switches')

                  )

                  It is not working.

                  Have I got your code in the right place?

                  When creating a SQL query in Alert Manager, it does not let me change the SELECT statement that it automaticaly populates when you select the type of resource that you want to base your alert on.

                  I have not got a SELECT statement that includes the interfaces.Status field. Should I have?

                  Thanks

                  Mario

                    • Re: Alerting Based on Node Groups rather than Custom Properties
                      netlogix

                      Is the Advanced SQL a Interface alert?  And the Group a Node Group?

                      If so, try:

                      where (interfaces.Status = 0) AND (
                        Node.Caption in (Select ContainerMemberSnapshots.Name
                          from ContainerMemberSnapshots
                            inner join Containers on
                               Containers.ContainerID = ContainerMemberSnapshots.ContainerID
                        where Containers.Name = 'XXX Distribution Switches')
                      )

                      The caption it was getting was probably the Interface caption not the node's caption.  I am not positive if it's node.caption or nodes.caption