Can you use a Host Based Macro inside a Templated LLD Item Prototype?
e.g.
[root@serverxxxx externalscripts]# zabbix_get -s sqlserver01 -k "perf_counter[\MSSQL\$ITSPRD04_02
atabases(Database1)\Log File(s) Size (KB)]"
5624.000000
LLD Item Prototype
perf_counter[\MSSQL\${$INSTANCE}
atabases({#DBNAME})\Data File(s) Size (KB)]
$INSTANCE is a host item macro assigned to the host who has the Item prototype in it's discovery rule i.e. ITSPRD04_02
e.g.
[root@serverxxxx externalscripts]# zabbix_get -s sqlserver01 -k "perf_counter[\MSSQL\$ITSPRD04_02
atabases(Database1)\Log File(s) Size (KB)]"5624.000000
LLD Item Prototype
perf_counter[\MSSQL\${$INSTANCE}
atabases({#DBNAME})\Data File(s) Size (KB)]$INSTANCE is a host item macro assigned to the host who has the Item prototype in it's discovery rule i.e. ITSPRD04_02