Using Zabbix with Active Agent, How to determine the correct key. (LLD)

zabbix

I'm trying to do a discovery to get info from antivirus software.

In zabbix_agentd.conf i put this:

UserParameter=custom.discovery, cscript c:\soft\zabbix\av.vbs //NOLOGO

With this result:

{"data":[
{"{#DISPLAYNAME}": "ESET Endpoint Security 6.4.2014.2",
"{#PRODUCTSTATE}": "266240",
"{#TIMESTAMP}": "Tue, 18 Jul 2017 21:24:26 GMT"},
{"{#DISPLAYNAME}": "Windows Defender",
"{#PRODUCTSTATE}": "393472",
"{#TIMESTAMP}": "Thu, 10 Nov 2016 12:20:52 GMT"}
]}

My Discovery rule is this:

Name: Antivirus
Type: Zabbix Agent (Active)
key: custom.discovery

And i create this item prototype:

Name: Antivirus {#DISPLAYNAME}
Type: Zabbix Agent (Active)
Key: custom.discovery[ {#DISPLAYNAME}, PRODUCTSTATE]

My problem is when the item trying to get the "Productstate", the items are discovered correctly, but without value.

At the Configuration/Host/Item, i see the error "Item does not allow parameters" in each item created from the discovery.

Somebody can help me? Thx!

Best Answer

You should have separate userparameter to get item values, and that key should be used in the item prototypes. Your LLD rule key should not return item values.