Linux under cacti monitoring MySQL database State example

Source: Internet
Author: User

1, monitoring script download and configuration

wget http://mysql-cacti-templates.googlecode.com/files/better-cacti-templates-1.1.8.tar.gz
Tar zxvf better-cacti-templates-1.1.8.tar.gz
CD better-cacti-templates-1.1.8
CP scripts/ss_get_mysql_stats.php/var/www/html/cacti/scripts/

Only two files are needed to monitor MySQL:

Template file:./templates/cacti_host_template_x_mysql_server_ht_0.8.6i-sver1.1.8.xml
Plugins:./scriptsss_get_mysql_stats.php
To modify the ss_get_mysql_stats.php file:

vim/var/www/html/cacti/scripts/ss_get_mysql_stats.php



The MySQL server is configured so that the cacti machine can access the state information of the MySQL server and must have "process" permission. If you want to monitor the InnoDB state, you must also have "SUPER" permission.

Mysql> Grant Process,super on *.* to ' cactiuser ' @ '% ' identified by ' cactiuser '; Mysql> grant all privileges on cacti.* to  cactiuser@ "%" identified by "Cactiuser" mysql> flush;

3, Import Template
Cacti_host_template_x_mysql_server_ht_0.8.6i-sver1.1.8.xml template from Linux down to local computer, login to Web import:


4, add MySQL monitoring
Select Devices in the left menu bar under the Console tab, select a device or create a new device, and add the MySQL status to monitor in associated Graph templates:


In the Create Graphs for this host, select the template you just added and create the image below by clicking Create:


5, finally in the upper left corner of the Graphs tab, to view the device image, you can view the monitoring of the MySQL image:
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.