I am a little confused about how variable expansion works in a LLD host discovery created host.
My scenario is that I'm using the LLD host discover to create hosts attached to radio APs, I know that it was originally there for vmware, but I think there is far more use for the creation of hosts that exist as a sub-unit of other hosts especially if they are temporary.
Anyway, I thought this would work fine as the SNMP interface I'm polling for the LLD created hosts is in fact the AP. So the hosts are discovered via SNMP by device name off the APs WHISP-APS-MIB::linkSiteName table and created with their linkSiteName as the hostname and the APs SNMP interface as their interface. All good. I apply a template containing the items to monitor (via the AP parent)
Now I am trying to poll for data, using the dynamic indices syntax
WHISP-APS-MIB::linkSessState["index","WHISP-APS-MIB::linkSiteName","{HOST.NAME}"]
Which I thought made sense as the linkSessState OID is index per attached client to the AP the same as the linkSiteName OID, so zabbix should find the index for {HOST.HOST} on the linkSiteName and use it to poll linkSessState.
But alas, no luck. I also tried {HOST.NAME}, same thing no luck. I set the debug to 4 and went through the log file to find this error:
error reason for "Rita_SM:net.rf.client.connstate" changed: Cannot find index of "{HOST.HOST}" in "WHISP-APS-MIB::linkSiteName".
which indicates that {HOST.HOST} is not being expanded in the check.
What's throwing me is that I also wrote an external check script that takes the hostname, community string, polling interface, and OID to be polled and it works fine when I pass the same macro:
In get_value_external() key:'SM_get.pl[{HOST.HOST},Canopy,{HOST.CONN},".1.3.6.1.4.1.161.1 9.3.2.2.8.0"]'
In zbx_popen() command:'/usr/lib/zabbix/externalscripts/SM_get.pl "Bob_SM" "Canopy" "10.222.222.194" ".1.3.6.1.4.1.161.19.3.2.2.8.0"'
So zabbix can expand {HOST.HOST} for the LLD discovered host if it's polling with an external check, but not if it's polling a SNMP interface??? or for an item key, but not for an OID??
My scenario is that I'm using the LLD host discover to create hosts attached to radio APs, I know that it was originally there for vmware, but I think there is far more use for the creation of hosts that exist as a sub-unit of other hosts especially if they are temporary.
Anyway, I thought this would work fine as the SNMP interface I'm polling for the LLD created hosts is in fact the AP. So the hosts are discovered via SNMP by device name off the APs WHISP-APS-MIB::linkSiteName table and created with their linkSiteName as the hostname and the APs SNMP interface as their interface. All good. I apply a template containing the items to monitor (via the AP parent)
Now I am trying to poll for data, using the dynamic indices syntax
WHISP-APS-MIB::linkSessState["index","WHISP-APS-MIB::linkSiteName","{HOST.NAME}"]
Which I thought made sense as the linkSessState OID is index per attached client to the AP the same as the linkSiteName OID, so zabbix should find the index for {HOST.HOST} on the linkSiteName and use it to poll linkSessState.
But alas, no luck. I also tried {HOST.NAME}, same thing no luck. I set the debug to 4 and went through the log file to find this error:
error reason for "Rita_SM:net.rf.client.connstate" changed: Cannot find index of "{HOST.HOST}" in "WHISP-APS-MIB::linkSiteName".
which indicates that {HOST.HOST} is not being expanded in the check.
What's throwing me is that I also wrote an external check script that takes the hostname, community string, polling interface, and OID to be polled and it works fine when I pass the same macro:
In get_value_external() key:'SM_get.pl[{HOST.HOST},Canopy,{HOST.CONN},".1.3.6.1.4.1.161.1 9.3.2.2.8.0"]'
In zbx_popen() command:'/usr/lib/zabbix/externalscripts/SM_get.pl "Bob_SM" "Canopy" "10.222.222.194" ".1.3.6.1.4.1.161.19.3.2.2.8.0"'
So zabbix can expand {HOST.HOST} for the LLD discovered host if it's polling with an external check, but not if it's polling a SNMP interface??? or for an item key, but not for an OID??
Comment