This is the documentation page for an unsupported version of Zabbix.
Is this not what you were looking for? Switch to the current version or choose one from the drop-down menu.

14. Configuration export/import

Overview

Zabbix export/import functionality makes it possible to exchange various configuration entities between one Zabbix system and another.

Typical use cases for this functionality:

  • 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.
  • integrate with third-party tools - the universal XML format makes integration and data import/export possible with third party tools and applications
What can be exported/imported

Objects that can be exported/imported are:

Export format

Data can be exported using the Zabbix web frontend or Zabbix API. Supported export formats are:

  • XML - in the frontend
  • XML or JSON - in Zabbix API

Details about export

  • All supported elements are exported in one file.
  • Host and template entities (items, triggers, graphs, discovery rules) that are inherited from linked templates are not exported. Any changes made to those entities on a host level (such as changed item interval, modified regular expression or added prototypes to the low-level discovery rule) will be lost when exporting; when importing, all entities from linked templates are re-created as on the original linked template.
  • Entities created by low-level discovery and any entities depending on them are not exported. For example, a trigger created for an LLD-rule generated item will not be exported.

Details about import

  • 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 importing hosts/templates using the "Delete missing" option, host/template macros not present in the imported XML 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.
  • Import supports both XML and JSON, the import file must have a correct file extension: .xml for XML and .json for JSON.
  • See compatibility information about supported XML versions.

XML base format

<?xml version="1.0" encoding="UTF-8"?>
       <zabbix_export>
           <version>4.0</version>
           <date>2016-10-04T06:20:11Z</date>
       </zabbix_export>
<?xml version="1.0" encoding="UTF-8"?>

Default header for XML documents.

<zabbix_export>

Root element for Zabbix XML export.

<version>4.0</version>

Export version.

<date>2016-10-04T06:20:11Z</date>

Date when export was created in ISO 8601 long format.

Other tags are dependent on exported objects.

XML format

<?xml version="1.0" encoding="UTF-8"?>
       <zabbix_export>
           <version>5.4</version>
           <date>2020-04-22T06:20:11Z</date>
       </zabbix_export>
<?xml version="1.0" encoding="UTF-8"?>

Default header for XML documents.

<zabbix_export>

Root element for Zabbix XML export.

<version>5.4</version>

Export version.

<date>2020-04-22T06:20:11Z</date>

Date when export was created in ISO 8601 long format.

Other tags are dependent on exported objects.

JSON format

{
           "zabbix_export": {
               "version": "5.4",
               "date": "2020-04-22T06:20:11Z"
           }
       }
  "zabbix_export":

Root node for Zabbix JSON export.

      "version": "5.4"

Export version.

      "date": "2020-04-22T06:20:11Z"

Date when export was created in ISO 8601 long format.

Other nodes are dependent on exported objects.