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.

Advanced Alert Macros

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.

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

  • yes (kind of)

    Think of it like this: 'What object have (this condition) and not (that condition)'

    Where the object is the thing you're alerting on (a container/group).

    You can do it as custom SQL -> contact support for help on SQL macros.

  • Ugh.  I was afraid of that.  Thanks.

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

    }

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