Configuration parameters: Zabbix agent 2 (Windows)

Overview

Configuration parameters allow customizing Zabbix agent 2 behavior on Windows.

Specify parameter values in the configuration file (zabbix_agent2.win.conf). All parameters are optional, unless explicitly stated that the parameter is mandatory.

This page is structured as:

  • Parameter overview (to see full details of a parameter, click on its name)
  • Parameter details
Parameter Description
Alias Set an alias for an item key.
AllowKey Allow the execution of those item keys that match a pattern.
BufferSend Set the frequency of sending values from the buffer to Zabbix server.
BufferSize Set the maximum number of values in the memory buffer.
ControlSocket Specify the control socket, used to send runtime commands with the '-R' option.
DebugLevel Set the debug level.
DenyKey Deny the execution of those item keys that match a pattern.
EnablePersistentBuffer Enable the usage of local persistent storage for active items.
ForceActiveChecksOnStart Perform active checks immediately after the restart for the first received configuration.
HeartbeatFrequency Set the frequency of heartbeat messages in seconds.
HostInterface Specify the host interface.
HostInterfaceItem Specify an item for getting the host interface.
HostMetadata Specify the host metadata.
HostMetadataItem Specify a Zabbix agent item used for getting the host metadata.
Hostname Specify the hostname.
HostnameItem Specify a Zabbix agent item for getting the hostname.
Include Specify a directory or individual files to be included in the configuration file.
ListenIP Specify the agent listen IP address for connections from the server.
ListenPort Specify the agent listen port.
LogFile Specify the agent log file.
LogFileSize Set the maximum log file size.
LogType Specify the log output type.
PerfCounter Specify a new parameter <parameter_name> which is the average value for system performance counter <perf_counter_path> for the specified time period <period> (in seconds).
PerfCounterEn Specify a new parameter <parameter_name> which is the average value for system performance counter <perf_counter_path> for the specified time period <period> (in seconds). Compared to PerfCounter, the perfcounter paths must be in English.
PersistentBufferFile Specify the file where Zabbix agent 2 should keep the SQLite database.
PersistentBufferPeriod Set the duration of storing data when there is no connection to the server or proxy.
Plugins.<PluginName>.System.Capacity Set the limit for checks per plugin that can be executed at the same time.
Plugins.Log.MaxLinesPerSecond Set the maximum number of new lines the agent will send per second to Zabbix server or proxy when processing log, logrt, and eventlog active checks.
Plugins.SystemRun.LogRemoteCommands Enable the logging of the executed shell commands as warnings.
PluginSocket Specify the path to the Windows named pipe for loadable plugin communications.
PluginTimeout Set the timeout for connections with loadable plugins, in seconds.
RefreshActiveChecks Specify the frequency of refreshing the list of active checks.
Server Specify the IP addresses or DNS names of Zabbix servers/proxies.
ServerActive Specify the Zabbix server/proxy address or cluster configuration to get active checks from.
SourceIP Specify the source IP address.
StatusPort Set the port that the agent listens on for HTTP status requests (http://localhost:<port>/status).
Timeout Specify how long to wait (in seconds) for establishing connection and exchanging data with Zabbix proxy or server.
TLSAccept Specify the level of encryption required for incoming connections.
TLSCAFile Specify full pathname of a file containing the top-level CA(s) certificates for peer certificate verification, used for encrypted communications between Zabbix components.
TLSCertFile Specify full pathname of a file containing the agent certificate or certificate chain, used for encrypted communications between Zabbix components.
TLSCipherAll13 Specify the OpenSSL cipher string (TLS 1.3). Override the default ciphersuite selection criteria for certificate- and PSK-based encryption.
TLSCipherCert13 Specify the OpenSSL cipher string (TLS 1.3). Override the default ciphersuite selection criteria for certificate-based encryption.
TLSCipherPSK13 Specify the OpenSSL cipher string (TLS 1.3). Override the default ciphersuite selection criteria for PSK-based encryption.
TLSConnect Specify the level of encryption required for connections to Zabbix server or proxy.
TLSCRLFile Specify full pathname of the file containing revoked certificates. This parameter is used for encrypted communications between Zabbix components.
TLSKeyFile Specify full pathname of the file containing the agent private key, used for encrypted communications between Zabbix components.
TLSPSKFile Specify full pathname of the file containing the agent pre-shared key, used for encrypted communications with Zabbix server.
TLSPSKIdentity Specify the pre-shared key identity string, used for encrypted communications with Zabbix server.
TLSServerCertIssuer Specify the allowed server (proxy) certificate issuer.
TLSServerCertSubject Specify the allowed server (proxy) certificate subject.
UnsafeUserParameters Allow all characters to be passed in arguments to user-defined parameters.
UserParameter Specify a user-defined parameter to monitor.
UserParameterDir Specify the default search path for UserParameter commands.

Note that:

  • The default values reflect process defaults, not the values in the shipped configuration files;
  • Values support environment variables;
  • Zabbix supports configuration files only in UTF-8 encoding without BOM;
  • Comments starting with "#" are only supported in the beginning of the line.

Parameter details

Alias

Set an alias for an item key. It can be used to substitute a long and complex item key with a shorter and simpler one.
Multiple Alias parameters may be present. Multiple parameters with the same Alias key are not allowed.
Different Alias keys may reference the same item key.
Aliases can be used in HostMetadataItem but not in the HostnameItem parameter.

Example 1: Retrieving the paging file usage in percentage from the server.

Alias=pg_usage:perf_counter[\Paging File(_Total)\% Usage]

Now the shorthand key pg_usage may be used to retrieve data.

Example 2: Getting the CPU load with default and custom parameters.

Alias=cpu.load:system.cpu.load
Alias=cpu.load[*]:system.cpu.load[*]

This allows use cpu.load key to get the CPU load with default parameters as well as use cpu.load[percpu,avg15] to get specific data about the CPU load.

Example 3: Running multiple low-level discovery rules processing the same discovery items.

Alias=vfs.fs.discovery[*]:vfs.fs.discovery

Now it is possible to set up several discovery rules using vfs.fs.discovery with different parameters for each rule, e.g., vfs.fs.discovery[foo], vfs.fs.discovery[bar], etc.

AllowKey

Allow the execution of those item keys that match a pattern. The key pattern is a wildcard expression that supports the "*" character to match any number of any characters.
Multiple key matching rules may be defined in combination with DenyKey. The parameters are processed one by one according to their appearance order. See also: Restricting agent checks.

BufferSend

Set the frequency of sending values from the buffer to Zabbix server (in seconds).
Note that if the buffer is full, the data will be sent sooner.

Default: 5
Range: 1-3600

BufferSize

Set the maximum number of values in the memory buffer. The agent will send all collected data to the Zabbix server or proxy if the buffer is full.
This parameter should only be used if persistent buffer is disabled (EnablePersistentBuffer=0).

Default: 1000
Range: 2-65535

ControlSocket

Specify the control socket, used to send runtime commands with the '-R' option.

Default: \\.\pipe\agent.sock

DebugLevel

Set the debug level:
0 - basic information about starting and stopping of Zabbix processes
1 - critical information;
2 - error information;
3 - warnings;
4 - for debugging (produces lots of information);
5 - extended debugging (produces even more information).

Default: 3
Range: 0-5

DenyKey

Deny the execution of those item keys that match a pattern. The key pattern is a wildcard expression that supports the "*" character to match any number of any characters.
Multiple key matching rules may be defined in combination with AllowKey. The parameters are processed one by one according to their appearance order. See also: Restricting agent checks.

EnablePersistentBuffer

Enable the usage of local persistent storage for active items. If persistent storage is disabled, the memory buffer will be used.

Default: 0
Values: 0 - disabled, 1 - enabled

ForceActiveChecksOnStart

Perform active checks immediately after the restart for the first received configuration. Also available as a per-plugin configuration parameter, for example: Plugins.Uptime.System.ForceActiveChecksOnStart=1

Default: 0
Values: 0 - disabled, 1 - enabled

HeartbeatFrequency

Set the frequency of heartbeat messages in seconds. Used for monitoring the availability of active checks.
0 - heartbeat messages disabled.

Default: 60
Range: 0-3600

HostInterface

Specify the host interface (IP address or DNS name) used during host autoregistration. This value will be used to populate the interface in the newly created host, and allows configuring either IP or DNS address explicitly. For more details, see Using DNS as default interface.

If not defined, the value will be acquired from HostInterfaceItem.

The agent will issue an error and not start if the value is over the limit of 255 characters.

Range: 0-255 characters

HostInterfaceItem

Specify an item used to determine the host interface (IP address or DNS name) during host autoregistration. This value is used only if HostInterface is not defined. For more details, see Using DNS as default interface.

During an autoregistration request the agent will log a warning message if the value returned by the specified item is over the limit of 255 characters.

The system.run[] item is supported regardless of AllowKey/DenyKey settings.

HostMetadata

Specify the metadata used to identify or distinguish the host during host autoregistration (active agent). HostMetadata allows distinguishing between hosts beyond the hostname.

If not defined, the value will be acquired from HostMetadataItem.

The agent will issue an error and not start if the specified value is over the limit of 2034 bytes or a non-UTF-8 string. When a parameter expects an IP address or DNS name, values that are valid UTF-8 but are not valid IPs or DNS names will also be rejected and reported as invalid.

Multi-line metadata is not supported — the output will be truncated at the first line break.

Range: 0-2034 bytes

HostMetadataItem

Specify a Zabbix agent item used to obtain host metadata. This option is only used when HostMetadata is not defined.

The HostMetadataItem value is retrieved on each autoregistration attempt and is used only at host autoregistration process (active agent). HostMetadataItem allows distinguishing between hosts beyond the hostname.

User parameters and aliases are supported. The system.run[] item is supported regardless of AllowKey/DenyKey settings.

During an autoregistration request the agent will log a warning message if the value returned by the specified item is over the limit of 65535 UTF-8 code points. The value returned by the item must be a UTF-8 string otherwise it will be ignored. When a parameter expects an IP address or DNS name, values that are valid UTF-8 but are not valid IPs or DNS names will also be rejected and reported as invalid.

Multi-line metadata is not supported — the output will be truncated at the first line break.

Hostname

Specify unique, case-sensitive hostnames. A comma-delimited list. Required for active checks and must match hostnames as configured on the server. The value is acquired from HostnameItem if undefined.
Allowed characters: alphanumeric, '.', ' ', '_' and '-'. Maximum length: 128 characters per hostname, 2048 characters for the entire line.

Default: Set by HostnameItem

HostnameItem

Specify an item for getting the hostname. This option is only used when Hostname is not defined. User parameters or aliases are not supported, but the system.run[] item is supported regardless of AllowKey/DenyKey values.

Default: system.hostname

Include

Specify a directory or individual files to be included in the configuration file (located in C:\Program Files\Zabbix Agent 2 by default if Zabbix agent is installed using Windows MSI installer packages; located in the folder specified during installation if Zabbix agent is installed as a zip archive). All included files must have correct syntax, otherwise the agent will not start. The path can be relative to the zabbix_agent2.conf file location (e.g., Include=.\zabbix_agent2.d\plugins.d\*.conf).
To only include relevant files in the specified directory, the asterisk wildcard character is supported for pattern matching.
See special notes about limitations.

Example:

Include=C:\Program Files\Zabbix Agent2\zabbix_agent2.d\*.conf
ListenIP

Specify the agent listen IP address for connections from the server. A comma-delimited list. The first IP address is sent to the Zabbix server, if connecting to it, to retrieve the list of active checks.

Default: 0.0.0.0

ListenPort

Specify the agent listen port for connections from the server.

Default: 10050
Range: 1024-32767

LogFile

Specify the agent log file.

Default: c:\zabbix_agent2.log
Mandatory: Yes, if LogType is set to file; otherwise no

LogFileSize

Set the maximum log file size (in MB).
0 - disable automatic log rotation.
Note: If the log file size limit is reached and file rotation fails, for whatever reason, the existing log file is truncated and started anew.

Default: 1
Range: 0-1024

LogType

Specify the log output type:
file - write log to the file specified by LogFile parameter;
console - write log to standard output.

Default: file

PerfCounter

Define a new parameter <parameter_name> which is the average value for system performance counter <perf_counter_path> for the specified time period <period> (in seconds).
Syntax: <parameter_name>,"<perf_counter_path>",<period>

For example, if you wish to receive the average number of processor interrupts per second for the last minute, you can define a new parameter "interrupts" as the following:

PerfCounter = interrupts,"\Processor(0)\Interrupts/sec",60

Please note the double quotes around the performance counter path. The parameter name (interrupts) is to be used as the item key when creating an item. Samples for calculating the average value will be taken every second.
You may run "typeperf -qx" to get the list of all performance counters available in Windows.

PerfCounterEn

Define a new parameter <parameter_name> which is the average value for system performance counter <perf_counter_path> for the specified time period <period> (in seconds). Compared to PerfCounter, the perfcounter paths must be in English. Supported only on Windows Server 2008/Vista and later.
Syntax: <parameter_name>,"<perf_counter_path>",<period>

For example, if you wish to receive the average number of processor interrupts per second for the last minute, you can define a new parameter "interrupts" as the following:

PerfCounterEn = interrupts,"\Processor(0)\Interrupts/sec",60

Please note the double quotes around the performance counter path. The parameter name (interrupts) is to be used as the item key when creating an item. Samples for calculating the average value will be taken every second.
You can find the list of English strings by viewing the following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\009.

PersistentBufferFile

Specify the file where Zabbix agent 2 should keep the SQLite database. Must be a full filename. This parameter is only used if persistent buffer is enabled (EnablePersistentBuffer=1).

PersistentBufferPeriod

Set the duration of storing data when there is no connection to the server or proxy. Older data will be lost. Log data will be preserved. This parameter is only used if persistent buffer is enabled (EnablePersistentBuffer=1).

Default: 1h
Range: 1m-365d

Plugins.<PluginName>.System.Capacity

Set the limit of checks per <PluginName> plugin that can be executed at the same time.

Default: 1000 Range: 1-1000

Plugins.Log.MaxLinesPerSecond

Set the maximum number of new lines the agent will send per second to Zabbix server or proxy when processing log, logrt, and eventlog active checks. The provided value will be overridden by the 'maxlines' parameter, provided in the 'log', 'logrt' or 'eventlog' item key.
Note: Zabbix will process 10 times more new lines than set in MaxLinesPerSecond to seek the required string in log items.

Default: 20
Range: 1-1000

Plugins.SystemRun.LogRemoteCommands

Enable the logging of the executed shell commands as warnings. The commands will be logged only if executed remotely. Log entries will not be created if system.run[] is launched locally by the HostMetadataItem, HostInterfaceItem or HostnameItem parameters.

Default: 0
Values: 0 - disabled, 1 - enabled

PluginSocket

Specify the path to the Windows named pipe for loadable plugin communications.

Default: \\.\pipe\agent.plugin.sock

PluginTimeout

Set the timeout for connections with loadable plugins, in seconds.

Default: Timeout
Range: 1-30

RefreshActiveChecks

Specify the frequency of refreshing the list of active checks, in seconds. Note that after failing to refresh active checks the next refresh will be attempted in 60 seconds.

Default: 5
Range: 1-86400

Server

Specify the IP addresses, optionally in CIDR notation, or DNS names of Zabbix servers/proxies. A comma-delimited list. Incoming connections will be accepted only from the hosts listed here. If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally and '::/0' will allow any IPv4 or IPv6 address. '0.0.0.0/0' can be used to allow any IPv4 address. Spaces are allowed. If this parameter is not specified, disables passive checks and the agent will not listen on any TCP port.

Example:

Server=127.0.0.1,192.168.1.0/24,::1,2001:db8::/32,zabbix.example.com
ServerActive

Specify the Zabbix server/proxy address or cluster configuration to get active checks from. The server/proxy address is an IP address or DNS name and optional port separated by colon.
The cluster configuration is one or more server or proxy group member addresses separated by semicolon. Multiple Zabbix servers/clusters and Zabbix proxies can be specified, separated by comma. Unless using proxy groups, more than one Zabbix proxy should not be specified from each Zabbix server/cluster. If a Zabbix proxy is specified then Zabbix server/cluster for that proxy should not be specified.
Multiple comma-delimited addresses can be provided to use several independent Zabbix servers in parallel. Spaces are allowed.
If the port is not specified, default port is used.
IPv6 addresses must be enclosed in square brackets if port for that host is specified. If port is not specified, square brackets for IPv6 addresses are optional.
If this parameter is not specified, active checks are disabled.

Example for Zabbix proxy:

ServerActive=127.0.0.1:10051

Example for Zabbix proxy group:

ServerActive=proxy1.example.com;proxy2.example.com;proxy3.example.com;proxy4.example.com;proxy5.example.com

Example for multiple servers:

ServerActive=127.0.0.1:20051,zabbix.domain,\[::1\]:30051,::1,\[12fc::1\]

Example for high availability:

ServerActive=zabbix.cluster.node1;zabbix.cluster.node2:20051;zabbix.cluster.node3

Example for high availability with two clusters and one server:

ServerActive=zabbix.cluster.node1;zabbix.cluster.node2:20051,zabbix.cluster2.node1;zabbix.cluster2.node2,zabbix.domain
SourceIP

Specify the source IP address for:

  • outgoing connections to Zabbix server or Zabbix proxy;
  • making connections while executing some items (web.page.get, net.tcp.port, etc.).
StatusPort

Set the port that the agent listens on for HTTP status requests (http://localhost:<port>/status).

Range: 1024-32767

Timeout

Specify how long to wait (in seconds) for establishing connection and exchanging data with Zabbix proxy or server.

This parameter defines the duration of various communication operations, including:

  • awaiting a response from the Zabbix server;
  • sending requests to Zabbix server, including item configuration requests and item data in active checks;
  • retrieving log data through logfile or Windows event log monitoring;
  • sending heartbeat messages;
  • maximum duration for vfs.* checks;
  • serving as a fallback in scenarios where a server or proxy older than version 7.0 sends checks without timeouts.

This timeout will not be used for those agent checks that have configurable timeout settings in the frontend (on global, proxy, or per-item level).

Default: 3
Range: 1-30

TLSAccept

Specify the level of encryption required for incoming connections. Used for passive checks. Multiple values can be specified, separated by comma:
unencrypted - accept connections without encryption (default)
psk - accept connections with TLS and a pre-shared key (PSK)
cert - accept connections with TLS and a certificate

Mandatory: yes, if TLS certificate or PSK parameters are defined (even for unencrypted connection); otherwise no

TLSCAFile

Specify full pathname of the file containing the top-level CA(s) certificates for peer certificate verification, used for encrypted communications between Zabbix components.

TLSCertFile

Specify full pathname of the file containing the agent certificate or certificate chain, used for encrypted communications with Zabbix components.

TLSCipherAll13

Specify the OpenSSL cipher string (TLS 1.3). Override the default ciphersuite selection criteria for certificate- and PSK-based encryption.

Example:

TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256
TLSCipherCert13

Specify the OpenSSL cipher string (TLS 1.3). Override the default ciphersuite selection criteria for certificate-based encryption.

Note that this parameter cannot be used together with TLSAccept=cert,psk; for certificate connection (TLSConnect=cert) use TLSCipherAll13 instead.

TLSCipherPSK13

Specify the OpenSSL cipher string (TLS 1.3). Override the default ciphersuite selection criteria for PSK-based encryption.

Example:

TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256
TLSConnect

Specify the level of encryption required for agent connections to Zabbix server or proxy. Used for active checks. Only one value can be specified:
unencrypted - connect without encryption (default)
psk - connect using TLS and a pre-shared key (PSK)
cert - connect using TLS and a certificate

Mandatory: yes, if TLS certificate or PSK parameters are defined (even for unencrypted connection); otherwise no

TLSCRLFile

Specify full pathname of the file containing revoked certificates. This parameter is used for encrypted communications between Zabbix components.

TLSKeyFile

Specify full pathname of the file containing the agent private key, used for encrypted communications between Zabbix components.

TLSPSKFile

Specify full pathname of the file containing the agent pre-shared key, used for encrypted communications with Zabbix server.

TLSPSKIdentity

Specify the pre-shared key identity string, used for encrypted communications with Zabbix server.

TLSServerCertIssuer

Specify the allowed server (proxy) certificate issuer.

TLSServerCertSubject

Specify the allowed server (proxy) certificate subject.

UnsafeUserParameters

Allow all characters to be passed in arguments to user-defined parameters. The following characters are not allowed: \ ' " ` * ? [ ] { } \~ $ ! & ; ( ) < > | # @ %
Additionally, newline characters are not allowed.

Default: 0
Values: 0 - do not allow, 1 - allow

UserParameter

Specify a user-defined parameter to monitor. There can be several user-defined parameters.
Format: UserParameter=<key>,<shell command>
Note that the shell command must not return empty string or EOL only. Shell commands may have relative paths, if the UserParameterDir parameter is specified.

Example:

UserParameter=system.test,dir /b | find /c /v ""
UserParameter=check_cpu,.\custom\_script.bat
UserParameterDir

Specify the default search path for UserParameter commands. If used, the agent will change its working directory to the one specified here before executing a command. Thereby, UserParameter commands can have a relative .\ prefix instead of a full path.
Only one entry is allowed.

Example:

UserParameterDir=C:\opt\myscripts