Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3036017
  • 博文数量: 535
  • 博客积分: 15788
  • 博客等级: 上将
  • 技术积分: 6507
  • 用 户 组: 普通用户
  • 注册时间: 2007-03-07 09:11
文章分类

全部博文(535)

文章存档

2016年(1)

2015年(1)

2014年(10)

2013年(26)

2012年(43)

2011年(86)

2010年(76)

2009年(136)

2008年(97)

2007年(59)

分类: 系统运维

2010-08-03 17:22:45

升级了cacti,有0.8.7e升级到0.8.7g后,nginx连接数的监控不能正常工作。

推荐打补丁解决问题,或者去掉每行print后面的空格或回车。

注:2010-8-31日,spine已经出了补丁解决了这个问题,详见:
+Patched 0.8.7g +-bug#0001669: Problems with getting data from script using SPINE on Windows Server 2003 x32 
+-bug#0001829: Wrong string numerical value got from Spine SNMP poller 
+-bug: Net-snmp API issues cause spine crashes with some SNMP agents 
+-bug: Host list not properly initialized 
+-bug: Mutex locking issues cause deadlocks in Windows 
+-bug: Escape windows type back slashes in scripts
步骤:

Execute the following commands to install all of these patches against Spine version 0.8.7g. Be sure that you are in your Spine source directory when you execute these commands. After applying the patches, you must rebuild Spine using the 'make' command.

在原安装目录执行,或者下载新的spine,需要重新执行

  aclocal

  libtoolize --force

  autoconf

  autoheader

  automake 

  chmod u+x configure

  ./configure --prefix=/usr/local/spine --with-mysql=/usr/local/mysql 

wget
patch -p1 -N < unified_issues.patch

make
make install




下面为出补丁以前的问题解决办法:
首先查看你的cacti的docs/html/目录中的文档,Creating a Data Input Method的部分进行排错。

手动执行/scripts/get_nginx_clients_status.pl 能够正确的获取返回的数据。

第一步:使用poller的debug:

/usr/local/php/bin/php -q /usr/local/nginx/html/cacti/poller.php --force --debug

可以看到有这样的错误:
ERROR: not enough argument
应该就是在获取nginx client时出现的错误。

而且查看nginx client的rra,发现没有更新。


第二步:使用spine的debug:

./spine -../etc/spine.conf --verbosity=-H 8

其中-H为device的ID,可以在devices菜单中查到。

其中关于nginx连接数的信息:

08/03/2010 05:09:09 PM - SPINE: Poller[0] Host[8] TH[1] DS[122] SCRIPT: perl /usr/local/nginx/html/cacti/scripts/get_nginx_clients_status.pl http://211.132.130.189/NginxStatus, output: 0

可以看到,spine没有获取到数据。

将spine换回原来的0.8.7e,重新执行:

./spine -../etc/spine.conf --verbosity=-H 8


08/03/2010 05:06:49 PM - SPINE: Poller[0] Host[8] DS[122] SCRIPT: perl /usr/local/nginx/html/cacti/scripts/get_nginx_clients_status.pl http://211.132.130.1890/NginxStatus, output: nginx_active:1767 nginx_reading:81 nginx_writing:3 nginx_waiting:1683

这样的数据是正确的。







阅读(2518) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

yzhkpli2010-11-26 19:20:43

求问:spine和cacti能版本相异运行么??您的cacti的版本是0.8.7e??