Zabbix配置文件详解

本文详细介绍了Zabbix监控系统的配置文件类型及其具体设置,帮助读者深入理解如何优化和调整Zabbix的性能。
摘要由CSDN通过智能技术生成

zabbix配置文件详解

一、配置文件类型

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,以保持代理端数据库轻便,建议保持默认
  
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值