Cacti monitoring of MySQL connections

Source: Internet
Author: User
Tags chmod percona

CactiMonitoringMySQL threads, concurrency, connection situation, cache usage, query method, etc.

Wgets https://www.percona.com/downloads/percona-monitoring-plugins/1.1.6/                                                                                      Percona-monitoring-plugins-1.1.6.tar.gz ( as of 2017.1.4 latest version 1.1.7)

Download extract only two files

1. PHP capture script:

CP percona-monitoring-plugins-1.1.6/cacti/scripts/ss_get_mysql_stats.php/var/www/html/cacti/scripts/

chmod +x ss_get_mysql_stats.php

Licensed on the monitored mysql server

Mysql> Grant Process,super on * * to ' cacti ' @ '% ' identified by ' cacti ';

Note:MySQL 5.1.23and older versions ofAcquisitionInnoDBGraphics NeedSUPERPermissions.
in theMySQL 5.1.24and later versions, the required permissions arePROCESSand notSUPER. (official)

Modify on Demand: Vim ss_get_mysql_stats.php

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/8C/E9/wKioL1h91c3iSDYuAAANSJY_7Zs937.png "title=" 1.png "alt=" Wkiol1h91c3isdyuaaansjy_7zs937.png "/>

Create Cache Directory, default /tmp cacti no access

Mkdir/var/www/html/cacti/tmp

Chown-r cacti.cacti/var/www/html/cacti/tmp
chmod 777-r/var/www/html/cacti/tmp

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/8C/E9/wKioL1h91fmAs6ZZAADAuY6GYac928.png "title=" 2.png "alt=" Wkiol1h91fmas6zzaadauy6gyac928.png "/>

2. Cacti View template file (Web admin side import the template):

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/8C/E9/wKioL1h91siwKYvKAAF_5MOXP8w243.png "title=" 3.png "alt=" Wkiol1h91siwkyvkaaf_5moxp8w243.png "/>

Select the xml file:percona-monitoring-plugins-1.1.6/cacti/templates/cacti_host_template_percona_mysql_ Server_ht_0.8.6i-sver1.1.6.xml


Add device after import select Percona mysql template, select individual monitoring items, the specific meaning of their own on-demand, the bottom of the link
Top two pictures of greedy 、、、

MyISAM and InnoDB have a dedicated monitoring view, n more, choose their own needs

650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M00/8C/EE/wKiom1h96hiTPtXYAABzmyxoUo4254.png-wh_500x0-wm_ 3-wmp_4-s_3013845012.png "style=" Float:none; "title=" 1.png "alt=" Wkiom1h96hitptxyaabzmyxouo4254.png-wh_50 "/>

650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M00/8C/EE/wKiom1h96hnDLnSRAABy-vuPKZ0413.png-wh_500x0-wm_ 3-wmp_4-s_2703253171.png "style=" Float:none; "title=" 2.png "alt=" Wkiom1h96hndlnsraaby-vupkz0413.png-wh_50 "/>

650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M00/8C/EA/wKioL1h96hqBxuglAADmeVrW9_w120.png-wh_500x0-wm_ 3-wmp_4-s_2150719611.png "style=" Float:none; "title=" 3.png "alt=" Wkiol1h96hqbxuglaadmevrw9_w120.png-wh_50 "/>


Example diagram and Monitoring item comparison description:

Https://www.percona.com/doc/percona-monitoring-plugins/LATEST/cacti/mysql-templates.html


The existing monitoring is nagios+cacti do the integration, so don't ask me why not directly with Zabbix, a word trouble 、、、



This article is from the "Linux_wei" blog, make sure to keep this source http://linuxww.blog.51cto.com/11418425/1892701

Cacti monitoring of MySQL connections

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.