[ZBX-26339] User macro conflict resolved differently on Frontend vs Server Created: 2025 Apr 22 Updated: 2025 May 21 |
|
Status: | Ready for QA |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Server (S) |
Affects Version/s: | 7.0.11, 7.0.12rc1 |
Fix Version/s: | 7.0.14rc1, 7.2.8rc1, 7.4.0rc1 (master) |
Type: | Problem report | Priority: | Minor |
Reporter: | user185953 | Assignee: | Natalja Romancaka |
Resolution: | Unresolved | Votes: | 0 |
Labels: | consistency | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | 12h 50m | ||
Original Estimate: | Not Specified | ||
Environment: |
Debian 12, Firefox |
Attachments: |
![]() ![]() |
||||||||
Issue Links: |
|
||||||||
Team: | |||||||||
Sprint: | S25-W20/21 | ||||||||
Story Points: | 4 |
Description |
Steps to reproduce:
Result: Expected: |
Comments |
Comment by user185953 [ 2025 Apr 22 ] |
Related to macro conflict resolution: ZBXNEXT-1674 and https://www.zabbix.com/documentation/current/en/manual/config/macros/user_macros for those who look for workarounds. |
Comment by Alexander Vladishev [ 2025 Apr 22 ] |
What do you mean by "but when LLD rule runs"? Are you referring to the macro being resolved differently in items or triggers created from prototypes? The procedure for resolving user macros and how such conflicts are handled is described here. |
Comment by user185953 [ 2025 Apr 23 ] |
First template has UUID 2... and macro {$VAL.IGNORE.REGEX} = ^never-ignore$, When LLD rule runs, it works like described in documentation. First template wins and nothing is filtered. Maybe it is not worth fixing but caused "My macro is ^2$ so why are these items still discovered?". |
Comment by user185953 [ 2025 Apr 23 ] |
Looks like maybe order of template import matters in Frontend?
|
Comment by Alexander Vladishev [ 2025 Apr 23 ] |
Yes, the order definitely matters — identical macros are sorted by the template ID (hostmacro.hostid). Here’s an excerpt from our documentation:
The server and frontend should behave the same way. I’ll try to reproduce the issue to confirm. |
Comment by user185953 [ 2025 Apr 23 ] |
I hope the attached templates will help with reproducing. |
Comment by Alexander Vladishev [ 2025 Apr 23 ] |
I meant that the import order matters, not the linking order. If a template is imported first, it will have a lower ID, and therefore its macro will take precedence. Thank you for the templates — they’ll help reproduce the issue. |
Comment by user185953 [ 2025 Apr 23 ] |
Oh, I assumed that "template ID" means template UUID that will be carried by export. I see my mistake. I don't know if attached templates will work here. Let me test the LLD part more thoroughly on my end. |
Comment by user185953 [ 2025 Apr 23 ] |
Can you please try this:
|
Comment by user185953 [ 2025 Apr 23 ] |
Simpler test:
|
Comment by Alexander Vladishev [ 2025 Apr 23 ] |
Thank you for your input! I can confirm the issue — the server resolves user macros without taking their priority by "hostid" into account. |