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

Host macros are not resolved when used in actions

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • 5.4.2rc2, 6.0.0alpha1, 6.0 (plan)
    • 5.4.0
    • Server (S)
    • None
    • Centos8, MariaDB
    • Sprint 76 (May 2021), Sprint 77 (Jun 2021)
    • 1

      Start with a 5.0 instance.

      Create host, and on that host add 2 macros:

       

      Macro name Macro value Macro type
      {$MACRO1} clear clear text
      {$MACRO2} hidden secret text

      Build an item, trigger and make an action based on that trigger.

      Action:

      Force the trigger to go into the problem state, and see what's going on in the event details:

      This can be confirmed by checking that log.log file:

       

      [root@zbx50 zabbix]# cat log.log  
      The hidden macro: hidden and the clear: clear
      

       

       

      Now build the same setup in a 5.4 instance (or upgrade your 5.0), and check the event details:

       

       

      When opening that log file:

       

      [root@zbx54 zabbix]# cat log.log
      The hidden macro: {} and the clear: {}
      

       

       

      Expected: The same behaviour as 5.0 since hostmacros aren't that strange to use in your actions.

       

        1. Screenshot 2021-05-21 at 10.46.11.png
          58 kB
          Brian van Baekel
        2. Screenshot 2021-05-21 at 10.46.28.png
          62 kB
          Brian van Baekel
        3. Screenshot 2021-05-21 at 10.47.31.png
          22 kB
          Brian van Baekel
        4. Screenshot 2021-05-21 at 10.49.15.png
          36 kB
          Brian van Baekel

            dgoloscapov Dmitrijs Goloscapovs
            brian.baekel Brian van Baekel
            Team A
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: