yuxing 发表于 2019-1-10 13:16:12

cacti监控(5)快速轮询

  Cacti默认轮询器cmd.php执行效率有点低,spine为C语言编写的组件,性能要好许多。安装spine要和Cacti的版本相匹配,本文以最新版cacti0.8.8a安装为例。
      这里我们是将默认的五分钟轮询设置为一分钟轮询
  安装cacti-spine
     wget http://www.cacti.net/downloads/spine/cacti-spine-0.8.8a.tar.gz
# cp /mnt/hgfs/LINUX/cacti\ nagios\ mrtg/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
  

  配置cacti-spine
  # cd /usr/local/spine/etc/
# mv spine.conf.distspine.conf
# vim spine.conf
DB_Host         localhost
DB_Database   cacti
DB_User         cacti
DB_Pass         cacti123
DB_Port         3306
DB_PreG         0
"spine.conf" 40L, 2786C written                                                                           
#
  

   设置spine路径,
  Console——Settings——Paths
http://blog.运维网.com/attachment/201305/093204755.jpg
  

  设置没分钟轮询
  Console——Settings——Poller
  

  

http://blog.运维网.com/attachment/201305/093324613.jpg
  

  测试spine轮询器:

1
2
3
4/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
  
如出现FATAL: Unable to read configuration file! (Spine init)请确认以上配置是否正确。
  

   实例:添加没分钟流量视图
  Console-->>Data Template -->> Interface Traffic 添加没分钟视图
http://blog.运维网.com/attachment/201305/102655372.jpg
  

  




页: [1]
查看完整版本: cacti监控(5)快速轮询