Overview
Host export contains:
linked host groups
host data
template linkage
host group linkage
host interfaces
directly linked applications
directly linked items
directly linked triggers
directly linked graphs
directly linked discovery rules with all prototypes
host inventory data
value maps
Exporting
To export hosts, do the following:
Go to: Configuration → Hosts
Mark the checkboxes of the hosts to export
Click on Export below the list
Depending on the selected format, hosts are exported to a local file with a default name:
zabbix_export_hosts.yaml - in YAML export (default option for export)
zabbix_export_hosts.xml - in XML export
Importing
To import hosts, do the following:
Go to: Configuration → Hosts
Click on Import to the right
Select the import file
Click on Import
A success or failure message of the import will be displayed in the frontend.
Import rules:
Export format
Export format in YAML:
Element tags
Element tag values are explained in the table below.
Host tags
Element | Element property | Required | Type | Range | Description |
---|---|---|---|---|---|
groups | x | Root element for host groups. | |||
name | x | Host group name. | |||
hosts | - | Root element for hosts. | |||
host | x | string | Unique host name. | ||
name | - | string | Visible host name. | ||
description | - | text | Host description. | ||
status | - | string | 0 - ENABLED (default) 1 - DISABLED | Host status. | |
ipmi_authtype | - | string | -1 - DEFAULT (default) 0 - NONE 1 - MD2 2 - MD5 4 - STRAIGHT 5 - OEM 6 - RMCP_PLUS | IPMI session authentication type. | |
ipmi_privilege | - | string | 1 - CALLBACK 2 - USER (default) 3 - OPERATOR 4 - ADMIN 5 - OEM | IPMI session privilege level. | |
ipmi_username | - | string | Username for IPMI checks. | ||
ipmi_password | - | string | Password for IPMI checks. | ||
tls_connect | - | string | 1 - NO_ENCRYPTION (default) 2 - TLS_PSK 4 - TLS_CERTIFICATE | Type of outgoing connection. | |
tls_accept | - | Root element for incoming connection options. | |||
option | - | string | 1 - NO_ENCRYPTION (default) 2 - TLS_PSK 4 - TLS_CERTIFICATE | Type of incoming connection. If both unencrypted and encrypted connection is allowed, the <option> property is used twice, one time with NO_ENCRYPTION and another with the encryption option (see example above). | |
tls_issuer | - | string | Allowed agent/proxy certificate issuer. | ||
tls_subject | - | string | Allowed agent/proxy certificate subject. | ||
tls_psk_identity | - | string | PSK identity string. Required if either tls_connect or tls_accept has PSK enabled. | ||
tls_psk | - | string | The preshared key string, at least 32 hex digits. Required if either tls_connect or tls_accept has PSK enabled. | ||
proxy | - | Proxy. | |||
name | x | string | Name of the proxy (if any) that monitors the host. | ||
templates | - | Root element for linked templates. | |||
name | x | string | Template name. | ||
interfaces | - | Root element for host interfaces. | |||
default | - | string | 0 - NO 1 - YES (default) | Whether this is the primary host interface. There can be only one primary interface of one type on a host. | |
type | - | string | 1 - ZABBIX (default) 2 - SNMP 3 - IPMI 4 - JMX | Interface type. | |
useip | - | string | 0 - NO 1 - YES (default) | Whether to use IP as the interface for connecting to the host (if not, DNS will be used). | |
ip | - | string | IP address, can be either IPv4 or IPv6. Required if the connection is made via IP. | ||
dns | - | string | DNS name. Required if the connection is made via DNS. | ||
port | - | string | Port number. Supports user macros. | ||
interface_ref | x | string | Format: if<N> | Interface reference name to be used in items. | |
details | - | Root element for interface details. | |||
community | - | string | SNMP community. Required by SNMPv1 and SNMPv2 items. | ||
bulk | - | string | 0 - NO 1 - YES (default) | Use bulk requests for SNMP. | |
snmpv3_contextname | - | string | SNMPv3 context name. Used only by SNMPv3 items. | ||
snmpv3_securityname | - | string | SNMPv3 security name. Used only by SNMPv3 items. | ||
snmpv3_securitylevel | - | string | 0 - NOAUTHNOPRIV (default) 1 - AUTHNOPRIV 2 - AUTHPRIV | SNMPv3 security level. Used only by SNMPv3 items. | |
snmpv3_authprotocol | - | string | 0 - MD5 (default) 1 - SHA | SNMPv3 authentication protocol. Used only by SNMPv3 items. | |
snmpv3_authpassphrase | - | string | SNMPv3 authentication passphrase. Used only by SNMPv3 items. | ||
snmpv3_privprotocol | - | string | 0 - DES (default) 1 - AES | SNMPv3 privacy protocol. Used only by SNMPv3 items. | |
snmpv3_privpassphrase | - | string | SNMPv3 privacy passphrase. Used only by SNMPv3 items. | ||
items | - | Root element for items. | |||
For item element tag values, see host item tags. | |||||
tags | - | Root element for host tags. | |||
tag | x | string | Tag name. | ||
value | - | string | Tag value. | ||
macros | - | Root element for macros. | |||
macro | x | User macro name. | |||
type | - | string | 0 - TEXT (default) 1 - SECRET_TEXT | Type of the macro. | |
value | - | string | User macro value. | ||
description | - | string | User macro description. | ||
inventory | - | Root element for host inventory. | |||
<inventory_property> | - | Individual inventory property. All available inventory properties are listed under the respective tags, e.g. <type>, <name>, <os> (see example above). | |||
inventory_mode | - | string | -1 - DISABLED 0 - MANUAL (default) 1 - AUTOMATIC | Inventory mode. |
Host item tags
Host low-level discovery rule tags
Element | Element property | Required | Type | Range | Description |
---|---|---|---|---|---|
discovery_rules | - | Root element for low-level discovery rules. | |||
For most of the element tag values, see element tag values for a regular item. Only the tags that are specific to low-level discovery rules, are described below. | |||||
type | - | string | 0 - ZABBIX_PASSIVE (default) 2 - TRAP 3 - SIMPLE 5 - INTERNAL 7 - ZABBIX_ACTIVE 10 - EXTERNAL 11 - ODBC 12 - IPMI 13 - SSH 14 - TELNET 16 - JMX 18 - DEPENDENT 19 - HTTP_AGENT 20 - SNMP_AGENT | Item type. | |
lifetime | - | string | Default: 30d | Time period after which items that are no longer discovered will be deleted. Seconds, time unit with suffix or user macro. | |
filter | Individual filter. | ||||
evaltype | - | string | 0 - AND_OR (default) 1 - AND 2 - OR 3 - FORMULA | Logic to use for checking low-level discovery rule filter conditions. | |
formula | - | string | Custom calculation formula for filter conditions. | ||
conditions | - | Root element for filter conditions. | |||
macro | x | string | Low-level discovery macro name. | ||
value | - | string | Filter value: regular expression or global regular expression. | ||
operator | - | string | 8 - MATCHES_REGEX (default) 9 - NOT_MATCHES_REGEX | Condition operator. | |
formulaid | x | character | Arbitrary unique ID that is used to reference a condition from the custom expression. Can only contain capital-case letters. The ID must be defined by the user when modifying filter conditions, but will be generated anew when requesting them afterward. | ||
lld_macro_paths | - | Root element for LLD macro paths. | |||
lld_macro | x | string | Low-level discovery macro name. | ||
path | x | string | Selector for value which will be assigned to the corresponding macro. | ||
preprocessing | - | LLD rule value preprocessing. | |||
step | - | Individual LLD rule value preprocessing step. | |||
For most of the element tag values, see element tag values for a host item value preprocessing. Only the tags that are specific to low-level discovery value preprocessing, are described below. | |||||
type | x | string | 5 - REGEX 11 - XMLPATH 12 - JSONPATH 15 - NOT_MATCHES_REGEX 16 - CHECK_JSON_ERROR 17 - CHECK_XML_ERROR 20 - DISCARD_UNCHANGED_HEARTBEAT 21 - JAVASCRIPT 23 - PROMETHEUS_TO_JSON 24 - CSV_TO_JSON 25 - STR_REPLACE | Type of the item value preprocessing step. | |
trigger_prototypes | - | Root element for trigger prototypes. | |||
For trigger prototype element tag values, see regular host trigger tags. | |||||
graph_prototypes | - | Root element for graph prototypes. | |||
For graph prototype element tag values, see regular tags. | |||||
host_prototypes | - | Root element for host prototypes. | |||
For host prototype element tag values, see regular host tags. | |||||
item_prototypes | - | Root element for item prototypes. | |||
For item prototype element tag values, see regular tags. | |||||
application_prototypes | - | Root element for application prototypes. | |||
name | x | string | Application prototype name. | ||
master_item | - | Individual item prototype master item/item prototype data. | |||
key | x | string | Dependent item prototype master item/item prototype key value. Required for a dependent item. |
Host trigger tags
Host graph tags
Element | Element property | Required | Type | Range1 | Description |
---|---|---|---|---|---|
graphs | - | Root element for graphs. | |||
name | x | string | Graph name. | ||
width | - | integer | 20-65535 (default: 900) | Graph width, in pixels. Used for preview and for pie/exploded graphs. | |
height | - | integer | 20-65535 (default: 200) | Graph height, in pixels. Used for preview and for pie/exploded graphs. | |
yaxismin | - | double | Default: 0 | Value of Y axis minimum. Used if ‘ymin_type_1’ is FIXED. | |
yaxismax | - | double | Default: 0 | Value of Y axis maximum. Used if ‘ymax_type_1’ is FIXED. | |
show_work_period | - | string | 0 - NO 1 - YES (default) | Highlight non-working hours. Used by normal and stacked graphs. | |
show_triggers | - | string | 0 - NO 1 - YES (default) | Display simple trigger values as a line. Used by normal and stacked graphs. | |
type | - | string | 0 - NORMAL (default) 1 - STACKED 2 - PIE 3 - EXPLODED | Graph type. | |
show_legend | - | string | 0 - NO 1 - YES (default) | Display graph legend. | |
show_3d | - | string | 0 - NO (default) 1 - YES | Enable 3D style. Used by pie and exploded pie graphs. | |
percent_left | - | double | Default:0 | Show the percentile line for left axis. Used only for normal graphs. | |
percent_right | - | double | Default:0 | Show the percentile line for right axis. Used only for normal graphs. | |
ymin_type_1 | - | string | 0 - CALCULATED (default) 1 - FIXED 2 - ITEM | Minimum value of Y axis. Used by normal and stacked graphs. | |
ymax_type_1 | - | string | 0 - CALCULATED (default) 1 - FIXED 2 - ITEM | Maximum value of Y axis. Used by normal and stacked graphs. | |
ymin_item_1 | - | Individual item details. Required if ‘ymin_type_1’ is ITEM. | |||
host | x | string | Item host. | ||
key | x | string | Item key. | ||
ymax_item_1 | - | Individual item details. Required if ‘ymax_type_1’ is ITEM. | |||
host | x | string | Item host. | ||
key | x | string | Item key. | ||
graph_items | x | Root element for graph items. | |||
sortorder | - | integer | Draw order. The smaller value is drawn first. Can be used to draw lines or regions behind (or in front of) another. | ||
drawtype | - | string | 0 - SINGLE_LINE (default) 1 - FILLED_REGION 2 - BOLD_LINE 3 - DOTTED_LINE 4 - DASHED_LINE 5 - GRADIENT_LINE | Draw style of the graph item. Used only by normal graphs. | |
color | - | string | Element color (6 symbols, hex). | ||
yaxisside | - | string | 0 - LEFT (default) 1 - RIGHT | Side of the graph where the graph item’s Y scale will be drawn. Used by normal and stacked graphs. | |
calc_fnc | - | string | 1 - MIN 2 - AVG (default) 4 - MAX 7 - ALL (minimum, average and maximum; used only by simple graphs) 9 - LAST (used only by pie and exploded pie graphs) | Data to draw if more than one value exists for an item. | |
type | - | string | 0 - SIMPLE (default) 2 - GRAPH_SUM (value of the item represents the whole pie; used only by pie and exploded pie graphs) | Graph item type. | |
item | x | Individual item. | |||
host | x | string | Item host. | ||
key | x | string | Item key. |