Welcome 微信登录

首页 / 数据库 / MySQL / Cacti 监控 MySQL笔记

Cacti 监控 MySQL1. 安装监控插件cd /opt
wget http://mysql-cacti-templates.googlecode.com/files/mysql-cacti-templates-1.1.2.tar.gz
tar -xzvf mysql-cacti-templates-1.1.2.tar.gz
cp /opt/mysql-cacti-templates-1.1.2/ss_get_mysql_stats.php /var/www/html/scripts/chown -R apache.apache /var/www/html/scripts
chmod -R 755 /var/www/html/scripts使用 http 访问 cacti主机 导入 /opt/mysql-cacti-templates-1.1.2/cacti_host_template_x_db_server_ht_0.8.6i.xml
http://192.168.0.195
默认CactiEZ 账户和密码分别是 admin admin控制台 - 导入导出 - 模板导入 - 浏览选中 cacti_host_template_x_db_server_ht_0.8.6i.xml
保存2. 配置cacti的mysql插件修改 ss_get_mysql_stats.phpvi /var/www/html/scripts/ss_get_mysql_stats.php$mysql_user = "cacti";
$mysql_pass = "cacti";
$cache_dir = "/tmp/cacti/cache/";这个账户和密码是 被监控端主机 给 Cacti主机 授权的 账户和密码
Cacti需要这个账户和密码去连接 被监控机 查询状态mkdir -p /tmp/cacti/cache
chown -R apache.apache /tmp/cacti
chmod -R 755 /tmp/cacti设置 cacti 缓存目录在 /tmp/cacti/cache/ 并给予权限3. 配置被监控端的mysql 给 cacti 主机授权mysql -uroot -p
grant process,super on *.* to "cacti"@"192.168.0.195" identified by "cacti";
exitgrant process,super on *.* to "账户"@"Cacti主机IP地址" identified by "密码";
此命令 意义
只允许IP为 192.168.0.195 的主机 以 账户 cacti 密码 cacti 去访问 本机数据4. 在Cacti主机上 监控Mysql4.1 为主机添加mysql模块
控制台 - 管理 - 设备 - 选中之前创建好的主机
然后移到最下面的 添加图形模版 选中 Mysql相关模块 然后保存4.2 为mysql模块创建图形
控制台 - 创建 - 创建图形 - 选中该主机 - 选中mysql模块 - 创建4.3 插件mysql性能数据
监视器 - 选中该主机 - 查阅对应的mysql完毕mysqld_safe --user=mysql &mysql -uroot -pmysql -uroot -proot
grant ALL PRIVILEGES ON *.* to root@"%" identified by "root" WITH GRANT OPTION;
exitgrant select,insert,update,delete on cacti.* to cacti@* identified by "cacti";
exitgrant process,super on *.* to "cacti"@"%" identified by "cacti";
grant all privileges on cacti.* to cacti@"%" identified by "cacti";
客户端开启Cacti访问本机mysql的权限grant process,super on *.* to "cacti"@"192.168.0.195" identified by "cacti";
grant process,super on *.* to "cacti"@"192.168.0.97" identified by "cacti";= = = = =mysql -ucacti -pcacti -h 192.168.0.97MySQL Timestamp的使用Oracle中的用户管理相关资讯      mysql  CACTI 
  • Cacti监控内网本机TCP连接状况  (08月03日)
  • Cacti auth_login.php绕过访问限制  (04月15日)
  • Cacti完全使用手册 ( 让你快速个性  (08/20/2015 19:49:24)
  • Cacti 安装spine以实现每分钟获取  (04月27日)
  • Cacti host_new_graphs_save函数  (12/16/2015 13:55:43)
  • Linux下搭建Cacti详述  (08/12/2015 10:53:40)
本文评论 查看全部评论 (0)
表情: 姓名: 字数