4 Zabbix agent (Windows)

The default values reflect daemon defaults, not the values in the shipped configuration files.

The parameters supported in a Zabbix agent (Windows) configuration file:

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

Examples:

1. Retrieving paging file usage in percents from the server.
Alias=pgusage:perf_counter[\Paging File(_Total)\% Usage]
Now shorthand key pg_usage may be used to retrieve data.

2. Getting 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 CPU utilisation percentage with default parameters as well as use cpu.load[percpu,avg15] to get specific data about CPU load.

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.
BufferSendno1-36005Do not keep data longer than N seconds in buffer.
BufferSizeno2-65535100Maximum number of values in a memory buffer. The agent will send
all collected data to Zabbix server or proxy if the buffer is full.
DebugLevelno0-53Specifies 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)
EnableRemoteCommandsno0Whether remote commands from Zabbix server are allowed.
0 - not allowed
1 - allowed
HostMetadatano0-255 charactersOptional parameter that defines host metadata. Host metadata is used only at host auto-registration process (active agent).
If not defined, the value will be acquired from HostMetadataItem.
An agent will issue an error and not start if the specified value is over the limit or a non-UTF-8 string.
This option is supported in version 2.2.0 and higher.
HostMetadataItemnoOptional parameter that defines a Zabbix agent item used for getting host metadata. This option is only used when HostMetadata is not defined.
Supports UserParameters, performance counters and aliases. Supports system.run[] regardless of EnableRemoteCommands value.
Host metadata is used only at host auto-registration process (active agent).
During an auto-registration request an agent will log a warning message if the value returned by the specified item is over the limit of 255 characters.
The value returned by the item must be a UTF-8 string otherwise it will be ignored.
This option is supported in version 2.2.0 and higher.
HostnamenoSet by HostnameItemUnique, case sensitive hostname.
Required for active checks and must match hostname as configured on the server.
Allowed characters: alphanumeric, ‘.’, ‘ ‘, ‘‘ and ‘-‘.
Maximum length: 64
HostnameItemnosystem.hostnameOptional parameter that defines a Zabbix agent item used for getting host name. This option is only used when Hostname is not defined.
Does not support UserParameters, performance counters or aliases, but does support system.run[] regardless of EnableRemoteCommands value.
This option is supported in version 1.8.6 and higher.
See also a more detailed description.
IncludenoYou may include individual files or all files in a directory in the configuration file.
To only include relevant files in the specified directory, the asterisk wildcard character is supported for pattern matching. For example: /absolute/path/to/config/files/.conf. Pattern matching is supported since Zabbix 2.4.0.
See special notes about limitations.
ListenIPno0.0.0.0List of comma-delimited IP addresses that the agent should listen on.
Multiple IP addresses are supported since Zabbix 1.8.3.
ListenPortno1024-3276710050Agent will listen on this port for connections from the server.
LogFileyes, if LogType is set to file, otherwise
no
/tmp/zabbix_agentd.logName of the agent log file.
LogFileSizeno0-10241Maximum size of log file 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.
LogTypenofileLog output type:
file - write log to file specified by LogFile parameter,
system - write log Windows Event Log,
console - write log to standard output.
This parameter is supported since Zabbix 3.0.0.
LogRemoteCommandsno0Enable logging of executed shell commands as warnings.
0 - disabled
1 - enabled
MaxLinesPerSecondno1-100020Maximum number of new lines the agent will send per second to Zabbix server
or proxy processing ‘log’, ‘logrt’ and ‘eventlog’ active checks.
The provided value will be overridden by the parameter ‘maxlines’,
provided in ‘log’, ‘logrt’ or ‘eventlog’ item keys.
Note: Zabbix will process 10 times more new lines than set in MaxLinesPerSecond to seek the required string in log items.
PerfCounternoSyntax: <parameter_name>,”<perf_counter_path>”,<period>
Defines new parameter <parameter_name> which is an average value for system performance counter <perf_counter_path> for the specified time period <period> (in seconds).
For example, if you wish to receive average number of processor interrupts per second for last minute, you can define new parameter “interrupts” as following:
PerfCounter = interrupts,”\Processor(0)\Interrupts/sec”,60
Please note double quotes around performance counter path.
The parameter name (interrupts) is to be used as the item key when creating an item.
Samples for calculating average value will be taken every second.
You may run “typeperf -qx” to get list of all performance counters available in Windows.
RefreshActiveChecksno60-3600120How often list of active checks is refreshed, in seconds.
Note that after failing to refresh active checks the next refresh will be attempted after 60 seconds.
Serveryes, if StartAgents is not explicitly set to 0List of comma delimited IP addresses, optionally in CIDR notation, or hostnames of Zabbix servers.
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.
Note, that “IPv4-compatible IPv6 addresses” (0000::/96 prefix) are supported but deprecated by RFC4291.
Example: Server=127.0.0.1,192.168.1.0/24,::1,2001:db8::/32,zabbix.domain
Spaces are allowed since the Zabbix 2.2 version.
ServerActiveno()IP:port (or hostname:port) of Zabbix server or Zabbix proxy for active checks.
Multiple comma-delimited addresses can be provided to use several independent Zabbix servers in parallel. No spaces allowed.
If 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.
SourceIPnoSource IP address for outgoing connections.
StartAgentsno0-63 ()3Number of pre-forked instances of zabbix_agentd that process passive checks.
If set to 0, disables passive checks and the agent will not listen on any TCP port.
The upper limit used to be 16 before version 1.8.5.
Timeoutno1-303Spend no more than Timeout seconds on processing
TLSAcceptyes, if TLS certificate or PSK parameters are defined (even for unencrypted connection), otherwise noWhat incoming connections to accept. Used for a 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
This parameter is supported since Zabbix 3.0.0.
TLSCAFilenoFull pathname of a file containing the top-level CA(s) certificates for peer certificate verification, used for encrypted communications between Zabbix components.
This parameter is supported since Zabbix 3.0.0.
TLSCertFilenoFull pathname of a file containing the agent certificate or certificate chain, used for encrypted communications with Zabbix components.
This parameter is supported since Zabbix 3.0.0.
TLSConnectyes, if TLS certificate or PSK parameters are defined (even for unencrypted connection), otherwise noHow the agent should connect 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
This parameter is supported since Zabbix 3.0.0.
TLSCRLFilenoFull pathname of a file containing revoked certificates. This parameter is used for encrypted communications with Zabbix components.
This parameter is supported since Zabbix 3.0.0.
TLSKeyFilenoFull pathname of a file containing the agent private key used for encrypted communications with Zabbix components.
This parameter is supported since Zabbix 3.0.0.
TLSPSKFilenoFull pathname of a file containing the agent pre-shared key used for encrypted communications with Zabbix components.
This parameter is supported since Zabbix 3.0.0.
TLSPSKIdentitynoPre-shared key identity string, used for encrypted communications with Zabbix server.
This parameter is supported since Zabbix 3.0.0.
TLSServerCertIssuernoAllowed server (proxy) certificate issuer.
This parameter is supported since Zabbix 3.0.0.
TLSServerCertSubjectnoAllowed server (proxy) certificate subject.
This parameter is supported since Zabbix 3.0.0.
UnsafeUserParametersno0-10Allow all characters to be passed in arguments to user-defined parameters.
0 - do not allow
1 - allow
The following characters are not allowed:
\ ‘ “ ` ? [ ] { } ~ $ ! & ; ( ) < > | # @
Additionally, newline characters are not allowed.
UserParameterUser-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,echo 1

(*) The number of active servers listed in ServerActive plus the number of pre-forked instances for passive checks specified in StartAgents must be less than 64.

In Zabbix agent 2.0.0 version configuration parameters related to active and passive checks have been changed.
See the “See also” section at the bottom of this page to read more details about these changes.

Zabbix supports configuration files only in UTF-8 encoding without BOM.

Comments starting with “#” are only supported in the beginning of the line.

See also

  1. Differences in the Zabbix agent configuration for active and passive checks starting from version 2.0.0.

Parameters

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

Examples:

1. Retrieving paging file usage in percents from the server.
Alias=pgusage:perf_counter[\Paging File(_Total)\% Usage]
Now shorthand key pg_usage may be used to retrieve data.

2. Getting 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 CPU utilization percentage with default parameters as well as use cpu.load[percpu,avg15] to get specific data about CPU load.

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.
AllowKeynoAllow execution of those item keys that match a pattern. Key pattern is a wildcard expression that supports ““ 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.
This parameter is supported since Zabbix 5.0.0.
See also: Restricting agent checks.
BufferSendno1-36005Do not keep data longer than N seconds in buffer.
BufferSizeno2-65535100Maximum number of values in a memory buffer. The agent will send
all collected data to Zabbix server or proxy if the buffer is full.
DebugLevelno0-53Specifies 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)
DenyKeynoDeny execution of those item keys that match a pattern. Key pattern is a wildcard expression that supports ““ 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.
This parameter is supported since Zabbix 5.0.0.
See also: Restricting agent checks.
EnableRemoteCommandsno0Whether remote commands from Zabbix server are allowed. This parameter is deprecated, use AllowKey=system.run[] or DenyKey=system.run[] instead
It is internal alias for AllowKey/DenyKey parameters depending on value: 0 - DenyKey=system.run[
]
1 - AllowKey=system.run[*].
HostInterfaceno0-255 charactersOptional parameter that defines host interface.
Host interface is used at host autoregistration process.
An agent will issue an error and not start if the value is over the limit of 255 characters.
If not defined, value will be acquired from HostInterfaceItem.
Supported since Zabbix 4.4.0.
HostInterfaceItemnoOptional parameter that defines an item used for getting host interface.
Host interface is used at host autoregistration process.
During an autoregistration request an agent will log a warning message if the value returned by specified item is over limit of 255 characters.
This option is only used when HostInterface is not defined.
Supported since Zabbix 4.4.0.
HostMetadatano0-255 charactersOptional parameter that defines host metadata. Host metadata is used only at host autoregistration process (active agent).
If not defined, the value will be acquired from HostMetadataItem.
An agent will issue an error and not start if the specified value is over the limit or a non-UTF-8 string.
HostMetadataItemnoOptional parameter that defines a Zabbix agent item used for getting host metadata. This option is only used when HostMetadata is not defined.
Supports UserParameters, performance counters and aliases. Supports system.run[] regardless of EnableRemoteCommands value.
HostMetadataItem value is retrieved on each autoregistration attempt and is used only at host autoregistration process (active agent).
During an autoregistration request an agent will log a warning message if the value returned by the specified item is over the limit of 255 characters.
The value returned by the item must be a UTF-8 string otherwise it will be ignored.
HostnamenoSet by HostnameItemList of comma-delimited unique, case-sensitive hostnames.
Required for active checks and must match hostnames as configured on the server. Value is acquired from HostnameItem if undefined.
Allowed characters: alphanumeric, ‘.’, ‘ ‘, ‘‘ and ‘-‘.
Maximum length: 128 characters per hostname, 2048 characters for the entire line.
HostnameItemnosystem.hostnameOptional parameter that defines a Zabbix agent item used for getting host name. This option is only used when Hostname is not defined.
Does not support UserParameters, performance counters or aliases, but does support system.run[] regardless of EnableRemoteCommands value.
The output length is limited to 512KB.
See also a more detailed description.
IncludenoYou may include individual files or all files in a directory in the configuration file.
To only include relevant files in the specified directory, the asterisk wildcard character is supported for pattern matching. For example: /absolute/path/to/config/files/.conf.
See special notes about limitations.
ListenBacklogno0 - INT_MAXSOMAXCONNThe maximum number of pending connections in the TCP queue.
Default value is a hard-coded constant, which depends on the system.
Maximum supported value depends on the system, too high values may be silently truncated to the ‘implementation-specified maximum’.
ListenIPno0.0.0.0List of comma-delimited IP addresses that the agent should listen on.
ListenPortno1024-3276710050Agent will listen on this port for connections from the server.
LogFileyes, if LogType is set to file, otherwise
no
C:\zabbix_agentd.logName of the agent log file.
LogFileSizeno0-10241Maximum size of log file 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.
LogTypenofileLog output type:
file - write log to file specified by LogFile parameter,
system - write log Windows Event Log,
console - write log to standard output.
This parameter is supported since Zabbix 3.0.0.
LogRemoteCommandsno0Enable logging of executed shell commands as warnings.
0 - disabled
1 - enabled
MaxLinesPerSecondno1-100020Maximum number of new lines the agent will send per second to Zabbix server
or proxy processing ‘log’, ‘logrt’ and ‘eventlog’ active checks.
The provided value will be overridden by the parameter ‘maxlines’,
provided in ‘log’, ‘logrt’ or ‘eventlog’ item keys.
Note: Zabbix will process 10 times more new lines than set in MaxLinesPerSecond to seek the required string in log items.
PerfCounternoDefines a new parameter <parameter_name> which is an 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 average number of processor interrupts per second for last minute, you can define a new parameter “interrupts” as the following:
PerfCounter = interrupts,”\Processor(0)\Interrupts/sec”,60
Please note double quotes around performance counter path.
The parameter name (interrupts) is to be used as the item key when creating an item.
Samples for calculating average value will be taken every second.
You may run “typeperf -qx” to get list of all performance counters available in Windows.
PerfCounterEnnoDefines a new parameter <parameter_name> which is an average value for system performance counter <perf_counter_path> for the specified time period <period> (in seconds).
Syntax: <parameter_name>,”<perf_counter_path>”,<period>
Compared to PerfCounter, perfcounter paths must be in English.
Supported only on Windows Server 2008/Vista and above.
For example, if you wish to receive average number of processor interrupts per second for last minute, you can define a new parameter “interrupts” as the following:
PerfCounterEn = interrupts,”\Processor(0)\Interrupts/sec”,60
Please note double quotes around performance counter path.
The parameter name (interrupts) is to be used as the item key when creating an item.
Samples for calculating 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.
This parameter is supported since Zabbix 4.0.13 and 4.2.7.
RefreshActiveChecksno60-3600120How often list of active checks is refreshed, in seconds.
Note that after failing to refresh active checks the next refresh will be attempted after 60 seconds.
Serveryes, if StartAgents is not explicitly set to 0List of comma delimited IP addresses, optionally in CIDR notation, or hostnames of Zabbix servers.
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.
Note, that “IPv4-compatible IPv6 addresses” (0000::/96 prefix) are supported but deprecated by RFC4291.
Example: Server=127.0.0.1,192.168.1.0/24,::1,2001:db8::/32,zabbix.domain
Spaces are allowed.
ServerActiveno()IP:port (or hostname:port) of Zabbix server or Zabbix proxy for active checks.
Multiple comma-delimited addresses can be provided to use several independent Zabbix servers in parallel. Spaces are allowed.
If 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.
SourceIPnoSource IP address for:
- outgoing connections to Zabbix server or Zabbix proxy;
- making connections while executing some items (web.page.get, net.tcp.port, etc.)
StartAgentsno0-63 ()3Number of pre-forked instances of zabbix_agentd that process passive checks.
If set to 0, disables passive checks and the agent will not listen on any TCP port.
Timeoutno1-303Spend no more than Timeout seconds on processing
TLSAcceptyes, if TLS certificate or PSK parameters are defined (even for unencrypted connection), otherwise noWhat incoming connections to accept. Used for a 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
This parameter is supported since Zabbix 3.0.0.
TLSCAFilenoFull pathname of a file containing the top-level CA(s) certificates for peer certificate verification, used for encrypted communications between Zabbix components.
This parameter is supported since Zabbix 3.0.0.
TLSCertFilenoFull pathname of a file containing the agent certificate or certificate chain, used for encrypted communications with Zabbix components.
This parameter is supported since Zabbix 3.0.0.
TLSConnectyes, if TLS certificate or PSK parameters are defined (even for unencrypted connection), otherwise noHow the agent should connect 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
This parameter is supported since Zabbix 3.0.0.
TLSCRLFilenoFull pathname of a file containing revoked certificates. This parameter is used for encrypted communications with Zabbix components.
This parameter is supported since Zabbix 3.0.0.
TLSKeyFilenoFull pathname of a file containing the agent private key used for encrypted communications with Zabbix components.
This parameter is supported since Zabbix 3.0.0.
TLSPSKFilenoFull pathname of a file containing the agent pre-shared key used for encrypted communications with Zabbix components.
This parameter is supported since Zabbix 3.0.0.
TLSPSKIdentitynoPre-shared key identity string, used for encrypted communications with Zabbix server.
This parameter is supported since Zabbix 3.0.0.
TLSServerCertIssuernoAllowed server (proxy) certificate issuer.
This parameter is supported since Zabbix 3.0.0.
TLSServerCertSubjectnoAllowed server (proxy) certificate subject.
This parameter is supported since Zabbix 3.0.0.
UnsafeUserParametersno0-10Allow all characters to be passed in arguments to user-defined parameters.
0 - do not allow
1 - allow
The following characters are not allowed:
\ ‘ “ ` ? [ ] { } ~ $ ! & ; ( ) < > | # @
Additionally, newline characters are not allowed.
UserParameternoUser-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.
Shell commands may have relative paths, if UserParameterDir parameter is specified.
Examples:
UserParameter=system.test,who|wc -l
UserParameter=check_cpu,./custom_script.sh
UserParameterDirnoDefault 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=/opt/myscripts

(*) The number of active servers listed in ServerActive plus the number of pre-forked instances for passive checks specified in StartAgents must be less than 64.

See also

  1. Differences in the Zabbix agent configuration for active and passive checks starting from version 2.0.0.