wxsheng 发表于 2019-1-11 12:43:24

Cacti安装(3): mysql模板安装

  1. 下载模板


[*]wget http://mysql-cacti-templates.googlecode.com/files/better-cacti-templates-1.1.8.tar.gz -P /usr/local/src

  2. 解压,安装脚本


[*]tar zxvf /usr/local/src/better-cacti-templates-1.1.8.tar.gz -P /usr/local/src
[*]cd /usr/local/src/better-cacti-templates
[*]cp scripts/ss_get_mysql_stats.php /data/www/cacti/scripts
[*]chown cacti:cacti /data/www/cacti/scripts/ss_get_mysql_stats.php
[*]chmod 0755 /data/www/cacti/scripts/ss_get_mysql_stats.php

  3. 添加数据库监控用户


[*]mysql -uroot -p
[*]> grant process,super on *.* to cactiuser@'192.168.1.10' identified by 'xxxxxx';
[*]> flush privileges;

  4. 配置脚本的数据库连接


[*]vi /data/www/cacti/scripts/ss_get_mysql_stats.php
[*]$mysql_user = 'cactiuser';
[*]$mysql_pass = 'xxxxxx';
[*]$mysql_port = 3306;

  5. 导入模板
  通过cacti的“console”左侧栏的”Import Templates"导入模板"cacti_host_template_x_mysql_server_ht_0.8.6i-sver1.1.8.xml"



页: [1]
查看完整版本: Cacti安装(3): mysql模板安装