zabbix3.0 monitoring MySQL Database

Source: Internet
Author: User
Tags install php percona


According to Percona's official program to do the monitoring of MySQL database, please refer to: https://www.percona.com/doc/percona-monitoring-plugins/1.1/zabbix/index.html


1, first install Percona source

# yum Install http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm


2. Install Zabbix Agent-related components

# yum Install-y percona-zabbix-templates

Also to install:

# Yum Install php php-mysql-y


3. Copying configuration files

# cp/var/lib/zabbix/percona/templates/userparameter_percona_mysql.conf/etc/zabbix/zabbix_agentd.d/


4, into the /var/lib/zabbix/percona/scripts directory, there are two configuration files need to be configured:

# Vim Get_mysql_stats_wrapper.sh

host=x.x.x.x (the IP address where MySQL resides)

# Vim ss_get_mysql_stats.ph

$mysql _user = ' xx ';

$mysql _pass = ' xx ';

$mysql _port = xx;


/var/lib/zabbix/percona/templates/in userparameter_percona_mysql.conf.

the path to the get_mysql_stats_wrapper.sh file must be clear, write your local path to the file! restart Zabbix-agent to take effect after setup.


5, this program needs to rely on PHP and Php-mysql

# yum Install Php-mysql php-y

6. Testing

/var/lib/zabbix/percona/scripts/get_mysql_stats_wrapper.sh GG

If there's a return data, it's OK.


After testing, delete the/tmp generated *-mysql_cacti_status.txt file and let the program call to create a new file yourself (remember to remember)


7. Import templates

Move the zabbix_agent_template_percona_mysql_server_ht_2.0.9-under the/var/lib/zabbix/percona/templates path Sver1.1.6.xml Import into Zabbix_server


Configuration--Templates--and Import-Select File

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>

Wait a minute, you'll be out of the picture.

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>

Go ahead and toss it.

650) this.width=650; "alt=" Zabbix-percona plug-in monitoring Mysql.docx "class=" editor-attachment "src="/e/u261/themes/default/ Images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px Solid #ddd; "/>


This article is from the "it Side dish" blog, make sure to keep this source http://3777119.blog.51cto.com/3767119/1835768

zabbix3.0 monitoring MySQL Database

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.