For “reasonable” timeouts, this may be related to a snmpbulkwalk issue. To change this, see Settings, Poller and lower the value for The Maximum SNMP OID’s Per SNMP Get Request. Start at a value of 2 and increase it again, if the poller starts working. (1 or less disables snmpbulkwalk) Some agent’s don’t have the horsepower to deliver that many OID’s at a time. Therefore, we can reduce the number for those older/underpowered devices.
我在 Device 配置界面下,将“Maximum OID’s Per Get Request”值设置为最小值“1”,该问题解决了。但是过了一段时间图像又开始断断续续的,而且生成的 rrd 文件中的数值都是 NaN,在监控服务器端的命令行下执行 snmpwalk 命令,发现屏幕输出跑了一些信息后停下来显示 Timeout: No Response from 10.10.2.91,这是由于网络状况不太好,所以导致 Cacti 服务没有完全获得监控端的 SNMP 信息就 Timeout 了。为了证明我的猜测,我在之前的运行的 snmpwalk 命令中加入“-t 120”选项,结果 snmpwalk 获得了完整的监控端 SNMP 信息。所以我在 Device 配置界面下设置“SNMP Timeout”值为 20000,问题彻底解决了,同时我把“Maximum OID’s Per Get Request”值又重新调整为默认值“10”。这样可以减少 Cacti 监控服务器访问监控端的 SNMP 服务的次数从而提高性能。如果你的网络状况很好的情况下,你可以进一步的调高“Maximum OID’s Per Get Request”值。
1. Settings 中修改“poller type”为 Spine,修改 Spine Specific Execution Parameters 里的 Maximum Threads per Process 为监控服务器 cpu 个数的2倍。我在实际的操作中将该值从默认值“1”修改为“16”,但是 Poller 的运行时间反倒增加了,再修改为“8”,情况好一些,所以大家可以自己随意改写该数值,然后在 cacti.log 文件中查询 Poller 轮询运行时间的变化,然后确定最优的方案。如果在 cacti.log 文件中出现如下警告,请按照警告信息在 Cacti 监控服务器端修改相应文件的操作权限。
05/25/2011 09:00:02 AM – SPINE: Poller[0] WARNING: Spine NOT running asroot. This is required if using ICMP. Please run “chmod +s;chown root:root spine” to resolve.