cacti mysql 模板安装2

基本情况】
cacti本身自带了mem , proc user等模板,这里我们来安装对mysql的模板配置

【模板下载】
http://code.google.com/p/mysql-cacti-templates/





【模板配置】
1.将 ss_get_mysql_stats.phpp脚本放到cacti脚本目录下
2.修改ss_get_mysql_stats.php文件对数据库的用户名密码等配置
3.导入模板cacti_host_template_x_db_server_ht_0.8.6i.xml
4.配置MySQL服务器,让cacti所在机器能够访问MySQL服务器的状态信息,必须拥有"process"权限。如果要监控InnoDB状态,还必须有"SUPER"权限。
GRANT PROCESS ON *.* TO cacti@'cactimachine' IDENTIFIED by 'cacti';
GRANT SUPER ON *.* TO cacti@'cactimachine' IDENTIFIED BY 'cacti';
flush privileges;
5.创建Graph。在Console选项卡下的左侧菜单栏中选择Devices,为要监控的主机新建一个Devices或选择已有Devices。在Associated Graph Templates中添加想要监控MySQL状态的Graph Templates(如X MySQL Connections GT模板,此套模板是以X MySQL开头的一系列模板)。并点击最上面的Create Graphs for this Host链接,在Graph Templates的选择框中选择X MySQL Connections GT。
然后会让你输入端口信息
6.等待图片生成
7.如果有防火墙还要开发相应的数据库端口和ip

监控的对象有
X InnoDB Buffer Pool Activity GT
X InnoDB Buffer Pool GT
X InnoDB I/O GT
X InnoDB I/O Pending GT
X InnoDB Insert Buffer GT
X InnoDB Log GT
X InnoDB Row Operations GT
X InnoDB Semaphores GT
X InnoDB Transactions GT
X MyISAM Indexes GT
X MySQL Binary/Relay Logs GT
X MySQL Command Counters GT
X MySQL Connections GT
X MySQL Files and Tables GT
X MySQL Handlers GT
X MySQL Network Traffic GT
X MySQL Processlist GT
X MySQL Query Cache GT
X MySQL Query Cache Memory GT
X MySQL Replication GT
X MySQL Select Types GT
X MySQL Sorts GT
X MySQL Table Locks GT
X MySQL Temporary Objects GT
X MySQL Threads GT
X MySQL Transaction Handler GT

【参考】
http://ebsblog.blog.163.com/blog/static/1279497892012416103822399/

猜你喜欢

转载自runpanda.iteye.com/blog/2100295