Percona template monitoring mysql

Install php environment
percona requires php environment
yum install php php-mysql -y

Download and install percona
https://downloads.percona.com/downloads/percona-monitoring-plugins/percona-monitoring-plugins-1.1.8/binary/redhat/7/x86_64/percona-zabbix-templates-1.1.8-1 .noarch.rpm

rpm -ich percona-zabbix-templates-1.1.8-1.noarch.rpm
Insert picture description here

Modify get_mysql_stats_wrapper.sh
modify get_mysql_stats_wrapper ss_get_mysql_stats.php database login information
Line 19 add the mysql account password
vim /var/lib/zabbix/percona/scripts/get_mysql_stats_wrapper.sh
Insert picture description here
vim / var/lib/zabbix_stats_get_scripts/s
Insert picture description here

Copy the custom monitoring item configuration file to the
zabbix directory cp /var/lib/zabbix/percona/templates/userparameter_percona_mysql.conf /etc/zabbix/zabbix_agentd.d/

Insert picture description here

重启zabbix-agent
systemctl restart zabbix-agent.service

测试KEY
zabbix_get -s 127.0.0.1 -k MySQL.Sort-scan
Insert picture description here

Import template

Insert picture description here
Insert picture description here

Apply the template to the monitoring host
Insert picture description here

Guess you like

Origin blog.csdn.net/bjgaocp/article/details/111029975