Cacti默认轮询器cmd.php执行效率有点低,spine为C语言编写的组件,性能要好许多。
编译安装spine需以下软件支持:
net-snmp-devel
mysql
mysql-devel
openssl-devel
安装spine要和Cacti的版本相匹配,本文以最新版cacti0.8.8a安装为例。
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
配置spine:
cd /usr/local/spine/etc/
mv spine.conf.dist spine.conf
vim spine.conf
填写数据库信息,即Cacti数据库。
DB_Host localhost
DB_Database cacti
DB_User root
DB_Pass passwd
DB_Port 3306
设置spine路径,Console——Settings——Paths
更改cacti轮询器为spine,Console——Settings——Poller
测试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
如出现FATAL: Unable to read configuration file! (Spine init)请确认以上配置是否正确。
标签:cacti, 服务器监控, spine, cacti更改轮询器为spine