qweewq123qwe 发表于 2019-1-10 12:51:49

cacti更换spine轮询

  1.安装前准备
  
yum install net-snmp-devel mysql mysql-devel openssl-devel  

  2.安装spine
  spine的安装要跟cacti的版本匹配
  
cd /usr/local/src
wget http://www.cacti.net/downloads/spine/cacti-spine-0.8.8a.tar.gz
tar zxvf cacti-spine-0.8.8a.tar.gz
cd cacti-spine-0.8.8a
./configure
make
make install  3.配置spine
  

cd /usr/local/spine/etc/
cp spine.conf.dist spine.conf
vim spine.conf
#填写数据库信息,即cacti数据库
DB_Host         localhost
DB_Database   cacti
DB_User         cactiuser
DB_Pass         cactiuser
DB_Port         3306
DB_PreG         0  4.在cacti页面上设置spine

  设置spine路径,Console——Settings——Paths
  http://blog.运维网.com/attachment/201306/121939781.png
  更改cacti轮询器为spine,Console——Settings——Poller
  http://blog.运维网.com/attachment/201306/122203903.png
  清除之前的缓存Console——System Utilities——Rebuild Poller Cache
  http://blog.运维网.com/attachment/201306/122324308.png
  5.修改crontab
  将crontab的时间修改成与cacti上设置的一样的轮询时间
  

crontab -e
*/1 * * * * /usr/bin/php /var/www/html/cacti/poller.php >>/dev/null 2>&1  6.测试spine轮询器

  

/usr/local/spine/bin/spine
#SPINE: Using spine config file
#SPINE: Version 0.8.8a starting
#SPINE: Time: 0.1167 s, Threads: 1, Hosts: 2  ps:如果出现“FATAL: Unable to read configuration file! (Spine init)”,则检查上面的配置是否正确。



页: [1]
查看完整版本: cacti更换spine轮询