Zabbix 3 uses Percona monitoring Plugins to monitor MySQL

Source: Internet
Author: User
Tags percona

1, install the monitoring plug-in

wget https://www.percona.com/downloads/percona-monitoring-plugins/percona-monitoring-plugins-1.1.7/binary/ redhat/6/x86_64/percona-zabbix-templates-1.1.7-2.noarch.rpm

RPM-IVH percona-zabbix-templates-1.1.7-2.noarch.rpm

Yum Install percona-zabbix-templates PHP php-mysql-y


2. Modify the Zabbix agent configuration file

Cp/var/lib/zabbix/percona/templates/userparameter_percona_mysql.conf/usr/local/zabbix/etc/zabbix_agentd.conf.d /

Vim/usr/local/zabbix/etc/zabbix_agentd.conf

include=/usr/local/zabbix/etc/zabbix_agentd.conf.d/

Killall-9 Zabbix_agentd

/usr/local/zabbix/sbin/zabbix_agentd


3. Create MySQL Account

Mysql> GRANT select,process,super,replication CLIENT on * * to ' zabbixmoniter ' @ ' localhost ' identified by "123456";

mysql> flush Privileges;


4. Modify the plug-in configuration file

vim/var/lib/zabbix/percona/scripts/ss_get_mysql_stats.php

$mysql _user = ' zabbixmoniter ';

$mysql _pass = ' 123456 ';

$mysql _port = 3306;

$mysql _socket = '/tmp/mysql.sock ';

5, create Zabbix user MySQL user account (for monitoring slave)

Su-zabbix

Vim ~/.MY.CNF

[Client]

user = Zabbixmoniter

Password = 123456

Socket =/tmp/mysql.sock


6. Test slave

Su-zabbix

Sh/var/lib/zabbix/percona/scripts/get_mysql_stats_wrapper.sh Running-slave


7. Import templates

Template:

Http://jaminzhang.github.io/soft-conf/Zabbix/zbx_percona_mysql_template.xml


Reference blog:

http://www.ywnds.com/?p=6199

http://10880347.blog.51cto.com/346720/1932100

http://jaminzhang.github.io/monitoring/Monitoring-MySQL-using-Percona-Monitoring-Plugins-in-Zabbix/


Zabbix 3 uses Percona monitoring Plugins to monitor MySQL

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.