时间:2021-07-01 10:21:17 帮助过:4人阅读
killall -9 zabbix_agentd
/usr/local/zabbix/sbin/zabbix_agentd
3、创建mysql账号
mysql> GRANT SELECT,PROCESS,SUPER,REPLICATION CLIENT ON *.* TO ‘zabbixmoniter‘@‘localhost‘ IDENTIFIED BY "123456";
mysql> flush privileges;
4、修改插件配置文件
vim /var/lib/zabbix/percona/scripts/ss_get_mysql_stats.php
$mysql_user = ‘zabbixmoniter‘;
$mysql_pass = ‘123456‘;
$mysql_port = 3306;
$mysql_socket = ‘/tmp/mysql.sock‘;
5、创建zabbix用户MySQL用户账号(监控slave用)
su - zabbix
vim ~/.my.cnf
[client]
user = zabbixmoniter
password = 123456
socket = /tmp/mysql.sock
6、测试slave
su - zabbix
sh /var/lib/zabbix/percona/scripts/get_mysql_stats_wrapper.sh running-slave
7、导入模板
模板下载地址:
http://jaminzhang.github.io/soft-conf/Zabbix/zbx_percona_mysql_template.xml
参考博文:
http://www.ywnds.com/?p=6199
http://10880347.blog.51cto.com/346720/1932100
http://jaminzhang.github.io/monitoring/Monitoring-MySQL-using-Percona-Monitoring-Plugins-in-Zabbix/
Zabbix 3 中使用 Percona Monitoring Plugins 监控 MySQL
标签:zabbix