1. 程式人生 > >Zabbix Server端配置文件說明

Zabbix Server端配置文件說明

ner serve 數量 時間 啟用 是否 options 需要 ren

zabbix作為運維鄰域不可缺少的一員,它的各種文檔可是數不勝數啊,但是關於配置文件的解釋與說明就有點少。這裏列出zabbix配置文件篇之zabbix_server。

Zabbix Server端配置文件說明

# This is a configuration file for Zabbix Server process
# To get more information about Zabbix,
# visit http://www.zabbix.com
############ GENERAL PARAMETERS #################
### Option: NodeID
# Unique NodeID in distributed setup.

# 0 - standalone server
#
# Mandatory: no
# Range: 0-999
# Default:
#說明:服務端節點Id,0表示只有一臺服務端;主要用於服務端分布式部署時,視使用者設計ZABBIX系統架構調整

# NodeID=0
### Option: ListenPort
# Listen port for trapper.
#
# Mandatory: no
# Range: 1024-32767
# Default:
#說明:服務端監聽端口用於接收二級代理或直連AGENT的采集數據



# ListenPort=10051
### Option: SourceIP
# Source IP address for outgoing connections.
#
# Mandatory: no
# Default:
#說明:服務端監聽IP,建議指定

# SourceIP=
### Option: LogFile
# Name of log file.
# If not set, syslog is used.
#
# Mandatory: no
# Default:
# LogFile=
#說明:zabbix服務端日誌路徑,視具體情況指定

LogFile=/smp/sncmon/zabbix_server.log
### Option: LogFileSize
# Maximum size of log file in MB.
# 0 - disable automatic log rotation.
#
# Mandatory: no
# Range: 0-1024
# Default:
#說明:日誌達到多少M裏就輪轉;若此參數值為0時,則不輪轉,日誌將不斷變大,建議設置成輪轉

# LogFileSize=1
### Option: DebugLevel
# Specifies debug level
# 0 - no debug 無日誌
# 1 - critical information 災難日誌,日誌量較少
# 2 - error information 錯誤級別,日誌量大於CRITICAL級別
# 3 - warnings 告警級別,日誌量大於ERROR級別
# 4 - for debugging (produces lots of information)調試級別,日誌量大於WARNING
#

# Mandatory: no
# Range: 0-4
# Default:
#說明:日誌級別0~4,單位時間內生成日誌的量不斷增大

# DebugLevel=3
### Option: PidFile
# Name of PID file.
#
# Mandatory: no
# Default:
#說明:zabbix服務端程序PID路徑

# PidFile=/tmp/zabbix_server.pid
### Option: DBHost
# Database host name.
# If set to localhost, socket is used for MySQL.
# If set to empty string, socket is used for PostgreSQL.
#
# Mandatory: no
# Default:
#說明:指定數據庫信息,對於mysql,若設置為localhost則mysql用SOCKET來連接(需配合參數 DBSocket 使用),否則用IP連接;若DHHOST值為空,則默認連接PostgreSQL

# DBHost=localhost
### Option: DBName
# Database name.
# For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored.
#
# Mandatory: yes
# Default:
# DBName=
#說明:服務端連接數據庫的庫名

DBName=smp
### Option: DBSchema
# Schema name. Used for IBM DB2.
#
# Mandatory: no
# Default:
#說明:專門用於 IBM DB2數據庫的連接信息

# DBSchema=
### Option: DBUser
# Database user. Ignored for SQLite.
#
# Mandatory: no
# Default:
#說明:連接數據庫的用戶

# DBUser=
DBUser=root
### Option: DBPassword
# Database password. Ignored for SQLite.
# Comment this line if no password is used.
#
# Mandatory: no
# Default:
#說明:連接數據庫的密碼

DBPassword=123
### Option: DBSocket
# Path to MySQL socket.
#
# Mandatory: no
# Default:
#說明:指定MYSQL的SOCK連接路徑

# DBSocket=/tmp/mysql.sock
### Option: DBPort
# Database port when not using local socket. Ignored for SQLite.
#
# Mandatory: no
# Range: 1024-65535
# Default (for MySQL):
#說明:指定連接數據庫的端口

DBPort=3306
############ ADVANCED PARAMETERS ################
#高級參數
### Option: StartPollers
# Number of pre-forked instances of pollers.
#
# Mandatory: no
# Range: 0-1000
# Default:
#說明;初始化時,啟動子進程數量,數量越多,則服務端吞吐能力越強,對系統資源消耗越大
# StartPollers=5
### Option: StartIPMIPollers
# Number of pre-forked instances of IPMI pollers.
#
# Mandatory: no
# Range: 0-1000
# Default:
#
#說明:主要用於IPmi技術用於獲取硬件狀態場景。若無相關監控項,建議設置為0
# StartIPMIPollers=0
### Option: StartPollersUnreachable
# Number of pre-forked instances of pollers for unreachable hosts (including IPMI).
#
# Mandatory: no
# Range: 0-1000
# Default:
#說明:默認情況下,ZABBIX會啟用指定進程用於探測某些不可達主機的(含IPMI場景);若使用場景中含有代理端,建議保持默認;若直接agent較多,可視具體情況調整
# StartPollersUnreachable=1
### Option: StartTrappers
# Number of pre-forked instances of trappers.
# Trappers accept incoming connections from Zabbix sender, active agents, active proxies and child nodes.
# At least one trapper process must be running to display server availability in the frontend.
#
# Mandatory: no
# Range: 0-1000
# Default:
說明:用於設置諸如SNMP STRAPPER場景提交來的數據的接收進程數,若客戶機SNMP TRAPPER技術較多,建議加大此參數值
# StartTrappers=5
### Option: StartPingers
# Number of pre-forked instances of ICMP pingers.
#
# Mandatory: no
# Range: 0-1000
# Default:
#說明:用於設置啟用icmp協議PING主機方式啟動線程數量,若單臺代理所管理機器超過500臺,建議加大此數值
# StartPingers=1
### Option: StartDiscoverers
# Number of pre-forked instances of discoverers.
#
# Mandatory: no
# Range: 0-250
# Default:
說明:用於設置自動發現主機的線程數量,若單臺代理所管理機器超過500臺,可以考慮加大此數值(僅適用於直接AGENT場景)
# StartDiscoverers=1
### Option: StartHTTPPollers
# Number of pre-forked instances of HTTP pollers.
#
# Mandatory: no
# Range: 0-1000
# Default:
#說明:用於設置WEB撥測監控線程數,可視具體情況增加或減少此數值。
# StartHTTPPollers=1
### Option: StartTimers
# Number of pre-forked instances of timers.
# Timers process time-based trigger functions and maintenance periods.
# Only the first timer process handles the maintenance periods.
#
# Mandatory: no
# Range: 1-1000
# Default:
#說明:各實例計時器數量,主要用於觸發器,標有維護標識的主機,但只第一個計時器用於計算維護標識主機。
# StartTimers=1
### Option: JavaGateway
# IP address (or hostname) of Zabbix Java gateway.
# Only required if Java pollers are started.
#
# Mandatory: no
# Default:
#說明:JAVAGATEWAY 場景下使用
# JavaGateway=
### Option: JavaGatewayPort
# Port that Zabbix Java gateway listens on.
#
# Mandatory: no
# Range: 1024-32767
# Default:
#說明:JAVAGATEWAY 場景下使用
# JavaGatewayPort=10052
### Option: StartJavaPollers
# Number of pre-forked instances of Java pollers.
#
# Mandatory: no
# Range: 0-1000
# Default:
#說明:JAVAGATEWAY 場景下使用
# StartJavaPollers=0
### Option: StartVMwareCollectors
# Number of pre-forked vmware collector instances.
#
# Mandatory: no
# Range: 0-250
# Default:
#說明:用於設置監控VMWARE Esxi主機實例時使用,若為0則不啟用,若要監控ESXI主機,此值最少為1 ;視監控ESXI數量設置對應數值
# StartVMwareCollectors=0
### Option: VMwareFrequency
# How often Zabbix will connect to VMware service to obtain a new data.
#
# Mandatory: no
# Range: 10-86400
# Default:
#說明:代理端訪問 VMWARE service的頻率,單位:秒
# VMwareFrequency=60
### Option: VMwareCacheSize
# Size of VMware cache, in bytes.
# Shared memory size for storing VMware data.
# Only used if VMware collectors are started.
#
# Mandatory: no
# Range: 256K-2G
# Default:
#說明:劃出多少共享內存用於存儲VMWARE數據
# VMwareCacheSize=8M
### Option: SNMPTrapperFile
# Temporary file used for passing data from SNMP trap daemon to the server.
# Must be the same as in zabbix_trap_receiver.pl or SNMPTT configuration file.
#
# Mandatory: no
# Default:
#說明:指定SNMP TRAPPER 時的臨時文件,用於代理端啟用SNMP TRAPPER功能時使用
# SNMPTrapperFile=/tmp/zabbix_traps.tmp
### Option: StartSNMPTrapper
# If 1, SNMP trapper process is started.
#
# Mandatory: no
# Range: 0-1
# Default:
#說明:是否啟用 snmptrapper功能 ,默認不啟用=0,啟用=1(配合參數SNMPTrapperFile使用)
# StartSNMPTrapper=0
### Option: ListenIP
# List of comma delimited IP addresses that the trapper should listen on.
# Trapper will listen on all network interfaces if this parameter is missing.
#
# Mandatory: no
# Default:
說明:啟用SNMPTRAPPER裏 ,接收端監聽的IP,此參數與StartSNMPTrapper,SNMPTrapperFile 聯合使用
# ListenIP=0.0.0.0
# ListenIP=127.0.0.1
### Option: HousekeepingFrequency
# How often Zabbix will perform housekeeping procedure (in hours).
# Housekeeping is removing unnecessary information from history, alert, and alarms tables.
#
# Mandatory: no
# Range: 1-24
# Default:
#說明:多少小時清理一次代理端數據庫的 history, alert, and alarms,以保持代理端數據庫輕便,建議保持默認
# HousekeepingFrequency=1
### Option: MaxHousekeeperDelete
# The table "housekeeper" contains "tasks" for housekeeping procedure in the format:
# [housekeeperid], [tablename], [field], [value].
# No more than ‘MaxHousekeeperDelete‘ rows (corresponding to [tablename], [field], [value])
# will be deleted per one task in one housekeeping cycle.
# SQLite3 does not use this parameter, deletes all corresponding rows without a limit.
# If set to 0 then no limit is used at all. In this case you must know what you are doing!
#
# Mandatory: no
# Range: 0-1000000
# Default:
# MaxHousekeeperDelete=500
### Option: SenderFrequency
# How often Zabbix will try to send unsent alerts (in seconds).
#
# Mandatory: no
# Range: 5-3600
# Default:
#說明:多少秒後重試發送失敗的報警信息
# SenderFrequency=30
### Option: CacheSize
# Size of configuration cache, in bytes.
# Shared memory size for storing host, item and trigger data.
#
# Mandatory: no
# Range: 128K-2G
# Default:
#說明;zabbix初始化時占用多少系統共享內存用於存儲配置信息,HOST,ITEM,TRIGGER數據,視監控主機數量和監控項調整,建議調整到32M或者更大
# CacheSize=8M
### Option: CacheUpdateFrequency
# How often Zabbix will perform update of configuration cache, in seconds.
#
# Mandatory: no
# Range: 1-3600
# Default:
#說明:zabbix更新操作系統CACHE頻率,若管理頁面操作不頻繁,可以考慮加大參數值
# CacheUpdateFrequency=60
### Option: StartDBSyncers
# Number of pre-forked instances of DB Syncers
#
# Mandatory: no
# Range: 1-100
# Default:
#說明:將采集數據從CACHE同步到數據庫線程數量,視數據庫服務器I/O繁忙情況,和數據庫寫能力調整。數值越大,寫能力越強。對數據庫服務器I/O壓力越大。
# StartDBSyncers=4
### Option: HistoryCacheSize
# Size of history cache, in bytes.
# Shared memory size for storing history data.
#
# Mandatory: no
# Range: 128K-2G
# Default:
#說明:用於設置劃分多少系統共享內存用於存儲采集的歷史數據,此數值越大,數據庫讀壓力越小
# HistoryCacheSize=8M
### Option: TrendCacheSize
# Size of trend cache, in bytes.
# Shared memory size for storing trends data.
#
# Mandatory: no
# Range: 128K-2G
# Default:
#說明:用於設置劃分多少系統共享內存用於存儲計算出來的趨勢數據,此參數值從一定程度上可影響數據庫讀壓力
# TrendCacheSize=4M
### Option: HistoryTextCacheSize
# Size of text history cache, in bytes.
# Shared memory size for storing character, text or log history data.
#
# Mandatory: no
# Range: 128K-2G
# Default:
#說明:指定劃出多少系統共享內存用於存儲 character, text or log history數據,若二級代理內存足夠,建議可適當擴大此數值,可很大程度上解決系統I/O壓力,和數據庫讀壓力
# HistoryTextCacheSize=16M
### Option: ValueCacheSize
# Size of history value cache, in bytes.
# Shared memory size for caching item history data requests
# Setting to 0 disables value cache.
#
# Mandatory: no
# Range: 0,128K-64G
# Default:
#說明:劃出系統多少共享內存用於已請求的存儲監控項信息,若監控項較多,建議加大此數值
# ValueCacheSize=8M
### Option: NodeNoEvents
# If set to ‘1‘ local events won‘t be sent to master node.
# This won‘t impact ability of this node to propagate events from its child nodes.
#
# Mandatory: no
# Range: 0-1
# Default:
#說明:若節點為子結點,是否允許本地事件(events表)發送到主節點,1為不發送,但不影響此節點以下的節點的傳播能力,視ZABBIX分布式系統架構設計開啟或關閉。在不明架構前提下,建議保持默認
# NodeNoEvents=0
### Option: NodeNoHistory
# If set to ‘1‘ local history won‘t be sent to master node.
# This won‘t impact ability of this node to propagate history from its child nodes.
#
# Mandatory: no
# Range: 0-1
# Default:
說明:若節點為子結點,是否允許本地歷史數據發送到主節點,1為不發送,但不影響此節點以下的節點的傳播能力,視ZABBIX分布式系統架構設計開啟或關閉,在不明架構前提下,建議保持默認
# NodeNoHistory=0
### Option: Timeout
# Specifies how long we wait for agent, SNMP device or external check (in seconds).
#
# Mandatory: no
# Range: 1-30
# Default:
#說明:與AGNET\SNMP設備和其它外部設備通信超時設置,單位為秒;若采集數據不完整或網絡繁忙,或從管理頁面發現客戶端狀態變化頻繁,可以考慮加大此數值。註意若此數值加大,應該考慮參數 StartPollers 是否有相應加大的必要。
# Timeout=3
### Option: TrapperTimeout
# Specifies how many seconds trapper may spend processing new data.
#
# Mandatory: no
# Range: 1-300
# Default:
#說明:啟用 trapper功能,用於進程等待超時設置。根據需要調整
# TrapperTimeout=300
### Option: UnreachablePeriod
# After how many seconds of unreachability treat a host as unavailable.
#
# Mandatory: no
# Range: 1-3600
# Default:
#說明:當AGNET端處於不可用狀態下,間隔多少秒後,嘗試重新連接。建議根據具體情況設置。註意,若此數值過小,右agent端業務系統繁忙時,有可能造成報警信息誤報
# UnreachablePeriod=45
### Option: UnavailableDelay
# How often host is checked for availability during the unavailability period, in seconds.
#
# Mandatory: no
# Range: 1-3600
# Default:
#說明:當AGENT端處於可用狀態下,間隔多少秒後,進行狀態檢查。若出現可正常采集數據,但管理頁面AGENT狀態不正常;若在網絡,端口等均通暢情況下,AGENT狀態仍不正常,可以考慮加大此數值
# UnavailableDelay=60
### Option: UnreachableDelay
# How often host is checked for availability during the unreachability period, in seconds.
#
# Mandatory: no
# Range: 1-3600
# Default:
#說明:當agent端處於不可達狀態下,延遲多少秒後,進行重新嘗試,建議保持默認,在AGENT接入調試階段,可考慮減少此數值
# UnreachableDelay=15
### Option: AlertScriptsPath
# Full path to location of custom alert scripts.
# Default depends on compilation options.
#
# Mandatory: no
# Default:
#說明:監控報警腳本路徑,非研發人員不建議修改此參數值
# AlertScriptsPath=${datadir}/zabbix/alertscripts
### Option: ExternalScripts
# Full path to location of external scripts.
# Default depends on compilation options.
#
# Mandatory: no
# Default:
#說明:自定義腳本存儲路徑,非研發人員不建議修改此參數值
# ExternalScripts=${datadir}/zabbix/externalscripts
### Option: FpingLocation
# Location of fping.
# Make sure that fping binary has root ownership and SUID flag set.
#
# Mandatory: no
# Default:
#說明:IPv4 FPING命令路徑,僅ROOT可用。註意使用此命令時,應該確認此命令是否存在
# FpingLocation=/usr/sbin/fping
### Option: Fping6Location
# Location of fping6.
# Make sure that fping6 binary has root ownership and SUID flag set.
# Make empty if your fping utility is capable to process IPv6 addresses.
#
# Mandatory: no
# Default:
#說明:IPv6 FPING命令路徑,僅ROOT可用。註意使用此命令時,應該確認此命令是否存在
# Fping6Location=/usr/sbin/fping6
### Option: SSHKeyLocation
# Location of public and private keys for SSH checks and actions.
#
# Mandatory: no
# Default:
#說明:在服務端需要SSH到AGENT端且采用用KEY驗證方式時使用。非研發人員,不建議修改或設置
# SSHKeyLocation=
### Option: LogSlowQueries
# How long a database query may take before being logged (in milliseconds).
# Only works if DebugLevel set to 3 or 4.
# 0 - don‘t log slow queries.
#
# Mandatory: no
# Range: 1-3600000
# Default:
#說明:用於服務端數據庫慢查詢功能,單位是毫秒;1毫秒=0.001秒,若有服務端數據庫監控慢查詢的需求,可以視具體情況調整此數。
# LogSlowQueries=0
### Option: TmpDir
# Temporary directory.
#
# Mandatory: no
# Default:
#說明:zabbix服務端工作的臨時目錄
# TmpDir=/tmp
### Option: StartProxyPollers
# Number of pre-forked instances of pollers for passive proxies.
#
# Mandatory: no
# Range: 0-250
# Default:
#說明:啟用多少子進程與代理端通信,若代理端較多可考慮加大此數值
# StartProxyPollers=1
### Option: ProxyConfigFrequency
# How often Zabbix Server sends configuration data to a Zabbix Proxy in seconds.
# This parameter is used only for proxies in the passive mode.
#
# Mandatory: no
# Range: 1-3600*24*7
# Default:
#說明:zabbix服務端將配置文件數據同步到代理端的頻率,僅適用於代理端為被動模式情況 下
# ProxyConfigFrequency=3600
### Option: ProxyDataFrequency
# How often Zabbix Server requests history data from a Zabbix Proxy in seconds.
# This parameter is used only for proxies in the passive mode.
#
# Mandatory: no
# Range: 1-3600
# Default:
說明:zabbix服務端請求代理端采集的數據的頻率,僅適用代理端為被動模式情況下
# ProxyDataFrequency=1
### Option: AllowRoot
# Allow the server to run as ‘root‘. If disabled and the server is started by ‘root‘, the server
# will try to switch to user ‘zabbix‘ instead. Has no effect if started under a regular user.
# 0 - do not allow 不允許
# 1 - allow 允許
#
# Mandatory: no
# Default:
#說明:是否允許以root身份運行服務端
# AllowRoot=0
### Option: Include
# You may include individual files or all files in a directory in the configuration file.
# InstallingZabbix will create include directory in /usr/local/etc, unless modified during the compile time.
#
# Mandatory: no
# Default:
#說明:在一些情況下,軟件的參數配置文件很長,為了方便管理,將配置文件切割成N個配置文件,但為了主配置參數文件的簡潔,便會啟用INCLUDE參數,以方便程序讀取指定目錄下的所有配置文件
# Include=
# Include=/usr/local/etc/zabbix_server.general.conf
# Include=/usr/local/etc/zabbix_server.conf.d/
####### LOADABLE MODULES #######
### Option: LoadModulePath
# Full path to location of server modules.
# Default depends on compilation options.
#
# Mandatory: no
# Default:
#指定本地模塊路徑,非研發人員不建議修改
# LoadModulePath=${libdir}/modules
### Option: LoadModule
# Module to load at server startup. Modules are used to extend functionality of the server.
# Format: LoadModule=<module.so>
# The modules must be located in directory specified by LoadModulePath.
# It is allowed to include multiple LoadModule parameters.
#
# Mandatory: no
# Default:
#指定本地模塊路徑,非研發人員不建議修改
# LoadModule=

Zabbix Server端配置文件說明