Hosts

Os hosts são exportados com vários objetos associados e relacionados.

Uma exportação de host contêm:

  • dados do host
  • dados do inventário do host
  • relacionamento com grupos
  • associação com templates
  • interfaces
  • macros
  • aplicações
  • itens
  • regras de descoberta e seus protótipos

O processo de importação de hosts só adiciona associações com templates, nunca as removendo.

<hosts>
               <host>
                   <host>Zabbix server</host>
                   <name>Zabbix server</name>
                   <description>Zabbix monitoring server.</description>
                   <proxy/>
                   <status>0</status>
                   <ipmi_authtype>-1</ipmi_authtype>
                   <ipmi_privilege>2</ipmi_privilege>
                   <ipmi_username/>
                   <ipmi_password/>
                   <templates/>
                   <groups>
                       <group>
                           <name>Zabbix servers</name>
                       </group>
                   </groups>
                   <interfaces>
                       <interface>
                           <default>1</default>
                           <type>1</type>
                           <useip>1</useip>
                           <ip>127.0.0.1</ip>
                           <dns/>
                           <port>20001</port>
                           <interface_ref>if1</interface_ref>
                       </interface>
                   </interfaces>
                   <applications>
                       <application>
                           <name>Memory</name>
                       </application>
                       <application>
                           <name>Zabbix agent</name>
                       </application>
                   </applications>
                   <items>
                       <item>
                           <name>Agent ping</name>
                           <type>0</type>
                           <snmp_community/>
                           <multiplier>0</multiplier>
                           <snmp_oid/>
                           <key>agent.ping</key>
                           <delay>60</delay>
                           <history>7</history>
                           <trends>365</trends>
                           <status>0</status>
                           <value_type>3</value_type>
                           <allowed_hosts/>
                           <units/>
                           <delta>0</delta>
                           <snmpv3_securityname/>
                           <snmpv3_securitylevel>0</snmpv3_securitylevel>
                           <snmpv3_authpassphrase/>
                           <snmpv3_privpassphrase/>
                           <formula>1</formula>
                           <delay_flex/>
                           <params/>
                           <ipmi_sensor/>
                           <data_type>0</data_type>
                           <authtype>0</authtype>
                           <username/>
                           <password/>
                           <publickey/>
                           <privatekey/>
                           <port/>
                           <description>The agent always returns 1 for this item. It could be used in combination with nodata() for availability check.</description>
                           <inventory_link>0</inventory_link>
                           <applications>
                               <application>
                                   <name>Zabbix agent</name>
                               </application>
                           </applications>
                           <valuemap>
                               <name>Zabbix agent ping status</name>
                           </valuemap>
                           <logtimefmt/>
                           <interface_ref>if1</interface_ref>
                       </item>
                       <item>
                           <name>Available memory</name>
                           <type>0</type>
                           <snmp_community/>
                           <multiplier>0</multiplier>
                           <snmp_oid/>
                           <key>vm.memory.size[available]</key>
                           <delay>60</delay>
                           <history>7</history>
                           <trends>365</trends>
                           <status>0</status>
                           <value_type>3</value_type>
                           <allowed_hosts/>
                           <units>B</units>
                           <delta>0</delta>
                           <snmpv3_securityname/>
                           <snmpv3_securitylevel>0</snmpv3_securitylevel>
                           <snmpv3_authpassphrase/>
                           <snmpv3_privpassphrase/>
                           <formula>1</formula>
                           <delay_flex/>
                           <params/>
                           <ipmi_sensor/>
                           <data_type>0</data_type>
                           <authtype>0</authtype>
                           <username/>
                           <password/>
                           <publickey/>
                           <privatekey/>
                           <port/>
                           <description>Available memory is defined as free+cached+buffers memory.</description>
                           <inventory_link>0</inventory_link>
                           <applications>
                               <application>
                                   <name>Memory</name>
                               </application>
                           </applications>
                           <valuemap/>
                           <logtimefmt/>
                           <interface_ref>if1</interface_ref>
                       </item>
                   </items>
                   <discovery_rules>
                       <discovery_rule>
                           <name>Mounted filesystem discovery</name>
                           <type>0</type>
                           <snmp_community/>
                           <snmp_oid/>
                           <key>vfs.fs.discovery</key>
                           <delay>3600</delay>
                           <status>0</status>
                           <allowed_hosts/>
                           <snmpv3_securityname/>
                           <snmpv3_securitylevel>0</snmpv3_securitylevel>
                           <snmpv3_authpassphrase/>
                           <snmpv3_privpassphrase/>
                           <delay_flex/>
                           <params/>
                           <ipmi_sensor/>
                           <authtype>0</authtype>
                           <username/>
                           <password/>
                           <publickey/>
                           <privatekey/>
                           <port/>
                           <filter>{#FSTYPE}:@File systems for discovery</filter>
                           <lifetime>30</lifetime>
                           <description>Discovery of file systems of different types as defined in global regular expression "File systems for discovery".</description>
                           <item_prototypes>
                               <item_prototype>
                                   <name>Free disk space on $1</name>
                                   <type>0</type>
                                   <snmp_community/>
                                   <multiplier>0</multiplier>
                                   <snmp_oid/>
                                   <key>vfs.fs.size[{#FSNAME},free]</key>
                                   <delay>60</delay>
                                   <history>7</history>
                                   <trends>365</trends>
                                   <status>0</status>
                                   <value_type>3</value_type>
                                   <allowed_hosts/>
                                   <units>B</units>
                                   <delta>0</delta>
                                   <snmpv3_securityname/>
                                   <snmpv3_securitylevel>0</snmpv3_securitylevel>
                                   <snmpv3_authpassphrase/>
                                   <snmpv3_privpassphrase/>
                                   <formula>1</formula>
                                   <delay_flex/>
                                   <params/>
                                   <ipmi_sensor/>
                                   <data_type>0</data_type>
                                   <authtype>0</authtype>
                                   <username/>
                                   <password/>
                                   <publickey/>
                                   <privatekey/>
                                   <port/>
                                   <description/>
                                   <inventory_link>0</inventory_link>
                                   <applications>
                                       <application>
                                           <name>Filesystems</name>
                                       </application>
                                   </applications>
                                   <valuemap/>
                                   <logtimefmt/>
                                   <application_prototypes>
                                       <application_prototype>
                                           <name>{#FSNAME}</name>
                                       </application_prototype>
                                   </application_prototypes>
                                   <interface_ref>if1</interface_ref>
                               </item_prototype>
                           </item_prototypes>
                           <trigger_prototypes>
                               <trigger_prototype>
                                   <expression>{Zabbix server 2:vfs.fs.size[{#FSNAME},pfree].last()}<20</expression>
                                   <name>Free disk space is less than 20% on volume {#FSNAME}</name>
                                   <url/>
                                   <status>0</status>
                                   <priority>2</priority>
                                   <description/>
                                   <type>0</type>
                               </trigger_prototype>
                           </trigger_prototypes>
                           <graph_prototypes>
                               <graph_prototype>
                                   <name>Disk space usage {#FSNAME}</name>
                                   <width>600</width>
                                   <height>340</height>
                                   <yaxismin>0.0000</yaxismin>
                                   <yaxismax>0.0000</yaxismax>
                                   <show_work_period>0</show_work_period>
                                   <show_triggers>0</show_triggers>
                                   <type>2</type>
                                   <show_legend>1</show_legend>
                                   <show_3d>1</show_3d>
                                   <percent_left>0.0000</percent_left>
                                   <percent_right>0.0000</percent_right>
                                   <ymin_type_1>0</ymin_type_1>
                                   <ymax_type_1>0</ymax_type_1>
                                   <ymin_item_1>0</ymin_item_1>
                                   <ymax_item_1>0</ymax_item_1>
                                   <graph_items>
                                       <graph_item>
                                           <sortorder>0</sortorder>
                                           <drawtype>0</drawtype>
                                           <color>C80000</color>
                                           <yaxisside>0</yaxisside>
                                           <calc_fnc>2</calc_fnc>
                                           <type>2</type>
                                           <item>
                                               <host>Zabbix server 2</host>
                                               <key>vfs.fs.size[{#FSNAME},total]</key>
                                           </item>
                                       </graph_item>
                                       <graph_item>
                                           <sortorder>1</sortorder>
                                           <drawtype>0</drawtype>
                                           <color>00C800</color>
                                           <yaxisside>0</yaxisside>
                                           <calc_fnc>2</calc_fnc>
                                           <type>0</type>
                                           <item>
                                               <host>Zabbix server 2</host>
                                               <key>vfs.fs.size[{#FSNAME},free]</key>
                                           </item>
                                       </graph_item>
                                   </graph_items>
                               </graph_prototype>
                           </graph_prototypes>
                           <interface_ref>if1</interface_ref>
                       </discovery_rule>
                   </discovery_rules>
                   <macros>
                       <macro>
                           <macro>{$M1}</macro>
                           <value>m1</value>
                       </macro>
                       <macro>
                           <macro>{$M2}</macro>
                           <value>m2</value>
                       </macro>
                   </macros>
                   <inventory/>
               </host>
           </hosts>

hosts/host

Parâmetro Tipo Descrição Detalhes
host string Nome do host.
name string Nome visível do host.
description string Descrição do host.
status int Status do host.
proxy int Nome do proxy utilizado para sua monitoração.
ipmi_authtype int Tipo de autenticação IPMI.
ipmi_privilege int Privilégio IPMI.
ipmi_username string Usuário de autenticação no IPMI.
ipmi_password string Senha de autenticação no IPMI.

hosts/host/groups/group

Parâmetro Tipo Descrição Detalhes
name string Nome do grupo.

hosts/host/templates/template

Parâmetro Tipo Descrição Detalhes
name string Nome técnico do template.

hosts/host/interfaces/interface

Nome da coluna Tipo Descrição
default inteiro Status da interface:
0 - Não é a interface padrão
1 - Interface padrão
type inteiro Tipo de interface:
1 - Agente
2 - SNMP
3 - IPMI
4 - JMX
useip inteiro Como será a conexão ao host:
0 – através do nome de DNS
1 – através do endereço IP
ip texto Endereço IP, pode ser no padrão IPv4 ou IPv6.
dns texto Nome de DNS.
port texto Número da porta.
interface_ref texto Nome de referencia de interface a ser utilizada nos itens.

hosts/host/applications/application

Parâmetro Tipo Descrição Detalhes
name string Nome da aplicação.

hosts/host/items/item

Parâmetro Tipo Descrição
type int Tipo do item:
0 - Agente Zabbix
1 - SNMPv1
2 - Trapper
3 - Verificação simples
4 - SNMPv2
5 - Interno
6 - SNMPv3
7 - Agente Zabbix Ativo
8 - Agregado
9 - Teste HTTP (passo de monitoração web)
10 - Externo
11 - Monitoração de banco de dados
12 - IPMI
13 - SSH
14 - telnet
15 - Calculado
16 - JMX
17 - trap SNMP
snmp_community string Nome da comunidade SNMP
snmp_oid string OID SNMP
port int Porta customizada do item
name string Nome do item
key string Chave do item
delay int Intervalo entre verificações
history int Tempo de retenção de dados no histórico (dias)
trends int Tempo de retenção de dados de médias (dias)
status int Status do item
value_type int Tipo do dado
trapper_hosts string
units string Unidade do valor
multiplier int Multiplicador
delta int Guardar o delta dos valores
snmpv3_securityname string SNMPv3 - nome de segurança
snmpv3_securitylevel int SNMPv3 - nível de segurança
snmpv3_authpassphrase string SNMPv3 - frase de autenticação
snmpv3_privpassphrase string SNMPv3 - frase privada
formula string
delay_flex string Intervalo flexível
params string
ipmi_sensor string IPMI - Sensor
data_type int
authtype int
username string
password string
publickey string
privatekey string
interface_ref varchar Referência a interface do host
description string Descrição do item
inventory_link int Número do campo de inventário do host associado, o campo será populado automaticamente com o valor do item
applications Aplicações do item
valuemap Mapeamento de valor associado ao item
logtimefmt string Formato de hora nas entradas do log. Usado apenas para itens de log.

hosts/host/items/item/applications/application

Parâmetro Tipo Descrição Detalhes
name string Nome da aplicação.
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 host trigger 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 host 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
Element Element property Required Type Range1 Description
triggers - Root element for triggers.
expression x string Trigger expression.
recovery_mode - string 0 - EXPRESSION (default)
1 - RECOVERY_EXPRESSION
2 - NONE
Basis for generating OK events.
recovery_expression - string Trigger recovery expression.
name x string Trigger name.
correlation_mode - string 0 - DISABLED (default)
1 - TAG_VALUE
Correlation mode (no event correlation or event correlation by tag).
correlation_tag - string The tag name to be used for event correlation.
url - string URL associated with the trigger.
status - string 0 - ENABLED (default)
1 - DISABLED
Trigger status.
priority - string 0 - NOT_CLASSIFIED (default)
1 - INFO
2 - WARNING
3 - AVERAGE
4 - HIGH
5 - DISASTER
Trigger severity.
description - text Trigger description.
type - string 0 - SINGLE (default)
1 - MULTIPLE
Event generation type (single problem event or multiple problem events).
manual_close - string 0 - NO (default)
1 - YES
Manual closing of problem events.
dependencies - Root element for dependencies.
name x string Dependency trigger name.
expression x string Dependency trigger expression.
recovery_expression - string Dependency trigger recovery expression.
tags - Root element for event tags.
tag x string Tag name.
value - string Tag value.
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.
Host web scenario tags
Element Element property Required Type Range1 Description
httptests - Root element for web scenarios.
name x string Web scenario name.
delay - string Default: 1m Frequency of executing the web scenario. Seconds, time unit with suffix or user macro.
attempts - integer 1-10 (default: 1) The number of attempts for executing web scenario steps.
agent - string Default: Zabbix Client agent. Zabbix will pretend to be the selected browser. This is useful when a website returns different content for different browsers.
http_proxy - string Specify an HTTP proxy to use, using the format: http://[username[:password]@]proxy.example.com[:port]
variables - Root element for scenario-level variables (macros) that may be used in scenario steps.
name x text Variable name.
value x text Variable value.
headers - Root element for HTTP headers that will be sent when performing a request. Headers should be listed using the same syntax as they would appear in the HTTP protocol.
name x text Header name.
value x text Header value.
status - string 0 - ENABLED (default)
1 - DISABLED
Web scenario status.
authentication - string 0 - NONE (default)
1 - BASIC
2 - NTLM
Authentication method.
http_user - string User name used for basic, HTTP or NTLM authentication.
http_password - string Password used for basic, HTTP or NTLM authentication.
verify_peer - string 0 - NO (default)
1 - YES
Verify the SSL certificate of the web server.
verify_host - string 0 - NO (default)
1 - YES
Verify that the Common Name field or the Subject Alternate Name field of the web server certificate matches.
ssl_cert_file - string Name of the SSL certificate file used for client authentication (must be in PEM format).
ssl_key_file - string Name of the SSL private key file used for client authentication (must be in PEM format).
ssl_key_password - string SSL private key file password.
steps x Root element for web scenario steps.
name x string Web scenario step name.
url x string URL for monitoring.
query_fields - Root element for query fields - an array of HTTP fields that will be added to the URL when performing a request.
name x string Query field name.
value - string Query field value.
posts - HTTP POST variables as a string (raw post data) or as an array of HTTP fields (form field data).
name x string Post field name.
value x string Post field value.
variables - Root element of step-level variables (macros) that should be applied after this step.

If the variable value has a 'regex:' prefix, then its value is extracted from the data returned by this step according to the regular expression pattern following the 'regex:' prefix
name x string Variable name.
value x string Variable value.
headers - Root element for HTTP headers that will be sent when performing a request. Headers should be listed using the same syntax as they would appear in the HTTP protocol.
name x string Header name.
value x string Header value.
follow_redirects - string 0 - NO
1 - YES (default)
Follow HTTP redirects.
retrieve_mode - string 0 - BODY (default)
1 - HEADERS
2 - BOTH
HTTP response retrieve mode.
timeout - string Default: 15s Timeout of step execution. Seconds, time unit with suffix or user macro.
required - string Text that must be present in the response. Ignored if empty.
status_codes - string A comma delimited list of accepted HTTP status codes. Ignored if empty. For example: 200-201,210-299
tags - Root element for web scenario tags.
tag x string Tag name.
value - string Tag value.
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.