cacti 增加 Mysql 监控

SpawN 2010-05-26 13:21:48 累计浏览 4,744 次

1.update yum source
rpm -Uvh   http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
rpm -Uvh   http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm

2.install software
yum install cacti httpd mysql-server net-snmp-utils rrdtool

3.mysql start
service mysqld restart

4. add database cacti for mysql
mysqladmin -user=root -p123456 create cacti
mysql cacti < /var/www/cacti/cacti.sql

5.modify cacti confile file for apache
vim /etc/httpd/conf.d/cacti.conf
delete lines below
deny from all
allow from 127.0.0.1

6.add user cacti for mysql
mysql -u root -p123456
GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY ‘cacti’;
flush privileges;

7.modify cacti config file
vi /var/www/cacti/include/config.php
$database_password = “cacti”;

8.add mysql template and script for cacti
wget http://mysql-cacti-templates.googlecode.com/files/mysql-cacti-templates-1.1.2.tar.gz
tar zxvf mysql-cacti-templates-1.1.2.tar.gz
cd mysql-cacti-templates-1.1.2
cp ss_get_mysql_stats.php cacti/sctipts/
chmod 777 ss_get_mysql_stats.php

9.reference
http://code.google.com/p/mysql-cacti-templates/

同分类推荐文章

  1. NGINX Gateway Fabric 2.8: IP allow and deny lists, passive health checks, and cookie-based session persistence (2026-11-14 01:10:02)
  2. NGINX Ingress Controller 5.7: HTTP/2 to your upstreams, Opaque Secrets, and cert-manager challenges behind HTTPS redirects (2026-11-14 00:10:02)
  3. Hexo 文章一键发布到微信公众号 (2026-11-13 19:10:02)

查看更多 DevOps 文章 →

建议继续学习

  1. 用Hyer来进行网站的抓取 (累计阅读 158,836)
  2. MySQL数据库在实际应用一些方面的介绍 (累计阅读 36,808)
  3. WordPress插件开发 -- 在插件使用数据库存储数据 (累计阅读 29,568)
  4. Mysql监控指南 (累计阅读 21,830)
  5. WEB系统需要关注的一些点 (累计阅读 19,283)
  6. 由浅入深探究mysql索引结构原理、性能分析与优化 (累计阅读 17,050)
  7. 批量添加主机到cacti+nagios的监控报警系统中 (累计阅读 15,536)
  8. 我常用的主机监控shell脚本 (累计阅读 14,007)
  9. 在Apache2.2.XX下安装Mod-myvhost模块 (累计阅读 13,479)
  10. 15个最好的免费开源电子商务平台 (累计阅读 12,947)