Ad Widget

Collapse

LLD macro name override for interface name discovery

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • troffasky
    Senior Member
    • Jul 2008
    • 567

    #1

    LLD macro name override for interface name discovery


    I would like to be able to edit names of discovered interfaces, but you can't do that.
    Can I get LLD to create a host macro, or refer to a host macro, that I can use to override or add a label for the interface? Really only matters for the names of interface graphs.
  • troffasky
    Senior Member
    • Jul 2008
    • 567

    #2
    This is is my first attempt. Graph prototype name:

    Interface {#IFNAME}: Network traffic {$IFLABEL:"{#IFNAME}"}

    Then created a macro on a host with that template on:

    Macro:
    {$IFLABEL:"{#vnet0}"}

    Value:
    WAN

    But not actually sure of the syntax here....so created this one as well:

    Macro:
    {$IFLABEL:"vnet0"}

    Value:
    WAN attempt 2​

    Will see if either of these work!

    Comment

    • troffasky
      Senior Member
      • Jul 2008
      • 567

      #3
      No, macro is not resolved. Graph is not mentioned here:

      so that's probably why.

      Comment

      • troffasky
        Senior Member
        • Jul 2008
        • 567

        #4
        Item-level instead, would be better than nothing. But no. Just ignored.
        Click image for larger version

Name:	image.png
Views:	82
Size:	63.9 KB
ID:	503377

        Comment

        • troffasky
          Senior Member
          • Jul 2008
          • 567

          #5
          This should be working.



          Items / item prototypes


          In an item or an item prototype configuration, user macros can be used in the following fields:
          Item name yes

          Comment

          • troffasky
            Senior Member
            • Jul 2008
            • 567

            #6
            "Should" work, apparently: https://support.zabbix.com/browse/ZBXNEXT-9856

            Comment

            • troffasky
              Senior Member
              • Jul 2008
              • 567

              #7
              It *does* work! Just not when you look at the list of configured items on the host. The macro is resolved in the graph legend:
              Click image for larger version

Name:	image.png
Views:	90
Size:	47.1 KB
ID:	503390

              Comment

              • troffasky
                Senior Member
                • Jul 2008
                • 567

                #8
                OK, it will resolve the macros in the graph key of the rendered graph but not the graph title of the rendered graph. It will do, for now.

                Comment

                Working...