This is a translation of the original English documentation page. Help us make it better.


Zabbix Summit 2022
Register for Zabbix Summit 2022

3 Agent 2


Zabbix agent 2 is a new generation of Zabbix agent and may be used in place of Zabbix agent. Zabbix agent 2 has been developed to:

  • reduce the number of TCP connections
  • have greater check concurrency
  • be easily extendible with plugins. A plugin should be able to:
    • provide trivial checks consisting of only a few simple lines of code
    • provide complex checks consisting of long-running scripts and standalone data gathering with periodic sending back of the data
  • be a drop-in replacement for Zabbix agent (in that it supports all the previous functionality)

Agent 2 is written in Go (with some C code of Zabbix agent reused). A configured Go environment with a currently supported Go version is required for building Zabbix agent 2.

Agent 2 does not have built-in daemonization support on Linux; it can be run as a Windows service.

Passive checks work similarly to Zabbix agent. Active checks support scheduled/flexible intervals and check concurrency within one active server.

Check concurrency

Checks from different plugins can be executed concurrently. The number of concurrent checks within one plugin is limited by the plugin capacity setting. Each plugin may have a hardcoded capacity setting (100 being default) that can be lowered using the Plugins.<Plugin name>.Capacity=N setting in the Plugins configuration parameter.

See also: Plugin development guidelines.

Plates-formes prises en charge

L'agent 2 est pris en charge pour les plates-formes Linux et Windows.

En cas d'installation à partir de packages, l'agent 2 est pris en charge sur :

  • RHEL/CentOS 6, 7, 8
  • SLES 15 SP1+
  • Debian 9, 10
  • Ubuntu 18.04, 20.04

Sous Windows, l'agent 2 est pris en charge sur toutes les versions de desktop et serveur, sur lesquelles une version Go prise en charge à jour peut être installée.


L'agent Zabbix 2 est disponible dans des packages Zabbix pré-compilés. Pour compiler l'agent Zabbix 2 à partir des sources, vous devez spécifier l'option de configuration --enable-agent2.


The following command line parameters can be used with Zabbix agent 2:

Parameter Description
-c --config <config-file> Path to the configuration file.
You may use this option to specify a configuration file that is not the default one.
On UNIX, default is /usr/local/etc/zabbix_agent2.conf or as set by compile-time variables --sysconfdir or --prefix
-f --foreground Run Zabbix agent in foreground (default: true).
-p --print Print known items and exit.
Note: To return user parameter results as well, you must specify the configuration file (if it is not in the default location).
-t --test <item key> Test specified item and exit.
Note: To return user parameter results as well, you must specify the configuration file (if it is not in the default location).
-h --help Print help information and exit.
-v --verbose Print debugging information. Use this option with -p and -t options.
-V --version Print agent version number and exit.
-R --runtime-control <option> Perform administrative functions. See runtime control.

Specific examples of using command line parameters:

  • print all built-in agent items with values
  • test a user parameter with "" key defined in the specified configuration file
shell> zabbix_agent2 --print
       shell> zabbix_agent2 -t "" -c /etc/zabbix/zabbix_agentd.conf
Runtime control

Runtime control provides some options for remote control.

Option Description
log_level_increase Increase log level.
log_level_decrease Decrease log level.
metrics List available metrics.
version Display agent version.
userparameter_reload Reload user parameters from the current configuration file.
Note that UserParameter is the only agent configuration option that will be reloaded.
help Display help information on runtime control.


  • increasing log level for agent 2
  • print runtime control options
shell> zabbix_agent2 -R log_level_increase
       shell> zabbix_agent2 -R help

Configuration file

The configuration parameters of agent 2 are mostly compatible with Zabbix agent with some exceptions.

New parameters Description
ControlSocket The runtime control socket path. Agent 2 uses a control socket for runtime commands.
These parameters are used to configure persistent storage on agent 2 for active items.
Plugins Plugins may have their own parameters, in the format Plugins.<Plugin name>.<Parameter>=<value>. A common plugin parameter is Capacity, setting the limit of checks that can be executed at the same time.
StatusPort The port agent 2 will be listening on for HTTP status request and display of a list of configured plugins and some internal parameters
Dropped parameters Description
AllowRoot, User Not supported because daemonization is not supported.
LoadModule, LoadModulePath Loadable modules are not supported.
StartAgents This parameter was used in Zabbix agent to increase passive check concurrency or disable them. In Agent 2, the concurrency is configured at a plugin level and can be limited by a capacity setting. Whereas disabling passive checks is not currently supported.
HostInterface, HostInterfaceItem Not yet supported.

For more details see the configuration file options for zabbix_agent2.

Codes de sortie

À partir de la version 4.4.8, l'agent Zabbix 2 peut également être compilé avec les anciennes versions d'OpenSSL (1.0.1, 1.0.2).

Dans ce cas, Zabbix fournit des mutex pour le verrouillage dans OpenSSL. Si un verrouillage ou un déverrouillage mutex échoue, un message d'erreur est écrit dans le flux d'erreurs standard (STDERR) et l'agent 2 quitte avec le code de retour 2 ou 3, respectivement.