查了下是因为监测点设置过多导致cacti通过snmpget取完所有数据的时间超过300秒。
会不会也有这方面的原因呢?故找了下解决方法如下: 以下为收集整理:
【Cacti的作者一早就考虑到这问题,所以在cacti中有两种解决方法:
1)、将POLLER更改为cactid。
默认的POLLER是cmd.php,而cactid是使用C写的程序,效率会比cmd.php高几倍! 注意,虽然POLLER的选项中有cactid的选择,但cactid默认并没有安装,所以即使你选择了它也不会生效的。
你可以从这里(http://www.cacti.net/cactid_download.php)下载cactid的源码或rpm(bin)文件进行安装。然后在PATH中指定cactid的路径即可。
2)、在POLLER的设置中加大cmd.php的进程数,即同时运行多个cmd.php进行数据的采集。但这样的话会加重你的系统负载(具体操作往下拉)。
如果你的机器性能太差,建议还是改用cactid为好。
貌似升级版本也是个方法 http://cacti.net/changelog.php最新版本0.8.8h我的是0.8.8a
【附赠】CACTID安装步骤:
Spine needs to be compiled before it can be used. If you found a binary package of Spine for your operating system, you can skip the next step about compiling Spine. Compiling Spine
tar xvzf cacti-cactid-0.8.6.tar cd cactid-0.8.6
./configure && make
拷贝cactid和cactid.conf到/usr/local/spine/
Setting Up Spine
Once Spine is installed on your system, you must perform the following steps to make your Cacti installation aware of it.
1. Login to Cacti as an admin user.
2. Select Settings on the menu and click the Paths tab.
3. Enter the complete path to your cactid binary in the Spine Poller File Path field
and click Save. (/usr/local/spine/cactid) 4. Click the Poller tab.
5. Choose "spine" from the Poller Type dropdown box and click Save.
After completing these steps, Cacti will spawn Spine every 5 minutes instead of cmd.php. If you are having problems getting Spine to gather data, you can always temporarily change Poller Type back to "cmd.php".】(自译or词霸)
PS:当磁盘空间满的时候会出现这个问题,原因是磁盘空间慢导致snmpget的时间变长(这句话是某博友总结的原话)
我选择的第二种,原因?简单粗暴不解释