最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
linux下Cacti监控MySQL数据库状态例子
时间:2015-03-23 编辑:简简单单 来源:一聚教程网
1、监控脚本下载及配置
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/
监控mysql只需要用到两个文件:
模板文件:./templates/cacti_host_template_x_mysql_server_ht_0.8.6i-sver1.1.8.xml
插件:./scriptsss_get_mysql_stats.php
修改ss_get_mysql_stats.php 文件:
vim /var/www/html/cacti/scripts/ss_get_mysql_stats.php
配置MySQL服务器,让cacti所在机器能够访问MySQL服务器的状态信息,必须拥有”process”权限。如果要监控InnoDB状态,还必须有”SUPER”权限。
mysql> grant process,super on *.* to 'cactiuser'@'%' identified by 'cactiuser'; mysql> grant all privileges on cacti.* to cactiuser@"%" identified by "cactiuser"; mysql> flush privileges;
在Console选项卡下的左侧菜单栏中选择Devices,选择一个Device或新建一个Device,在Associated Graph Templates中添加要监控的mysql状态:
-
下一个: nginx.conf配置文件中文说明
相关文章
- linux查看MySQL数据库的版本 07-04
- 在linux下如何进行mysql命令行 创建数据库 04-17
- linux中MySQL 重新初始化数据库 03-04
- linux中查看mysql数据库版本号的方法 02-22
- Linux shell操作mysql数据库详解 10-12
- linux卸载mysql数据库步骤详解 10-12