免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5479 | 回复: 8
打印 上一主题 下一主题

[网络管理] cacti监控,snmpwalk有数据,rrdtool无,求教解决思路??? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-06-26 11:07 |只看该作者 |倒序浏览
公司的cacti安装设置好后,可以监控,但从昨天晚上十点开始所有服务器的数据都不能显示在cacti的图形中.
参考:http://www.0591ok.com/blog/article.asp?id=1
snmpwalk -v 1 localhost -c public     有数据显示
rrdtool fetch ***.rrd AVERAGE          所有的记录都显示为nan
php /*/*/*/poller.php                       显示 Waiting on 1/1 pollers.

---------------------------------------------------------------------------------------------------------
再参考:http://bbs.chinaunix.net/viewthread.php?tid=634335
nan 就是沒有資料,全都是 nan
表示你 rrdtool update 從沒有成功過
用 cacti 出現這種問題表示你的 snmp 設定肯定有問題
你的 snmp 設定有問題代表你要先弄懂 snmp 的東西
不是研究 cacti/rrdtool , 根本沒做好,求什麼形而上的東西呢
---------------------------------------------------------------------------------------------------------

郁闷,说到底,具体怎么解决?    思路是什么?

论坛徽章:
0
2 [报告]
发表于 2006-06-26 13:43 |只看该作者
是snmp的问题? 还是rrdtool的问题?解决的思路是什么?

[ 本帖最后由 agg230 于 2006-6-26 14:30 编辑 ]

论坛徽章:
0
3 [报告]
发表于 2006-06-26 13:46 |只看该作者
what's the version of your cacti ?
have you apply all the patches ?
I've met the same problem some times ago, and finally, by truncate table poller_output, the problem solved.

so please check whether the table "poller_output" is totally empty.
mysql> select count(*) from poller_output;
+----------+
| count(*) |
+----------+
|        0 |
+----------+
1 row in set (0.00 sec)


if not ,truncate it.and run command:
php ./rebuild_poller_cache.php
php ./poller_reindex_hosts.php

论坛徽章:
0
4 [报告]
发表于 2006-06-26 14:26 |只看该作者
我的意思是,这台电脑上安装并使用CACTI已经有很长时间(大于一年),前面一直可以运行良好,可以显示数据,只是从昨天晚上十点开始,全部服务器的数据突然都无法在CACTI上显示出来。网络没有问题,按网上几个教程试着运行以下几个命令
snmpwalk -v 1 localhost -c public     结果:有数据显示
rrdtool fetch ***.rrd AVERAGE          结果:所有的记录都显示为nan
php /*/*/*/poller.php                       结果:显示 Waiting on 1/1 pollers.
-------------------------------------------------------------------
回zhangr,MYSQL运行命令后,显示如下:
mysql>select count(*) from poller_output
count(*): 0
1 row in set (0.00 sec)
-------------------------------------------------------------------
应该和该表无关系吧
无从下手现在

[ 本帖最后由 agg230 于 2006-6-26 14:31 编辑 ]

论坛徽章:
0
5 [报告]
发表于 2006-06-26 14:39 |只看该作者
turn on the debug log in the cacti,and check for more detail.
but the log maybe huge more than hundred KB every 5 mins.

论坛徽章:
0
6 [报告]
发表于 2006-06-27 08:53 |只看该作者
参考:http://www.cacti.net/downloads/docs/html/faq.html#AEN1927
----------------------------------------------------------------------------------------------
rra目录下文件为cactiuser拥有.
select Graph Management from the menu, select any graph listed, and select Turn On Graph Debug Mode.  结果可以绘图,但图中无数据,显示:RRDTool Says: OK
我的snmpd也是开启的
----------------------------------------------------------------------------------------------
对于cacti.log文件,最晚的记录为十点,从该时间点开始,CACTI中开始无数据显示,LOG文件不再有记录。
最后一条记录:
06/25/2006 10:00:00 AM - CMDPHP: Poller[0] Host[7] DS[74] SNMP: v1: 10.205.8.1, dsname: hdd_used, oid: .1.3.6.1.4.1.2021.9.1.8.1, output: 1

[ 本帖最后由 agg230 于 2006-6-27 09:26 编辑 ]

论坛徽章:
0
7 [报告]
发表于 2006-06-27 12:14 |只看该作者
参考:http://forums.cacti.net/about7359-30.html
Now, I am getting hanging pollers:
05/02/2005 05:12:55 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: , ARGS: 0 64]
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
---------------------------------------------------------------------------------------
I disabled the device that was often the last rrd to update and now all the rrds are updating !!!
Yayaya
But this is with cmd.php and it takes 10 mins
cactid 0.8.6e is core dumping
---------------------------------------------------------------------------------------
Ok, I now realize all entries returned by the "None" were "bogus" and I have deleted them.

论坛徽章:
0
8 [报告]
发表于 2006-06-27 15:26 |只看该作者
参考:http://chinaunix.net/jh/4/552218.html
5.更新 RRD 資料 (rrdtool update)

rrdtool update filename [--template|-t ds-name[:ds-name]...] N|timestamp:value[:value...]

這個很好理解,基本上就是根據 DS來更新資料,如上述之 tcpdump.rrd,若有需要更新時及時
$>;rrdtool update tcpdump.rrd  1061811856:114:0:50:1199:0:821073
上面的 1061811856 即時間值,如果就是要現在的時間值,則可以 N 代表,但要轉換成秒值,通常我們都會以
$>;timestamp=`date +%s `
來轉現在秒數,如果是某些特定時間,則可以
$>;timestamp=`date -d "2003/08/15 12:00" +%s`
通常這裏你得寫個小程式取數據,或用 snmpget/snmpwalk 抓資料來做 rrdtool update,再用 crontab
根據你在 rrdtool create 時的 step 來決定執行排程的時間點
http://211.72.210.251/tcpdump.txt
這裏提供一個 update 範例檔給大家,其時間範圍為 2003/08/15~2003/08/25,step 為 300s,根據這個檔
您自己可適時的建立自己的 rrd file,最好不要抄上面才好(放不進去 rrdfile,請再將 create 指令再看
一次,一定是你漏了什麼了).

论坛徽章:
0
9 [报告]
发表于 2006-06-27 17:25 |只看该作者
Console -> Devices -> (Edit)

Localhost (127.0.0.1)
SNMP Information
SNMP not in use

和这个有关系么?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP