Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-20304

Macro from host level doesn't work into action/script

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Cannot Reproduce
    • Icon: Trivial Trivial
    • None
    • 5.4.8
    • Frontend (F)
    • None

      Steps to reproduce:

      1. Please set the global macro as {$MACRO1} with value Global1
      2. Please set the local macro as {$MACRO1} with value Local1
      3. Please create the script and as a parameter please use this {$MACRO1} for example: notification.sh --info "{$MACRO1}"
      4. Please create the action for all problems from host where {$MACRO1} uses please execute the script notification.sh

      Result:

      Macro from global (Global1) will be used instead of Host (Local1)

      Expected:
      which is not in accordance with the guide:

      Zabbix resolves macros according to the following precedence:

      1. host level macros (checked first)


      2. macros defined for first level templates of the host (i.e., templates linked directly to the host), sorted by template ID

      3. macros defined for second level templates of the host, sorted by template ID

      4. macros defined for third level templates of the host, sorted by template ID, etc.

      5. global macros (checked last)

        1. image-2021-12-01-20-34-05-726.png
          21 kB
          Lukasz Ma
        2. image-2021-12-01-20-34-52-500.png
          14 kB
          Lukasz Ma
        3. image-2021-12-01-20-35-26-753.png
          6 kB
          Lukasz Ma
        4. zbx - action log.PNG
          14 kB
          Francys Nivea
        5. zbx - global macro.PNG
          20 kB
          Francys Nivea
        6. zbx - action.PNG
          42 kB
          Francys Nivea
        7. zbx - macro.PNG
          30 kB
          Francys Nivea
        8. zabbix_action.jpg
          45 kB
          Lukasz Ma
        9. image-2021-12-07-14-48-50-619.png
          153 kB
          Lukasz Ma
        10. image-2021-12-07-14-49-07-258.png
          91 kB
          Lukasz Ma
        11. screenshot-1.png
          18 kB
          Francys Nivea
        12. image-2021-12-14-16-46-41-588.png
          46 kB
          Francys Nivea
        13. image-2021-12-14-16-49-55-590.png
          12 kB
          Francys Nivea
        14. image-2021-12-14-16-55-38-202.png
          40 kB
          Francys Nivea
        15. image-2021-12-14-16-57-06-975.png
          42 kB
          Francys Nivea
        16. image-2021-12-14-16-58-59-483.png
          53 kB
          Francys Nivea
        17. image-2021-12-14-17-17-37-461.png
          17 kB
          Francys Nivea
        18. image-2021-12-14-17-27-23-934.png
          11 kB
          Francys Nivea

            nfrancys Francys Nivea (Inactive)
            luka Lukasz Ma
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: