您好,登錄后才能下訂單哦!
一、配置文件類型 zabbix_server配置文件:zabbix_server.conf zabbix_proxy配置文件:zabbix_proxy.conf zabbix-agentd配置文件:zabbix_agentd.conf 二、配置文件詳解 zabbix_server.conf # 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: # NodeID=0 //分布式節點id號,0代表是獨立服務器,默認是被注釋掉的 ### Option: ListenPort # Listen port for trapper. # # Mandatory: no # Range: 1024-32767 # Default: ListenPort=10051 //zabbix server的端口,默認是10051 ### Option: SourceIP # Source IP address for outgoing connections. # # Mandatory: no # Default: # SourceIP= SourceIP=0.0.0.0 //連接的源ip地址,默認為空,默認即可 ### Option: LogFile # Name of log file. # If not set, syslog is used. # # Mandatory: no # Default: # LogFile= 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: LogFileSize=1024 //日志文件的大小,單位為MB,當設置為0時,表示不進行日志輪詢 ### 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: # DebugLevel=3 DebugLevel=3 //指定調試級別,默認即可 ### Option: PidFile # Name of PID file. # # Mandatory: no # Default: PidFile=/tmp/zabbix_server.pid //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: DBHost=10.10.8.167 //數據庫主機名 ### Option: DBName # Database name. # For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored. # # Mandatory: yes # Default: # DBName= DBName=zabbix //指定存放zabbix數據數據庫的名字 ### Option: DBSchema # Schema name. Used for IBM DB2. # # Mandatory: no # Default: # DBSchema= //專門用于 IBM DB2數據庫的連接信息 ### Option: DBUser # Database user. Ignored for SQLite. # # Mandatory: no # Default: # DBUser= DBUser=zabbix //指定連接數據庫的用戶名 ### Option: DBPassword # Database password. Ignored for SQLite. # Comment this line if no password is used. # # Mandatory: no # Default: DBPassword=zabbix ### Option: DBSocket # Path to MySQL socket. # # Mandatory: no # Default: #DBSocket=/var/lib/mysql/mysql.sock //前文DBHost設置為localhost,用戶連接數據庫所用的sock位置 ### Option: DBPort # Database port when not using local socket. Ignored for SQLite. # # Mandatory: no # Range: 1024-65535 # Default (for MySQL): DBPort=3306 //數據庫的端口號,當用sock連接時,無關緊要,當通過網絡連接時需設置 ############ ADVANCED PARAMETERS ################ #高級參數 ### Option: StartPollers # Number of pre-forked instances of pollers. # # Mandatory: no # Range: 0-1000 # Default: StartPollers=180 //初始化時,啟動子進程數量,數量越多,則服務端吞吐能力越強,對系統資源消耗越大 ### Option: StartIPMIPollers # Number of pre-forked instances of IPMI pollers. # # Mandatory: no # Range: 0-1000 # Default: # StartIPMIPollers=0 //主要用于IPMI技術用于獲取硬件狀態場景。若無相關監控項,建議設置為0 ### Option: StartPollersUnreachable # Number of pre-forked instances of pollers for unreachable hosts (including IPMI). # # Mandatory: no # Range: 0-1000 # Default: StartPollersUnreachable=8 //默認情況下,ZABBIX會啟用指定進程用于探測某些不可達主機的(含IPMI場景);若使用場景中含有代理端,建議保持默認;若直接agent較多,可視具體情況調整 ### 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: StartTrappers=10 //用于設置諸如SNMP STRAPPER場景提交來的數據的接收進程數,若客戶機SNMP TRAPPER技術較多,建議加大此參數值 ### Option: StartPingers # Number of pre-forked instances of ICMP pingers. # # Mandatory: no # Range: 0-1000 # Default: #StartPingers=40 StartPingers=60 //用于設置啟用icmp協議PING主機方式啟動線程數量,若單臺代理所管理機器超過500臺,建議加大此數值 ### Option: StartDiscoverers # Number of pre-forked instances of discoverers. # # Mandatory: no # Range: 0-250 # Default: StartDiscoverers=10 //用于設置自動發現主機的線程數量,若單臺代理所管理機器超過500臺,可以考慮加大此數值(僅適用于直接AGENT場景) ### Option: StartHTTPPollers # Number of pre-forked instances of HTTP pollers. # # Mandatory: no # Range: 0-1000 # Default: StartHTTPPollers=1 //用于設置WEB撥測監控線程數,可視具體情況增加或減少此數值。 ### 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: # JavaGatewayPort=10052 //JAVAGATEWAY 場景下使用 ### Option: StartJavaPollers # Number of pre-forked instances of Java pollers. # # Mandatory: no # Range: 0-1000 # Default: # StartJavaPollers=0 //JAVAGATEWAY 場景下使用 ### 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: SNMPTrapperFile=/tmp/zabbix_traps.tmp //指定SNMP TRAPPER 時的臨時文件,用于代理端啟用SNMP TRAPPER功能時使用 ### Option: StartSNMPTrapper # If 1, SNMP trapper process is started. # # Mandatory: no # Range: 0-1 # Default: StartSNMPTrapper=1 //指定SNMP TRAPPER 時的臨時文件,用于代理端啟用SNMP TRAPPER功能時使用 ### 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: # ListenIP=0.0.0.0 # ListenIP=127.0.0.1 //啟用SNMPTRAPPER里 ,接收端監聽的IP,此參數與StartSNMPTrapper,SNMPTrapperFile 聯合使用 ### 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: # HousekeepingFrequency=1 //多少小時清理一次代理端數據庫的 history, alert, and alarms,以保持代理端數據庫輕便,建議保持默認 ### 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: DisableHousekeeping # If set to 1, disables housekeeping. # # Mandatory: no # Range: 0-1 # Default: DisableHousekeeping=1 //禁掉Housekeeping功能 ### 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: CacheSize=2048M //zabbix初始化時占用多少系統共享內存用于存儲配置信息,HOST,ITEM,TRIGGER數據,視監控主機數量和監控項調整,建議調整到32M或者更大 ### Option: CacheUpdateFrequency # How often Zabbix will perform update of configuration cache, in seconds. # # Mandatory: no # Range: 1-3600 # Default: #CacheUpdateFrequency=600 CacheUpdateFrequency=900 //zabbix更新操作系統CACHE頻率,若管理頁面操作不頻繁,可以考慮加大參數值 ### Option: StartDBSyncers # Number of pre-forked instances of DB Syncers # # Mandatory: no # Range: 1-100 # Default: StartDBSyncers=72 #StartDBSyncers=90 //將采集數據從CACHE同步到數據庫線程數量,視數據庫服務器I/O繁忙情況,和數據庫寫能力調整。數值越大,寫能力越強。對數據庫服務器I/O壓力越大 ### Option: HistoryCacheSize # Size of history cache, in bytes. # Shared memory size for storing history data. # # Mandatory: no # Range: 128K-2G # Default: HistoryCacheSize=2048M //用于設置劃分多少系統共享內存用于存儲采集的歷史數據,此數值越大,數據庫讀壓力越小 ### Option: TrendCacheSize # Size of trend cache, in bytes. # Shared memory size for storing trends data. # # Mandatory: no # Range: 128K-2G # Default: TrendCacheSize=2048M //用于設置劃分多少系統共享內存用于存儲計算出來的趨勢數據,此參數值從一定程度上可影響數據庫讀壓力 ### 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: HistoryTextCacheSize=2048M ### Option: NodeNoEvents # Default: HistoryTextCacheSize=2048M //指定劃出多少系統共享內存用于存儲 character, text or log history數據,若二級代理內存足夠,建議可適當擴大此數值,可很大程度上解決系統I/O壓力,和數據庫讀壓力 ### 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: # NodeNoEvents=0 //若節點為子結點,是否允許本地事件(events表)發送到主節點,1為不發送,但不影響此節點以下的節點的傳播能力,視ZABBIX分布式系統架構設計開啟或關閉。在不明架構前提下,建議保持默認 ### 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: # NodeNoHistory=0 //若節點為子結點,是否允許本地歷史數據發送到主節點,1為不發送,但不影響此節點以下的節點的傳播能力,視ZABBIX分布式系統架構設計開啟或關閉,在不明架構前提下,建議保持默認 ### Option: Timeout # Specifies how long we wait for agent, SNMP device or external check (in seconds). # # Mandatory: no # Range: 1-30 # Default: Timeout=30 //與AGNET\SNMP設備和其它外部設備通信超時設置,單位為秒;若采集數據不完整或網絡繁忙,或從管理頁面發現客戶端狀態變化頻繁,可以考慮加大此數值。注意若此數值加大,應該考慮參數 StartPollers 是否有相應加大的必要 ### Option: TrapperTimeout # Specifies how many seconds trapper may spend processing new data. # # Mandatory: no # Range: 1-300 # Default: # TrapperTimeout=30 //啟用 trapper功能,用于進程等待超時設置。根據需要調整 ### Option: UnreachablePeriod # After how many seconds of unreachability treat a host as unavailable. # # Mandatory: no # Range: 1-3600 # Default: # UnreachablePeriod=45 UnreachablePeriod=150 //當AGNET端處于不可用狀態下,間隔多少秒后,嘗試重新連接。建議根據具體情況設置。注意,若此數值過小,右agent端業務系統繁忙時,有可能造成報警信息誤報 ### Option: UnavailableDelay # How often host is checked for availability during the unavailability period, in seconds. # # Mandatory: no # Range: 1-3600 # Default: # UnavailableDelay=60 //當AGENT端處于可用狀態下,間隔多少秒后,進行狀態檢查。若出現可正常采集數據,但管理頁面AGENT狀態不正常;若在網絡,端口等均通暢情況下,AGENT狀態仍不正常,可以考慮加大此數值 ### Option: UnreachableDelay # How often host is checked for availability during the unreachability period, in seconds. # # Mandatory: no # Range: 1-3600 # Default: # UnreachableDelay=15 UnreachableDelay=30 //當agent端處于不可達狀態下,延遲多少秒后,進行重新嘗試,建議保持默認,在AGENT接入調試階段,可考慮減少此數值 ### 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: FpingLocation=/usr/bin/fping //IPv4 FPING命令路徑,僅ROOT可用。注意使用此命令時,應該確認此命令是否存在 ### 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: # Fping6Location=/usr/sbin/fping6 //IPv6 FPING命令路徑,僅ROOT可用。注意使用此命令時,應該確認此命令是否存在 ### Option: SSHKeyLocation # Location of public and private keys for SSH checks and actions # # Mandatory: no # Default: # SSHKeyLocation= //在服務端需要SSH到AGENT端且采用用KEY驗證方式時使用 ### Option: LogSlowQueries # How long a database query may take before being logged (in milliseconds). # 0 - don't log slow queries. # # Mandatory: no # Range: 1-3600000 # Default: LogSlowQueries=1000 //用于服務端數據庫慢查詢功能,單位是毫秒;1毫秒=0.001秒,若有服務端數據庫監控慢查詢的需求,可以視具體情況調整此數 ### Option: TmpDir # Temporary directory. # # Mandatory: no # Default: # TmpDir=/tmp //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: # Include= # Include=/usr/local/etc/zabbix_server.general.conf # Include=/usr/local/etc/zabbix_server.conf.d/ //在一些情況下,軟件的參數配置文件很長,為了方便管理,將配置文件切割成N個配置文件,但為了主配置參數文件的簡潔,便會啟用INCLUDE參數,以方便程序讀取指定目錄下的所有配置文件 ### 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 # ProxyConfigFrequency=3600 //zabbix服務端將配置文件數據同步到代理端的頻率,僅適用于代理端為被動模式情況 # 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: # ProxyDataFrequency=1 //zabbix服務端請求代理端采集的數據的頻率,僅適用代理端為被動模式情況下 zabbix_agentd.conf # This is a config file for the Zabbix agent daemon (Unix) # To get more information about Zabbix, visit http://www.zabbix.com ############ GENERAL PARAMETERS ################# ### Option: PidFile # Name of PID file. # # Mandatory: no # Default: PidFile=/tmp/zabbix_agentd.pid //pid文件的存放位置 ### Option: LogFile # Name of log file. # If not set, syslog is used. # # Mandatory: no # Default: # LogFile= LogFile=/tmp/zabbix_agentd.log //日志文件的位置 ### Option: LogFileSize # Maximum size of log file in MB. # 0 - disable automatic log rotation. # # Mandatory: no # Range: 0-1024 # Default: LogFileSize=1024 //當日志文件達到多大時進行輪詢操作 ### Option: DebugLevel # Specifies debug level # 0 - no debug # 1 - critical information # 2 - error information # 3 - warnings # 4 - for debugging (produces lots of information) # # Mandatory: no # Range: 0-4 # Default: DebugLevel=3 //日志信息(調試)級別 ### Option: SourceIP # Source IP address for outgoing connections. # # Mandatory: no # Default: # SourceIP= //連接的源ip地址,默認為空 ### Option: EnableRemoteCommands # Whether remote commands from Zabbix server are allowed. # 0 - not allowed # 1 - allowed # # Mandatory: no # Default: # EnableRemoteCommands=0 //是否允許zabbix server端的遠程指令, 0表示不允許, 1表示允許 ### Option: LogRemoteCommands # Enable logging of executed shell commands as warnings. # 0 - disabled # 1 - enabled # # Mandatory: no # Default: # LogRemoteCommands=0 //是否開啟日志記錄shell命令作為警告 0表示不允許,1表示允許 ##### Passive checks related ### Option: Server # List of comma delimited IP addresses (or hostnames) of Zabbix servers. # Incoming connections will be accepted only from the hosts listed here. # No spaces allowed. # If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally. # # Mandatory: no # Default: # Server= Server=127.0.0.1 //zabbix server的ip地址或主機名,可同時列出多個,需要用逗號隔開 ### Option: ListenPort # Agent will listen on this port for connections from the server. # # Mandatory: no # Range: 1024-32767 # Default: ListenPort=10050 //zabbix agent監聽的端口 ### 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. # # Mandatory: no # Default: ListenIP=0.0.0.0 //zabbix agent監聽的ip地址 ### 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. # # Mandatory: no # Range: 0-100 # Default: StartAgents=3 //zabbix agent開啟進程數 ##### Active checks related ### Option: ServerActive # List of comma delimited IP:port (or hostname:port) pairs of Zabbix servers 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] # # 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. # # Mandatory: no # Default: # Hostname= Hostname=Zabbix server //在zabbix server前端配置時指定的主機名要相同,最重要的配置 ### Option: HostnameItem # Item used for generating Hostname if it is undefined. # Ignored if Hostname is defined. # # Mandatory: no # Default: # HostnameItem=system.hostname ### 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. # # 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. # # Mandatory: no # Range: 2-65535 # Default: BufferSize=100 //zabbix agent數據緩沖區的大小,當達到該值便會發送所有的數據到zabbix server ### 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. # # Mandatory: no # Range: 1-1000 # Default: MaxLinesPerSecond=100 //zabbix agent發送給zabbix server最大的數據行 ### 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 user 'zabbix' instead. Has no effect if started under a regular user. # 0 - do not allow # 1 - allow # # Mandatory: no # Default: AllowRoot=0 //是否允許zabbix agent 以root用戶運行 ############ ADVANCED PARAMETERS ################# ### Option: Alias # Sets an alias for parameter. It can be useful to substitute long and complex parameter name with a smaller and simpler one. # # Mandatory: no # Range: # Default: ### Option: Timeout # Spend no more than Timeout seconds on processing # # Mandatory: no # Range: 1-30 # Default: Timeout=3 //設定處理超時的時間 ### 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: # Include= # Include=/usr/local/etc/zabbix_agentd.userparams.conf # Include=/usr/local/etc/zabbix_agentd.conf.d/ //包含子配置文件的路徑 ####### USER-DEFINED MONITORED PARAMETERS ####### ### Option: UnsafeUserParameters # Allow all characters to be passed in arguments to user-defined parameters. # 0 - do not allow # 1 - allow # # 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. # # Mandatory: no # Default: UserParameter= //指定用戶自定義參數 zabbix_proxy.conf 和zabbix_server.conf 類似 # This is a configuration file for Zabbix Proxy process # To get more information about Zabbix, # visit http://www.zabbix.com ############ GENERAL PARAMETERS ################# ### Option: ProxyMode # Proxy operating mode # 0 - proxy in the active mode # 1 - proxy in the passive mode # # Mandatory: no # Default: # ProxyMode=0 ### Option: Server # IP address (or hostname) of Zabbix server. # Active proxy will get configuration data from the server. # For a proxy in the passive mode this parameter will be ignored. # # Mandatory: yes (if ProxyMode is set to 0) # Default: # Server= Server=127.0.0.1 ### Option: ServerPort # Port of Zabbix trapper on Zabbix server. # For a proxy in the passive mode this parameter will be ignored. # # Mandatory: no # Range: 1024-32767 # Default: # ServerPort=10051 ### Option: Hostname # Unique, case sensitive Proxy name. Make sure the Proxy name is known to the server! # Value is acquired from HostnameItem if undefined. # # Mandatory: no # Default: # Hostname= Hostname=Zabbix proxy ### Option: HostnameItem # Item used for generating Hostname if it is undefined. # Ignored if Hostname is defined. # # Mandatory: no # Default: # HostnameItem=system.hostname ### Option: ListenPort # Listen port for trapper. # # Mandatory: no # Range: 1024-32767 # Default: # ListenPort=10051 ### Option: SourceIP # Source IP address for outgoing connections. # # Mandatory: no # Default: # SourceIP= ### Option: LogFile # Name of log file. # If not set, syslog is used. # # Mandatory: no # Default: # LogFile= LogFile=/tmp/zabbix_proxy.log ### Option: LogFileSize # Maximum size of log file in MB. # 0 - disable automatic log rotation. # # Mandatory: no # Range: 0-1024 # Default: # LogFileSize=1 ### Option: DebugLevel # Specifies debug level # 0 - no debug # 1 - critical information # 2 - error information # 3 - warnings # 4 - for debugging (produces lots of information) # # Mandatory: no # Range: 0-4 # Default: # DebugLevel=3 ### Option: PidFile # Name of PID file. # # Mandatory: no # Default: # PidFile=/tmp/zabbix_proxy.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: # DBHost=localhost ### Option: DBName # Database name. # For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored. # Warning: do not attempt to use the same database Zabbix server is using. # # Mandatory: yes # Default: # DBName= DBName=zabbix_proxy ### Option: DBSchema # Schema name. Used for IBM DB2. # # Mandatory: no # Default: # DBSchema= ### Option: DBUser # Database user. Ignored for SQLite. # # Default: # DBUser= DBUser=root ### 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: # DBSocket=/tmp/mysql.sock # Option: DBPort # Database port when not using local socket. Ignored for SQLite. # # Mandatory: no # Default (for MySQL): # DBPort=3306 ######### PROXY SPECIFIC PARAMETERS ############# ### Option: ProxyLocalBuffer # Proxy will keep data locally for N hours, even if the data have already been synced with the server. # This parameter may be used if local data will be used by third party applications. # # Mandatory: no # Range: 0-720 # Default: # ProxyLocalBuffer=0 ### Option: ProxyOfflineBuffer # Proxy will keep data for N hours in case if no connectivity with Zabbix Server. # Older data will be lost. # # Mandatory: no # Range: 1-720 # Default: # ProxyOfflineBuffer=1 ### Option: HeartbeatFrequency # Frequency of heartbeat messages in seconds. # Used for monitoring availability of Proxy on server side. # 0 - heartbeat messages disabled. # For a proxy in the passive mode this parameter will be ignored. # # Mandatory: no # Range: 0-3600 # Default: # HeartbeatFrequency=60 ### Option: ConfigFrequency # How often proxy retrieves configuration data from Zabbix Server in seconds. # For a proxy in the passive mode this parameter will be ignored. # # Mandatory: no # Range: 1-3600*24*7 # Default: # ConfigFrequency=3600 ### Option: DataSenderFrequency # Proxy will send collected data to the Server every N seconds. # For a proxy in the passive mode this parameter will be ignored. # # Mandatory: no # Range: 1-3600 # Default: # DataSenderFrequency=1 ############ 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: # StartIPMIPollers=0 ### Option: StartPollersUnreachable # Number of pre-forked instances of pollers for unreachable hosts (including IPMI). # # Mandatory: no # Range: 0-1000 # Default: # StartPollersUnreachable=1 ### Option: StartTrappers # Number of pre-forked instances of trappers. # Trappers accept incoming connections from Zabbix sender and active agents. # # Mandatory: no # Range: 0-1000 # Default: # StartTrappers=5 ### Option: StartPingers # Number of pre-forked instances of ICMP pingers. # # Mandatory: no # Range: 0-1000 # Default: # StartPingers=1 ### Option: StartDiscoverers # Number of pre-forked instances of discoverers. # # Mandatory: no # Range: 0-250 # Default: # StartDiscoverers=1 ### Option: StartHTTPPollers # Number of pre-forked instances of HTTP pollers. # # Mandatory: no # Range: 0-1000 # Default: # StartHTTPPollers=1 ### Option: JavaGateway # IP address (or hostname) of Zabbix Java gateway. # Only required if Java pollers are started. # # Mandatory: no # Default: # JavaGateway= ### Option: JavaGatewayPort # Port that Zabbix Java gateway listens on. # # Mandatory: no # Range: 1024-32767 # Default: # JavaGatewayPort=10052 ### Option: StartJavaPollers # Number of pre-forked instances of Java pollers. # # Mandatory: no # Range: 0-1000 # Default: # StartJavaPollers=0 ### Option: SNMPTrapperFile # Temporary file used for passing data from SNMP trap daemon to the proxy. # Must be the same as in zabbix_trap_receiver.pl or SNMPTT configuration file. # # Mandatory: no # Default: # SNMPTrapperFile=/tmp/zabbix_traps.tmp ### Option: StartSNMPTrapper # If 1, SNMP trapper process is started. # # Mandatory: no # Range: 0-1 # Default: # 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: # ListenIP=0.0.0.0 ### 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: # HousekeepingFrequency=1 ### Option: CacheSize # Size of configuration cache, in bytes. # Shared memory size, for storing hosts and items data. # # Mandatory: no # Range: 128K-2G # Default: # CacheSize=8M ### Option: StartDBSyncers # Number of pre-forked instances of DB Syncers # # Mandatory: no # Range: 1-100 # Default: # 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: 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: # HistoryTextCacheSize=16M ### Option: Timeout # Specifies how long we wait for agent, SNMP device or external check (in seconds). # # Mandatory: no # Range: 1-30 # Default: # Timeout=3 ### Option: TrapperTimeout # Specifies how many seconds trapper may spend processing new data. # # Mandatory: no # Range: 1-300 # Default: # TrapperTimeout=300 ### Option: UnreachablePeriod # After how many seconds of unreachability treat a host as unavailable. # # Mandatory: no # Range: 1-3600 # Default: # UnreachablePeriod=45 ### Option: UnavailableDelay # How often host is checked for availability during the unavailability period, in seconds. # # Mandatory: no # Range: 1-3600 # Default: # UnavailableDelay=60 ### Option: UnreachableDelay # How often host is checked for availability during the unreachability period, in seconds. # # Mandatory: no # Range: 1-3600 # Default: # UnreachableDelay=15 ### 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: # 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: # Fping6Location=/usr/sbin/fping6 ### Option: SSHKeyLocation # Location of public and private keys for SSH checks andactions # # Mandatory: no # Default: # SSHKeyLocation= ### Option: LogSlowQueries # How long a database query may take before being logged (in milliseconds). # 0 - don't log slow queries. # # Mandatory: no # Range: 1-3600000 # Default: # LogSlowQueries=0 ### Option: TmpDir # Temporary directory. # # Mandatory: no # Default: # TmpDir=/tmp ### 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: # Include= # Include=/usr/local/etc/zabbix_proxy.general.conf # Include=/usr/local/etc/zabbix_proxy.conf.d/ 三、實例 zabbix_server.conf # egrep -v "^$|^#" zabbix_server.conf ListenPort=10051 SourceIP=0.0.0.0 LogFile=/var/log/zabbix/zabbix_server.log LogFileSize=1024 DebugLevel=3 PidFile=/var/run/zabbix/zabbix_server.pid DBHost=10.249.17.52 DBName=zabbix DBUser=zabbix DBPassword=zabbix DBPort=3306 StartPollers=5 StartPollersUnreachable=8 StartTrappers=10 StartPingers=60 StartDiscoverers=10 StartHTTPPollers=1 SNMPTrapperFile=/tmp/zabbix_traps.tmp StartSNMPTrapper=1 CacheSize=2048M CacheUpdateFrequency=900 StartDBSyncers=20 HistoryCacheSize=2048M TrendCacheSize=2048M HistoryTextCacheSize=2048M Timeout=30 UnreachablePeriod=150 UnreachableDelay=30 FpingLocation=/usr/sbin/fping LogSlowQueries=1000 TmpDir=/tmp/zabbix-pinger zabbix_agentd.conf cat /usr/local/zabbix-agent-ops/etc/zabbix_agentd.conf PidFile=/usr/local/zabbix-agent-ops/var/zabbix_agentd.pid LogFile=/usr/local/zabbix-agent-ops/var/zabbix_agentd.log Server=10.10.3.234 ServerActive=10.10.3.234 Include=/usr/local/zabbix-agent-ops/etc/extra.conf Include=/usr/local/zabbix-agent-ops/etc/zabbix_agentd.conf.d/ /usr/local/zabbix-agent-ops/bin/ 目錄下為自定義腳本 /usr/local/zabbix-agent-ops/etc/extra.conf 自定義key值 /usr/local/zabbix-agent-ops/etc/zabbix_agentd.conf.d/ 自定義key值 # iostat UserParameter=custom.vfs.dev.discovery,/usr/local/zabbix-agent-ops/bin/dev-discovery.sh UserParameter=iostat[*],/usr/local/zabbix-agent-ops/bin/iostat-check.sh $1 $2 zabbix_proxy.conf Server=192.168.100.100 #指定zabbix server的ip地址或主機名 Hostname=zabbix-proxy-1.35 #定義監控代理的主機名,需和zabbix server前端配置時指定的節點名相同 LogFile=/tmp/zabbix_proxy.log #指定日志文件的位置 PidFile=/tmp/zabbix_proxy.pid #pid文件的位置 DBName=zabbix_proxy #數據庫名 DBUser=zabbix #連接數據庫的用戶 DBPassword=zabbix#連接數據庫用戶的密碼 ConfigFrequency=60 #zabbix proxy從zabbix server取得配置數據的頻率 DataSenderFrequency=60 #zabbix proxy發送監控到的數據給zabbix server的頻率
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。