MySQL stats (1) of Cacti script and template)

Source: Internet
Author: User

CactiIs a set of network traffic monitoring graphical analysis tools developed based on PHP, MySQL, SNMP, and RRDTool. CactiTemplateYesMySQL statsLet's explain it!

1. MySQL stats Template

Forum discussion: http://forums.cacti.net/about11010.html

: Http://www.faemalia.net/mysqlUtils/

Function: monitors the MySQL status, including index usage, query, sorting, and locking.

1 ). set mysql_stats.php and dumpMemcachedStats. put the php script in the cacti Script directory (/usr/local/apache/htdocs/cacti/scripts /), when importing a template, be sure to select the cacti_host_template_temysql_host-step300-heartbeat600.xml and cacti_host_template_memcached_host-step300-heartbeat600.xml template (default cacti 5-minute fetch data ).

2) configure the MySQL server so that the cacti machine can access the status information of the MySQL server. You must have the "process" permission. To monitor the InnoDB status, you must have the "SUPER" permission.

Grant process on *. * TO cacti @ 'cactimachine 'IDENTIFIED by 'cacti ';

Grant super on *. * TO cacti @ 'cactimacher' identified by 'cacti ';

3) create a Graph. Select Devices from the left-side menu bar under the Console tab to create a new Devices for the host to be monitored or select an existing Devices. Add the Graph Templates (for example, the teMySQL-Index Usage template, which starts with teMySQL) that you want to monitor the MySQL status in Associated Graph Templates ). Click the Create Graphs for this Host link at the top, select teMySQL-Index Usage in the Graph Templates selection box, and click Create. the following webpage is displayed.

Enter the username and password for accessing the MySQL database and click create.

Select the newly added Graph Templates and click create to create a Graph.

Select Graph Trees from the left-side menu under the console tab to organize a Tree View.


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.