Ad Widget

Collapse

Using Macros on Links in Network Maps

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rsadmin
    Junior Member
    • Jan 2024
    • 6

    #1

    Using Macros on Links in Network Maps

    I have a question in regard of Zabbix Networtkmaps.
    I want to depict a Map of our Switches using the Zabbix Map function.

    I know you can use Macros like {HOST.IP} on Host elements to pull data dynamicly.
    I laso want to show Networktraffic of all Ports in my Map.
    I found a Function that works and goes like this.
    {?last(/HOSTNAME/net.if.in[ifInOctets.1])}

    But because I set these to a Link and not a host its not possible to use a Macro to get the HOSTNAME.
    I need to alter all maps and put the host manually.
    Is there a possiblity to link the Macro {HOST.NAME} from a central Host on a map to all links?

    I also tried to set the Macro to a Host insted of a link but that doenst work because the Macro {HOST.NAME} is interpreted correctly but the complete command {?last(/{HOST.NAME}/net.if.in[ifInOctets.1])} is not.
    Last edited by rsadmin; 30-01-2024, 15:13.
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    The link connects two hosts - how to understand which host is {HOST.NAME}?

    Comment

    • nathanvandalen
      Junior Member
      • Jan 2023
      • 11

      #3
      Perhaps in the future there will be a {HOST.NAME1} and {HOST.NAME2} just like with item values in triggers but that would require some editing of the map coding aswell I guess.

      To answer your question, there is no easy war nor a macro that does this. I've done it some time ago using the API but was not easy.

      Comment

      • rsadmin
        Junior Member
        • Jan 2024
        • 6

        #4
        Ok thanks for your answers.
        If thats the case I will put all data maunally into my map

        Comment

        • KyleeMegan
          Junior Member
          • Jan 2024
          • 1

          #5
          Is there an option in Zabbix to define macros centrally, possibly on a parent or central host, and have them automatically propagate to linked elements on the Network Map?​

          Comment

          • mark112
            Junior Member
            • May 2024
            • 1

            #6
            Like with item values in triggers, perhaps in the future there will be a {HOST.NAME1} and {HOST.NAME2}, although it would also take some tweaking of the map coding, I suppose.

            To respond to your inquiry, neither a macro nor a simple war exist that can accomplish this. I've used the API to accomplish it before, but it wasn't simple.

            Comment

            Working...