Display Custom Property for Child Object

Hi, 

Simple I hope. I have an email template that includes this variable: ${N=SwisEntity;M=CustomProperties.Address} - this works fine when reporting on the node status and performance. However, when I attach this to an alert that triggers when any interface on that node reaches 90% utilisation, I get this in the subject: High Priority Site Utilisation is Greater 90% on ${N=SwisEntity;M=CustomProperties.Address} at Wednesday, May 29, 2024 08:52. 

I understand that as the interface is a child of the node, it does not have the custom property assigned. Is there anyway to achieve this without going through the 4000 interfaces and updating their custom property field. 

The aim is to correctly display the custom property in the email subject. 

Thanks all 

Zak

Parents
  • The macros are positional - think  ${N=SwisEntity;M=CustomProperties.Address} = "On this table, go down to the custom properties table, then the address value"

    If you swap a node for an interface, it's still going to look to go down one, and use the address. If you made that on interfaces customproperties it'd work. If you want the node's address it wouldnt because that's not the right directions to get to that datapoint

    Instead you'd want something that went "On this table, go up to nodes, then down to custom properties, then address" - You can try formatting that yourself, or use the variable picker to find the right one and use that

  • I understood all of that up until the end. Sorry, I am new to SWQL. 

    Essentially, build a custom variable that determines the value by looking at the parent node and then to the table / row that contains the custom address data? 

  • That route works for more complicated stuff but I was trying to also give you a nudge in the direction of the macro picker as you can find it in there without having to write anything custom. That said it's good to understand why stuff breaks when moved between alerts on different objects too, took me a while to figure it out some years back.

    What you probably want to do is insert a macro, use the top left drop downs to show macros by table(object type), and look for the node custom properties stuff.

    You can do the write it yourself version, it should look about the same as it does now but with a "Node." bit in there after the M=, mistakes are really easy there though

  • I thought I was going to have to write custom queries or understand the syntax of the variables but no, you were right to nudge. It was actually very simple. 

    As Vinay.by said "Alert variables are linked to the type of object/alert that you create". So even if you set up a useful alerting template for node based alerts, this will not transfer to an interface based alert. The variables must be changed to work with the different alert type. As you said; use the macro picker, which appears when you select the "insert variable" button within the trigger action window. 

  • Glad to be helpful!

    You if you find the variable picker ain't quite enough, the "positional" macro thing should help ya if you do need to guess at syntax or write custom stuff, it'll probably come up sooner or later

Reply Children
No Data