Ad Widget

Collapse

Populate SNMP interface name into trigger name?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • roboris
    Junior Member
    • Jan 2021
    • 16

    #1

    Populate SNMP interface name into trigger name?

    Good day,

    I have a trigger created from a discovery item prototype, and I need to include the SNMP interface name in the name of the trigger. Here's an example of a trigger created from the prototype:
    Click image for larger version

Name:	image_18705.png
Views:	261
Size:	133.7 KB
ID:	421616
    My goal here is to have the trigger be named "wan2 down", to correspond to the "wan2" interface indicated in the problem expression, but I can't find the right macro to populate this value into the trigger name. Is there a macro that will do the job, or do I need to go about this a different way?

    Help is greatly appreciated!

    Thank you,

    -Brian
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    You need to add the interface name to the trigger name at the LLD stage. Try adding the {#IFNAME} macro (or the corresponding one) to the name of the trigger prototype.

    Comment

    • roboris
      Junior Member
      • Jan 2021
      • 16

      #3
      I appreciate your advice. Based on this page, I decided to give {#SNMPVALUE} another go; I'd tried it before, but it hadn't worked. I must have made a typo, or I must not have waited long enough for it to populate through, because it worked this time:
      Click image for larger version

Name:	Screen Shot 2021-03-27 at 19.50.04.png
Views:	248
Size:	37.1 KB
ID:	421652

      The "6" before "wan2" is the interface type; the final thing that I need to do is somehow run the 6 (or whatever value is returned) through IF-MIB::ifType (like I can do with "Show value" in an item definition) to translate it into "ethernetCsmacd(6)". The end goal is to receive trigger alerts like "ethernetCsmacd(6) wan2 down".

      -Brian

      Comment

      Working...