# tar zxvf mysql_performance_monitor_agent-0.9.1.tar.gz
# mv mysql_performance_monitor_agent-0.9.1 /usr/local/zabbix/script/mpm
修改FromDualMySQLagent.pl中的zabbix_sender的路径:
cd /usr/local/zabbix/script/mpm
sed -i 's|/usr/local/bin|/usr/local/zabbix/bin/|g' FromDualMySQLagent.pl
修改配置文件
cp /usr/local/zabbix/script/mpm/etc/FromDualMySQLagent.conf.template /usr/local/zabbix/etc/zabbix_mpm.conf
cat zabbix_mpm.conf [default] Type = mysqld Debug = 2 LogFile = /var/log/zabbix/FromDualMySQLagent.log # Directory where the Cache files should be written to: CacheFileBase = /var/log/zabbix/cache/FromDualAgentCache # Information for MySQL connections: Username = user Password = password MysqlHost = 127.0.0.1 MysqlPort = 3306 # Zabbix Server IP address ZabbixServer = 10.6.9.8 # If section is disabled Disabled = false Modules = process mysql myisam innodb # Special parameter which is used for module ndb and process ClusterLog = /var/lib/mysql-cluster/ndb_1_cluster.log PidFile = /var/lib/mysql/mysqld.pid # All MySQL databases here # Try to avoid section names with spaces! [10.58.50.49] # This MUST match Hostname in Zabbix! Type = mysqld MysqlPort = 3306 Modules = process mysql myisam slave PidFile = /data/mysql/data/mysql.pid #mysql server pid