Zabbix Documentation 2.2

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

manual:appendix:config:zabbix_agentd [2019/09/03 07:45]
manual:appendix:config:zabbix_agentd [2019/04/03 12:08] (current)
martins-v ServerActive - spaces are allowed since 2.2
Line 1: Line 1:
 +==== - #3 Zabbix agent (UNIX) ====
  
 +The parameters supported in a Zabbix agent configuration file (//​zabbix_agentd.conf//​):​
 +
 +^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 not allowed.\\ Different //Alias// keys may reference the same item key.\\ For example, to retrieve 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.\\ Aliases can be used in //​HostMetadataItem//​ but not in //​HostnameItem//​ parameters. |
 +| 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. |
 +| 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) |
 +| EnableRemoteCommands| no | |0 |Whether remote commands from Zabbix server are allowed.\\ 0 - not allowed\\ 1 - allowed |
 +| 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.|
 +| 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.|
 +| 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: 64|
 +| 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.|
 +| Include| no | | |You may include individual files or all files in a directory in the configuration file. 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.|
 +| ListenPort| no | 1024-32767 |10050 |Agent will listen on this port for connections from the server. |
 +| LoadModule| no |  |  |Module to load at agent startup. Modules are used to extend functionality of the agent.\\ Format: LoadModule=<​module.so>​\\ The modules must be located in directory specified by LoadModulePath.\\ It is allowed to include multiple LoadModule parameters. ​ |
 +| LoadModulePath| no |  |  |Full path to location of agent modules.\\ Default depends on compilation options. ​ |
 +| LogFile| no | | |Name of log file.\\ If not set, syslog is used. |
 +| 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. |
 +| 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 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 4 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. |
 +| RefreshActiveChecks| no | 60-3600 |120 |How 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. |
 +| Server| no | | |List of comma delimited IP addresses (or hostnames) of Zabbix servers and Zabbix proxies. Spaces are allowed since Zabbix 2.2.\\ 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. |
 +| ServerActive| no | | |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 since Zabbix 2.2.\\ 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. |
 +| SourceIP| no | | |Source IP address for outgoing connections. |
 +| StartAgents| no | 0-100 |3 |Number 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. |
 +| 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 |
 +
 +<​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>​
 +
 +<​note>​Zabbix supports configuration files only in UTF-8 encoding without [[https://​en.wikipedia.org/​wiki/​Byte_order_mark|BOM]].</​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]]