1. 程式人生 > >zabbix_server的配置文件講解

zabbix_server的配置文件講解

zabbix

# This is a configuration file for Zabbix server daemon # To get more information about Zabbix, visit http://www.zabbix.com ############ GENERAL PARAMETERS ################# ### 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: LogType # Specifies where log messages are written to: # system - syslog # file - file specified with LogFile parameter # console - standard output # # Mandatory: no # Default: # LogType=file ### Option: LogFile # Log file name for LogType ‘file‘ parameter. # # Mandatory: no # Default: # LogFile= #說明:zabbix服務端日誌路徑,視具體情況指定 LogFile=/tmp/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=50 ### Option: DebugLevel # Specifies debug level: # 0 - basic information about starting and stopping of Zabbix processes # 1 - critical information 災難日誌,日誌量較少 # 2 - error information 錯誤級別,日誌量大於CRITICAL級別 # 3 - warnings 告警級別,日誌量大於ERROR級別 # 4 - for debugging (produces lots of information)調試級別,日誌量大於WARNING # 5 - extended debugging (produces even more information) # # Mandatory: no # Range: 0-5 # 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 DBHost= ### Option: DBName # Database name. # For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored. # # Mandatory: yes # Default: # DBName= #說明:服務端連接數據庫的庫名 DBName= ### Option: DBSchema # Schema name. Used for IBM DB2 and PostgreSQL. # # Mandatory: no # Default: #說明:專門用於 IBM DB2數據庫的連接信息 # DBSchema= ### Option: DBUser # Database user. Ignored for SQLite. # # Mandatory: no # Default: #說明:連接數據庫的用戶 # DBUser= DBUser= ### Option: DBPassword # Database password. Ignored for SQLite. # Comment this line if no password is used. # # Mandatory: no # Default: #說明:連接數據庫的密碼 DBPassword= ### 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): #說明:指定連接數據庫的端口,默認3306 DBPort=3306 ############ ADVANCED PARAMETERS ################ #高級參數 ### Option: StartPollers # Number of pre-forked instances of pollers. # # Mandatory: no # Range: 0-1000 # Default: #說明;初始化時,啟動子進程數量,數量越多,則服務端吞吐能力越強,對系統資源消耗越大 StartPollers=300 ### 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 and Java). # At least one poller for unreachable hosts must be running if regular, IPMI or Java pollers # are started. # # Mandatory: no # Range: 0-1000 # Default: #說明:默認情況下,ZABBIX會啟用指定進程用於探測某些不可達主機的(含IPMI場景);若使用場景中含有代理端,建議保持默認;若直接agent較多,可視具體情況調整 StartPollersUnreachable=50 ### Option: StartTrappers # Number of pre-forked instances of trappers. # Trappers accept incoming connections from Zabbix sender, active agents and active proxies. # At least one trapper process must be running to display server availability and view queue # in the frontend. # # Mandatory: no # Range: 0-1000 # Default: #說明:用於設置諸如SNMP STRAPPER場景提交來的數據的接收進程數,若客戶機SNMP TRAPPER技術較多,建議加大此參數值 StartTrappers=50 ### Option: StartPingers # Number of pre-forked instances of ICMP pingers. # # Mandatory: no # Range: 0-1000 # Default: #說明:用於設置啟用icmp協議PING主機方式啟動線程數量,若單臺代理所管理機器超過500臺,建議加大此數值 # StartPingers=10 ### Option: StartDiscoverers # Number of pre-forked instances of discoverers. # # Mandatory: no # Range: 0-250 # Default: #說明:用於設置自動發現主機的線程數量,若單臺代理所管理機器超過500臺,可以考慮加大此數值(僅適用於直接AGENT場景) StartDiscoverers=15 ### 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: StartEscalators # Number of pre-forked instances of escalators. # # Mandatory: no # Range: 0-100 # Default: #說明:用於處理動作中的步驟的進程,zabbix動作較多時建議調大。 StartEscalators=30 ### Option: JavaGateway # IP address (or hostname) of Zabbix Java gateway. # Only required if Java pollers are started. # # Mandatory: no # Default: #說明:JAVAGATEWAY 場景下使用 JavaGateway=10.238.0.180 ### 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=30 ### 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: VMwarePerfFrequency # How often Zabbix will connect to VMware service to obtain performance data. # # Mandatory: no # Range: 10-86400 # Default: # VMwarePerfFrequency=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=256M ### Option: VMwareTimeout # Specifies how many seconds vmware collector waits for response from VMware service. # # Mandatory: no # Range: 1-300 # Default: #說明:等待VMWare返回數據的最長時間 VMwareTimeout=10 ### 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=10.238.0.180 ### Option: HousekeepingFrequency # How often Zabbix will perform housekeeping procedure (in hours). # Housekeeping is removing outdated information from the database. # To prevent Housekeeper from being overloaded, no more than 4 times HousekeepingFrequency # hours of outdated information are deleted in one housekeeping cycle, for each item. # To lower load on server startup housekeeping is postponed for 30 minutes after server start. # With HousekeepingFrequency=0 the housekeeper can be only executed using the runtime control option. # In this case the period of outdated information deleted in one housekeeping cycle is 4 times the # period since the last housekeeping cycle, but not less than 4 hours and not greater than 4 days. # # Mandatory: no # Range: 0-24 # Default: #說明:多少小時清理一次代理端數據庫的 history, alert, and alarms,以保持代理端數據庫輕便,建議保持默認 HousekeepingFrequency=24 ### 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: #說明:每個HouseKeeper任務刪除的最大記錄數,1.8.2開始支持 MaxHousekeeperDelete=1000000 ### 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-8G # Default: #說明;zabbix初始化時占用多少系統共享內存用於存儲配置信息,HOST,ITEM,TRIGGER數據,視監控主機數量和監控項調整,建議調整到32M或者更大 CacheSize=8G ### Option: CacheUpdateFrequency # How often Zabbix will perform update of configuration cache, in seconds. # # Mandatory: no # Range: 1-3600 # Default: #說明:zabbix更新操作系統CACHE頻率,若管理頁面操作不頻繁,可以考慮加大參數值 CacheUpdateFrequency=300 ### Option: StartDBSyncers # Number of pre-forked instances of DB Syncers. # # Mandatory: no # Range: 1-100 # Default: #說明:將采集數據從CACHE同步到數據庫線程數量,視數據庫服務器I/O繁忙情況,和數據庫寫能力調整。數值越大,寫能力越強。對數據庫服務器I/O壓力越大。 StartDBSyncers=20 ### Option: HistoryCacheSize # Size of history cache, in bytes. # Shared memory size for storing history data. # # Mandatory: no # Range: 128K-2G # Default: #說明:用於設置劃分多少系統共享內存用於存儲采集的歷史數據,此數值越大,數據庫讀壓力越小 HistoryCacheSize=2048M ### Option: HistoryIndexCacheSize # Size of history index cache, in bytes. # Shared memory size for indexing history cache. # # Mandatory: no # Range: 128K-2G # Default: #說明:3.0.0開始支持,歷史索引大小,一個監控項需要100bytes來存儲 HistoryIndexCacheSize=2048M ### Option: TrendCacheSize # Size of trend cache, in bytes. # Shared memory size for storing trends data. # # Mandatory: no # Range: 128K-2G # Default: #說明:用於設置劃分多少系統共享內存用於存儲計算出來的趨勢數據,此參數值從一定程度上可影響數據庫讀壓力 TrendCacheSize=512M ### 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=16G ### Option: Timeout # Specifies how long we wait for agent, SNMP device or external check (in seconds). # # Mandatory: no # Range: 1-30 # Default: # Timeout=3 #說明:與AGNET\SNMP設備和其它外部設備通信超時設置,單位為秒;若采集數據不完整或網絡繁忙,或從管理頁面發現客戶端狀態變化頻繁,可以考慮加大此數值。註意若此數值加大,應該考慮參數 StartPollers 是否有相應加大的必要。 Timeout=10 ### Option: TrapperTimeout # Specifies how many seconds trapper may spend processing new data. # # Mandatory: no # Range: 1-300 # Default: #說明:啟用 trapper功能,用於進程等待超時設置。根據需要調整 TrapperTimeout=50 ### 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 AlertScriptsPath=/home/zabbix/bin ### 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, 4 or 5. # 0 - don‘t log slow queries. # # Mandatory: no # Range: 1-3600000 # Default: #說明:用於服務端數據庫慢查詢功能,單位是毫秒;1毫秒=0.001秒,若有服務端數據庫監控慢查詢的需求,可以視具體情況調整此數。 # LogSlowQueries=0 LogSlowQueries=3000 ### 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 the user specified by the User configuration option instead. # Has no effect if started under a regular user. # 0 - do not allow 不允許 # 1 - allow 允許 # # Mandatory: no # Default: #說明:是否允許以root身份運行服務端 AllowRoot=1 ### Option: User # Drop privileges to a specific, existing user on the system. # Only has effect if run as ‘root‘ and AllowRoot is disabled. # # Mandatory: no # Default: #說明:非root運行的賬號 # 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. # # Mandatory: no # Default: #說明:在一些情況下,軟件的參數配置文件很長,為了方便管理,將配置文件切割成N個配置文件,但為了主配置參數文件的簡潔,便會啟用INCLUDE參數,以方便程序讀取指定目錄下的所有配置文件 # Include= # Include=/usr/local/etc/zabbix_server.general.conf # Include=/usr/local/etc/zabbix_server.conf.d/ # Include=/usr/local/etc/zabbix_server.conf.d/*.conf ### Option: SSLCertLocation # Location of SSL client certificates. # This parameter is used only in web monitoring. # # Mandatory: no # Default: #說明:SSL客戶端認證文件,2.4開始支持 # SSLCertLocation=${datadir}/zabbix/ssl/certs ### Option: SSLKeyLocation # Location of private keys for SSL client certificates. # This parameter is used only in web monitoring. # # Mandatory: no # Default: #說明:SSL私鑰文件目錄,2.4開始支持 # SSLKeyLocation=${datadir}/zabbix/ssl/keys ### Option: SSLCALocation # Override the location of certificate authority (CA) files for SSL server certificate verification. # If not set, system-wide directory will be used. # This parameter is used only in web monitoring and SMTP authentication. # # Mandatory: no # Default: #說明:SSL CA鑰文件目錄,2.4開始支持 # SSLCALocation= ####### 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= ####### TLS-RELATED PARAMETERS ####### #TLS 相關參數 ### Option: TLSCAFile # Full pathname of a file containing the top-level CA(s) certificates for # peer certificate verification. # # Mandatory: no # Default: #說明:TLS證書文件 # TLSCAFile= ### Option: TLSCRLFile # Full pathname of a file containing revoked certificates. # # Mandatory: no # Default: #說明:TLS證書文件 # TLSCRLFile= ### Option: TLSCertFile # Full pathname of a file containing the server certificate or certificate chain. # # Mandatory: no # Default: #說明:TLS證書文件 # TLSCertFile= ### Option: TLSKeyFile # Full pathname of a file containing the server private key. # # Mandatory: no # Default: #說明:TLS證書文件 # TLSKeyFile=

zabbix_server的配置文件講解