Ad Widget

Collapse

Supported macros {HOST.HOST}

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sunrules
    Junior Member
    • Mar 2022
    • 11

    #1

    Supported macros {HOST.HOST}

    Hi, guys!
    I am using zabbix 6.0.5
    I need to pass the hostname as a parameter to define a global macro, but unfortunately I can't do it.
    In previous versions, I used the {HOSTNAME} macro, everything worked, but it is deprecated and does not work in version 6.0.5.
    I noticed that these macro weirdness started after upgrading from version 6.0.4 to version 6.0.5.
    If I specify the real hostname, then everything works.
    Probably I misunderstood something, tell me how can I solve this?
    Attached Files
  • vladimir_lv
    Senior Member
    • May 2022
    • 240

    #2
    Should be {HOST.NAME}
    Here is the list of supported macros for Zabbix 6.0

    Comment

    • sunrules
      Junior Member
      • Mar 2022
      • 11

      #3
      Originally posted by vladimir_lv
      Should be {HOST.NAME}
      Here is the list of supported macros for Zabbix 6.0
      https://www.zabbix.com/documentation...l=HOST.NAME%7D
      It only works for me in item and trigger, but it doesn't work in host macros, see my PrnScr in the location.
      I tried: {HOSTNAME} {HOST.HOST} {HOST.NAME} throws an error. But it certainly worked before.

      Comment

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

        #4
        Whats the point of using a usermacro, which gets a value of a built in macro... you could use that macro directly without that reassigning...

        Comment

        • sunrules
          Junior Member
          • Mar 2022
          • 11

          #5
          Originally posted by cyber
          Whats the point of using a usermacro, which gets a value of a built in macro... you could use that macro directly without that reassigning...
          In some cases, it can be unique, for example, the full path to the site on this host, and this must be done in a special form that applies only to this host and not in the template itself, since it is global.
          As a result, there will be one macro in which there is a host name and an additional suffix.
          I understand that this is not a significant problem and it is being solved, but the question was related to why it stopped working, or maybe it works, but the name of the macro for this form has changed.
          Thank you!

          Comment

          Working...