Details
-
Incident report
-
Resolution: Fixed
-
Minor
-
3.0.1
-
Centos7, PostgreSQL-9.5.1, zabbix-3.0.1
Description
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)
It 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.
Attachments
Issue Links
- causes
-
ZBX-15985 json_last_error_msg() is not supported in php 5.4
-
- Open
-
- is duplicated by
-
ZBXNEXT-3225 Problems importing JSON templates
-
- Closed
-