Zabbix Documentation 1.8

2.23.04.04.2 (current)In development:4.4 (devel)Unsupported:1.82.02.43.23.4

User Tools

Site Tools


Sidebar

pt:complete

Manual do Zabbix 1.8

1 Sobre

1.1 Introdução ao Zabbix

O que é o Zabbix?

Zabbix foi criado por Alexei Vladishev, e atualmente é desenvolvido ativamente e suportado pela Zabbix SIA. Zabbix é uma solução open source de monitoração para empresas. Zabbix é um software que monitora varios parametros de rede de computadores e saúde e integridade de servidores. Zabbix usa um mecanismo de notificação flexível tha permite os usuários configurarem alerta de e-mail baseado em praticamente qualquer evento. Isto permite uma rápida reação para problemas em servidores. Zabbix oferece Zabbix é um software que monitora vários parâmetros de uma rede; a saúde e a integridade dos servidores. Zabbix usa um mecanismo de notificação flexível que permite aos usuários configurar e-mail alertas baseados em praticamente todos os eventos. Isto permite uma reação rápida aos problemas do servidor. Zabbix oferece relatórios e visualização de dados com excelentes características baseado nos dados armazenados. Isso faz do Zabbix ideal para o planejamento de capacidade.

Zabbix suporta polling e trapping. Todos os relatórios Zabbix e estatísticas, bem como os parâmetros de configuração, são acessados através de uma ferramenta Web que é o front-end do produto. Uma ferramenta web assegura que o status da rede e da saúde dos servidores pode ser avaliado a partir de qualquer localização. Devidamente configurado, Zabbix pode desempenhar um papel importante no controle da infra-estrutura de TI. Isto é igualmente verdadeiro para as pequenas organizações com poucos servidores e para as grandes empresas com muitos servidores.

Zabbix é gratuito. Zabbix é desenvolvido e distribuído de acordo com a GPL General Public License versão 2. Isso significa que seu código-fonte é distribuído gratuitamente e está disponível para o público em geral. O suporte comercial está disponível e é fornecido pela Zabbix Company.

1.1.1 O que faz Zabbix oferecer?

Zabbix oferece:

  • Auto-descoberta de servidores e dispositivos de rede
  • Monitoração distribuida com a administração centralizada via WEB
  • Suporte para mecanismo de pooling e trapping
  • Aplicação-servidor compativel com Linux, Solaris, HP-UX, AIX, BSD Livre, Open BSD, Mac OS X
  • Aplicação cliente de alta performance compativel com Linux, Solaris, HP-UX, AIX, BSD Livre, Open BSD, OS X, Tru64/OSF1, NT4.0, Windows 2000, Windows 2003, Windows XP, Windows Vista
  • Monitoramento sem agente
  • Autenticação segura de usuário
  • Permissões flexiveis de usuário
  • Interface baseada em web
  • Notificação por e-mail flexivel de eventos predefinidos
  • Visualização em alto nível dos recursos monitorados a nivel gerencial
  • Auditoria
1.1.2 Porque usar Zabbix?
  • A solução Open Source
  • Altamente eficiente para agentes baseado nas plataformas UNIX e WIN32
  • Baixa curva de aprendizado
  • Retorno do investimento elevado. Downtimes são muito caros.
  • Baixo custo do licensiamento
  • Configuração muito simples
  • Sistema de monitoramento centralizado. Todas as informações (configuração, dados de desempenho) são armazenado em banco de dados relacional
  • Árvore de serviço de alto nível
  • Instalação muito fácil
  • Suporte para SNMP (V1, V2). Os dois com trapping e polling
  • Capacidades de visualização
  • Desenvolvido com procedimento de limpeza
1.1.3 Usuários do Zabbix

Muitas organizações de diferentes dimensões ao redor do mundo confiam no Zabbix como uma plataforma de controlo principal.

2010/04/15 20:07

1.2 Objetivos e Princípios

1.2.1 Objetivos principais do desenvolvimento Zabbix

Há vários objetivos que o Zabbix está tentando alcançar:

  • Tornar-se uma reconhecida ferramenta de monitoramento

open source

  • Criar um grupo de usuários Zabbix, o que ajuda a tornar o software ainda melhor
  • Proporcionar uma alta qualidade de apoio comercial
1.2.2 Principais princípios do desenvolvimento Zabbix
  • Ser uma ferramenta amigavel
  • Manter as coisas simples
  • Usar o minimo de recursos possível
  • Rápida reação
  • Documentar varios aspectos da aplicação
2010/04/16 13:37

1.5 O que há de novo no Zabbix 1.8

Após mais de um ano de trabalho o Zabbix 1.8 chegou com muitas funcionalidades novas, bem como melhorarias nas antigas. Você pode conhecer as mudanças desta nova versão do Zabbix na seção seguinte.

1.5.1 Principais melhorias

Com tantas mudanças, é impossível escolher as 3 principais melhorias. Por esta razão, sugere-se ler por completo, pois algumas menores melhorias podem ser muito importante para você.

1.5.2 Novas caracteristicas e melhorias ao Frontend

Zabbix interface web é a característica que o diferencia de outras soluções. Poderoso, contudo fácil de usar, GUI oficial é fornecido com o pacote padrão. Ele provê acesso discreto para usuários novatos e recursos de configuração de larga escala para as instalações consideraveis.

Sendo a parte mais visivel para os usuários, nós vamos iniciar a visualização nas novas características e melhorias no Zabbix 1.8 para a interface web (frontend)

1.5.3 Relatório em Barra

Já era fácil de usar os gráficos simples do Zabbixque não requerem de qualquer configuração - isto é provido para qualquer item numérico. Graficos customizados, junto com um conjunto de graficos simplificados, permitem verificar os dados dentro de um contexto. Zabbix 1.8 traz muito mais relatórios poderosos.

A nova categoria de relatório, Relatorio em Barra, permite olhar os dados de diferentes angulos. Quer olhar a temperatura semana de uma sala de servidores nos últimos 2 meses? Quer comparar o processamento de um webserver no primeiro mês de cada quarter deste ano? Todas essas e mais possibilidades estão nessa nova opção.

1.5.4 Completo Suporte Unicode

Enquanto as versões anteriores do Zabbix eram do tipo multi-linguagem amigavel, provendo vários traduções do frontend, isto não era na verdade algo globa - a mais popular codificação, o Unicode, não era totalmente suportado.

Zabbix 1.8 agora suporta totalmente o Unicode/UTF-8, permitindo uma customização localizada ou multi-linguagem.

No Zabbix, um controle simples é usado para selecionar o periodo de tempo exibido para várias vizualizações, incluindo graficos simples e customizados, dados originais, telas e monitorações web. Já melhorado na versão 1.6, o selecionador de período de tempo foi melhorado novamente na versão 1.8

Esta barra de rolagem permite seu arrasto e seu redimensionamento. Alem disso, os links do lado esquerdo permitem você escolher algums periodos de tempos já pré-definidos e ainda mover o período para frente e para trás no tempo. As data do lado direito agora trabalham como links, mostrando um calendário and permitindo especificar o tempo de início e final do gráfico

E quanto ao link dinâmico/fixo no canto inferior e a direita? Ele pode ser usado para controlar se período de tempo é mantido constante quando você muda o inicio ou o fim do período do tempo.

Além das telas capturads, você pode também ver o vídeo do uso do control do período de tempo em um gráfico.

1.5.6 Gráficos Melhorados

Os gráficos do Zabbix foram melhorados em muitas maneiras. Isso inclui tanto melhorias visuais e funcionais, como o seletor de período de tempo já mencionado. Por exemplo, informações sobre valores máximos, mínimos e média. Os valores são apresentados de forma clara como uma tabela.

1.5.7 Cronograma em tabelas melhorados

Os gráficos do Zabbix - ou tabelas - normalmente exibirão o tempo no eixo x. E mesmo essa representação foi melhorado na nova versão.

Comparando a versão 1.6 e 1.8:

Rótulos de eixos na versão 1.6.
Rótulos de eixos na versão 1.8.

Como pode ser visto, os rótulos são agora mais fáceis de ler. Ao invés de priorizar algum ponto arbitrário no tempo, dependendo da escala do gráfico, os pontos em tempo real como a mudança de um dia são priorizadas. Às vezes, o Zabbix vai usar o rótulo mais legível:

1.5.8 Suporte à linhas graduais nos gráficos

Os gráficos do Zabbix suportal vários estilos de linhas, e a versão 1.8 tras um estilo a mais: a linha gradual. É fácil de compreender como ele trabalha somente olhando este exemplo:

1.5.9 Fonte DejaVu usada pelos gráficos

A fonte DejaVu é usada pelos gráficos para uma boa visualização do texto - e para as capacidades Unicode.

1.6 Edição de mapa melhorado

Mapas de rede suportados pelo Zabbix em ambiente monitorado podem ser colocado como uma imagem de fundo para fornecer visão geral para o usuário.

Em versões anteriores, edição de mapas da rede não era fácil - necessitava colocar coordenadas de cada elemento do mapa manualmente.

A edição de mapa no Zabbix 1.8 foi significativamente melhorado, adicionando suporte a arrastar e soltar itens, assim como exibição de detalhes o elemento selecionado em um pop-up.

Você pode ver o vídeo de um mapa sendo editado.

Além de que o link dos mapas podem ter textos opicionais para mostrar uma informação arbitrária, como por exemplo, dados da largura de uma banda.

Mapa de fundo de tela CC-BY-SA Openstreetmap.

2010/05/19 20:16
 
 
 
 
2010/04/15 19:51

2 Instalação

2.1 Como adquirir o Zabbix

Verique no site do Zabbix as informações sobre a versão atual e verifique as instruções de download. O Zabbix é distribuide como um pacote-fonte, entretanto ele é também incluido pré-compilado em algumas distribuições de Sistema Operacional.

2010/05/20 21:45
 
 
 
 
2010/04/27 18:30

3 Processos do Zabbix

3.1 Logging

For logging configuration of Zabbix daemons “LogFile” configuration parameter is used. If this parameter is left empty (LogFile=), syslog logging facilities are used. All Zabbix daemons on Unix-like platforms log their messages from “Daemon” environment. The mapping between Zabbix logging levels and syslog levels is as follows:

Zabbix log levelsyslog log levelComments
0 - empty
(LOG_LEVEL_EMPTY)
syslog is not used. All messages are skipped.
1 - critical information
(LOG_LEVEL_CRIT)
critical conditions
(LOG_CRIT)
2 - error information
(LOG_LEVEL_ERR)
error conditions
(LOG_ERR)
3 - warnings
(LOG_LEVEL_WARNING)
warning conditions
(LOG_WARNING)
4 - for debugging
(LOG_LEVEL_DEBUG)
debug-level messages
(LOG_DEBUG)

For syslog configuration consult the corresponding literature.


Zabbix agent under Windows uses Event Log if “LogFile” configuration parameter is provided empty. Mapping between Zabbix log levels (messages of corresponding type) and Windows Event Log entries type is provided below:

Zabbix log levelWindows Event Log entry typeComments
0 - empty
(LOG_LEVEL_EMPTY)
Event Log is not used. All messages are skipped.
1 - critical information
(LOG_LEVEL_CRIT)
2 - error information
(LOG_LEVEL_ERR)
EVENTLOG_ERROR_TYPE Error
3 - warnings
(LOG_LEVEL_WARNING)
EVENTLOG_WARNING_TYPE Warning
4 - for debugging
(LOG_LEVEL_DEBUG)
EVENTLOG_INFORMATION_TYPE Information

3.2 Individual processes

3.3 Zabbix Server

Zabbix Server is a central process of Zabbix software. Zabbix Server can be started by executing:

shell> cd sbin
shell> ./zabbix_server

Since version 1.8.3, Zabbix server has improved unreachable host handling. If a poller finds in the item queue an item from an unreachable host, it takes the item and marks the host as being checked currently. Other pollers do not take items from a host, which is marked like that. As a result, unreachable host will be checked by at most one poller at a time. Also, at most one item for an unreachable host will be tried at a time. Given that, it was decided to remove specific poller class for unreachable hosts.

Zabbix Server runs as a daemon process. Zabbix Server accepts the following command line parameters:

-c --config <file> specify configuration file, default is /etc/zabbix/zabbix_server.conf
-h --help give this help
-v --version display version number

In order to get this help run:

shell> zabbix_server -h

Example of command line parameters:

shell> zabbix_server -c /usr/local/etc/zabbix_server.conf
shell> zabbix_server --help
shell> zabbix_server -v

The configuration file contains parameters for zabbix_server. The file must exist and it should have read permissions for user 'zabbix'. Supported parameters:

ParameterMandatoryRangeDefaultDescription
AlertScriptsPath no /home/zabbix/bin/ Location of custom alert scripts
CacheSize no 128K-1G 8M Size of configuration cache, in bytes.
Shared memory size for storing hosts and items data.
CacheUpdateFrequency no 1-3600 60 How often Zabbix will perform update of configuration cache, in seconds.
DBHost no localhost Database host name.
If set to localhost, socket is used for MySQL.
DBName yes Database name.
For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored.
DBPassword no Database password. Ignored for SQLite.
Comment this line if no password is used.
DBPort no 1024-65535 3306 Database port when not using local socket. Ignored for SQLite.
DBSocket no /tmp/mysql.sock Path to MySQL socket.
DBUser no Database user. Ignored for SQLite.
DebugLevel no 0-4 3 Specifies debug level
0 - no debug
1 - critical information
2 - error information
3 - warnings
4 - for debugging (produces lots of information)
DisableHousekeeping no 0-1 0 If set to 1, disables housekeeping.
ExternalScripts no /etc/zabbix/externalscripts Location of external scripts
Fping6Location no /usr/sbin/fping6 Location of fping6.
Make sure that fping6 binary has root ownership and SUID flag set.
Make empty (“Fping6Location=”) if your fping utility is capable to process IPv6 addresses.
FpingLocation no /usr/sbin/fping Location of fping.
Make sure that fping binary has root ownership and SUID flag set!
HistoryCacheSize no 128K-1G 8M Size of history cache, in bytes.
Shared memory size for storing history data.
HistoryTextCacheSize no 128K-1G 16M Size of text history cache, in bytes.
Shared memory size for storing character, text or log history data.
HousekeepingFrequency no 1-24 1 How often Zabbix will perform housekeeping procedure (in hours).
Housekeeping is removing unnecessary information from history, alert, and alarms tables.
If PostgreSQL is used, suggested value is 24, as it performs VACUUM.
MaxHousekeeperDelete no 0-1000000 500 No more than 'MaxHousekeeperDelete' rows (corresponding to [tablename], [field], [value]) will be deleted per one task in one housekeeping cycle.
SQLite3 does not use this parameter, deletes all corresponding rows without a limit.
If set to 0 then no limit is used at all. In this case you must know what you are doing!
This option is supported in version 1.8.2 and higher.
Include no You may include individual files or all files in a directory in the configuration file.
ListenIP no 0.0.0.0 List of comma delimited IP addresses that the trapper should listen on.
Trapper will listen on all network interfaces if this parameter is missing.
Multiple IP addresses are supported in version 1.8.3 and higher.
ListenPort no 1024-32767 10051 Listen port for trapper.
LogFileSize no 0-1024 1 Maximum size of log file in MB.
0 - disable automatic log rotation.
LogFile no Name of log file.
LogSlowQueries no 0-3600000 0 If a query takes longer than this many milliseconds, the query is logged to the log file.
0 - disable log slow queries
This option is supported in version 1.8.2 and higher.
NodeID no 0-999 0 Unique NodeID in distributed setup.
0 - standalone server
NodeNoEvents no 0-1 0 If set to '1' local events won't be sent to master node.
This won't impact ability of this node to propagate events from its child nodes.
NodeNoHistory no 0-1 0 If set to '1' local history won't be sent to master node.
This won't impact ability of this node to propagate history from its child nodes.
PidFile no /tmp/zabbix_server.pid Name of PID file.
ProxyConfigFrequency no 1-604800 3600 How often Zabbix Server sends configuration data to a Zabbix Proxy in seconds. Used only for proxies in a passive mode.
This option is supported in version 1.8.3 and higher.
ProxyDataFrequency no 1-3600 1 How often Zabbix Server requests history data from a Zabbix Proxy in seconds. Used only for proxies in a passive mode.
This option is supported in version 1.8.3 and higher.
SSHKeyLocation no Location of public keys for SSH checks
SenderFrequency no 5-3600 30 How often Zabbix will try to send unsent alerts (in seconds).
SourceIP no Source IP address for outgoing connections.
StartDBSyncers no 1-64 4 Number of pre-forked instances of DB Syncers.
This option is supported in version 1.8.3 and higher.
StartDiscoverers no 0-255 1 Number of pre-forked instances of discoverers.
StartHTTPPollers no 0-255 1 Number of pre-forked instances of HTTP pollers.
StartIPMIPollers no 0-255 0 Number of pre-forked instances of IPMI pollers.
StartPingers no 0-255 1 Number of pre-forked instances of ICMP pingers.
StartPollersUnreachable no 0-255 1 Number of pre-forked instances of pollers for unreachable hosts.
This option is missing in version 1.8.3.
StartPollers no 0-255 5 Number of pre-forked instances of pollers.
StartProxyPollers no 0-255 1 Number of pre-forked instances of pollers for passive proxies.
This option is supported in version 1.8.3 and higher.
StartTrappers no 0-255 5 Number of pre-forked instances of trappers
Timeout no 1-30 3 Specifies how long we wait for agent, SNMP device or external check (in seconds).
TmpDir no /tmp Temporary directory.
TrapperTimeout no 1-300 300 Specifies how many seconds trapper may spend processing new data.
TrendCacheSize no 128K-1G 4M Size of trend cache, in bytes.
Shared memory size for storing trends data.
UnavailableDelay no 1-3600 60 How often host is checked for availability during the unavailability period, in seconds.
UnreachableDelay no 1-3600 15 How often host is checked for availability during the unreachability period, in seconds.
UnreachablePeriod no 1-3600 45 After how many seconds of unreachability treat a host as unavailable.
2010/07/13 14:33
3.4 Zabbix Proxy

Zabbix Proxy is a process which collects performance and availability data from one or more monitored devices and sends the information to a Zabbix Server. Zabbix Proxy can be started by:

shell> cd sbin
shell> ./zabbix_proxy

Zabbix Proxy runs as a daemon process. Zabbix Proxy accepts the following command line parameters:

  -c --config <file> specify configuration file, default is /etc/zabbix/zabbix_proxy.conf
  -h --help give this help
  -v --version display version number

In order to get this help run:

shell> zabbix_proxy -h

Example of command line parameters:

shell> zabbix_proxy -c /usr/local/etc/zabbix_proxy.conf
shell> zabbix_proxy --help
shell> zabbix_proxy -v

The configuration file contains parameters for zabbix_proxy. The file must exist and it should have read permissions for user 'zabbix'. Supported parameters:

ParameterMandatoryRangeDefaultDescription
CacheSize no 128K-1G 8M Size of configuration cache, in bytes.
Shared memory size, for storing hosts and items data.
CacheUpdateFrequency no 1-3600 60 How often Zabbix will perform update of configuration cache, in seconds.
For a proxy in the passive mode this parameter will be ignored.
ConfigFrequency no 1-604800 3600 How often proxy retrieves configuration data from Zabbix Server in seconds.
For a proxy in the passive mode this parameter will be ignored.
DBHost no localhost Database host name.
If set to localhost, socket is used for MySQL.
DBName yes Database name.
For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored.
DBPassword no Database password. Ignored for SQLite.
Comment this line if no password is used.
DBSocket no 3306 Path to MySQL socket.
Database port when not using local socket. Ignored for SQLite.
DBUser Database user. Ignored for SQLite.
DataSenderFrequency no 1-3600 1 Proxy will send collected data to the Server every N seconds.
DebugLevel no 0-4 3 Specifies debug level
0 - no debug
1 - critical information
2 - error information
3 - warnings
4 - for debugging (produces lots of information)
ExternalScripts no /etc/zabbix/externalscripts Location of external scripts
Fping6Location no /usr/sbin/fping6 Location of fping6.
Make sure that fping6 binary has root ownership and SUID flag set.
Make empty (“Fping6Location=”) if your fping utility is capable to process IPv6 addresses.
FpingLocation no /usr/sbin/fping Location of fping.
Make sure that fping binary has root ownership and SUID flag set!
HeartbeatFrequency no 0-3600 60 Frequency of heartbeat messages in seconds.
Used for monitoring availability of Proxy on server side.
0 - heartbeat messages disabled.
For a proxy in the passive mode this parameter will be ignored.
HistoryCacheSize no 128K-1G 8M Size of history cache, in bytes.
Shared memory size for storing history data.
HistoryTextCacheSize no 128K-1G 16M Size of text history cache, in bytes.
Shared memory size for storing character, text or log history data.
Hostname no Unique Proxy name. Make sure the Proxy name is known to the server!
System hostname is used if undefined.
HousekeepingFrequency no 1-24 1 How often Zabbix will perform housekeeping procedure (in hours).
Housekeeping is removing unnecessary information from history, alert, and alarms tables.
If PostgreSQL is used, suggested value is 24, as it performs VACUUM.
Include no You may include individual files or all files in a directory in the configuration file.
ListenIP no 0.0.0.0 List of comma delimited IP addresses that the trapper should listen on.
Trapper will listen on all network interfaces if this parameter is missing.
Multiple IP addresses are supported in version 1.8.3 and higher.
ListenPort no 1024-32767 10051 Listen port for trapper.
LogFileSize no 0-1024 1 Maximum size of log file in MB.
0 - disable automatic log rotation.
LogFile no Name of log file.
If not set, syslog is used.
LogSlowQueries no 0-3600000 0 If a query takes longer than this many milliseconds, the query is logged to the log file.
0 - disable log slow queries
This option is supported in version 1.8.2 and higher.
PidFile no /tmp/zabbix_proxy.pid Name of PID file.
ProxyLocalBuffer no 0-720 0 Proxy will keep data locally for N hours.
This parameter may be used if local data will be used by third party applications.
ProxyMode no 0-1 0 Proxy operating mode.
0 - proxy in the active mode
1 - proxy in the passive mode
This option is supported in version 1.8.3 and higher.
ProxyOfflineBuffer no 0-720 1 Proxy will keep data for N hours in case of no connectivity with Zabbix Server.
Older data will be lost.
SSHKeyLocation no Location of public keys for SSH checks
ServerPort no 1024-32767 10051 Port of Zabbix trapper on Zabbix server.
For a proxy in the passive mode this parameter will be ignored.
Server yes IP address (or hostname) of Zabbix server.
Active Proxy will get configuration data from the server.
For a proxy in the passive mode this parameter will be ignored.
SourceIP no Source IP address for outgoing connections.
StartDBSyncers no 1-64 4 Number of pre-forked instances of DB Syncers.
This option is supported in version 1.8.3 and higher.
StartDiscoverers no 0-255 1 Number of pre-forked instances of discoverers.
StartHTTPPollers no 0-255 1 Number of pre-forked instances of HTTP pollers.
StartIPMIPollers no 0-255 0 Number of pre-forked instances of IPMI pollers.
StartPingers no 0-255 1 Number of pre-forked instances of ICMP pingers.
StartPollersUnreachable no 0-255 1 Number of pre-forked instances of pollers for unreachable hosts.
Obsolete since 1.8.3.
StartPollers no 0-255 5 Number of pre-forked instances of pollers.
StartTrappers no 0-255 5 Number of pre-forked instances of trappers
Timeout no 1-30 3 Specifies how long we wait for agent, SNMP device or external check (in seconds).
TmpDir no /tmp Temporary directory.
TrapperTimeout no 1-300 300 Specifies how many seconds trapper may spend processing new data.
TrendCacheSize no 128K-1G 4M Size of trend cache, in bytes.
Shared memory size for storing trends data.
UnavailableDelay no 1-3600 60 How often host is checked for availability during the unavailability period, in seconds.
UnreachableDelay no 1-3600 15 How often host is checked for availability during the unreachability period, in seconds.
UnreachablePeriod no 1-3600 45 After how many seconds of unreachability treat a host as unavailable.
2010/07/13 14:34
3.3 Agente Zabbix (UNIX, processo Standalone daemon)

O Agente Zabbix para unix é executado em um host sendo monitorado. O agente fornece performance do host e informação de disponibilidade pelo Zabbix Server. O agente Zabbix processa itens do tipo 'Zabbix Agent' e 'Zabbix Agent (ativo)'.

O Zabbix Agente pode ser iniciado executando os seguintes comandos:

shell> cd sbin
shell> ./zabbix_agentd

O agente Zabbix é executado como um processo daemon. O agente Zabbix aceita os seguinte parametros de linha de comando

  -c --config <arquivo> especifica o arquivo de configuração, o padrão é /etc/zabbix/zabbix_agentd.conf
  -h --help mostra essa tela de ajuda
  -v --version mostra a versão do agente
  -p --print imprime as metricas suportadas e saída.
  -t --test <metric> testas metricas especificadas e saída.

No caso de mostrar essa ajuda, execute:

shell> zabbix_agentd -h

Exemplos de parâmetros de linha de comando:

shell> zabbix_agentd -c /usr/local/etc/zabbix_agentd.conf
shell> zabbix_agentd --help
shell> zabbix_agentd --print
shell> zabbix_agentd -t "system.cpu.load[all,avg1]"

o arquivo de configuração contem parâmetros de configuração para o zabbix_agentd. O arquivo deve existir e eke deveria ter permissão de leiura para o usuário 'zabbix'. Parâmetros suportados:

ParâmetrosMandatórioAlcancePadrãoDescrição
BufferSend no 1-3600 5 Do not keep data longer than N seconds in buffer.
BufferSize no 2-65535 100 Maximum number of values in a memory buffer. The agent will send
all collected data to Zabbix Server or Proxy if the buffer is full.
DebugLevel no 0-4 3 Specifies debug level
0 - no debug
1 - critical information
2 - error information
3 - warnings
4 - for debugging (produces lots of information)
DisableActive no 0 Disable active checks. The agent will work in passive mode listening for server.
DisablePassive no 0 Disable passive checks. The agent will not listen on any TCP port.
Only active checks will be processed.
0 - do not disable
1 - disable
EnableRemoteCommands no 0 Whether remote commands from Zabbix server are allowed.
0 - not allowed
1 - allowed
Hostname system.uname Unique hostname.
Required for active checks and must match hostname as configured on the server.
Include no You may include individual files or all files in a directory in the configuration file.
ListenIP no 0.0.0.0 List of comma delimited IP addresses that the agent should listen on.
Multiple IP addresses are supported in version 1.8.3 and higher.
ListenPort no 1024-32767 10050 Agent will listen on this port for connections from the server.
LogFileSize no 0-1024 1 Maximum size of log file in MB.
0 - disable automatic log rotation.
LogFile no Name of log file.
If not set, syslog is used.
LogRemoteCommands no 0 Enable logging of executed shell commands as warnings
0 - disabled
1 - enabled
MaxLinesPerSecond no 1-1000 100 Maximum number of new lines the agent will send per second to Zabbix Server
or Proxy processing 'log' and 'eventlog' active checks.
The provided value will be overridden by the parameter 'maxlines',
provided in 'log' or 'eventlog' item key.
PidFile no /tmp/zabbix_agentd.pid Name of PID file.
RefreshActiveChecks no 60-3600 120 How often list of active checks is refreshed, in seconds.
ServerPort no 10051 Server port for retrieving list of and sending active checks.
Server yes List of comma delimited IP addresses (or hostnames) of Zabbix servers.
No spaces allowed. First entry is used for receiving list of and sending active checks.
Note that hostnames must resolve hostname→IP address and IP address→hostname.
SourceIP no Source IP address for outgoing connections.
StartAgents no 1-16 3 Number of pre-forked instances of zabbix_agentd that process passive checks.
Timeout no 1-30 3 Spend no more than Timeout seconds on processing
UnsafeUserParameters no 0,1 0 Allow all characters to be passed in arguments to user-defined parameters. Supported since Zabbix 1.8.2.
UserParameter no User-defined parameter to monitor. There can be several user-defined parameters.
Format: UserParameter=<key>,<shell command>
Note that shell command must not return empty string or EOL only.
Example: UserParameter=system.test,who|wc -l
2010/07/13 14:47
3.4 Zabbix Agent (UNIX, Inetd version)

The file contains configuration parameters for zabbix_agent. The file must exist and it should have read permissions for user 'zabbix'. Supported parameters:

ParameterMandatoryDefault valueDescription
Server yes -Comma-delimited list of IP addresses of ZABBIX Servers or Proxies. Connections from other IP addresses will be rejected.
Timeout no 3Do not spend more than Timeout seconds on getting requested value (1-255). The agent does not kill timeouted User Parameters processes!
UnsafeUserParameters no 0 Allow all characters to be passed in arguments to user-defined parameters
UserParameter no User-defined parameter to monitor. There can be several user-defined parameters.
Format: UserParameter=<key>,<shell command>
Note that shell command must not return empty string or EOL only.
Example: UserParameter=system.test,who|wc -l
2010/07/13 14:47
 
3.5 Zabbix Sender (UNIX)

Zabbix UNIX Sender is a command line utility which may be used to send performance data to Zabbix Server for processing.

The utility is usually used in long running user scripts for periodical sending of availability and performance data. Zabbix Sender can be started by executing:

shell> cd bin
shell> ./zabbix_sender -z zabbix -p 10051 -s LinuxDB3 -k db.connections -o 43

See Zabbix Sender manpage for more information.

2010/07/13 14:35
3.6 Zabbix Get (UNIX)

Zabbix UNIX Get is a process which communicates with Zabbix Agent and retrieves required information.

The utility is usually used for troubleshooting of ZABBIX Agents.

Zabbix Get can be started by executing:

shell> cd bin
shell> ./zabbix_get -s127.0.0.1 -p10050 -k"system.cpu.load[all,avg1]"

Zabbix Get accepts the following command line parameters:

  -p --port <port number> Specify port number of agent running on the host. Default is 10050.
  -s -host <host name or IP> Specify host name or IP address of a host.
  -I --source-address <ip address> Specify source IP address
  -k -key <key of metric> Specify metric name (key) we want to retrieve.
  -h --help Give this help.
  -v --version Display version number.

In order to get this help run:

shell> zabbix_get -h
2010/07/13 14:36
2010/05/19 20:27

4 Configuração

4.1 Actions

Zabbix reacts to events by executing set of operations. An action can be defined for any event or set of events generated by Zabbix.

Action attributes:

ParameterDescription
NameUnique action name.
Event SourceSource of event.
Currently three sources are supported:
Triggers – events generated by trigger status changes
Discovery – events generated by auto-discovery module
Auto registration - events generated by new active agents
Enable escalationsEnable escalations. If enabled, the action will be escalated according to operation steps defined for operations.
Period (seconds)Time period for increase of escalation step.
Event SourceEvent source:
Triggers – action will be executed for events generated by triggers
Discovery – action will be executed for discovery events
Default subjectDefault notification subject. The subject may contain macros.
Default messageDefault notification message. The message may contain macros.
Recovery messageIf enabled, Zabbix will send a recovery message after the original problem is resolved. The messages will be sent only to those who received any message regarding this problem before.
Recovery subjectSubject of the recovery message. It may contain macros.
Recovery messageRecovery message. It may contain macros.
StatusAction status:
Enabled – action is active
Disabled – action is disabled
Warning: before enabling recovery messages or escalations, make sure to add “Trigger value = PROBLEM” condition to the action, otherwise remedy events can become escalated as well.
Action conditions

An action is executed only in case if an event matches defined set of conditions.

The following conditions can be defined for Trigger based events:

Condition typeSupported operatorsDescription
Application=
like
not like
= - event came from Trigger, which is part of the Application
like - event came from Trigger, which is part of the Application containing the String
not like - event came from Trigger, which is part of the Application not containing the String
Host group=
<>
Compare against Host Group having a trigger which generated event.
= - event came from this Host Group
<> - event did not come from this Host Group
Host template=
<>
Compare against Host Template the trigger belongs to.
= - event came from a trigger inherited from this Host Template
<> - event did not come from a trigger inherited from this Host Template
Host=
<>
Compare against Host having a trigger which generated event.
= - event came from this Host
<> - event did not come from this Host
Trigger=
<>
Compare against Trigger which generated event.
= - event generated by this Trigger
<> - event generated by other Trigger
Trigger description (name)like
not like
Compare against Trigger Name which generated event.
like – String can be found in Trigger Name. Case sensitive.
not like – String cannot be found in Trigger Name. Case sensitive.
Trigger severity=
<>
>=
<=
Compare with Trigger Severity. = - equal to trigger severity
<> - not equal to trigger severity
>= - more or equal to trigger severity
<= - less or equal to trigger severity
Trigger value=Compare with Trigger Value.
= - equal to trigger value (OK or PROBLEM)
Time period ininEvent is within time period.
in – event time matches the time period. Time period is given in format: dd-dd,hh:mm-hh:mm;dd-dd,hh:mm:hh:mm;…
Maintenance status=
<>
Check if host is in maintenance.
= - Host is in maintenance mode.
<> - Host is not in maintenance mode.

Trigger value:

Trigger changes status from OK to PROBLEM (trigger value is PROBLEM) Trigger changes status from PROBLEM to OK (trigger value is OK)

Status change OK→UNKNOWN→PROBLEM is treated as OK→PROBLEM, and PROBLEM→UNKNOWN→OK as PROBLEM→OK.

The following conditions can be defined for Discovery based events:

Condition typeSupported operatorsDescription
Host IP=
<>
Check if IP address of a discovered Host is or is not in the range of IP addresses.
= - Host IP is in the range
<> - Host IP is out of the range
Service type=
<>
Check if a discovered service.
= - matches discovered service
<> - event came from a different service
Service port=
<>
Check if TCP port number of a discovered service is or is not in the range of ports.
= - service port is in the range
<> - service port is out of the range
Discovery status=Up – matches Host Up and Service Up events
Down – matches Host Down and Service Down events
Uptime/Downtime>=
<=
Downtime for Host Down and Service Down events. Uptime for Host Up and Service Up events.
>= - uptime/downtime is more or equal
<= - uptime/downtime is less or equal. Parameter is given in seconds.
Received value=
<>
>=
<=
like not
like
Compare with value received from an agent (Zabbix, SNMP). String comparison.
= - equal to the value
<> - not equal to the value
>= - more or equal to the value
<= - less or equal to the value
like – has a substring
not like – does not have a substring. Parameter is given as a string.

For example this set of conditions (calculation type: AND/OR):

  • Host group = Oracle servers
  • Host group = MySQL servers
  • Trigger name like 'Database is down'
  • Trigger name like 'Database is unavailable'

is evaluated as

(Host group = Oracle servers or Host group = MySQL servers) and (Trigger name like 'Database is down' or Trigger name like 'Database is unavailable')

Operations

Operation or a set of operations is executed when event matches conditions.

Zabbix supports the following operations:

  • Send message
  • Remote command(s), including IPMI.
To successfully receive and read e-mails from Zabbix, e-mail servers/clients must support standard 'SMTP/MIME e-mail' format since Zabbix sends UTF-8 data. Starting from 1.8.2 the subject and the body of the message are base64-encoded to follow 'SMTP/MIME e-mail' format standard.
Starting with 1.8.3, if the subject contains ASCII characters only, it is not UTF-8 encoded.

Additional operations available for discovery events:

  • Add host
  • Remove host
  • Enable host
  • Disable host
  • Add to group
  • Delete from group
  • Link to template
  • Unlink from template

When adding a host, its name is decided by standard gethostbyname function. If the host can be resolved, resolved name is used. If not, IP address is used. Besides, if IPv6 address must be used for a host name, then all “:” (colons) are replaced by “_” (underscores), since “:” (colons) are not allowed in host names.

If performing discovery by a proxy, currently hostname lookup still takes place on Zabbix server.
If a host exists in Zabbix configuration with the same name as a newly discovered one, versions of Zabbix prior to 1.8 would add another host with the same name. Zabbix 1.8.1 and latter adds _N to the hostname, where N is increasing number, starting with 2.
ParameterDescription
StepIf escalation is enabled for this action, escalation settings:
From – execute for each step starting from this one
To – till this (0, for all steps starting from From)
Period – increase step number after this period, 0 – use default period.
Operation typeType of action:
Send message – send message to user
Execute command – execute remote command
Event Source
Send message toSend message to:
Single user – a single user
User group – to all members of a group
Default messageIf selected, default message will be used.
SubjectSubject of the message. The subject may contain macros.
MessageThe message itself. The message may contain macros.
Remote commandList of remote commands.
Starting from 1.6.2, Zabbix sends notifications only to those users, which have read permissions to a host (trigger), which generated the event. At least one host of a trigger expression must be accessible.
Macros for messages and remote commands

The macros can be used for more efficient reporting.

Example 1
Subject: {TRIGGER.NAME}: {TRIGGER.STATUS}

Message subject will be replaced by something like:

‘Processor load is too high on server zabbix.zabbix.com: ON’
Example 2

Message:

Processor load is: 
{zabbix.zabbix.com:system.cpu.load[,avg1].last(0)}

The message will be replaced by something like:

'Processor load is: 1.45'
Example 3

Message:

Latest value: 
{{HOSTNAME}:{TRIGGER.KEY}.last(0)}
MAX for 15 minutes: 
{{HOSTNAME}:{TRIGGER.KEY}.max(900)}
MIN for 15 minutes: 
{{HOSTNAME}:{TRIGGER.KEY}.min(900)}

The message will be replaced by something like:

Latest value: 1.45
MAX for 15 minutes: 2.33
MIN for 15 minutes: 1.01
2010/07/13 14:50
 

4.3 Applications

Application is a set of host items. For example, application 'MySQL Server' may contain all items which are related to the MySQL server: availability of MySQL, disk space, processor load, transactions per second, number of slow queries, etc.

An item may be linked with one or more applications.

Applications are used in Zabbix front-end to group items.

Currently a host cannot be linked to different templates having same application.
2010/07/13 14:50
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2010/05/19 20:28

5 Guia de Inicialização Rápida

 
 
 
 
 
2010/05/19 20:29

6 Importação e Exportação de XML

 
 
 
 
 
 
2010/05/20 15:26

7 Tutoriais

This section contains step-by-step instructions for most common tasks.

7.1 Extending Zabbix Agents

This tutorial provides step-by-step instructions how to extend functionality of Zabbix agent.

Step 1

Write a script or command line to retrieve required parameter.

For example, we may write the following command in order to get total number of queries executed by a MySQL server:

mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -d"S"

When executed, the command returns total number of SQL queries.

Step 2

Add this command to agent's configuration file.

Add the command to zabbix_agentd.conf:

UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -d"S"

mysql.questions is an unique identifier. It can be any string, for example, queries.

Test this parameter by using zabbix_get utility.

Step 3

Restart Zabbix agent.

Agent will reload configuration file.

Step 4

Add new item for monitoring.

Add new item with Key=mysql.questions to the monitored host. Type of the item must be either Zabbix Agent or Zabbix Agent (active).

Be aware that type of returned values must be set correctly on Zabbix server. Otherwise Zabbix won't accept them.

2009/08/13 10:38

7.2 Monitoring of log files

This tutorial provides step-by-step instructions how to setup monitoring of log files. It is assumed that a host is configured already in Zabbix frontend.

Step 1

Configure Zabbix agent.

Follow standard instructions in order to install and configure agent on monitored host. Make sure that parameter Hostname matches host name of the host configured in Zabbix frontend.

Also make sure that parameter DisableActive is not set in zabbix_agentd.conf

Step 2

Add a new item for monitoring of a log file.

Pay attention to the following parameters of the item:

PARAMETER Description
Type Must be set to 'Zabbix agent (active)'.
Key Must be set to 'log[file<,regexp>]'. For example: log[/var/log/syslog], log[/var/log/syslog,error]. Make sure that the file has read permissions for user 'zabbix' otherwise the item status will be set to 'unsupported'. Zabbix agent will filter entries of log file by the regexp if present.
Type of informationMust be set to 'log'.
Update interval (in sec)The parameter defines how often Zabbix agent will check for any changes in the log file. Normally must be set to 1 second in order to get new records as soon as possible.
2009/08/13 10:40

7.3 Remote commands

This tutorial provides step-by-step instructions on how to setup remote execution of pre-defined commands in case on an event. It is assumed that Zabbix is configured and operational.

Step 1

On Zabbix agent, enable remote commands. In zabbix_agentd.conf make sure that parameter EnableRemoteCommands is set to 1 and uncommented. Restart agent daemon if changing this parameter.

Step 2

Configure new action by going to Configuration → Actions and in the New action block choose operation type Remote command.

Pay attention to the following parameters of the action:

PARAMETERDescription
Action typeMust be set to 'Remote command'.
Remote commandEach line must contain an command for remote execution. For example: host:sudo /etc/init.d/apache restart. Remote command may contain macros!
Note the use of sudo - Zabbix user does not have permissions to restart system services by default. See below for hints on how to configure sudo.

Syntax of remote commands:

REMOTE COMMANDDescription
{HOSTNAME}:<command>Command 'command' will be executed on the host where the event happened.
<host>:<command>Command 'command' will be executed on host 'host'.
<group>#<command>Command 'command' will be executed on all hosts of host group 'group'.
Zabbix agent executes commands in background. Zabbix does not check if a command has been executed successfully.
Remote commands in Zabbix < 1.4 are limited to 44 characters, in Zabbix >= 1.4 they are limited to 255 characters.

Syntax of IPMI remote commands:

REMOTE COMMANDDescription
{HOSTNAME}:IPMI <ipmi control> [value]The syntax is for execution of IPMI command on the host where the event happened. Supported values: “on”, “off” or number (1, by default).
<host>:IPMI <ipmi control> [value]The syntax is for execution of IPMI command on a single host.
<group>#IPMI <ipmi control> [value]The syntax is for execution of IPMI command for all hosts of a host group.
Access permissions

Make sure that user 'zabbix' has execute permissions for configured commands. One may be interested in using sudo to give access to privileged commands. To configure access, execute as root:

# visudo

Example lines that could be used in sudoers file:

# allows 'zabbix' user to run all commands without password.
zabbix ALL=NOPASSWD: ALL
# allows 'zabbix' user to restart apache without password.
zabbix ALL=NOPASSWD: /etc/init.d/apache restart
On some systems sudoers file will prevent non-local users from executing commands. To change this, comment out requiretty option in /etc/sudoers.
On recent systems it might be required to set Defaults visiblepw in /etc/sudoers.
Example 1

Restart of Windows on certain condition.

In order to automatically restart Windows in case of a problem detected by Zabbix, define the following actions:

PARAMETER Description
Action type 'Remote command'
Remote commandhost:c:\windows\system32\shutdown.exe -r -f
Replace 'host' with Zabbix hostname of Windows server.
Example 2

Restart the host by using IPMI control.

PARAMETERDescription
Action type'Remote command'
Remote command{HOSTNAME}:IPMI reset on
Example 3

Power off the host by using IPMI control.

PARAMETERDescription
Action type'Remote command'
Remote command{HOSTNAME}:IPMI power off
2009/08/13 10:50

7.4 Monitoring of Windows Services

This tutorial provides step-by-step instructions how to setup monitoring of Windows services. It is assumed that ZABBIX server and ZABBIX agent are configured and operational.

Step 1

Get service name

You can get that name by going to the services mmc and bring up the properties of the service you want to monitor it's up/down status. In the General tab you should see a field called Service name. The value that follows that you put in the brackets above. For example, if I wanted to monitor the “workstation” service then my service would be lanmanworkstation.

Step 2

Add item for monitoring of the service

Add item with a key service_state[lanmanworkstation], value type Integer, value mapping Windows service state.

2009/08/13 10:50
2010/05/20 15:26

9 Monitoração WEB

 
 
 
 
 
2010/05/20 15:28

10 Monitoração de Arquivo de Log

 
 
2010/05/20 15:29

11 Descoberta

 
 
 
 
 
2010/05/20 15:53

12 Monitoração Avançada por SNMP

 
 
2010/05/20 15:54

13 Monitoração de dispositivos IPMI

 
 
 
2010/05/20 15:57

14 Uso de Proxies

Zabbix Proxies may greatly simplify maintenance of Zabbix environment and increase performance of the central Zabbix server.

Also, use of Zabbix Proxies is the easiest way of implementing centralized and distributed monitoring, when all Agents and Proxies report to one Zabbix server and all data is collected centrally.

 
 
 
2010/05/20 15:59

15 Monitoração Distribuida

Zabbix can be configured to support hierarchical distributed monitoring.

 
 
 
 
 
 
 
 
2010/05/20 15:59

16 Modo de Manutenção para Zabbix GUI

Zabbix GUI can be temporarily disabled in order to prohibit access to the front-end. This can be useful for protection of Zabbix database from any changes initiated by users, thus protecting integrity of database.

Zabbix database can be stopped while Zabbix GUI is in the maintenance mode.

 
 
 
2010/05/20 16:01

17 Interface WEB

There are several useful features of ZABBIX WEB interface:

  • almost all screens support full-screen mode
  • Ctrl + Mouse click make possible selection of multiple list elements (hosts, items, triggers, etc)
  • sound alarm can be switched on and off in Status of Triggers view
  • a new theme can be created to match your preferences or a company color schema
 
 
 
2010/05/20 16:02

18 Ajuste de Performance

 
 
2010/05/20 16:02

19 Receita de Bolo

 
 
 
2010/05/20 16:03

20 Troubleshooting

 
2010/05/20 16:03

21 "Escalations" e Notificações Recorrentes

 
 
 
 
 
 
 
2010/03/05 02:05