1.安装前准备
yum install net-snmp-devel mysql mysql-devel openssl-devel
2.安装spine
spine的安装要跟cacti的版本匹配
cd /usr/local/srcwget http://www.cacti.net/downloads/spine/cacti-spine-0.8.8a.tar.gztar zxvf cacti-spine-0.8.8a.tar.gzcd cacti-spine-0.8.8a./configuremakemake install
3.配置spine
cd /usr/local/spine/etc/cp spine.conf.dist spine.confvim spine.conf#填写数据库信息,即cacti数据库DB_Host localhostDB_Database cactiDB_User cactiuserDB_Pass cactiuserDB_Port 3306DB_PreG 0
4.在cacti页面上设置spine
设置spine路径,Console——Settings——Paths
更改cacti轮询器为spine,Console——Settings——Poller
清除之前的缓存Console——System Utilities——Rebuild Poller Cache
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.conf]#SPINE: Version 0.8.8a starting#SPINE: Time: 0.1167 s, Threads: 1, Hosts: 2
ps:如果出现“FATAL: Unable to read configuration file! (Spine init)”,则检查上面的配置是否正确。