Monitor MySQL using Percona monitoring Plugins in Zabbix

Source: Internet
Author: User
Tags install php percona

1. Install Agent client First

Tar zxvf zabbix-3.2.6. TAR.GZCD Zabbix-3.2.6. /configure--prefix=/data/zabbix--enable-java  --enable-agent--with-net-snmp--with-libcurl--with-openiomi-- With-unixodbc--with-ldap--with-ssh2--with-openipmi--with-jabbermakemake Install

2. Download the percona-zabbix-templates template

wget 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. Installing PHP and Php-mysql Services

Yum-  y install php php-mysql

4. Installing Percona-zabbix-templates

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

5. Modify the Zabbix configuration file

Vim/data/zabbix/etc/zabbix_agentd.conf
Add to/var/lib/zabbix/percona/templatesuserparameter_percona_mysql.conf content

6. Import a template

In the Zabbix Web page import/var/lib/zabbix/percona/zbx_percona_mysql_template.xml (this is my own 3.0 of the default installation is 2.0 of the non-generic)

7. Authorization Script File

Chmod-r 777/var/lib/zabbix/percona/scripts/*

8. Modify the SH page according to your environment location

vim/var/lib/zabbix/percona/scripts/get_mysql_stats_wrapper.shhost=10.39.3.45 (native) CMD="  /data/php/bin/php (PHP installation location)cachefile="/tmp/$HOST-mysql_zabbix_stats.txt  "  (temporary file location) RES= ' home=~zabbix/data/mysql/bin/mysql (mysql installation location)

9. Modify the PHP page according to your environment location

' Root '  'thad6zelma7_grope3936pollution'= 3306; Port

Replace cacti to Zabbix

10. Troubleshooting

Error: Rm:cannot remove '  not permitted
If the TMP below does not prompt the file to be created, if there is to give 777 permission
Going to get the data test
Zabbix_get-s 192.168.137.3-p 10050-k "Mysql.running-slave"

Monitor MySQL using Percona monitoring Plugins in Zabbix

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.