Zabbix : Invalid JSON

jsonzabbix

I have a Powershell script returning a file like :

{
"data":[
{
"{#SHARENAME}":"Informatique",
"{#SHARENAME}":"Marketing"
}
]
}

I've set a discovery rule (zabbix agent) + an Item prototype (zabbix trapper) with the Key : sharename[{#SHARENAME}]

But the discovery rule says :

Invalid discovery rule value: cannot parse as a valid JSON object:
invalid object format, expected opening character '{' or '[' at: '/c
zabbix_sender -c "C:\Program
Files\Zabbix\Configurations\ZabbixAgentConf_x64_Cu stom.conf" -i
C:\Temp\JSON.log sent: 0; skipped: 8; total: 8'

Why ?!

Best Answer

Jsonlint reports an error stating "duplicated key" when trying to validate your file data.