cacti监控MySQL

十一月 8th, 2009 Posted in cacti | 阅读次数: 1,161 次

Author:gaojinbo
time:2009-11-07
Blog:http://www.gaojinbo.com

1.MySQL stats模板

论坛讨论:http://forums.cacti.net/about11010.html

下载地址:http://www.faemalia.net/mysqlUtils/
http://www.faemalia.net/mysqlUtils/teMySQLcacti-20060810.tar.gz

http://mysql-cacti-templates.googlecode.com/files/mysql-cacti-templates-1.1.1.tar.gz

功能:用来监控MySQL状态,其中包括索引使用情况、查询、排序、锁定情况等。

 

1).将mysql_stats.php 和 dumpMemcachedStats.php脚本放到cacti脚本目录下(/var/www/html/cacti/scripts/)

导入模板时注意选择
cacti_host_template_temysql_host-step300- heartbeat600.xml
cacti_host_template_memcached_host-step300- heartbeat600.xml模板(默认cacti 5分钟取一次数据)

 

2).配置MySQL服务器,让cacti所在机器能够访问MySQL服务器的状态信息,必须拥有"process"权限。
如果要监控InnoDB状态,还必须有"SUPER"权限。

GRANT PROCESS ON *.* TO cacti@’cactimachine’ IDENTIFIED by ‘cacti’;

GRANT SUPER ON *.* TO cacti@’cactimachine’ IDENTIFIED BY ‘cacti’;

 

3).创建Graph。在Console选项卡下的左侧菜单栏中选择Devices,为要监控的主机新建一个Devices或选择已有Devices。在Associated Graph Templates中添加想要监控MySQL状态的Graph Templates(

如teMySQL – Index Usage模板,此套模板是以teMySQL开头的一系列模板)。并点击最上面的Create Graphs for this Host链接,在Graph Templates的选择框中选择teMySQL – Index Usage,然后点

击Create按钮,出现以下WEB页。

在上面填写有权限访问MySQL数据库的用户名及密码,然后点击create按钮。

选中刚添加的Graph Templates,点击create按钮来创建Graph。

在控制台选项卡下左侧菜单中选择Graph Trees可以组织一个树状视图。

 

完成!

相关日志:

Tags: ,

6 Responses to “cacti监控MySQL”

  1. Cure Yeast Infection Says:

    Recent Favourite Sites…

    [...]below you can check out my links page http://www.yeastinfectiontreatmentcure.net/links/ with some good sites that I think you should visit[...]…


  2. Resources Says:

    Interesting Article…

    [...]some interesting sites worth visitng. We recommend all our readers go and check these out[...]……


  3. Related Resources Says:

    Related Websites…

    [...]some other related resources on the web that are worth viewing on this subject include[...]…


  4. Good info. Says:

    Nice Read….

    [..] This morning after I read your blog post, I really liked the message and decided it was worthy of a link. [..]…


  5. home remedies for yeast infections Says:

    Interesting Posts…

    [...]some other related resources on the web that are worth viewing on this subject include[...]…


  6. divorce law in pennsylvania Says:

    Cool sites……

    [...]we came across a cool site that you might enjoy. Take a look if you want[...]………


留下您的脚印