Chinaunix首页 | 论坛 | 博客
  • 博客访问: 609992
  • 博文数量: 74
  • 博客积分: 1845
  • 博客等级: 上尉
  • 技术积分: 731
  • 用 户 组: 普通用户
  • 注册时间: 2005-03-14 20:49
文章分类

全部博文(74)

文章存档

2017年(3)

2016年(7)

2015年(4)

2014年(6)

2013年(7)

2012年(10)

2011年(10)

2010年(4)

2009年(5)

2008年(4)

2007年(7)

2006年(6)

2005年(1)

分类: LINUX

2013-11-11 15:25:32

转自





        近日研究cacti监控网络边界流量的问题,可是发现当流量超过100M时不准确,网上查了很多资料都说是不支持64位采集或者net-snmp版本过低的问题,但经过测试我的情况不属于上述两者。

       后发现cacti 的官方论坛里有这样的回复:

“the problem is that a 32 bit snmp counter overflows between the 5 min polling intevals that is used by default. 

you have two options: 
* use 64 bit snmp counters if your device supports it (probably needs snmp v2 or above) 
* use shorter polling interval, for example 1 minute, but note that you need to change more than just the polling interval (graph, rra and so on) 

i'm using 1min polling intervals for 32bit counters on 1 gbit interfaces and a different graph+datasource setup, and this works fine. 
it also gives better precition for the last couple of ours (1min intervals instead of 5min). 

check the forums, there should be some info about this.”

原来,把cacit的poller时间改成1分钟,可以解决这个问题,于是:(cacti:Version 0.8.7g)

1、修改poller

进入cacti ,点击settings ,然后点击右边的Poller,将Poller Interval和Cron Interval全部设置为every minute,然后点击最下面的save (当然Poller Interval 可以设置为10s ,15s,20s,30s,)

2、修改crontab

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

3、修改data templete,我这里的是网络流量监控,所以直接修改Interface Traffic 点击进去,将Step 300 改为60 ,Associated RRA’s 把1 minute average 也选择上,然后点击save 退出

4、清除cache

Console->System Utilities->Rebuild Poller Cache

 

5.重新建立rrd cache

cd /var/www/cacti/cli/
php -q rebuild_poller_cache.php -d
6.删除所有rra文件

cd /var/www/cacti/rra
rm -rf *

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