manual:xml_export_import

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
manual:xml_export_import [2017/10/06 15:01]
sasha 3.4 => 4.0
manual:xml_export_import [2020/08/10 12:27] (current)
iivs added .yml extension (ZBXNEXT-2754)
Line 7: Line 7:
 Typical use cases for this functionality:​ Typical use cases for this functionality:​
   * share templates or network maps - Zabbix users may share their configuration parameters   * share templates or network maps - Zabbix users may share their configuration parameters
-  * share web scenarios on //​share.zabbix.com//​ - export a template with the web scenarios and upload to //​share.zabbix.com//​. Then others can download the template and import the XML into Zabbix. +  * share web scenarios on //​share.zabbix.com//​ - export a template with the web scenarios and upload to //​share.zabbix.com//​. Then others can download the template and import the file into Zabbix. 
-  * integrate with third-party tools - the universal XML format makes integration and data import/​export possible with third party tools and applications+  * integrate with third-party tools - universal ​YAML, XML and JSON formats make integration and data import/​export possible with third party tools and applications
  
 == What can be exported/​imported == == What can be exported/​imported ==
Line 18: Line 18:
   * [[:​manual/​xml_export_import/​hosts|hosts]]   * [[:​manual/​xml_export_import/​hosts|hosts]]
   * [[:​manual/​xml_export_import/​maps|network maps]]   * [[:​manual/​xml_export_import/​maps|network maps]]
 +  * [[:​manual/​xml_export_import/​screens|screens]]
 +  * [[:​manual/​xml_export_import/​media|media types]]
   * images   * images
-  * [[:​manual/​xml_export_import/​screens|screens]] 
   * value maps   * value maps
  
 == Export format == == Export format ==
  
-Data can be exported using the Zabbix web frontend or [[manual:​api:​reference:​configuration|Zabbix API]]. Supported export formats are+Data can be exported using the Zabbix web frontend or [[manual:​api:​reference:​configuration|Zabbix API]]. Supported export formats are YAML, XML and JSON.
- +
-  * XML - in the frontend +
-  * XML or JSON - in Zabbix API +
 === Details about export === === Details about export ===
  
Line 37: Line 34:
   * Import stops at the first error.   * Import stops at the first error.
   * When updating existing images during image import, "​imagetype"​ field is ignored, i.e. it is impossible to change image type via import.   * When updating existing images during image import, "​imagetype"​ field is ignored, i.e. it is impossible to change image type via import.
-  * When importing hosts/​templates using the "​Delete missing"​ option, host/​template macros not present in the imported XML file will be deleted too.+  * When importing hosts/​templates using the "​Delete missing"​ option, host/​template macros not present in the import ​file will be deleted too.
   * Empty tags for items, triggers, graphs, host/​template applications,​ discoveryRules,​ itemPrototypes,​ triggerPrototypes,​ graphPrototypes are meaningless i.e. it's the same as if it was missing. Other tags, for example, item applications,​ are meaningful i.e. empty tag means no applications for item, missing tag means don't update applications.   * Empty tags for items, triggers, graphs, host/​template applications,​ discoveryRules,​ itemPrototypes,​ triggerPrototypes,​ graphPrototypes are meaningless i.e. it's the same as if it was missing. Other tags, for example, item applications,​ are meaningful i.e. empty tag means no applications for item, missing tag means don't update applications.
-  * Import supports ​both XML and JSON, the import file must have a correct file extension: .xml for XML and .json for JSON.+  * Import supports ​YAML, XML and JSON, the import file must have a correct file extension: ​.yaml and .yml for YAML, .xml for XML and .json for JSON.
   * See [[manual:​appendix:​compatibility|compatibility information]] about supported XML versions.   * See [[manual:​appendix:​compatibility|compatibility information]] about supported XML versions.
 === XML base format === === XML base format ===
Line 46: Line 43:
 <?xml version="​1.0"​ encoding="​UTF-8"?>​ <?xml version="​1.0"​ encoding="​UTF-8"?>​
 <​zabbix_export>​ <​zabbix_export>​
-    <​version>​4.0</​version>​ +    <​version>​5.0</​version>​ 
-    <​date>​2016-10-04T06:​20:​11Z</​date>​+    <​date>​2020-04-22T06:​20:​11Z</​date>​
 </​zabbix_export>​ </​zabbix_export>​
 </​code>​ </​code>​
Line 57: Line 54:
 Root element for Zabbix XML export. Root element for Zabbix XML export.
  
-  <​version>​4.0</​version>​+  <​version>​5.0</​version>​
 Export version. Export version.
  
-  <​date>​2016-10-04T06:​20:​11Z</​date>​+  <​date>​2020-04-22T06:​20:​11Z</​date>​
 Date when export was created in ISO 8601 long format. Date when export was created in ISO 8601 long format.
  
 Other tags are dependent on exported objects. Other tags are dependent on exported objects.