Use the Percona MySQL plugin to monitor mysql5.7

Source: Internet
Author: User
Tags install php percona

1. Install PHP

yum install -y php php-mysql

2, Installation Percona-zabbix

yum install -y https://www.percona.com/downloads/percona-monitoring-plugins/percona-monitoring-plugins-1.1.7/binary/redhat/7/x86_64/percona-zabbix-templates-1.1.7-2.noarch.rpm

3, Configuration Zabbix agentd

vim /usr/local/zabbix/etc/zabbix_agentd.conf  Include=/usr/local/zabbix/etc/zabbix_agentd.conf.d/*.confcd /var/lib/zabbix/percona/templatescp userparameter_percona_mysql.conf /usr/local/zabbix/etc/zabbix_agentd.conf.d/killall -9 zabbix_agentdchown zabbix.zabbix /tmp/localhost-mysql_cacti_stats.txt

4. Configure MySQL Default login account

su - zabbixcat .my.cnf  [client]  password=MySQL2018  user=root

5. Modify PHP Scripts

cd /var/lib/zabbix/percona/scripts/vim ss_get_mysql_stats.php   $mysql_user = ‘root‘;  $mysql_pass = ‘MySQL2018‘;  $mysql_port = 3306;  $mysql_socket = ‘/tmp/mysql.sock‘;

6. Test to get MySQL data

cd /var/lib/zabbix/percona/scripts//usr/bin/php ss_get_mysql_stats.php --host localhost --items ggcd /usr/local/zabbix/bin./zabbix_get -s 172.16.2.39 -k MySQL.file-reads

7. Download the template into Zabbix
Https://www.ttlsa.com/wp-content/uploads/2016/07/Percona-MySQL-Server-Template.zip
Reference Documentation:
Download Percona Monitoring Plugins
zabbix3.0.2 using the Percona MySQL plugin to monitor the detailed implementation of mysql5.7
zabbix-3.0 Import Percona Template Error

Use the Percona MySQL plugin to monitor mysql5.7

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.