Ad Widget

Collapse

Help with trigger protoypes and LLD / user macros

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sfuller
    Junior Member
    • Jun 2023
    • 5

    #1

    Help with trigger protoypes and LLD / user macros


    I would like to create a trigger that fires when bandwidth for an SNMP discovered interface is below a certain value. I want the trigger to fire at a different value for each discovered interface.

    My approach was going to be to create the trigger prototype and have it reference an interface specific user macro that is named based on the value of #IFALIAS for each interface.

    Example:

    I have a switch with two interfaces with that have the values of 1.234 and 5.678 for #IFALIAS. When the triggers are created by the template, I'd like the trigger for interface 1.234 to look at a user macro on the host named $LOW_BW_1.234 for the value to fire on, and the trigger for interface 5.678 should look at the user macro on the host named $LOW_BW_5.678 for the value to fire on.

    When I try to create the trigger prototype and use the construct {$LOW_BW_"{#IFNAME}"} after the < operator, I receive the following error

    Invalid parameter "/1/expression": incorrect expression starting from "{$LOW_BW_"{#IFNAME}"}

    Is this type of reference something that isn't allowed? Is there a different approach I should be taking? I am hoping to avoid manual editing of rules with static values after creation.

    Thanks
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    Answered in your other similar thread...

    Comment

    • sfuller
      Junior Member
      • Jun 2023
      • 5

      #3
      Thanks. I accidentally submitted the first thread before I had completed it and wasn't able to update or delete that thread before it was approved.

      I was hoping to use an "_" in the variable name, but that's minor in the scheme of things. Thank you for the pointer, we have it working using the user macro with context.

      - Steve

      Comment

      Working...