Zabbix Documentation 5.0

3.04.05.0 (current)| In development:5.2 (devel)| Unsupported:1.82.02.22.43.23.44.24.4Guidelines

User Tools

Site Tools


manual:appendix:config:zabbix_agentd

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
manual:appendix:config:zabbix_agentd [2019/10/07 06:35]
127.0.0.1 external edit
manual:appendix:config:zabbix_agentd [2020/06/12 06:36] (current)
martins-v EnableRemoteCommands is deprecated (ZBX-17759)
Line 1: Line 1:
 ==== 3 Zabbix agent (UNIX) ==== ==== 3 Zabbix agent (UNIX) ====
  
-<​note>​The default values reflect daemon defaults, not the values in the shipped configuration files.</​note>​+=== Overview ===
  
-The parameters supported in a Zabbix agent configuration file (//zabbix_agentd.conf//):+This section lists parameters supported in a Zabbix agent configuration file (zabbix_agentd.conf). Note that: 
 + 
 +  * The default values reflect daemon defaults, not the values in the shipped configuration files; 
 +  * Zabbix supports configuration files only in UTF-8 encoding without [[https://​en.wikipedia.org/​wiki/​Byte_order_mark|BOM]];​ 
 +  * Comments starting with "#"​ are only supported in the beginning of the line. 
 + 
 +=== Parameters ===
  
 ^Parameter^Mandatory^Range^Default^Description^ ^Parameter^Mandatory^Range^Default^Description^
-| Alias| no | | |Sets 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//​ parameters.\\ \\ Examples:\\ \\ 1. Retrieving the ID of user '​zabbix'​.\\ %%Alias=zabbix.userid:​vfs.file.regexp[/​etc/​passwd,"​^zabbix:​.:​([0-9]+)",,,,​\1]%%\\ Now shorthand key **zabbix.userid** may be used to retrieve data.\\ ​ \\ 2. Getting CPU utilization with default and custom parameters.\\ Alias=cpu.util:​system.cpu.util\\ Alias=cpu.util[*]:​system.cpu.util[*]\\ This allows use **cpu.util** key to get CPU utilisation ​percentage with default parameters as well as use **cpu.util[all,​ idle, avg15]** to get specific data about CPU utilisation.\\ \\ 3. Running multiple [[manual/​discovery/​low_level_discovery|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.  |+| Alias| no | | |Sets 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//​ parameters.\\ \\ Examples:\\ \\ 1. Retrieving the ID of user '​zabbix'​.\\ %%Alias=zabbix.userid:​vfs.file.regexp[/​etc/​passwd,"​^zabbix:​.:​([0-9]+)",,,,​\1]%%\\ Now shorthand key **zabbix.userid** may be used to retrieve data.\\ ​ \\ 2. Getting CPU utilization with default and custom parameters.\\ Alias=cpu.util:​system.cpu.util\\ Alias=cpu.util[*]:​system.cpu.util[*]\\ This allows use **cpu.util** key to get CPU utilization ​percentage with default parameters as well as use **cpu.util[all,​ idle, avg15]** to get specific data about CPU utilization.\\ \\ 3. Running multiple [[manual/​discovery/​low_level_discovery|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| no | | |Allow 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: [[manual:​config:​items:​restrict_checks|Restricting agent checks]].  |
 | AllowRoot| no | |0 |Allow the agent to run as '​root'​. If disabled and the agent is started by '​root',​ the agent will try to switch to user '​zabbix'​ instead. Has no effect if started under a regular user.\\ 0 - do not allow\\ 1 - allow| | AllowRoot| no | |0 |Allow the agent to run as '​root'​. If disabled and the agent is started by '​root',​ the agent will try to switch to user '​zabbix'​ instead. Has no effect if started under a regular user.\\ 0 - do not allow\\ 1 - allow|
 | BufferSend| no | 1-3600 |5 |Do not keep data longer than N seconds in buffer. | | 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. | | 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-5 |3 |Specifies 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) | | DebugLevel| no | 0-5 |3 |Specifies 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) |
-| EnableRemoteCommands| no | |0 |Whether remote commands from Zabbix server are allowed.\\ 0 - not allowed\\ 1 - allowed ​+| DenyKey| no | | |Deny 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: [[manual:​config:​items:​restrict_checks|Restricting agent checks]]. ​ | 
-| HostInterface| no | 0-255 characters | |Optional parameter that defines host interface.\\ Host interface is used at host auto-registration ​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. ​ | +| EnableRemoteCommands| no | |0 |Whether remote commands from Zabbix server are allowed. ​Since Zabbix 5.0.2, 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[*]  ​
-| HostInterfaceItem| no | | |Optional parameter that defines an item used for getting host interface.\\ Host interface is used at host auto-registration ​process.\\ During an auto-registration ​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. ​ | +| HostInterface| no | 0-255 characters | |Optional 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. ​ | 
-| HostMetadata| no | 0-255 characters| | Optional 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.| +| HostInterfaceItem| no | | |Optional 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. ​ | 
-| HostMetadataItem| no | | | Optional parameter that defines a //Zabbix agent// item used for getting host metadata. This option is only used when HostMetadata is not defined.\\ Supports UserParameters and aliases. Supports //​system.run[]//​ regardless of //​EnableRemoteCommands//​ value.\\ HostMetadataItem value is retrieved on each auto-registration ​attempt and 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.|+| HostMetadata| no | 0-255 characters| | Optional 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.\\ This option is supported in version 2.2.0 and higher.| 
 +| HostMetadataItem| no | | | Optional parameter that defines a //Zabbix agent// item used for getting host metadata. This option is only used when HostMetadata is not defined.\\ Supports UserParameters and aliases. Supports //​system.run[]//​ regardless of AllowKey/DenyKey values.\\ 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.\\ This option is supported in version 2.2.0 and higher.|
 | Hostname| no | |Set by HostnameItem |Unique, case sensitive hostname.\\ Required for active checks and must match hostname as configured on the server.\\ Allowed characters: alphanumeric,​ '​.',​ ' ', '​_'​ and '​-'​.\\ Maximum length: 128| | Hostname| no | |Set by HostnameItem |Unique, case sensitive hostname.\\ Required for active checks and must match hostname as configured on the server.\\ Allowed characters: alphanumeric,​ '​.',​ ' ', '​_'​ and '​-'​.\\ Maximum length: 128|
-| HostnameItem| no | |system.hostname |Optional 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 or aliases, but does support //​system.run[]//​ regardless of //​EnableRemoteCommands//​ value.\\ This option is supported in version 1.8.6 and higher.|+| HostnameItem| no | |system.hostname |Optional 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 or aliases, but does support //​system.run[]//​ regardless of AllowKey/DenyKey values.\\ This option is supported in version 1.8.6 and higher.|
 | Include| no | | |You 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_include|special notes]] about limitations.| | Include| no | | |You 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_include|special notes]] about limitations.|
 | 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.| | 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.|
Line 26: Line 34:
 | LogFileSize| no | 0-1024 |1 |Maximum 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. | | LogFileSize| no | 0-1024 |1 |Maximum 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. |
 | LogType| no | | file |Log output type:\\ //file// - write log to file specified by LogFile parameter,​\\ //system// - write log to syslog,\\ //console// - write log to standard output.\\ This parameter is supported since Zabbix 3.0.0. | | LogType| no | | file |Log output type:\\ //file// - write log to file specified by LogFile parameter,​\\ //system// - write log to syslog,\\ //console// - write log to standard output.\\ This parameter is supported since Zabbix 3.0.0. |
-| LogRemoteCommands| no | |0 |Enable logging of executed shell commands as warnings.\\ 0 - disabled\\ 1 - enabled |+| LogRemoteCommands| no | |0 |Enable logging of executed shell commands as warnings.\\ 0 - disabled\\ 1 - enabled\\ Commands will be logged only if executed remotely. Log entries will not be created if system.run[] is launched locally by HostMetadataItem,​ HostInterfaceItem or HostnameItem parameters.  ​|
 | MaxLinesPerSecond| no | 1-1000 |20 |Maximum number of new lines the agent will send per second to Zabbix server or proxy when processing '​log'​ and '​eventlog'​ active checks.\\ The provided value will be overridden by the parameter '​maxlines',​\\ provided in '​log'​ 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. ​ | | MaxLinesPerSecond| no | 1-1000 |20 |Maximum number of new lines the agent will send per second to Zabbix server or proxy when processing '​log'​ and '​eventlog'​ active checks.\\ The provided value will be overridden by the parameter '​maxlines',​\\ provided in '​log'​ 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. ​ |
 | PidFile| no | |/​tmp/​zabbix_agentd.pid |Name of PID file. | | PidFile| no | |/​tmp/​zabbix_agentd.pid |Name of PID file. |
Line 38: Line 46:
 | TLSCAFile| no |  | |Full 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. ​ | | TLSCAFile| no |  | |Full 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. ​ |
 | TLSCertFile| no |  | |Full 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. ​ | | TLSCertFile| no |  | |Full 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. ​ |
 +| TLSCipherAll| no |  | |GnuTLS priority string or OpenSSL (TLS 1.2) cipher string. 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\\ This parameter is supported since Zabbix 4.4.7. ​ |
 +| TLSCipherAll13| no |  | |Cipher string for OpenSSL 1.1.1 or newer in TLS 1.3. Override the default ciphersuite selection criteria for certificate- and PSK-based encryption.\\ Example for GnuTLS: NONE:​+VERS-TLS1.2:​+ECDHE-RSA:​+RSA:​+ECDHE-PSK:​+PSK:​+AES-128-GCM:​+AES-128-CBC:​+AEAD:​+SHA256:​+SHA1:​+CURVE-ALL:​+COMP-NULL::​+SIGN-ALL:​+CTYPE-X.509\\ Example for OpenSSL: EECDH+aRSA+AES128:​RSA+aRSA+AES128:​kECDHEPSK+AES128:​kPSK+AES128\\ This parameter is supported since Zabbix 4.4.7. ​ |
 +| TLSCipherCert| no |  | |GnuTLS priority string or OpenSSL (TLS 1.2) cipher string. Override the default ciphersuite selection criteria for certificate-based encryption.\\ Example for GnuTLS: NONE:​+VERS-TLS1.2:​+ECDHE-RSA:​+RSA:​+AES-128-GCM:​+AES-128-CBC:​+AEAD:​+SHA256:​+SHA1:​+CURVE-ALL:​+COMP-NULL:​+SIGN-ALL:​+CTYPE-X.509\\ Example for OpenSSL: EECDH+aRSA+AES128:​RSA+aRSA+AES128\\ This parameter is supported since Zabbix 4.4.7. ​ |
 +| TLSCipherCert13| no |  | |Cipher string for OpenSSL 1.1.1 or newer in TLS 1.3. Override the default ciphersuite selection criteria for certificate-based encryption.\\ This parameter is supported since Zabbix 4.4.7. ​ |
 +| TLSCipherPSK| no |  | |GnuTLS priority string or OpenSSL (TLS 1.2) cipher string. Override the default ciphersuite selection criteria for PSK-based encryption.\\ Example for GnuTLS: NONE:​+VERS-TLS1.2:​+ECDHE-PSK:​+PSK:​+AES-128-GCM:​+AES-128-CBC:​+AEAD:​+SHA256:​+SHA1:​+CURVE-ALL:​+COMP-NULL:​+SIGN-ALL\\ Example for OpenSSL: kECDHEPSK+AES128:​kPSK+AES128\\ This parameter is supported since Zabbix 4.4.7. ​ |
 +| TLSCipherPSK13| no |  | |Cipher string for OpenSSL 1.1.1 or newer in TLS 1.3. Override the default ciphersuite selection criteria for PSK-based encryption.\\ Example: TLS_CHACHA20_POLY1305_SHA256:​TLS_AES_128_GCM_SHA256\\ This parameter is supported since Zabbix 4.4.7. ​ |
 | TLSConnect| yes, if TLS certificate or PSK parameters are defined (even for //​unencrypted//​ connection),​ otherwise no |  | |How 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. ​ | | TLSConnect| yes, if TLS certificate or PSK parameters are defined (even for //​unencrypted//​ connection),​ otherwise no |  | |How 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. ​ |
 | TLSCRLFile| no |  | |Full 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. ​ | | TLSCRLFile| no |  | |Full 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. ​ |
Line 49: Line 63:
 | 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 | | 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 |
  
-<​note>​In Zabbix agent 2.0.0 version configuration parameters related to active and passive checks have been changed.\\ See the [[#​see_also|"​See also"​]] section at the bottom of this page to read more details about these changes.</​note>​ +=== See also ===
- +
-<​note>​Zabbix supports configuration files only in UTF-8 encoding without [[https://​en.wikipedia.org/​wiki/​Byte_order_mark|BOM]].\\ \\  Comments starting with "#"​ are only supported in the beginning of the line.</​note>​ +
-==== See also ====+
   - [[http://​blog.zabbix.com/​multiple-servers-for-active-agent-sure/​858|Differences in the Zabbix agent configuration for active and passive checks starting from version 2.0.0]]   - [[http://​blog.zabbix.com/​multiple-servers-for-active-agent-sure/​858|Differences in the Zabbix agent configuration for active and passive checks starting from version 2.0.0]]