配置mysql的监控服务(zabbix)
1、概述
www.percona.com官网上有已经存在的mysql监控模版,直接导入即刻
2、下载模版
https://www.percona.com/downloads/percona-monitoring-plugins/LATEST/
3、安装
rpm -ivh percona-zabbix-templates-1.1.8-1.noarch.rpm
yum install percona-zabbix-templates php php-mysql -y
4、检查是否安装成功:
rpm -ql percona-zabbix-templates
5、拷贝配置文件致zabbi-agent的配置文件目录
cp /var/lib/zabbix/percona/templates/userparameter_percona_mysql.conf /etc/zabbix/zabbix_agentd.d/
6、编辑获取信息脚本的文件信息
vi /var/lib/zabbix/percona/scripts/ss_get_mysql_stats.php
7、重启zabbix-agent
systemctl restart zabbix-agent.service
8、zabbix 界面选择导入模版
/var/lib/zabbix/percona/templates/zabbix_agent_template_percona_mysql_server_ht_2.0.9-sver1.1.8.xml