Zabbix has problems importing templates in JSON format. XML works without problems.
If one use the zabbix API to export a template in JSON format (check attachment:zabbix_export_template.json) , the system will not be able to import this export file via the API or the frontend.
The error we get via de API is: "... Application error.: Invalid XML tag "/zabbix_export/groups": unexpected tag "0". while sending ...."
Via the frontend the error is: "...Invalid XML tag "/zabbix_export/groups": unexpected tag "0"...."
According to the documentation this should work, "Import supports both XML and JSON, the import file must have a correct file extension: .xml for XML and .json for JSON.".
I addition, when trying to import via the API, we use "format":"json" to specify that the file is a json file. (Check attachment with full information about json data send to the API: json_data_send_to_api.txt)
I looks like the system doesn't discover that we are sending JSON data, try to parse de content as XML and fails.
Any ideas on how to fix this? Thanks.
- duplicates
-
ZBX-10607 Problems importing JSON templates
- Closed