Percona-zabbix-templates plugin installation and monitoring MySQL and perconamysql monitoring

Source: Internet
Author: User
Tags percona

Percona-zabbix-templates plugin installation and monitoring MySQL and perconamysql monitoring

The monitored machine has installed php.

1. Install the mysql monitoring plug-in 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 specific path depends on the actual situation)

Import this template file zabbix_agent_template_percona_mysql_server_ht_2.0.9-sver1.1.6.xml on the zabbix monitoring page

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 Command Execution file/var/lib/zabbix/percona/scripts/get_mysql_stats_wrapper.sh

RES=`HOME=~zabbix /usr/bin/mysql -uUSER -pPASS -e 'SHOW SLAVE STATUS\G' | egrep '(Slave_IO_Running|Slave_SQL_Running):' | awk -F: '{print $2}' | tr '\n' ','`

Change the/var/lib/zabbix/percona/scripts/ss_get_mysql_stats.php file to the MySQL user name and password.

$mysql_user = 'USER';$mysql_pass = 'PASS';

4. Add MySQL monitoring on the zabbix monitoring page and select the Percona MySQL Server Template

 

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.