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.
Zabbix oferece:
Muitas organizações de diferentes dimensões ao redor do mundo confiam no Zabbix como uma plataforma de controlo principal.
Há vários objetivos que o Zabbix está tentando alcançar:
open source
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.
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ê.
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)
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.
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.
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.
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:
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:
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:
A fonte DejaVu é usada pelos gráficos para uma boa visualização do texto - e para as capacidades Unicode.
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.
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.
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 level | syslog log level | Comments |
|---|---|---|
| 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 level | Windows Event Log entry type | Comments |
|---|---|---|
| 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 |
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:
| Parameter | Mandatory | Range | Default | Description |
|---|---|---|---|---|
| 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. |
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:
| Parameter | Mandatory | Range | Default | Description |
|---|---|---|---|---|
| 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 if 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. |
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âmetros | Mandatório | Alcance | Padrão | Descriçã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 |
The file contains configuration parameters for zabbix_agent. The file must exist and it should have read permissions for user 'zabbix'. Supported parameters:
| Parameter | Mandatory | Default value | Description |
|---|---|---|---|
| Server | yes | - | Comma-delimited list of IP addresses of ZABBIX Servers or Proxies. Connections from other IP addresses will be rejected. |
| Timeout | no | 3 | Do 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 |
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.
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
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:
| Parameter | Description |
|---|---|
| Name | Unique action name. |
| Event Source | Source 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 escalations | Enable 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 Source | Event source: Triggers – action will be executed for events generated by triggers Discovery – action will be executed for discovery events |
| Default subject | Default notification subject. The subject may contain macros. |
| Default message | Default notification message. The message may contain macros. |
| Recovery message | If 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 subject | Subject of the recovery message. It may contain macros. |
| Recovery message | Recovery message. It may contain macros. |
| Status | Action status: Enabled – action is active Disabled – action is disabled |
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 type | Supported operators | Description |
|---|---|---|
| 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 in | in | Event 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 type | Supported operators | Description |
|---|---|---|
| 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):
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')
Operation or a set of operations is executed when event matches conditions.
Zabbix supports the following operations:
Additional operations available for discovery events:
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.
| Parameter | Description |
|---|---|
| Step | If 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 type | Type of action: Send message – send message to user Execute command – execute remote command |
| Event Source | |
| Send message to | Send message to: Single user – a single user User group – to all members of a group |
| Default message | If selected, default message will be used. |
| Subject | Subject of the message. The subject may contain macros. |
| Message | The message itself. The message may contain macros. |
| Remote command | List of remote commands. |
The macros can be used for more efficient reporting.
Subject: {TRIGGER.NAME}: {TRIGGER.STATUS}
Message subject will be replaced by something like:
‘Processor load is too high on server zabbix.zabbix.com: ON’
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'
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
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.
This section contains step-by-step instructions for most common tasks.
This tutorial provides step-by-step instructions how to extend functionality of Zabbix agent.
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.
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.
Restart Zabbix agent.
Agent will reload configuration file.
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.
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.
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
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 information | Must 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. |
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.
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.
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:
| PARAMETER | Description |
|---|---|
| Action type | Must be set to 'Remote command'. |
| Remote command | Each line must contain an command for remote execution. For example: host:sudo /etc/init.d/apache restart. Remote command may contain macros! |
Syntax of remote commands:
| REMOTE COMMAND | Description |
|---|---|
| {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'. |
Syntax of IPMI remote commands:
| REMOTE COMMAND | Description |
|---|---|
| {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. |
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=(ALL) NOPASSWD: /etc/init.d/apache restart
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 command | host:c:\windows\system32\shutdown.exe –r –f Replace 'host' with Zabbix hostname of Windows server. |
Restart the host by using IPMI control.
| PARAMETER | Description |
|---|---|
| Action type | 'Remote command' |
| Remote command | {HOSTNAME}:IPMI reset on |
Power off the host by using IPMI control.
| PARAMETER | Description |
|---|---|
| Action type | 'Remote command' |
| Remote command | {HOSTNAME}:IPMI power off |
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.
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.
Add item for monitoring of the service
Add item with a key service_state[lanmanworkstation], value type Integer, value mapping Windows service state.
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.
Zabbix can be configured to support hierarchical distributed monitoring.
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.
There are several useful features of ZABBIX WEB interface: