[ZBX-15830] Macro is not resolved in Maps if it inherits its value from a user defined Macro Created: 2019 Mar 15  Updated: 2023 Nov 23

Status: Open
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 4.2.0rc1
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Sergejs Olonkins Assignee: Zabbix Development Team
Resolution: Unresolved Votes: 0
Labels: macro, maps
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Marco_fields_map.png     GIF File macros_scenario.gif    

 Description   

Problem description:
When a valid Macro the value of which is defined by a user defined Macro is added in Label, URL or URL name fields of an element in Maps, the value of the user defined Macro is not resolved in the map.

Steps to reproduce:
1 - Go to Configuration => Templates => Create template
2 - Fill out all mandatory fields, navigate to "Macros" tab and create a user defined Macro, for example: {$DNS_MACRO} => yahoo.com.
3 - Create a Host and attach it to the previously created template.
4 - Use the user defined Macro {$DNS_MACRO} as the value of the "DNS name" field.
5 - Navigate to Monitoring => Maps and press "Create map".
6 - Fill in all mandatory fields, enable "Advanced labels" checkbox and set "Host label type" to "Label" and save the newly created map.
7 - Open the map and press edit map.
8 - Add a host element to the map, in "Host" field select the previously created host
9 - Use macro {HOST.DNS} (valid according to Supported Macros) as the value of Label, URL name and URL fields:

10 - Save the element and update the map.
11 - Open the previously created map.

Whole scenario:

Result: The actual text of the user defined macro is returned in the Label and URLs fields. The same behavior is observed for the URL value.

Expected: The value of the user defined marco should be picked up by the

{HOST.DNS}

macro and should be displayed in the Label and URLs fields, and should be used in the actual URL.


Generated at Fri Apr 11 04:33:42 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.