(76)zabbix_agentd.conf配置文件详解
Posted liliyang
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了(76)zabbix_agentd.conf配置文件详解相关的知识,希望对你有一定的参考价值。
############ GENERAL PARAMETERS #################
### Option: PidFile
# Name of PID file.
# Agent PID文件全路径
# Mandatory: no
# Default:
# PidFile=/tmp/zabbix_agentd.pid
### Option: LogType
# Specifies where log messages are written to:
# system - syslog
# file - file specified with LogFile parameter
# console - standard output
# 指定日志信息记录到哪里
# system 传送给syslog服务
# file 记录到LogFile指定的文件中
# console 输入出到标准输出
# Mandatory: no
# Default:
# LogType=file
### Option: LogFile
# Log file name for LogType ‘file‘ parameter.
# 如果LogType类型为file,这里指定日志文件的全路径
# Mandatory: no
# Default:
# LogFile=
LogFile=/tmp/zabbix_agentd.log
### Option: LogFileSize
# Maximum size of log file in MB.
# 0 - disable automatic log rotation.
# 单个日志文件的最大大小默认是M,当达到指定大小时,轮替
# 0 禁用自动日至轮替
# Mandatory: no
# Range: 0-1024
# Default:
# LogFileSize=1
### Option: DebugLevel
# 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)
# 指定调试等级:
0 - Zabxxi进程起停的基本信息
1 - 重要信息
2 - 错误信息
3 - 警告信息
4 - 调试 (产生大量信息)
5 - 扩展调试 (产生更多信息)
# Mandatory: no
# Range: 0-5
# Default:
# DebugLevel=3
### Option: SourceIP
# Source IP address for outgoing connections.
# 对外发起网络连接时使用的IP(zabbi_sender)
# Mandatory: no
# Default:
# SourceIP=
### Option: EnableRemoteCommands
# Whether remote commands from Zabbix server are allowed.
# 0 - not allowed
# 1 - allowed
# 是否允许来自远程zabbix Server端的指令的执行
0 禁止
1 允许
# Mandatory: no
# Default:
# EnableRemoteCommands=0
### Option: LogRemoteCommands
# Enable logging of executed shell commands as warnings.
# 0 - disabled
# 1 - enabled
# 记录远程指令的执行,作为warning级别的日志
# Mandatory: no
# Default:
# LogRemoteCommands=0
##### Passive checks related(被动checks相关)
### Option: Server
# List of comma delimited IP addresses, optionally in CIDR notation, or hostnames of Zabbix servers and Zabbix proxies.
# 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.
# Example: Server=127.0.0.1,192.168.1.0/24,::1,2001:db8::/32,zabbix.domain
# Zabbix Server或Zabbix proxies的主机名,可以是逗号分隔的IP地址列表(可选择CIDR表示法)。 进入的连接只能从此处列出的主机接受。
#如果启用IPv6支持,则‘127.0.0.1‘,‘:: 127.0.0.1‘,‘:: ffff:127.0.0.1‘将被同等对待,‘:: / 0‘将允许任何IPv4或IPv6地址
# ‘0.0.0.0/0‘允许所有IPv4地址
示例:Server=127.0.0.1,192.168.1.0/24,::1,2001:db8::/32,zabbix.domain
# Mandatory: no
# Default:
# Server=
Server=127.0.0.1
### Option: ListenPort
# Agent will listen on this port for connections from the server.
#agent 将在此端口上侦听来自服务器的连接。
# Mandatory: no
# Range: 1024-32767
# Default:
# ListenPort=10050
### Option: ListenIP
# List of comma delimited IP addresses that the agent should listen on.
# First IP address is sent to Zabbix server if connecting to it to retrieve list of active checks.
#agent侦听的IP地址列表,若有多个用逗号分隔。 如果连接到Zabbix服务器,首先会将IP地址发送到Zabbix Server以检索活动检查列表。
# Mandatory: no
# Default:
# ListenIP=0.0.0.0
### Option: StartAgents
# 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.
# 处理被动check的zabbix_agentd的预启动实例的数量。 如果设置为0,则禁用被动check,并且agent将不侦听任何TCP端口。
# Mandatory: no
# Range: 0-100
# Default:
# StartAgents=3
##### Active checks related(主动chcek相关)
### Option: ServerActive
# List of comma delimited IP:port (or hostname:port) pairs of Zabbix servers and Zabbix proxies for active checks.
# 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.
# Example: ServerActive=127.0.0.1:20051,zabbix.domain,[::1]:30051,::1,[12fc::1]
# 以逗号分隔的IP:Port(或主机名:端口)对Zabbix服务器和Zabbix代理进行主动检查。
# 如果未指定端口,则使用默认端口。
# 如果指定了该主机的端口,则IPv6地址必须用方括号括起来。
# 如果未指定端口,则IPv6地址的方括号是可选的。
# 如果未指定此参数,则禁用主动检查。
# 示例:ServerActive=127.0.0.1:20051,zabbix.domain,[::1]:30051,::1,[12fc::1]
# Mandatory: no
# Default:
# ServerActive=
ServerActive=127.0.0.1
### Option: Hostname
# Unique, case sensitive hostname.
# Required for active checks and must match hostname as configured on the server.
# Value is acquired from HostnameItem if undefined.
# 唯一的,区分大小写的主机名。
# 主动检查必需设置,并且必须与服务器上添加的主机名一致,也就是说在Zabbix Server上添加主机时,主机名必须使用这里指定的。
# 如果未定义,则从HostnameItem获取值。
# Mandatory: no
# Default:
# Hostname=
Hostname=Zabbix server
### Option: HostnameItem
# Item used for generating Hostname if it is undefined. Ignored if Hostname is defined.
# Does not support UserParameters or aliases.
# 用于生成主机名的item(如果未定义)。如果定义了主机名,则忽略。
# 不支持UserParameters或alias(别名)。
# Mandatory: no
# Default:
# HostnameItem=system.hostname
### Option: HostMetadata
# Optional parameter that defines host metadata.
# Host metadata is used at host auto-registration process.
# An agent will issue an error and not start if the value is over limit of 255 characters.
# If not defined, value will be acquired from HostMetadataItem.
# 定义主机元数据的可选参数。主机元数据用于主机自动注册过程。
# 如果该值超过255个字符的限制,agent将发出错误并且不会启动。
# 如果未定义,则将从HostMetadataItem获取值。
# Mandatory: no
# Range: 0-255 characters
# Default:
# HostMetadata=
### Option: HostMetadataItem
# Optional parameter that defines an item used for getting host metadata.
# Host metadata 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 HostMetadata is not defined.
# 可选参数,用于定义用于获取主机元数据的项目。主机元数据用于主机自动注册过程。
# 在自动注册请求期间,如果指定项目返回的值超过了255个字符的限制,agent将记录警告消息。
# 此选项仅在未定义HostMetadata时使用
# Mandatory: no
# Default:
# HostMetadataItem=
### Option: RefreshActiveChecks
# How often list of active checks is refreshed, in seconds.
# 刷新主动检查列表的频率,以秒为单位。
# Mandatory: no
# Range: 60-3600
# Default:
# RefreshActiveChecks=120
### Option: BufferSend
# Do not keep data longer than N seconds in buffer.
# 不在缓冲区中保持数据超过N秒
# Mandatory: no
# Range: 1-3600
# Default:
# BufferSend=5
### Option: BufferSize
# 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.
# 内存缓冲区中的最大值。如果缓冲区已满,agent将把所有收集的数据发送到Zabbix Server或Proxy服务器。
# Mandatory: no
# Range: 2-65535
# Default:
# BufferSize=100
### Option: MaxLinesPerSecond
# Maximum number of new lines the agent will send per second to Zabbix Server
# or Proxy processing ‘log‘ and ‘logrt‘ active checks.
# The provided value will be overridden by the parameter ‘maxlines‘,
# provided in ‘log‘ or ‘logrt‘ item keys.
# 主动检查模式中,agent每秒发送到Zabbix Server或Proxy进程的“log”和“logrt”的最大新行数。
# 提供的值将被‘log‘或‘logrt‘项目key中提供的参数‘maxlines‘覆盖。
# Mandatory: no
# Range: 1-1000
# Default:
# MaxLinesPerSecond=20
############ ADVANCED PARAMETERS(进阶参数) #################
### Option: Alias
# 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.
# 为ITEM的key设置别名。它可以用来替代长而复杂的item key,使用更小更简单的item key。
# 可存在多个别名参数。不允许使用相同Alias键的多个参数
# 不同的别名键可以引用相同的item key
# 例如,检索用户‘zabbix‘的ID:
# Alias=zabbix.userid:vfs.file.regexp[/etc/passwd,^zabbix:.:([0-9]+),,,,\1]
# 现在速记键zabbix.userid可用于检索数据。
# 别名可以在HostMetadataItem中使用,但不能在HostnameItem参数中使用。
# Mandatory: no
# Range:
# Default:
### Option: Timeout
# Spend no more than Timeout seconds on processing
# 处理时间不超过规定的时间
# Mandatory: no
# Range: 1-30
# Default:
# Timeout=3
### Option: AllowRoot
# Allow the agent to run as ‘root‘. If disabled and the agent is started by ‘root‘, the agent
# will try to switch to the user specified by the User configuration option instead.
# Has no effect if started under a regular user.
# 0 - do not allow
# 1 - allow
# 允许代理以“root”身份运行。如果禁用并且agent以“root”启动,则agent将尝试切换到User配置选项指定的用户。
# 如果在普通用户下启动,则不起作用。
# 0 禁止
# 1 允许
# Mandatory: no
# Default:
# AllowRoot=0
### Option: User
# Drop privileges to a specific, existing user on the system.
# Only has effect if run as ‘root‘ and AllowRoot is disabled.
# 将权限下放到系统上特定的现有用户。
# 只有以‘root‘身份运行并且AllowRoot被禁用时才有效。
# Mandatory: no
# Default:
# User=zabbix
### Option: Include
# You may include individual files or all files in a directory in the configuration file.
# Installing Zabbix will create include directory in /usr/local/etc, unless modified during the compile time.
# 您可以将单个文件或所有文件包含在配置文件的目录中。
# 安装Zabbix将在/usr/local etc中创建include目录,除非在编译期间进行修改。
# Mandatory: no
# Default:
# Include=
# Include=/usr/local/etc/zabbix_agentd.userparams.conf
# Include=/usr/local/etc/zabbix_agentd.conf.d/
# Include=/usr/local/etc/zabbix_agentd.conf.d/*.conf
####### USER-DEFINED MONITORED PARAMETERS(用户自定义的监控参数) #######
### Option: 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.
# 0 - do not allow
# 1 - allow
# 允许将所有字符以参数的形式传递给用户定义参数。
# 以下字符不允许使用: \ ‘ " ` * ? [ ] { } ~ $ ! & ; ( ) < > | # @
# 此外,不允许换行符。
# 0 禁止
# 1 允许
# Mandatory: no
# Range: 0-1
# Default:
# UnsafeUserParameters=0
### Option: UserParameter
# User-defined parameter to monitor. There can be several user-defined parameters.
# Format: UserParameter=<key>,<shell command>
# See ‘zabbix_agentd‘ directory for examples.
# 用户定义的参数进行监控。可以有多个用户定义的参数。
# 格式:UserParameter=<key>,<shell commnad>
# 请参阅“zabbix_agentd”目录中的示例。
# Mandatory: no
# Default:
# UserParameter=
####### LOADABLE MODULES(可加载的模块) #######
### Option: LoadModulePath
# Full path to location of agent modules.
# Default depends on compilation options.
# agent模块位置的完整路径,默认取决于编译选项。
# Mandatory: no
# Default:
# LoadModulePath=${libdir}/modules
### Option: LoadModule
# 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.
# 在agent启动时加载模块。模块用于扩展agetn的功能。
# 格式:LoadModule=<module.so>
# 模块必须位于LoadModulePath指定的目录中。允许包含多个LoadModule参数。
# Mandatory: no
# Default:
# LoadModule=
####### TLS-RELATED PARAMETERS(TLS相关参数) #######
### Option: TLSConnect
# How the agent should connect to server or proxy. Used for active checks.
# Only one value can be specified:
# unencrypted - connect without encryption
# psk - connect using TLS and a pre-shared key
# cert - connect using TLS and a certificate
# agent如何连接到Server或Proxy。用于主动检查,只能指定一个值:
# unencrypted - 连接时不加密
# psk - 使用TLS和预共享密钥连接
# cert - 使用TLS和证书连接
# Mandatory: yes, if TLS certificate or PSK parameters are defined (even for ‘unencrypted‘ connection)
# Default:
# TLSConnect=unencrypted
### Option: TLSAccept
# What incoming connections to accept.
# Multiple values can be specified, separated by comma:
# unencrypted - accept connections without encryption
# psk - accept connections secured with TLS and a pre-shared key
# cert - accept connections secured with TLS and a certificate
# 接受什么传入连接。可以指定多个值,用逗号分隔:
# unencrypted - 接受未加密的连接
# psk - 接受使用TLS和预共享的密钥加密连接
# cert - 接受TLS和证书加密的连接
# Mandatory: yes, if TLS certificate or PSK parameters are defined (even for ‘unencrypted‘ connection)
# Default:
# TLSAccept=unencrypted
### Option: TLSCAFile
# Full pathname of a file containing the top-level CA(s) certificates for
# peer certificate verification.
# 包含对等证书验证的顶级CA(s)证书的文件的完整路径名。
# Mandatory: no
# Default:
# TLSCAFile=
### Option: TLSCRLFile
# Full pathname of a file containing revoked certificates.
# 包含吊销证书的文件的完整路径名。
# Mandatory: no
# Default:
# TLSCRLFile=
### Option: TLSServerCertIssuer
# Allowed server certificate issuer.
# 允许的服务器证书颁发者。
# Mandatory: no
# Default:
# TLSServerCertIssuer=
### Option: TLSServerCertSubject
# Allowed server certificate subject.
# 允许服务器证书主题。
# Mandatory: no
# Default:
# TLSServerCertSubject=
### Option: TLSCertFile
# Full pathname of a file containing the agent certificate or certificate chain.
# 包含agent证书或证书链的文件的完整路径名。
# Mandatory: no
# Default:
# TLSCertFile=
### Option: TLSKeyFile
# Full pathname of a file containing the agent private key.
# 包含agent程序私钥的文件的完整路径名。
# Mandatory: no
# Default:
# TLSKeyFile=
### Option: TLSPSKIdentity
# Unique, case sensitive string used to identify the pre-shared key.
# 唯一的,区分大小写的字符串,用于标识预共享密钥。
# Mandatory: no
# Default:
# TLSPSKIdentity=
### Option: TLSPSKFile
# Full pathname of a file containing the pre-shared key.
# 包含预共享密钥的文件的完整路径名。
# Mandatory: no
# Default:
# TLSPSKFile=
以上是关于(76)zabbix_agentd.conf配置文件详解的主要内容,如果未能解决你的问题,请参考以下文章
zabbix进程组成结构与zabbix_agentd.conf配置文件参数详解