Yum Install http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm
Yum Install percona-zabbix-templates PHP php-mysql
3.
[Email protected] ~]# RPM-QL percona-zabbix-templates/var/lib/zabbix/percona/var/lib/zabbix/percona/scripts/var/ lib/zabbix/percona/scripts/get_mysql_stats_wrapper.sh/var/lib/zabbix/percona/scripts/ss_get_mysql_stats.php/ var/lib/zabbix/percona/templates/var/lib/zabbix/percona/templates/userparameter_percona_mysql.conf/var/lib/ Zabbix/percona/templates/zabbix_agent_template_percona_mysql_server_ht_2.0.9-sver1.1.7.xml #此模板可以导出来, then pour into Zabbix But because of the version of the issue Zabbix import was unsuccessful
, so use the database template in the folder (the monitor) to
4. Copy the configuration file
cp/var/lib/zabbix/percona/templates/userparameter_percona_mysql.conf/etc/zabbix/zabbix_agentd.d/5.cd/var/lib/ ZABBIX/PERCONA/SCRIPTS/CP ss_get_mysql_stats.php Ss_get_mysql_stats.php.cnfvim Ss_get_mysql_stats.php.cnf[[email Protected] scripts]# cat/var/lib/zabbix/percona/scripts/ss_get_mysql_stats.php.cnf <?php$mysql_user = ' user '; #数据库的用户名和密码 This user must grant localhost permission $mysql_pass = ' ********* '; [Email protected] scripts]#
Restarting the Zabbix client
Chown zabbix.zabbix/tmp/localhost-mysql_cacti_stats.txtsystemctl Restart Zabbix-agent.service
6. Import a template
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/8D/27/wKiom1iPQ3qgJRNaAACENbS_Usc330.png-wh_500x0-wm_3 -wmp_4-s_372079768.png "title=" A2561a47-ea0a-4d31-a4cc-740c6b8743a0.png "alt=" Wkiom1ipq3qgjrnaaacenbs_ Usc330.png-wh_50 "/>
7. Wait a moment to plot
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/8D/27/wKiom1iPQ8KDimXZAAFwBM-OXuA154.png-wh_500x0-wm_3 -wmp_4-s_1683021532.png "title=" 1.png "alt=" Wkiom1ipq8kdimxzaafwbm-oxua154.png-wh_50 "/>
Note: Please refer to Percona's official documentation
Https://www.percona.com/doc/percona-monitoring-plugins/1.1/zabbix/index.html#installation-instructions
This article is from the "Brick Blog" blog, please be sure to keep this source http://wsxxsl.blog.51cto.com/9085838/1894435
Zabbix Percona MySQL Monitor