1. Install the MySQL monitoring plugin rpm package on the Zabbix client
RPM-IVH https:// www.percona.com/downloads/percona-monitoring-plugins/1.1.6/percona-zabbix-templates-1.1.6-1.noarch.rpm
Cd/var/lib/zabbix/percona/templates
CP userparameter_percona_mysql.conf/usr/local/zabbix/etc/zabbix_agentd.conf.d/# (the exact path depends on the actual situation)
Import this template file in the Zabbix monitoring page Zabbix_agent_template_percona_mysql_server_ht_2.0.9-sver1.1.6.xml
2. Edit the configuration file/usr/local/zabbix/etc/zabbix_agentd.conf
include=/usr/local/zabbix/etc/zabbix_agentd.conf.d/
3. Modify the mysql execution command file/var/lib/zabbix/percona/scripts/get_mysql_stats_wrapper.sh
/usr/bin/mysql-uuser-ppass -E ' SHOW SLAVE status\g ' | Egrep ' (slave_io_running| slave_sql_running): ' | Awk-f: ' {print $} ' | Tr ' \ n ', ' '
Modify the/var/lib/zabbix/percona/scripts/ss_get_mysql_stats.php file and replace it with your MySQL username and password
' USER ' 'PASS';
4. Add MySQL monitoring to the Zabbix monitoring page and select the Percona MySQL Server template
Percona-zabbix-templates plug-in installation monitoring MySQL