5 Replies Latest reply on Mar 31, 2015 7:03 AM by bleearg13

    Advanced Alert Macros

    bleearg13

      I'm running into a problem where my Advanced Alert macros are not working.  I have a newly created alert for Group Members and I'm trying to send an email as a trigger and include important information in the email.  When trying to specify various properties about the Node, I'm getting the "${property}" in the emails rather than the actual value.  I've tried specifying the properties as "${Nodes.property}" and that doesn't work like it does for other types of alerts.

        • Re: Advanced Alert Macros
          bleearg13

          I found this:

           

          https://thwack.solarwinds.com/message/225594#225594

           

          Is this really the case?  Node properties are not available as macros/variables from within a Group alert? 

          • Re: Advanced Alert Macros
            bleearg13

            Ugh.  I was afraid of that.  Thanks.

              • Re: Advanced Alert Macros
                RichardLetts

                here is an example; NOTE!!! all of this should be on one line; I've formatted it for clarity.

                the inner sub-query gets the columns you want from the database

                the outer query flattens it into a single value that the Alert manager is expecting.

                check ${groupid}  -- should be whatever value has the current groupid that the alert action is being triggered on.


                ${SQL:SELECT a.sector +':' + a.nodename + ', ' AS [text()]

                FROM   (

                                  SELECT     c1.NAME AS nodename,

                                             n1.sector

                                  FROM       containermembersnapshots C1

                                  INNER JOIN nodes N1

                                  ON         c1.entityid=n1.nodeid

                                  AND        c1.status=2

                                  AND        c1.entitytype='Orion.Nodes'

                                  WHERE      c1.containerid=${groupid} ) a FOR xml path('')

                }

                  • Re: Advanced Alert Macros
                    bleearg13

                    Thanks, but I think I'm going to forego this option, but I do appreciate the help.  I really think that this is something that should just work.  I shouldn't have to go out of my way just to be able to do something that I can do in every other type of alert without a problem.