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

Details

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

    Description

      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)

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: