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 Type Range Description
discovery_rules Root element for low-level discovery rules.
discovery_rule Individual low-level discovery rule.
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.
lifetime string 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 integer 0 - And/or logic
1 - And logic
2 - Or logic
3 - custom 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.
condition Individual filter condition.
macro string Low-level discovery macro name.
value string Filter value: regular expression or global regular expression.
operator integer
formulaid character Filter condition ID. Used in the custom calculation formula.
item_prototypes Root element for item_prototypes.
item_prototype Individual item_prototype.
For most of the element tag values, see element tag values for a regular item. Only the tags that are specific to item_prototypes, are described below.
application_prototypes Root element for application prototypes.
application_prototype Individual application prototype.
name Application prototype name.
master_item Individual item prototype master item/item prototype data.
key string Dependent item prototype master item/item prototype key value.
Host trigger tags
Element Element property Type Range Description
triggers Root element for triggers.
trigger Individual trigger.
expression string Trigger expression.
recovery_mode integer 0 - expression
1 - recovery expression
2 - none
Basis for generating OK events.
recovery_expression string Trigger recovery expression.
name string Trigger name.
correlation_mode integer 0 - no event correlation
1 - event correlation by tag
Correlation mode.
correlation_tag string The tag name to be used for event correlation.
url string Trigger URL.
status integer 0 - enabled
1 - disabled
Trigger status.
priority integer 0 - not classified
1 - information
2 - warning
3 - average
4 - high
5 - disaster
Trigger severity.
description text Trigger description.
type integer 0 - single problem event
1 - multiple problem events
Event generation type.
manual_close integer 0 - not allowed
1 - allowed
Manual closing of problem events.
dependencies Root element for dependencies.
dependency Individual dependency.
name string Dependency trigger name.
expression string Dependency trigger expression.
recovery_expression string Dependency trigger recovery expression.
tags Root element for event tags.
tag Individual event tag.
tag string Tag name.
value string Tag value.
Host graph tags
Element Element property Type Range Description
graphs Root element for graphs.
graph Individual graph.
name string Graph name.
width integer Graph width, in pixels. Used for preview and for pie/exploded graphs.
height integer Graph height, in pixels. Used for preview and for pie/exploded graphs.
yaxismin double Value of Y axis minimum if 'ymin_type_1' is 1.
yaxismax double Value of Y axis maximum if 'ymax_type_1' is 1.
show_work_period integer 0 - no
1 - yes
Highlight non-working hours if 'type' is 0,1.
show_triggers integer 0 - no
1 - yes
Display simple trigger values as a line if 'type' is 0,1.
type integer 0 - normal
1 - stacked
2 - pie
3 - exploded
4 - 3D pie
5 - 3D exploded
Graph type.
show_legend integer 0 - no
1 - yes
Display graph legend.
show_3d integer 0 - 2D
1 - 3D
Enable 3D style if 'type' is 2,3.
percent_left double Show the percentile line for left axis if 'type' is 0.
percent_right double Show the percentile line for right axis if 'type' is 0.
ymin_type_1 integer 0 - calculated
1 - fixed
2 - last value of the selected item
Minimum value of Y axis if 'type' is 0,1.
ymax_type_1 integer 0 - calculated
1 - fixed
2 - last value of the selected item
Maximum value of Y axis if 'type' is 0,1.
ymin_item_1 string null or item details Item details if 'ymin_type_1' is 2.
ymax_item_1 string null or item details Item details if 'ymax_type_1' is 2.
graph_items Root element for graph items.
graph_item Individual graph item.
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 integer 0 - single line
1 - filled region
2 - bold line
3 - dotted line
4 - dashed line
Draw style if graph 'type' is 0.
color string Element color (6 symbols, hex).
yaxisside integer 0 - left axis
1 - right axis
Y axis position (left or right) the element belongs to if graph 'type' is 0,1.
calc_fnc integer 1 - minimum
2 - average
4 - maximum
7 - all (minimum, average and maximum, if graph 'type' is 0)
9 - last (if graph 'type' is not 0,1)
Data to draw if more than one value exists for an item.
type integer 1 - value of the item is represented proportionally on the pie
2 - value of the item represents the whole pie (graph sum)
Draw type for pie/exploded graphs.
item Individual item.
host string Item host.
key string Item key.
Host web scenario tags
Element Element property Type Range Description
httptests Root element for web scenarios.
httptest Individual web scenario.
name string Web scenario name.
delay string Frequency of executing the web scenario. Seconds, time unit with suffix or user macro.
attempts integer 1-10 The number of attempts for executing web scenario steps.
agent string 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 text List of scenario-level variables (macros) that may be used in scenario steps.
headers text HTTP headers that will be sent when performing a request.
status integer 0 - enabled
1 - disabled
Web scenario status.
authentication integer 0 - none
1 - basic
2 - NTLM
Authentication method.
http_user string Authentication user name.
http_password string Authentication password for specified user name.
verify_peer integer 0 - no
1 - yes
Verify the SSL certificate of the web server.
verify_host integer 0 - no
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.
ssl_key_file string Name of the SSL private key file used for client authentication.
ssl_key_password string SSL private key file password.
steps Root element for web scenario steps.
step Individual web scenario step.
name string Web scenario step name.
url string URL for monitoring.
posts text List of 'Post' variables.
variables text List 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
headers text HTTP headers that will be sent when performing a request.
follow_redirects integer 0 - no
1 - yes
Follow HTTP redirects.
retrieve_mode integer 0 - content
1 - headers only
HTTP response retrieve mode.
timeout string Timeout of step execution. Seconds, time unit with suffix or user macro.
required string Required string. Ignored if empty.
status_codes string A comma delimited list of accepted status codes. Ignored if empty. For example: 200-201,210-299