搜索泥称 发表于 2019-1-23 06:07:32

使用Zabbix + MPM全面监控MySQL

  

  
# Type of section:
  
# mysqld for a normal MySQL database
  
# ndbd   for a MySQL cluster
  
Type         = mysqld
  

  
# Debug levels are:
  
# 1 is logging only errors
  
# 2 is logging errors and warnings (this is the default)
  
# 3 logs some informations messages as well
  
# 4 logs everything (for debugging purposes only)
  

  
Debug         = 2
  
LogFile       = /var/log/zabbix/FromDualMySQLagent.log
  
# Directory where the Cache files should be written to:
  
CacheFileBase = /var/log/zabbix/cache/FromDualAgentCache
  

  
# If you agent is not located in the same time zone as your server
  
# TimeShift = +0.0
  

  
# Information for MySQL connections: 下面的这几项需要修改
  
Username   = mpm
  
Password   = 123456
  
MysqlHost    = 127.0.0.1
  
MysqlPort    = 3306
  

  
# Zabbix Server IP address 需要修改
  
ZabbixServer = 192.168.1.190
  

  
# If section is disabled
  
Disabled   = false
  

  
# Possible modules for databases are:
  
# process mysql myisam aria innodb pbxt ndb master slave drbd galera memcache
  
# Possible modules for servers are:
  
# mpm server
  
# Usual modules are
  
Modules      = process mysql myisam innodb
  

  
# Special parameter which is used for module ndb and process
  
ClusterLog   = /var/lib/mysql-cluster/ndb_1_cluster.log
  
# MySQL Pid file, need read permission for zabbix user
  
PidFile      = /var/run/mysqld/mysqld.pid #这里也需要修改
  

  

  

  
Type         = mysqld
  
Modules      = mpm server
  

  

  
# All MySQL databases here
  
# Try to avoid section names with spaces!
  

  
   # This MUST match Hostname in Zabbix! 注意:该行及以下的几行需要取消注释
  
Type         = mysqld
  
MysqlPort    = 3306
  
Modules      = process mysql myisam innodb slave
  
PidFile      = /var/run/mysqld/mysqld.pid
  
Debug      = 1


页: [1]
查看完整版本: 使用Zabbix + MPM全面监控MySQL