SNMP MIB错误,找不到模块等

时间:2016-08-23 13:15:24

标签: networking centos snmp net-snmp mib

这是我的第一个stackoverflow问题,所以我必须提前为任何错误道歉。

我已经有一段时间在尝试使用SNMP了。我使用Cent-7运行主机,使用net-snmp,我在许多网络设备上都有代理,例如Juniper SRX100,E2200,Arista交换机,HP支持服务器等。我有一个问题始终存在。 无论设备如何,某些MIB似乎都与使用同一制造商的其他MIB有关。例如:

[root@localhost mibs]# snmpwalk -v 2c -c public 10.20.102.12
MIB search path: /root/.snmp/mibs:/usr/share/snmp/mibs
Cannot find module (CPQSINFO-MIB): At line 49 in /usr/share/snmp/mibs/CPQNIC-MIB.txt
Cannot find module (CPQSTDEQ-MIB): At line 50 in /usr/share/snmp/mibs/CPQNIC-MIB.txt
Did not find 'cpqSiServerSystemId' in module #-1 (/usr/share/snmp/mibs/CPQNIC-MIB.txt)
Did not find 'cpqSePciSlotBoardName' in module #-1 (/usr/share/snmp/mibs/CPQNIC-MIB.txt)
Cannot find module (CPQSINFO-MIB): At line 43 in /usr/share/snmp/mibs/CPQHLTH-MIB.mib.txt
Did not find 'cpqSiServerSystemId' in module #-1 (/usr/share/snmp/mibs/CPQHLTH-MIB.mib.txt)
Did not find 'cpqSiMemModuleSize' in module #-1 (/usr/share/snmp/mibs/CPQHLTH-MIB.mib.txt)
SNMPv2-MIB::sysDescr.0 = STRING: Integrated Lights-Out 4 2.03 Nov 07 2014

此文件夹中的mibs(usr / share / snmp / mibs /)

[root@localhost mibs]# ls
AGENTX-MIB.txt           HCNUM-TC.txt                         IPV6-TC.txt                RFC1155-SMI.txt              SNMPv2-CONF.txt
BRIDGE-MIB.txt           HOST-RESOURCES-MIB.txt               IPV6-TCP-MIB.txt           RFC1213-MIB.txt              SNMPv2-MIB.txt
CPQFCA-MIB.mib.txt       HOST-RESOURCES-TYPES.txt             IPV6-UDP-MIB.txt           RMON-MIB.txt                 SNMPv2-SMI.txt
CPQHLTH-MIB.mib.txt      IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt  LM-SENSORS-MIB.txt         SCTP-MIB.txt                 SNMPv2-TC.txt
CPQHOST-MIB.mib.txt      IANA-LANGUAGE-MIB.txt                MTA-MIB.txt                SMUX-MIB.txt                 SNMPv2-TM.txt
CPQIDA-MIB.mib.txt       IANA-RTPROTO-MIB.txt                 NET-SNMP-AGENT-MIB.txt     SNMP-COMMUNITY-MIB.txt       TCP-MIB.txt
CPQNIC-MIB.txt           IANAifType-MIB.txt                   NET-SNMP-EXAMPLES-MIB.txt  SNMP-FRAMEWORK-MIB.txt       TRANSPORT-ADDRESS-MIB.txt
CPQSINFO-MIB             IF-INVERTED-STACK-MIB.txt            NET-SNMP-EXTEND-MIB.txt    SNMP-MPD-MIB.txt             TUNNEL-MIB.txt
CPQSINFO-MIB.txt         IF-MIB.txt                           NET-SNMP-MIB.txt           SNMP-NOTIFICATION-MIB.txt    UCD-DEMO-MIB.txt
CPQSTDEQ-MIB.txt         INET-ADDRESS-MIB.txt                 NET-SNMP-PASS-MIB.txt      SNMP-PROXY-MIB.txt           UCD-DISKIO-MIB.txt
CPQSTSYS-MIB.txt         IP-FORWARD-MIB.txt                   NET-SNMP-TC.txt            SNMP-TARGET-MIB.txt          UCD-DLMOD-MIB.txt
DISMAN-EVENT-MIB.txt     IP-MIB.txt                           NET-SNMP-VACM-MIB.txt      SNMP-USER-BASED-SM-MIB.txt   UCD-IPFWACC-MIB.txt
DISMAN-SCHEDULE-MIB.txt  IPV6-FLOW-LABEL-MIB.txt              NETWORK-SERVICES-MIB.txt   SNMP-USM-AES-MIB.txt         UCD-SNMP-MIB.txt
DISMAN-SCRIPT-MIB.txt    IPV6-ICMP-MIB.txt                    NOTIFICATION-LOG-MIB.txt   SNMP-USM-DH-OBJECTS-MIB.txt  UDP-MIB.txt
EtherLike-MIB.txt        IPV6-MIB.txt                         RFC-1215.txt               SNMP-VIEW-BASED-ACM-MIB.txt

第一条错误消息的内部

CPQNIC-MIB DEFINITIONS ::= BEGIN

IMPORTS
    compaq                  FROM CPQHOST-MIB
    Counter                 FROM RFC1155-SMI
    Gauge                   FROM RFC1155-SMI
    TimeTicks               FROM RFC1155-SMI
    DisplayString           FROM RFC1213-MIB
    OBJECT-TYPE             FROM RFC-1212
    TRAP-TYPE               FROM RFC-1215
    sysName                 FROM RFC1213-MIB
    ipAdEntAddr             FROM RFC1213-MIB
    cpqHoTrapFlags          FROM CPQHOST-MIB
    cpqSiServerSystemId     FROM CPQSINFO-MIB
    cpqSePciSlotBoardName   FROM CPQSTDEQ-MIB;

最后两行是49和50。 我一直在使用来自不同制造商的各种MIB文件来获取这些错误。但我无法想象制造商会提供破损的MIB,因为它们是专为我正在使用它们的设备而设计的。

我根本无法弄清楚出了什么问题。 snmp.conf文件指向mibs文件夹中的所有文件。我已经尝试过重命名它们,改变文件扩展名等。

0 个答案:

没有答案