-
Problem report
-
Resolution: Won't fix
-
Trivial
-
None
-
7.0.12
-
Zabbix 7.12 (single server + several proxies).
The original Zabbix VMware Templates in use. In this case it is the VM (virtual machine) discovery LLD rule.
Each vCenter is represented in Zabbix as a host linked to that template.
Problem:
**
On each vCenter host we already have a User-Macro set:
{$CUSTOMER.ID} = <unique customer number per vCenter> in this test case we've chosen 12345 on one vCenter Server.
What we want is to automatically discover the VM-hosts of that vCenter Server and use {$CUSTOMER.ID} within the visible name of a VM, e.g.:
12345 - vm01 (visible name)
Whatever we've tried, we only get the visible name:
{$CUSTOMER.ID} - vm01
What we’ve tried
1. Template-level macro declaration in Configuration → Templates → VMware-LLD-Template → Macros, we've added:
{$CUSTOMER.ID} = we left this empty in here
2. Per-host override on each vCenter host (Configuration → Hosts → <vCenter> → Macros), we've set:
{$CUSTOMER.ID} = 12345 ← actual ID for that vCenter
3. Reload config cache on the Zabbix server and/or proxy:
zabbix -c 'zabbix_server -R config_cache_reload'
Then in the frontend we hit Execute now on the VM discovery rule.
and/or 4. Host-Prototype settings in the LLD host-prototype of the VMware-LLD template:
- Visible name:
{$CUSTOMER.ID} - {#VM.NAME}
Expected vs. actual
-
- Expected: Discovered VMs named “12345 – vm01”
-
- Actual: All new VMs literally appear as {$CUSTOMER.ID} – vm01 and have no customer_id tag applied.