We're using unifi.proxy to monitor our Ubiquiti equipment and we've run into a problem after upgrading to Zabbix 4.0.1. The problem is that any item key that has an array reference in it is not working.
For instance,
zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf -t unifi.proxy[get,ugw,<site_name>,"port_table.[name=lan].ip",<device_id>] returns [m|ZBX_NOTSUPPORTED] [Invalid item key format.].
But,
zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf -t unifi.proxy[get,ugw,<site_name>,"adopted",<device_id>] returns [s|1] which is correct.
I think problem is the extra set of braces (i.e. [name=lan] ) in the key. I've experimented and as long as there are no other braces except the ones enclosing the unifi.proxy parameters, the key will work.
For example: zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf -t unifi.proxy[get,ugw,<site_name>,port_table.ip,<device_id>] returns [s|192.168.x.x] which is the correct first item in the array.
Unfortunately, I need the second item in the array. But, as mentioned before, adding the [<array_position>] reference causes an invalid item key exception. This used to work before the Zabbix upgrade. Am I just not using the correct syntax (port_table.[name=lan].ip) for the key? Which begs the question, what's the correct syntax?
Or, has there been a change in Zabbix to the format of the item keys that will not allow the braces necessary to reference a specific json array element?
Thanks.
For instance,
zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf -t unifi.proxy[get,ugw,<site_name>,"port_table.[name=lan].ip",<device_id>] returns [m|ZBX_NOTSUPPORTED] [Invalid item key format.].
But,
zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf -t unifi.proxy[get,ugw,<site_name>,"adopted",<device_id>] returns [s|1] which is correct.
I think problem is the extra set of braces (i.e. [name=lan] ) in the key. I've experimented and as long as there are no other braces except the ones enclosing the unifi.proxy parameters, the key will work.
For example: zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf -t unifi.proxy[get,ugw,<site_name>,port_table.ip,<device_id>] returns [s|192.168.x.x] which is the correct first item in the array.
Unfortunately, I need the second item in the array. But, as mentioned before, adding the [<array_position>] reference causes an invalid item key exception. This used to work before the Zabbix upgrade. Am I just not using the correct syntax (port_table.[name=lan].ip) for the key? Which begs the question, what's the correct syntax?
Or, has there been a change in Zabbix to the format of the item keys that will not allow the braces necessary to reference a specific json array element?
Thanks.
Comment