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.

13. 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:

  • host groups (through Zabbix API only)
  • templates (including all directly attached items, triggers, graphs, screens, discovery rules, web scenarios and template linkage)
  • hosts (including all directly attached items, triggers, graphs, discovery rules, web scenarios and template linkage)
  • network maps (including all related images; map export/import is supported since Zabbix 1.8.2)
  • images
  • screens
  • value maps
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.
  • Triggers and graphs that use web items are exported starting with Zabbix 3.2.2; they are not exported in Zabbix 3.2.0 and 3.2.1.

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>3.2</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>3.2</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.