I'm configuring LLD Discovery with item prototypes. Information gathering is done by SNMP, using Zabbix 4.4.
When Item prototypes creates items, it requires unique key to be generated for each item. Easiest way is to use something like key: item.key[{#SNMPINDEX}]. In my scenario I'm getting the SNMP data in two levels querying one central server: server1 -> device1:int1,int2,int3 ; server1 -> device2,int1,int2,int3 etc. Now if I try to use two LLD macros in the key, it won't work. If I define the key as item.key[{#SNMPINDEX}] it works, but if I would need to use multiple LLD macro names in the Key or even in the Name field (other macros besides SNMPINDEX), then only one macro gets translated into value. Other stays as {#MACRONAME}.
For example. My Discovery rule has {#IFNAME} & {#ITEM.NAME} macros in the formula. In item prototype, if I use:
1) Interface {#IFNAME} on device {#ITEM.NAME}, then "Latest data" gives me the translated name as "Interface wired0 on device {#ITEM.NAME}" <--ITEM.NAME is not translated
2) Interface {#IFNAME} on device {#SNMPINDEX}, then "Latest data" gives me the translated name as "Interface wired0 on device 240.0.1.2.3.4" <-- both values translated
3) Interface test on device {#ITEM.NAME}, then "Interface test on device My-Device01" <-- ITEM.NAME is actually translatable, but only if it is a single macro in a field
Same thing in defining Key values with same logic. Only one macro gets translated into the real value gathered by snmp.
I'm not getting the snmp information from individual devices, but from one central server, so that's why I have to use device name & int names both in name and key values, to have a readable output(interfaces associated with a device name, not with general central server name) from the Latest data section.
The solution in question is Meraki Cloud Controller & from there I'm getting multiple devices with multiple interfaces.
When Item prototypes creates items, it requires unique key to be generated for each item. Easiest way is to use something like key: item.key[{#SNMPINDEX}]. In my scenario I'm getting the SNMP data in two levels querying one central server: server1 -> device1:int1,int2,int3 ; server1 -> device2,int1,int2,int3 etc. Now if I try to use two LLD macros in the key, it won't work. If I define the key as item.key[{#SNMPINDEX}] it works, but if I would need to use multiple LLD macro names in the Key or even in the Name field (other macros besides SNMPINDEX), then only one macro gets translated into value. Other stays as {#MACRONAME}.
For example. My Discovery rule has {#IFNAME} & {#ITEM.NAME} macros in the formula. In item prototype, if I use:
1) Interface {#IFNAME} on device {#ITEM.NAME}, then "Latest data" gives me the translated name as "Interface wired0 on device {#ITEM.NAME}" <--ITEM.NAME is not translated
2) Interface {#IFNAME} on device {#SNMPINDEX}, then "Latest data" gives me the translated name as "Interface wired0 on device 240.0.1.2.3.4" <-- both values translated
3) Interface test on device {#ITEM.NAME}, then "Interface test on device My-Device01" <-- ITEM.NAME is actually translatable, but only if it is a single macro in a field
Same thing in defining Key values with same logic. Only one macro gets translated into the real value gathered by snmp.
I'm not getting the snmp information from individual devices, but from one central server, so that's why I have to use device name & int names both in name and key values, to have a readable output(interfaces associated with a device name, not with general central server name) from the Latest data section.
The solution in question is Meraki Cloud Controller & from there I'm getting multiple devices with multiple interfaces.