4 Hosts
Overview
Host export contains:
- linked host groups
- host data
- template linkage
- host group linkage
- host interfaces
- directly linked items
- directly linked triggers
- directly linked graphs
- directly linked discovery rules with all prototypes
- directly linked web scenarios
- host macros
- value maps
Exporting
To export hosts, do the following:
- Go to: Data collection → Hosts
- Mark the checkboxes of the hosts to export
- Click on Export below the list
- zabbix_export_hosts.yaml - in YAML export (default option for export)
- zabbix_export_hosts.xml - in XML export
- zabbix_export_hosts.json - in JSON export
Importing
To import hosts, do the following:
- Go to: Data collection → Hosts
- Click on Import to the right
- Select the import file
- Click on Import
If you mark the Advanced options checkbox, a detailed list of all importable elements will be displayed - mark or unmark each import rule as required.
Import rules:
A success or failure message of the import will be displayed in the frontend.
Export format
Export format in YAML:
Element tags
Host tags
Element | Element property | Required | Type | Range1 | Description |
---|---|---|---|---|---|
host_groups | x | Root element for host groups. | |||
uuid | x | Unique identifier for this host group. | |||
name | x | string | 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. | ||
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. | |||
version | - | string | 1 - SNMPV1 2 - SNMP_V2C (default) 3 - SNMP_V3 | Use this SNMP version. | |
community | - | string | SNMP community. Required by SNMPv1 and SNMPv2 items. | ||
contextname | - | string | SNMPv3 context name. Used only by SNMPv3 items. | ||
securityname | - | string | SNMPv3 security name. Used only by SNMPv3 items. | ||
securitylevel | - | string | 0 - NOAUTHNOPRIV (default) 1 - AUTHNOPRIV 2 - AUTHPRIV | SNMPv3 security level. Used only by SNMPv3 items. | |
authprotocol | - | string | 0 - MD5 (default) 1 - SHA1 2 - SHA224 3 - SHA256 4 - SHA384 5 - SHA512 | SNMPv3 authentication protocol. Used only by SNMPv3 items. | |
authpassphrase | - | string | SNMPv3 authentication passphrase. Used only by SNMPv3 items. | ||
privprotocol | - | string | 0 - DES (default) 1 - AES128 2 - AES192 3 - AES256 4 - AES192C 5 - AES256C | SNMPv3 privacy protocol. Used only by SNMPv3 items. | |
privpassphrase | - | string | SNMPv3 privacy passphrase. Used only by SNMPv3 items. | ||
bulk | - | string | 0 - NO 1 - YES (default) | Use bulk requests for SNMP. | |
items | - | Root element for items. | |||
For item element tag values, see host 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 2 - VAULT | 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. | |
valuemaps | - | Root element for host value maps. | |||
name | x | string | Value map name. | ||
mapping | - | Root element for mappings. | |||
value | x | string | Value of a mapping. | ||
newvalue | x | string | New value of a mapping. |
Host item tags
Host low-level discovery rule tags
Element | Element property | Required | Type | Range1 | 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 27 - XML_TO_JSON | Type of the item value preprocessing step. | |
trigger_prototypes | - | Root element for trigger prototypes. | |||
For trigger prototype element tag values, see regular tags. | |||||
graph_prototypes | - | Root element for graph prototypes. | |||
For graph prototype element tag values, see regular host graph tags. | |||||
host_prototypes | - | Root element for host prototypes. | |||
For host prototype element tag values, see regular tags. | |||||
item_prototypes | - | Root element for item prototypes. | |||
For item prototype element tag values, see regular host item tags. | |||||
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 | Range | Description |
---|---|---|---|---|---|
graphs | - | Root element for graphs. | |||
name | x | 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. |
Host web scenario tags
Footnotes
1 For string values, only the string will be exported (e.g. “ZABBIX_ACTIVE”) without the numbering used in this table. The numbers for range values (corresponding to the API values) in this table is used for ordering only.