Cacti-spine是一个替换Cacti默认Poller Type如cmd.php
 

1、下载Cacti-spine最新版本,(要同使用的cacti版本相匹配)

下载地址:http://www.cacti.net/downloads/spine/


 

2、安装(注意需要安装net-snmp-devel的包,因为需要net-snmp的.h文件)

[cacti@test-22 cacti-spine-0.8.7h]$ ./configure --prefix=/usr/local/cacti-spine/

[cacti@test-22 cacti-spine-0.8.7h]$ make && make install


 

3、安装后,要对配置文件进行修改

[cacti@test-22 ~]$ vim /usr/local/cacti-spine/etc/spine.conf

DB_Host         localhost
DB_Database     cacti
DB_User         hitman

DB_Pass         password
DB_Port         3306


 

4、创建一个软链接文件(因为spine默认会去读取该sock文件)

[root@test-22 ~]# ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock


 

5、验证spine是否正常

[cacti@test-22 ~]$ /usr/local/cacti-spine/bin/spine -C /usr/local/cacti-spine/etc/spine.conf

 

[root@cacti etc]#crontab -e(设置轮询刷新时间)

 

*/1  * * * *   /usr/bin/php /var/www/html/poller.php > /dev/null 2>&1

 

6、在cacti界面指定cacti-spine路径

Console -> Cacti Settings->Paths->Spine Poller File Path

填入spine 的命令路径

/home/cacti/apps/spine/bin/spine

 

7、修改Cacti使用的Poller Type

Console -> Cacti Settings->Poller->Poller Type

在下拉中选择spine

接着在cacti页面上面设置poller选择spine,如下图设置

 

Cacti spine 安装配置_安装


Cacti spine 安装配置_安装_02

这样就结束了.