我们有一个思科交换机,我们使用Nagios在snmpv2上监视了很长时间。最近,我们的审计团队迫使我们在所有网络设备上迁移到snmpv3。
思科工程师进来,在交换机上配置了snmpv3,但在那之后,snmpwalk停止了工作:
当我尝试snmpwalk时,我会犯以下错误:
[root@nagios libexec]# snmpwalk -u snmprouser -A gs1snmmp -a MD5 -X DES -X gs1snmmp -l authPriv 192.168.13.11 -v3
SNMPv2-SMI::mib-2 = No more variables left in this MIB View (It is past the end of the MIB tree)上面的凭据是正确的,因为它在错误时抛出以下错误:
[root@nagios libexec]# snmpwalk -u snmprouser -A gs11snmp -a MD5 -X DES -X gs1snmmp -l authPriv 192.168.13.11 -v3
snmpwalk: Authentication failure (incorrect password, community or key)当我试着正常工作时:
[root@nagios libexec]# snmpwalk -u snmprouser -A gs1snmmp -a MD5 -X DES -X gs1snmmp -l authPriv 192.168.13.11 -v3 1.3.6.1.2.1.1.3.0
DISMAN-EVENT-MIB::sysUpTimeInstance = No more variables left in this MIB View (It is past the end of the MIB tree)另外:
[root@nagios ~]# snmpwalk -v3 -u snmprouser -A gs1snmmp -a MD5 -X DES -X gs1snmmp -l authPriv 192.168.13.11 mib-2.interfaces
IF-MIB::interfaces = No more variables left in this MIB View (It is past the end of the MIB tree)发布于 2014-05-27 18:11:24
看来问题确实在于交换机上的SNMP配置。另一位思科工程师来帮我们解决这个问题。“只有”浪费了我两周的时间,认为这在Linux方面是个问题。:(
发布于 2014-05-25 20:05:11
我用Linux和Ruby编写的一些代码:
def snmp_cmd(cmd)
`#{cmd} -Oq -v3 -u #{@user} -l authpriv -a MD5 \
-A #{@auth} -x DES -X #{@priv} #{@name} #{@oid}`
end在一个拥有“1”级的Linux主机上运行它,就会得到整个mib。不知道为什么要这样做,因为这需要很长时间才能完成。您的问题可能是“以思科为中心的”,因为这个片段也适用于我在惠普交换机和Windows主机(不是oid=1部分)上工作。
您可能希望将查询范围缩小到特定项。
https://serverfault.com/questions/594620
复制相似问题