找不到网卡的时候,修改了一下snmpd.conf就好了

http://blog.sina.com.cn/s/blog_6a03f09f0100xcf8.html

Cacti snmp找不到网卡的问题,请帮忙解决net-snmp版本5.0.9
编译配置:
./configure --with-default-snmp-version="3" --with-sys-contact="root@localhost" --with-sys-location="beijing" --with-logfile
="/var/log/snmpd.log" --with-persistent-directory="/var/net-snmp" --with-libwrap

snmp安装完成后,配置了一下snmpd.conf
内容为:

rocommunity abc_snmp
com2sec notConfigUserdefault abc_snmp
view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.2
view systemview included .1.3.6.1.2.1.25.1.1
view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.2
view systemview included .1.3.6.1.2.1.2.2.1.1
view systemview included .1.3.6.1.2.1.25.1.1
view systemview included .1.3.6.1.4.1.2021.10.1.3.1
view systemview included .1.3.6.1.4.1.2021.10.1.3.2
view systemview included .1.3.6.1.4.1.2021.10.1.3.3
view systemview included .1.3.6.1.4.1.2021.4.3.0
view systemview included .1.3.6.1.4.1.2021.4.4.0
view systemview included .1.3.6.1.4.1.2021.4.5.0
view systemview included .1.3.6.1.4.1.2021.4.6.0
view systemview included .1.3.6.1.4.1.2021.4.11.0
view all included .1 80
accessnotConfigGroup "" any noauth exactall none none
syslocation abc
syscontact abc@abcd
pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat

然后把编译目录下/dist/snmpd-init.d cp到/etc/rc.d/init.d/snmpd
然后修改/etc/rc.d/init.d/snmpd
#!/bin/sh
#
# snmpd This shell script takes care of starting and stopping
# the net-snmp SNMP daemon
#
# chkconfig: - 26 74
# description: snmpd is net-snmp SNMP daemon.

# Source function library.
. /etc/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

RETVAL=0
name="snmpd"
prog="/usr/local/sbin/snmpd"

[ -x $prog -a -f /usr/local/share/snmp/snmpd.conf ] || exit 0

start() {
# Start daemons.
echo -n $"Starting $name: "
daemon $prog -Cc /etc/snmp/snmpd.conf
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$name
return $RETVAL
}

stop() {
# Stop daemons.
echo -n $"Shutting down $name: "
killproc $prog
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$name
return $RETVAL
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status $name
RETVAL=$?
;;
restart|reload)
stop
start
RETVAL=$?
;;
condrestart)
if [ -f /var/lock/subsys/$name ]; then
stop
start
RETVAL=$?
fi
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
exit 1
esac

exit $RETVAL

修改的内容主要是把启动时的命令添加了参数 -Cc /etc/snmp/

请建议vpn方案...

snmpd.conf 修改snmpd读取的配置文件

在cacti添加了这个服务器以后http://www.2uphone.com,取不到数据,不知道为什么,请高人指导http://www.vaexcellent.com!佳能600DCacti版本是0.8.6h for linux,数据获取方式是Cactid,Cactid默认编译.
我觉得问题应该不是Cactid,因为我以前用cmd.php取数据也是没有取到请看cacti下 的log/cacti.log查找问题你要抓的网卡是千M还是百M,是32位还是64位?
下一个新的net-snmp从新编译安装试试。
configure 时加个--enable-mfd-rewrites我现在严重怀疑是我的cacti端的net-snmp版本太低.正在重新编译5.4版的.希望有些奇迹. 我的网卡32位1000M的

介于机房不提供用户流量查询服务,故自行安装。

yum install mysql mysql-server php php-mysql zlib libpng freetype libjpeg fontconfig gd libxml2 rrdtool net-snmp net-snmp-utils net-snmp-devel cacti

 

以上便于记录