Hi,
I have several discovery rules that get input through JSON, with zabbix_trapper or external scripts. That worked fine until I updated to 2.2.0. In the what's new for 2.2.0 it states:
Ok, that's fine with me although excactly WHAT format does zabbix expect? Even the examples given in the 2.2.0 documentation don't work for me anymore.
The error I get on the discovery-keys 'Value should be a JSON format' and the values are not processed. While I am keeping to the format the Zabbix documentation gives me, I checked with http://jsonlint.com/ and everything is fine (as well as the examples by the way). An example of my JSON string:
{
"data":[
{"{#PSU}":"psu_1.1","{#DESC}":"PSU 1, Left"},
{"{#PSU}":"psu_1.2","{#DESC}":"PSU 2, Right"}
]
}
What's wrong?
I have several discovery rules that get input through JSON, with zabbix_trapper or external scripts. That worked fine until I updated to 2.2.0. In the what's new for 2.2.0 it states:
5.25.8 JSON validation on server
Previously, a slightly incorrect JSON could silently get accepted by the Zabbix server. Starting with Zabbix 2.2, syntax validation is performed, before parsing JSON data. Opening invalid JSON data will immediately return failure and the parsing error will be logged as warning.
Previously, a slightly incorrect JSON could silently get accepted by the Zabbix server. Starting with Zabbix 2.2, syntax validation is performed, before parsing JSON data. Opening invalid JSON data will immediately return failure and the parsing error will be logged as warning.
The error I get on the discovery-keys 'Value should be a JSON format' and the values are not processed. While I am keeping to the format the Zabbix documentation gives me, I checked with http://jsonlint.com/ and everything is fine (as well as the examples by the way). An example of my JSON string:
{
"data":[
{"{#PSU}":"psu_1.1","{#DESC}":"PSU 1, Left"},
{"{#PSU}":"psu_1.2","{#DESC}":"PSU 2, Right"}
]
}
What's wrong?
lost comma between interfaces...
Comment