第1章 Zabbix简介及组成
1.1 zabbix简介
zabbix是一个基于web界面,提供分布式系统监视以及网络监视功能的企业级的开源解决方案。它可以监视各种网络参数,保证服务器自动的安全运营,并提供灵活的通知机制以让系统管理员快速定位/解决存在的各种问题
1.1 zabbix组成
zabbix server和zabbix agent,可选组件zabbix proxy
可以通过SNMP、zabbix agent、fping、端口监视等方法对远程服务器或网络状态完成监视/数据收集等功能。支持linux及类unix、windows平台只能安装客户端(被监控)
第2章 Zabbix 3.0.13服务端安装
zabbix server3.0无法centos6上进行yum安装,故我们要在centos7上进行yum安装。如果一定要在centos6上进行安装,则强烈建议通过源码方式进行编译安装,同时还需要注意PHP的版本
注意:尽管zabbix server3.0在centos6上不能进行yum安装,但zabbix agent3.0在centos6上是可进行yum安装的
第3章 Web页面报错总结
3.1 问题一Zabbix alerter processes more than 75% busy
问题原因:
zabbix服务器邮件进程繁忙导致的,一般是因为设置动作的间隔太短。特殊情况下会产生大量告警,如服务器发几万封邮件过程中,邮件进程发挂了
解决方案:
01.删除数据库解决(风险较大,不建议)
02.修改邮件脚本,将邮件的动作改为打印时间,等待邮件完全释放再改回来,如下
1 [root@m01 ~]# cat /usr/lib/zabbix/alertscripts/sms 2 3 #!/bin/bash 4 5 echo `date` >>/tmp/sms.txt
3.2 问题二Zabbix discoverer processes more than 75% busy
问题原因:
01.配置了discovery自动发现任务,配置的每个discovery任务在一定时间内占用1个进程,而zabbix_server.conf中默认配置只有1个discovery(被注释,默认生效)
02.为了快速验证自动发现效果,将discovery任务的"Delay"由默认3600s设置成60s
解决方案:
01.修改配置文件中的StartDiscoverers进程数量,取消其之前的#号并将数值修改为5,最后重启服务
(注:根据系统硬件配置,可以设置成更高的数值,但其范围为0~250)
1 [root@m01 ~]# grep 'StartDiscoverers' /etc/zabbix/zabbix_server.conf2 3 ### Option: StartDiscoverers4 5 StartDiscoverers=56 7 [root@m01 ~]# systemctl restart zabbix-server.service
02.编写定时任务脚本重启zabbix_server来降低负载
1 [root@m01 ~]# crontab -e2 3 @daily service zabbix-server restart > /dev/null 2>&14 5 #计划会每天自动重启Zabbix服务以结束僵尸进程并清理内存等
3.3 问题三Zabbix poller processes more than 75% busy
问题原因:
01.通过Zabbix agent采集数据的设备死机或其他原因导致zabbix agent死掉server获取不到数据
02. server向agent获取数据时时间过长,超过了server设置的timeout时间
解决方案:
01.增加Zabbix Server启动时初始化的进程数量
1 ### Option: StartPollers 2 3 StartPollers=10 #改成多少取决于服务器的性能和监控的数量,如果内存足够的话可以设置更高
02.修改模板自动发现规则中的保留失去的资源期间为0
3.4 问题四Zabbix housekeeper processes more than 75% busy
问题原因:
为了防止数据库持续增大,zabbix有自动删除历史数据的机制即housekeeper,而mysql删除数据时性能会降低,就会报错
解决方案:
调整HousekeepingFrequency参数
1 HousekeepingFrequency=12 #间隔时间 2 3 MaxHousekeeperDelete=1000000 #最大删除量
3.5 问题五Zabbix server内存溢出,无法启动
问题原因:
zabbix使用一段时间后,再次加入一批交换机监控,zabbix-server将无法启动,查看日志显示如下(提示内存溢出,需调整zabbix服务器配置zabbix_server.conf)
1 2816:20170725:174352.675 [file:dbconfig.c,line:652] zbx_mem_realloc(): out of memory (requested 162664 bytes)2 3 2816:20170725:174352.675 [file:dbconfig.c,line:652] zbx_mem_realloc(): please increase CacheSize configuration parameter
解决方案:
1 vim zabbix_server.conf 2 3 CacheSize=1024M #默认为8M
3.6 PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 11 bytes)
问题原因:
zabbix某些页面无法打开,查看php日志发现,当访问这个页面时报错内存不足
解决方案:
不清楚是否内存泄露,最简单的方法是调大php进程的可用内存
1 [root@zabbix-master ~]# grep 'memory_limit' /etc/httpd/conf.d/zabbix.conf 2 3 php_value memory_limit 512M #默认128M
3.7总结
此处笔者提供一份配置文件,其中的参数数值可供大家修改
1 # This is a configuration file for Zabbix server daemon 2 # To get more information about Zabbix, visit http://www.zabbix.com 3 ############ GENERAL PARAMETERS ################# 4 ### Option: ListenPort 5 # Listen port for trapper. 6 # 7 # Mandatory: no 8 # Range: 1024-32767 9 # Default: 10 #说明:服务端监听端口用于接收二级代理或直连AGENT的采集数据 11 # ListenPort=10051 12 ### Option: SourceIP 13 # Source IP address for outgoing connections. 14 # 15 # Mandatory: no 16 # Default: 17 #说明:服务端监听IP,建议指定 18 # SourceIP= 19 ### Option: LogType 20 # Specifies where log messages are written to: 21 # system - syslog 22 # file - file specified with LogFile parameter 23 # console - standard output 24 # 25 # Mandatory: no 26 # Default: 27 # LogType=file 28 ### Option: LogFile 29 # Log file name for LogType 'file' parameter. 30 # 31 # Mandatory: no 32 # Default: 33 # LogFile= 34 #说明:zabbix服务端日志路径,视具体情况指定 35 LogFile=/tmp/zabbix_server.log 36 ### Option: LogFileSize 37 # Maximum size of log file in MB. 38 # 0 - disable automatic log rotation. 39 # 40 # Mandatory: no 41 # Range: 0-1024 42 # Default: 43 #说明:日志达到多少M里就轮转;若此参数值为0时,则不轮转,日志将不断变大,建议设置成轮转 44 LogFileSize=50 45 ### Option: DebugLevel 46 # Specifies debug level: 47 # 0 - basic information about starting and stopping of Zabbix processes 48 # 1 - critical information 灾难日志,日志量较少 49 # 2 - error information 错误级别,日志量大于CRITICAL级别 50 # 3 - warnings 告警级别,日志量大于ERROR级别 51 # 4 - for debugging (produces lots of information)调试级别,日志量大于WARNING 52 # 5 - extended debugging (produces even more information) 53 # 54 # Mandatory: no 55 # Range: 0-5 56 # Default: 57 #说明:日志级别0~4,单位时间内生成日志的量不断增大 58 DebugLevel=3 59 ### Option: PidFile 60 # Name of PID file. 61 # 62 # Mandatory: no 63 # Default: 64 #说明:zabbix服务端程序PID路径 65 PidFile=/tmp/zabbix_server.pid 66 ### Option: DBHost 67 # Database host name. 68 # If set to localhost, socket is used for MySQL. 69 # If set to empty string, socket is used for PostgreSQL. 70 # 71 # Mandatory: no 72 # Default: 73 #说明:指定数据库信息,对于mysql,若设置为localhost则mysql用SOCKET来连接(需配合参数 DBSocket 使用),否则用IP连接;若DHHOST值为空,则默认连接PostgreSQL 74 # DBHost=localhost 75 DBHost= 76 ### Option: DBName 77 # Database name. 78 # For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored. 79 # 80 # Mandatory: yes 81 # Default: 82 # DBName= 83 #说明:服务端连接数据库的库名 84 DBName= 85 ### Option: DBSchema 86 # Schema name. Used for IBM DB2 and PostgreSQL. 87 # 88 # Mandatory: no 89 # Default: 90 #说明:专门用于 IBM DB2数据库的连接信息 91 # DBSchema= 92 ### Option: DBUser 93 # Database user. Ignored for SQLite. 94 # 95 # Mandatory: no 96 # Default: 97 #说明:连接数据库的用户 98 # DBUser= 99 DBUser=100 ### Option: DBPassword101 # Database password. Ignored for SQLite.102 # Comment this line if no password is used.103 #104 # Mandatory: no105 # Default:106 #说明:连接数据库的密码107 DBPassword=108 ### Option: DBSocket109 # Path to MySQL socket.110 #111 # Mandatory: no112 # Default:113 #说明:指定MYSQL的SOCK连接路径114 DBSocket=/tmp/mysql.sock115 ### Option: DBPort116 # Database port when not using local socket. Ignored for SQLite.117 #118 # Mandatory: no119 # Range: 1024-65535120 # Default (for MySQL):121 #说明:指定连接数据库的端口,默认3306122 DBPort=3306123 ############ ADVANCED PARAMETERS ################124 #高级参数125 ### Option: StartPollers126 # Number of pre-forked instances of pollers.127 #128 # Mandatory: no129 # Range: 0-1000130 # Default:131 #说明;初始化时,启动子进程数量,数量越多,则服务端吞吐能力越强,对系统资源消耗越大132 StartPollers=300133 ### Option: StartIPMIPollers134 # Number of pre-forked instances of IPMI pollers.135 #136 # Mandatory: no137 # Range: 0-1000138 # Default:139 #140 #说明:主要用于IPmi技术用于获取硬件状态场景。若无相关监控项,建议设置为0141 # StartIPMIPollers=0142 ### Option: StartPollersUnreachable143 # Number of pre-forked instances of pollers for unreachable hosts (including IPMI and Java).144 # At least one poller for unreachable hosts must be running if regular, IPMI or Java pollers145 # are started.146 #147 # Mandatory: no148 # Range: 0-1000149 # Default:150 #说明:默认情况下,ZABBIX会启用指定进程用于探测某些不可达主机的(含IPMI场景);若使用场景中含有代理端,建议保持默认;若直接agent较多,可视具体情况调整151 StartPollersUnreachable=50152 ### Option: StartTrappers153 # Number of pre-forked instances of trappers.154 # Trappers accept incoming connections from Zabbix sender, active agents and active proxies.155 # At least one trapper process must be running to display server availability and view queue156 # in the frontend.157 #158 # Mandatory: no159 # Range: 0-1000160 # Default:161 #说明:用于设置诸如SNMP STRAPPER场景提交来的数据的接收进程数,若客户机SNMP TRAPPER技术较多,建议加大此参数值162 StartTrappers=50163 ### Option: StartPingers164 # Number of pre-forked instances of ICMP pingers.165 #166 # Mandatory: no167 # Range: 0-1000168 # Default:169 #说明:用于设置启用icmp协议PING主机方式启动线程数量,若单台代理所管理机器超过500台,建议加大此数值170 # StartPingers=10171 ### Option: StartDiscoverers172 # Number of pre-forked instances of discoverers.173 #174 # Mandatory: no175 # Range: 0-250176 # Default:177 #说明:用于设置自动发现主机的线程数量,若单台代理所管理机器超过500台,可以考虑加大此数值(仅适用于直接AGENT场景)178 StartDiscoverers=15179 ### Option: StartHTTPPollers180 # Number of pre-forked instances of HTTP pollers.181 #182 # Mandatory: no183 # Range: 0-1000184 # Default:185 #说明:用于设置WEB拨测监控线程数,可视具体情况增加或减少此数值。186 # StartHTTPPollers=1187 ### Option: StartTimers188 # Number of pre-forked instances of timers.189 # Timers process time-based trigger functions and maintenance periods.190 # Only the first timer process handles the maintenance periods.191 #192 # Mandatory: no193 # Range: 1-1000194 # Default:195 #说明:各实例计时器数量,主要用于触发器,标有维护标识的主机,但只第一个计时器用于计算维护标识主机。196 # StartTimers=1197 ### Option: StartEscalators198 # Number of pre-forked instances of escalators.199 #200 # Mandatory: no201 # Range: 0-100202 # Default:203 #说明:用于处理动作中的步骤的进程,zabbix动作较多时建议调大。204 StartEscalators=30205 ### Option: JavaGateway206 # IP address (or hostname) of Zabbix Java gateway.207 # Only required if Java pollers are started.208 #209 # Mandatory: no210 # Default:211 #说明:JAVAGATEWAY 场景下使用212 JavaGateway=10.238.0.180213 ### Option: JavaGatewayPort214 # Port that Zabbix Java gateway listens on.215 #216 # Mandatory: no217 # Range: 1024-32767218 # Default:219 #说明:JAVAGATEWAY 场景下使用220 JavaGatewayPort=10052221 ### Option: StartJavaPollers222 # Number of pre-forked instances of Java pollers.223 #224 # Mandatory: no225 # Range: 0-1000226 # Default:227 #说明:JAVAGATEWAY 场景下使用228 StartJavaPollers=30229 ### Option: StartVMwareCollectors230 # Number of pre-forked vmware collector instances.231 #232 # Mandatory: no233 # Range: 0-250234 # Default:235 #说明:用于设置监控VMWARE Esxi主机实例时使用,若为0则不启用,若要监控ESXI主机,此值最少为1 ;视监控ESXI数量设置对应数值236 # StartVMwareCollectors=0237 ### Option: VMwareFrequency238 # How often Zabbix will connect to VMware service to obtain a new data.239 #240 # Mandatory: no241 # Range: 10-86400242 # Default:243 #说明:代理端访问 VMWARE service的频率,单位:秒244 # VMwareFrequency=60245 ### Option: VMwarePerfFrequency246 # How often Zabbix will connect to VMware service to obtain performance data.247 #248 # Mandatory: no249 # Range: 10-86400250 # Default:251 # VMwarePerfFrequency=60252 ### Option: VMwareCacheSize253 # Size of VMware cache, in bytes.254 # Shared memory size for storing VMware data.255 # Only used if VMware collectors are started.256 #257 # Mandatory: no258 # Range: 256K-2G259 # Default:260 #说明:划出多少共享内存用于存储VMWARE数据261 VMwareCacheSize=256M262 ### Option: VMwareTimeout263 # Specifies how many seconds vmware collector waits for response from VMware service.264 #265 # Mandatory: no266 # Range: 1-300267 # Default:268 #说明:等待VMWare返回数据的最长时间269 VMwareTimeout=10270 ### Option: SNMPTrapperFile271 # Temporary file used for passing data from SNMP trap daemon to the server.272 # Must be the same as in zabbix_trap_receiver.pl or SNMPTT configuration file.273 #274 # Mandatory: no275 # Default:276 #说明:指定SNMP TRAPPER 时的临时文件,用于代理端启用SNMP TRAPPER功能时使用277 # SNMPTrapperFile=/tmp/zabbix_traps.tmp278 ### Option: StartSNMPTrapper279 # If 1, SNMP trapper process is started.280 #281 # Mandatory: no282 # Range: 0-1283 # Default:284 #说明:是否启用 snmptrapper功能 ,默认不启用=0,启用=1(配合参数SNMPTrapperFile使用)285 # StartSNMPTrapper=0286 ### Option: ListenIP287 # List of comma delimited IP addresses that the trapper should listen on.288 # Trapper will listen on all network interfaces if this parameter is missing.289 #290 # Mandatory: no291 # Default:292 #说明:启用SNMPTRAPPER里 ,接收端监听的IP,此参数与StartSNMPTrapper,SNMPTrapperFile 联合使用293 # ListenIP=0.0.0.0294 ListenIP=10.238.0.180295 ### Option: HousekeepingFrequency296 # How often Zabbix will perform housekeeping procedure (in hours).297 # Housekeeping is removing outdated information from the database.298 # To prevent Housekeeper from being overloaded, no more than 4 times HousekeepingFrequency299 # hours of outdated information are deleted in one housekeeping cycle, for each item.300 # To lower load on server startup housekeeping is postponed for 30 minutes after server start.301 # With HousekeepingFrequency=0 the housekeeper can be only executed using the runtime control option.302 # In this case the period of outdated information deleted in one housekeeping cycle is 4 times the303 # period since the last housekeeping cycle, but not less than 4 hours and not greater than 4 days.304 #305 # Mandatory: no306 # Range: 0-24307 # Default:308 #说明:多少小时清理一次代理端数据库的 history, alert, and alarms,以保持代理端数据库轻便,建议保持默认309 HousekeepingFrequency=24310 ### Option: MaxHousekeeperDelete311 # The table "housekeeper" contains "tasks" for housekeeping procedure in the format:312 # [housekeeperid], [tablename], [field], [value].313 # No more than 'MaxHousekeeperDelete' rows (corresponding to [tablename], [field], [value])314 # will be deleted per one task in one housekeeping cycle.315 # SQLite3 does not use this parameter, deletes all corresponding rows without a limit.316 # If set to 0 then no limit is used at all. In this case you must know what you are doing!317 #318 # Mandatory: no319 # Range: 0-1000000320 # Default:321 #说明:每个HouseKeeper任务删除的最大记录数,1.8.2开始支持322 MaxHousekeeperDelete=1000000323 ### Option: SenderFrequency324 # How often Zabbix will try to send unsent alerts (in seconds).325 #326 # Mandatory: no327 # Range: 5-3600328 # Default:329 #说明:多少秒后重试发送失败的报警信息330 SenderFrequency=30331 ### Option: CacheSize332 # Size of configuration cache, in bytes.333 # Shared memory size for storing host, item and trigger data.334 #335 # Mandatory: no336 # Range: 128K-8G337 # Default:338 #说明;zabbix初始化时占用多少系统共享内存用于存储配置信息,HOST,ITEM,TRIGGER数据,视监控主机数量和监控项调整,建议调整到32M或者更大339 CacheSize=8G340 ### Option: CacheUpdateFrequency341 # How often Zabbix will perform update of configuration cache, in seconds.342 #343 # Mandatory: no344 # Range: 1-3600345 # Default:346 #说明:zabbix更新操作系统CACHE频率,若管理页面操作不频繁,可以考虑加大参数值347 CacheUpdateFrequency=300348 ### Option: StartDBSyncers349 # Number of pre-forked instances of DB Syncers.350 #351 # Mandatory: no352 # Range: 1-100353 # Default:354 #说明:将采集数据从CACHE同步到数据库线程数量,视数据库服务器I/O繁忙情况,和数据库写能力调整。数值越大,写能力越强。对数据库服务器I/O压力越大。355 StartDBSyncers=20356 ### Option: HistoryCacheSize357 # Size of history cache, in bytes.358 # Shared memory size for storing history data.359 #360 # Mandatory: no361 # Range: 128K-2G362 # Default:363 #说明:用于设置划分多少系统共享内存用于存储采集的历史数据,此数值越大,数据库读压力越小364 HistoryCacheSize=2048M365 ### Option: HistoryIndexCacheSize366 # Size of history index cache, in bytes.367 # Shared memory size for indexing history cache.368 #369 # Mandatory: no370 # Range: 128K-2G371 # Default:372 #说明:3.0.0开始支持,历史索引大小,一个监控项需要100bytes来存储373 HistoryIndexCacheSize=2048M374 ### Option: TrendCacheSize375 # Size of trend cache, in bytes.376 # Shared memory size for storing trends data.377 #378 # Mandatory: no379 # Range: 128K-2G380 # Default:381 #说明:用于设置划分多少系统共享内存用于存储计算出来的趋势数据,此参数值从一定程度上可影响数据库读压力382 TrendCacheSize=512M383 ### Option: ValueCacheSize384 # Size of history value cache, in bytes.385 # Shared memory size for caching item history data requests.386 # Setting to 0 disables value cache.387 #388 # Mandatory: no389 # Range: 0,128K-64G390 # Default:391 #说明:划出系统多少共享内存用于已请求的存储监控项信息,若监控项较多,建议加大此数值392 ValueCacheSize=16G393 ### Option: Timeout394 # Specifies how long we wait for agent, SNMP device or external check (in seconds).395 #396 # Mandatory: no397 # Range: 1-30398 # Default:399 # Timeout=3400 #说明:与AGNET\SNMP设备和其它外部设备通信超时设置,单位为秒;若采集数据不完整或网络繁忙,或从管理页面发现客户端状态变化频繁,可以考虑加大此数值。注意若此数值加大,应该考虑参数 StartPollers 是否有相应加大的必要。401 Timeout=10402 ### Option: TrapperTimeout403 # Specifies how many seconds trapper may spend processing new data.404 #405 # Mandatory: no406 # Range: 1-300407 # Default:408 #说明:启用 trapper功能,用于进程等待超时设置。根据需要调整409 TrapperTimeout=50410 ### Option: UnreachablePeriod411 # After how many seconds of unreachability treat a host as unavailable.412 #413 # Mandatory: no414 # Range: 1-3600415 # Default:416 #说明:当AGNET端处于不可用状态下,间隔多少秒后,尝试重新连接。建议根据具体情况设置。注意,若此数值过小,右agent端业务系统繁忙时,有可能造成报警信息误报417 # UnreachablePeriod=45418 ### Option: UnavailableDelay419 # How often host is checked for availability during the unavailability period, in seconds.420 #421 # Mandatory: no422 # Range: 1-3600423 # Default:424 #说明:当AGENT端处于可用状态下,间隔多少秒后,进行状态检查。若出现可正常采集数据,但管理页面AGENT状态不正常;若在网络,端口等均通畅情况下,AGENT状态仍不正常,可以考虑加大此数值425 # UnavailableDelay=60426 ### Option: UnreachableDelay427 # How often host is checked for availability during the unreachability period, in seconds.428 #429 # Mandatory: no430 # Range: 1-3600431 # Default:432 #说明:当agent端处于不可达状态下,延迟多少秒后,进行重新尝试,建议保持默认,在AGENT接入调试阶段,可考虑减少此数值433 # UnreachableDelay=15434 ### Option: AlertScriptsPath435 # Full path to location of custom alert scripts.436 # Default depends on compilation options.437 #438 # Mandatory: no439 # Default:440 #说明:监控报警脚本路径,非研发人员不建议修改此参数值441 # AlertScriptsPath=${datadir}/zabbix/alertscripts442 AlertScriptsPath=/home/zabbix/bin443 ### Option: ExternalScripts444 # Full path to location of external scripts.445 # Default depends on compilation options.446 #447 # Mandatory: no448 # Default:449 #说明:自定义脚本存储路径,非研发人员不建议修改此参数值450 # ExternalScripts=${datadir}/zabbix/externalscripts451 ### Option: FpingLocation452 # Location of fping.453 # Make sure that fping binary has root ownership and SUID flag set.454 #455 # Mandatory: no456 # Default:457 #说明:IPv4 FPING命令路径,仅ROOT可用。注意使用此命令时,应该确认此命令是否存在458 FpingLocation=/usr/sbin/fping459 ### Option: Fping6Location460 # Location of fping6.461 # Make sure that fping6 binary has root ownership and SUID flag set.462 # Make empty if your fping utility is capable to process IPv6 addresses.463 #464 # Mandatory: no465 # Default:466 #说明:IPv6 FPING命令路径,仅ROOT可用。注意使用此命令时,应该确认此命令是否存在467 # Fping6Location=/usr/sbin/fping6468 ### Option: SSHKeyLocation469 # Location of public and private keys for SSH checks and actions.470 #471 # Mandatory: no472 # Default:473 #说明:在服务端需要SSH到AGENT端且采用用KEY验证方式时使用。非研发人员,不建议修改或设置474 # SSHKeyLocation=475 ### Option: LogSlowQueries476 # How long a database query may take before being logged (in milliseconds).477 # Only works if DebugLevel set to 3, 4 or 5.478 # 0 - don't log slow queries.479 #480 # Mandatory: no481 # Range: 1-3600000482 # Default:483 #说明:用于服务端数据库慢查询功能,单位是毫秒;1毫秒=0.001秒,若有服务端数据库监控慢查询的需求,可以视具体情况调整此数。484 # LogSlowQueries=0485 LogSlowQueries=3000486 ### Option: TmpDir487 # Temporary directory.488 #489 # Mandatory: no490 # Default:491 #说明:zabbix服务端工作的临时目录492 # TmpDir=/tmp493 ### Option: StartProxyPollers494 # Number of pre-forked instances of pollers for passive proxies.495 #496 # Mandatory: no497 # Range: 0-250498 # Default:499 #说明:启用多少子进程与代理端通信,若代理端较多可考虑加大此数值500 # StartProxyPollers=1501 ### Option: ProxyConfigFrequency502 # How often Zabbix Server sends configuration data to a Zabbix Proxy in seconds.503 # This parameter is used only for proxies in the passive mode.504 #505 # Mandatory: no506 # Range: 1-3600*24*7507 # Default:508 #说明:zabbix服务端将配置文件数据同步到代理端的频率,仅适用于代理端为被动模式情况下509 # ProxyConfigFrequency=3600510 ### Option: ProxyDataFrequency511 # How often Zabbix Server requests history data from a Zabbix Proxy in seconds.512 # This parameter is used only for proxies in the passive mode.513 #514 # Mandatory: no515 # Range: 1-3600516 # Default:517 #说明:zabbix服务端请求代理端采集的数据的频率,仅适用代理端为被动模式情况下518 # ProxyDataFrequency=1519 ### Option: AllowRoot520 # Allow the server to run as 'root'. If disabled and the server is started by 'root', the server521 # will try to switch to the user specified by the User configuration option instead.522 # Has no effect if started under a regular user.523 # 0 - do not allow 不允许524 # 1 - allow 允许525 #526 # Mandatory: no527 # Default:528 #说明:是否允许以root身份运行服务端529 AllowRoot=1530 ### Option: User531 # Drop privileges to a specific, existing user on the system.532 # Only has effect if run as 'root' and AllowRoot is disabled.533 #534 # Mandatory: no535 # Default:536 #说明:非root运行的账号537 # User=zabbix538 ### Option: Include539 # You may include individual files or all files in a directory in the configuration file.540 # Installing Zabbix will create include directory in /usr/local/etc, unless modified during the compile time.541 #542 # Mandatory: no543 # Default:544 #说明:在一些情况下,软件的参数配置文件很长,为了方便管理,将配置文件切割成N个配置文件,但为了主配置参数文件的简洁,便会启用INCLUDE参数,以方便程序读取指定目录下的所有配置文件545 # Include=546 # Include=/usr/local/etc/zabbix_server.general.conf547 # Include=/usr/local/etc/zabbix_server.conf.d/548 # Include=/usr/local/etc/zabbix_server.conf.d/*.conf549 ### Option: SSLCertLocation550 # Location of SSL client certificates.551 # This parameter is used only in web monitoring.552 #553 # Mandatory: no554 # Default:555 #说明:SSL客户端认证文件,2.4开始支持556 # SSLCertLocation=${datadir}/zabbix/ssl/certs557 ### Option: SSLKeyLocation558 # Location of private keys for SSL client certificates.559 # This parameter is used only in web monitoring.560 #561 # Mandatory: no562 # Default:563 #说明:SSL私钥文件目录,2.4开始支持564 # SSLKeyLocation=${datadir}/zabbix/ssl/keys565 ### Option: SSLCALocation566 # Override the location of certificate authority (CA) files for SSL server certificate verification.567 # If not set, system-wide directory will be used.568 # This parameter is used only in web monitoring and SMTP authentication.569 #570 # Mandatory: no571 # Default:572 #说明:SSL CA钥文件目录,2.4开始支持573 # SSLCALocation=574 ####### LOADABLE MODULES #######575 #可加载的模块576 ### Option: LoadModulePath577 # Full path to location of server modules.578 # Default depends on compilation options.579 #580 # Mandatory: no581 # Default:582 #指定本地模块路径,非研发人员不建议修改583 # LoadModulePath=${libdir}/modules584 ### Option: LoadModule585 # Module to load at server startup. Modules are used to extend functionality of the server.586 # Format: LoadModule=587 # The modules must be located in directory specified by LoadModulePath.588 # It is allowed to include multiple LoadModule parameters.589 #590 # Mandatory: no591 # Default:592 #指定本地模块路径,非研发人员不建议修改593 # LoadModule=594 ####### TLS-RELATED PARAMETERS #######595 #TLS 相关参数596 ### Option: TLSCAFile597 # Full pathname of a file containing the top-level CA(s) certificates for598 # peer certificate verification.599 #600 # Mandatory: no601 # Default:602 #说明:TLS证书文件603 # TLSCAFile=604 ### Option: TLSCRLFile605 # Full pathname of a file containing revoked certificates.606 #607 # Mandatory: no608 # Default:609 #说明:TLS证书文件610 # TLSCRLFile=611 ### Option: TLSCertFile612 # Full pathname of a file containing the server certificate or certificate chain.613 #614 # Mandatory: no615 # Default:616 #说明:TLS证书文件617 # TLSCertFile=618 ### Option: TLSKeyFile619 # Full pathname of a file containing the server private key.620 #621 # Mandatory: no622 # Default:623 #说明:TLS证书文件624 # TLSKeyFile= 625 626 627 #参考配置文件见https://www.boheyan.cn/zabbix.htm
此笔记是本人学习摘记整理而成,此为初稿(尚有诸多不完善之处),原创作品允许转载,转载时请务必以超链接形式标明文章原始出处,作者信息和本声明,否则将追究法律责任。http://www.cnblogs.com/bananaaa/