[ZBXNEXT-2025] Alias of the key for items using macros Created: 2013 Nov 16 Updated: 2013 Dec 11 Resolved: 2013 Dec 11 |
|
Status: | Closed |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | Frontend (F), Server (S), Templates (T) |
Affects Version/s: | 2.2.0 |
Fix Version/s: | None |
Type: | New Feature Request | Priority: | Trivial |
Reporter: | Yuya Kusakabe | Assignee: | Unassigned |
Resolution: | Duplicate | Votes: | 0 |
Labels: | aggregate, calculateditems, item, macros | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Issue Links: |
|
Description |
I want alias of the key for items using macros. For example, HostA has an itemA. HostB has an itemB. ItemB is an aggregate checks type item. The key of itemB is grpsum["Group name","Key of itemA",last,0]. ItemB has error, because {HOST.HOST} in the key of itemA is expanded hostB. So I create the calculated item for itemA's alias, itemC and use itemC in itemB. |
Comments |
Comment by richlv [ 2013 Nov 16 ] |
can you please show the exact key used in the aggregate item ? |
Comment by Yuya Kusakabe [ 2013 Nov 17 ] |
I want to create an aggregate item "grpsum[\" {HOST.NAME}\",\"vmware.vm.cpu.num[{$URL},{HOST.HOST}]\",last,0]" in "Template Virt VMware Hypervisor".But this item has error because {HOST.HOST} is expanded Hypervisor's host name. So I create calculated item in "Template Virt VMware Guest", last("vmware.vm.cpu.num[{$URL},{HOST.HOST}]") as "calc.vmware.vm.cpu.num". And I create an aggregate item "grpsum[\"{HOST.NAME} \",\"calc.vmware.vm.cpu.num\",last,0]" as a temporary solution. |
Comment by Marc [ 2013 Nov 17 ] |
Unintentional macro expansion could be avoided by |
Comment by Yuya Kusakabe [ 2013 Nov 18 ] |
Thank you, Marc. Can I set the macro: {$USER_MACRO} => {HOST.HOST}in a template ? |
Comment by Aleksandrs Saveljevs [ 2013 Dec 11 ] |
You might wish to see the linked issues for available workarounds. |