Ad Widget

Collapse

Macro in template which defaults to {HOST.CONN}

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gijs007
    Member
    • Oct 2017
    • 40

    #1

    Macro in template which defaults to {HOST.CONN}

    I'm trying to monitor a service, which normally uses the same IP as the agent. However in a few cases the IP is different.
    To make this easier to configure I want to use use templates with macro's. I'd like to create a macro inside this template called {$serviceIP} which has as default value the value of the {HOST.CONN} macro. (The reason for this is that if I'd use the {HOST.CONN} macro directly in the item key, I can no longer override it.)

    However when I configure this for some reason the {$serviceIP} macro has no value. It simply contains the text {HOST.CONN}, instead of the IP...
    How can I make this work as intended?
    Last edited by Gijs007; 05-04-2021, 20:07.
  • Gijs007
    Member
    • Oct 2017
    • 40

    #2
    Exactly, so that I can use it in a template and when needed override it on the host level.
    Apparently this is not supported. Is there another way to accomplish this?

    Comment

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

      #3
      So you want to use macro as a macro value? That's not going to work......

      Comment

      • Gijs007
        Member
        • Oct 2017
        • 40

        #4
        Basically. What I want is to take the connection details of the host and store them in a macro, so that I can override this macro when required.

        Comment

        • sandro1976
          Junior Member
          • Sep 2022
          • 5

          #5
          I have the same problem (I use zabbix 6.0) and I wasn't able to find a workaround.
          Have you find a solution, Gijs007 ?

          I cannot believe that this is not supported, it would be such a neat feature...

          Comment

          Working...