[ZBXNEXT-7460] Return of {$USER.MACRO} in item PROTOTYPE names. Created: 2022 Feb 01 Updated: 2024 Jun 27 Resolved: 2024 Jan 02 |
|
Status: | Closed |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | API (A), Frontend (F), Server (S) |
Affects Version/s: | 6.0 (plan) |
Fix Version/s: | 7.0.0alpha8, 7.0 (plan) |
Type: | Change Request | Priority: | Trivial |
Reporter: | Andrey Tocko (Inactive) | Assignee: | Vladislavs Sokurenko |
Resolution: | Fixed | Votes: | 52 |
Labels: | None | ||
Σ Remaining Estimate: | Not Specified | Remaining Estimate: | Not Specified |
Σ Time Spent: | Not Specified | Time Spent: | Not Specified |
Σ Original Estimate: | Not Specified | Original Estimate: | Not Specified |
Environment: |
Attachments: |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
||||||||||||||||||||
Issue Links: |
|
||||||||||||||||||||
Sub-Tasks: |
|
||||||||||||||||||||
Epic Link: | Zabbix 7.0 | ||||||||||||||||||||
Team: | |||||||||||||||||||||
Sprint: | Sprint 105 (Oct 2023), Sprint 107 (Dec 2023) | ||||||||||||||||||||
Story Points: | 10 |
Description |
Comments |
Comment by Rodrigo P [ 2022 Sep 16 ] |
Hi. Macros support in item names make totally sense. Below I bring one of the many use cases I have here.
We have BGP session monitoring, getting lot of related metrics. In item name, we have context macro that should be resolved for their values.
To resolve macro values discovered in LLD rules, we need to replace context macros with desired values we want to be shown in item names.
Without macro support in item names, it's not possible to add custom values for items and context macro values are not resolved, as example below.
Please, consider bringing this feature back.
Thanks. |
Comment by Josip Deanovic [ 2022 Sep 21 ] |
Hello,
I am new to Zabbix. I inherited Zabbix 4.0.x installation which makes use of user macros in item names heavily. This feature makes Zabbix flexible and I am shocked to see that it is not supported in 6.0.x version. Removing user macros from names of the items (and I assume from triggers and their prototypes as well) calls for a lot of hard coding. Surely, there must be another way to fix whatever issues that feature presented. Avoiding hard coding and keeping more general item names would produce item names that are not distinguishable between each other. For example, please observe the screenshot of the "Latest data" screen in Zabbix 4.0.x: I looked all the features in versions 5.0.x and 6.0.x and I find them pretty insignificant in comparison with what 6.0.x lost by dropping user macros from item names and this is really sad.
Please, consider bringing this feature back. |
Comment by MikolajPorczynski [ 2022 Oct 26 ] |
Please, consider bringing this feature back. |
Comment by Eugene Mihaylovskiy [ 2022 Dec 07 ] |
Comment by Rodrigo P [ 2023 Mar 26 ] |
Hi. Thanks. |
Comment by MikolajPorczynski [ 2023 Jul 19 ] |
Is there any plan to restore this feature? We use of USER MACRO everywhere to simplify templates, this issue is blocking any upgrade in my company! Thanks. |
Comment by Alexei Vladishev [ 2023 Aug 28 ] |
Thanks so much for all your feedback here! We are introducing support of user macros in item prototype names in Zabbix 7.0. The macros will be expanded during LLD process, therefore item names will not contain user macros. We will try to backport it to the latest 6.0.x and 6.4.x. Note that we are not going to introduce support of user macros in item names. |
Comment by Constantin Oshmyan [ 2023 Aug 28 ] |
alexei, great news, thanks! |
Comment by James Cook [ 2023 Aug 29 ] |
Hi Alexie, Only reverting user macros for discovered items solves half the problem, as standard items may also have 'configurable' information in the item name which previously came from user macros. I raised https://support.zabbix.com/browse/ZBXNEXT-7497 not being aware of this issue. Here are some examples for standard items from the official Zabbix templates which are still current even on my Zabbix 6.4.4 appliance:
Heres some examples of how we use it:
Please reconsider as standard items and discovered items would be stored in the same tables and are displayed in the same web page etc...
Cheers James |
Comment by Dmitry Khenkin [ 2023 Aug 29 ] |
I use standard template Oracle by Zabbix agent2, but I cloned it because I have more than 3 Oracle instance on same host. Please consider returning the opportunity or suggest another method for my problem. |
Comment by MikolajPorczynski [ 2023 Aug 29 ] |
Unfortunately, the proposed solution does not solve my problem. I need to use user macros in the names of all items - not only in item prototype names. |
Comment by Alexei Vladishev [ 2023 Aug 29 ] |
The main problem with dynamic item names is that we cannot make reliable and fast search functionality. It is because Zabbix must expand all macros first, which is rather heavy operation. Well, I understand all your use cases and reasonings, but I still do not see how it can be fixed in a good way. |
Comment by James Cook [ 2023 Aug 30 ] |
Perhaps the same solution for trigger definitions where you have the name and event name? For items it would be name and item name, where the item name would contain user macros and only be used for display purposes only if specified? This could also cut down the amount of work when performing substitutions as it would only occur on the item name field if specified. |
Comment by MikolajPorczynski [ 2023 Sep 05 ] |
|
Comment by Alexei Vladishev [ 2023 Sep 05 ] |
[email protected], indeed, one of possible solutions is to have some sort of technical (configuration) and visible (what end-users see) item names. In this case Zabbix Server should update visible names any time a technical name or some user macro changes its value. It is doable, but it is not clear what performance hit it may cause. MikolajPorczynski, totally agree. We are still looking for a practical way of solving this. |
Comment by Alexei Vladishev [ 2023 Oct 06 ] |
All right, we are implementing support of user macros in item and item prototype names in Zabbix 7.0. Thanks again everyone for your valuable feedback, especially for describing various use cases. |
Comment by MikolajPorczynski [ 2023 Oct 06 ] |
Alexei, great news! Thank You! |
Comment by Josip Deanovic [ 2023 Oct 06 ] |
Great news indeed. Thank you! |
Comment by Constantin Oshmyan [ 2023 Oct 09 ] |
alexei, great news, thank you! |
Comment by Alexei Vladishev [ 2023 Oct 10 ] |
constantin.oshmyan, it all will be implemented under this ticket. |
Comment by Dmitrijs Goloscapovs [ 2023 Nov 23 ] |
Available in versions:
|
Comment by Martins Valkovskis [ 2023 Dec 01 ] |
Updated documentation:
|
Comment by Mickael Martin [ 2024 Jan 30 ] |
Thank you very much! |