how to add MIB (Linux SNMP)
I've got MIB files already under /usr/share/snmp/mibs
----------------------------------------------------- AGENTX-MIB.txt IPV6-TCP-MIB.txt SNMP-NOTIFICATION-MIB.txt DISMAN-EVENT-MIB.txt IPV6-UDP-MIB.txt SNMP-PROXY-MIB.txt DISMAN-SCHEDULE-MIB.txt LM-SENSORS-MIB.txt SNMP-TARGET-MIB.txt DISMAN-SCRIPT-MIB.txt MTA-MIB.txt SNMP-USER-BASED-SM-MIB.txt EtherLike-MIB.txt NET-SNMP-AGENT-MIB.txt SNMP-USM-AES-MIB.txt HCNUM-TC.txt NET-SNMP-EXAMPLES-MIB.txt SNMP-USM-DH-OBJECTS-MIB.txt HOST-RESOURCES-MIB.txt NET-SNMP-EXTEND-MIB.txt SNMP-VIEW-BASED-ACM-MIB.txt HOST-RESOURCES-TYPES.txt NET-SNMP-MIB.txt SNMPv2-CONF.txt IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt NET-SNMP-TC.txt SNMPv2-MIB.txt IANA-LANGUAGE-MIB.txt NETWORK-SERVICES-MIB.txt SNMPv2-SMI.txt IANA-RTPROTO-MIB.txt NOTIFICATION-LOG-MIB.txt SNMPv2-TC.txt IANAifType-MIB.txt RFC-1215.txt SNMPv2-TM.txt IF-INVERTED-STACK-MIB.txt RFC1155-SMI.txt TCP-MIB.txt IF-MIB.txt RFC1213-MIB.txt TRANSPORT-ADDRESS-MIB.txt INET-ADDRESS-MIB.txt RMON-MIB.txt UCD-DEMO-MIB.txt IP-FORWARD-MIB.txt SCTP-MIB.txt UCD-DISKIO-MIB.txt IP-MIB.txt SMUX-MIB.txt UCD-DLMOD-MIB.txt IPV6-ICMP-MIB.txt SNMP-COMMUNITY-MIB.txt UCD-IPFWACC-MIB.txt IPV6-MIB.txt SNMP-FRAMEWORK-MIB.txt UCD-SNMP-MIB.txt IPV6-TC.txt SNMP-MPD-MIB.txt UDP-MIB.txt ------------------------------------------------------ but can't get data from other MIB files except SNMPv2-MIB.txt by command snmpwalk -v 2c -c public localhost mgmt so I can only get system data.. ------------------------------------------------------ SNMPv2-MIB::sysDescr.0 = STRING: Linux SM-VPN 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.8072.3.2.10 SNMPv2-MIB::sysUpTime.0 = Timeticks: (2231571) 6:11:55.71 SNMPv2-MIB::sysContact.0 = STRING: Root <root@localhost> (configure /etc/snmp/snmp.local.conf) SNMPv2-MIB::sysName.0 = STRING: SM-VPN SNMPv2-MIB::sysLocation.0 = STRING: Unknown (edit /etc/snmp/snmpd.conf) SNMPv2-MIB::sysORLastChange.0 = Timeticks: (8) 0:00:00.08 SNMPv2-MIB::sysORID.1 = OID: SNMPv2-MIB::snmpMIB SNMPv2-MIB::sysORID.2 = OID: SNMPv2-SMI::mib-2.49 SNMPv2-MIB::sysORID.3 = OID: SNMPv2-SMI::mib-2.4 SNMPv2-MIB::sysORID.4 = OID: SNMPv2-SMI::mib-2.50 SNMPv2-MIB::sysORID.5 = OID: SNMPv2-SMI::snmpModules.16.2.2.1 SNMPv2-MIB::sysORID.6 = OID: SNMPv2-SMI::snmpModules.10.3.1.1 SNMPv2-MIB::sysORID.7 = OID: SNMPv2-SMI::snmpModules.11.3.1.1 SNMPv2-MIB::sysORID.8 = OID: SNMPv2-SMI::snmpModules.15.2.1.1 SNMPv2-MIB::sysORDescr.1 = STRING: The MIB module for SNMPv2 entities SNMPv2-MIB::sysORDescr.2 = STRING: The MIB module for managing TCP implementations SNMPv2-MIB::sysORDescr.3 = STRING: The MIB module for managing IP and ICMP implementations SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for managing UDP implementations SNMPv2-MIB::sysORDescr.5 = STRING: View-based Access Control Model for SNMP. SNMPv2-MIB::sysORDescr.6 = STRING: The SNMP Management Architecture MIB. SNMPv2-MIB::sysORDescr.7 = STRING: The MIB for Message Processing and Dispatching. SNMPv2-MIB::sysORDescr.8 = STRING: The management information definitions for the SNMP User-based Security Model. SNMPv2-MIB::sysORUpTime.1 = Timeticks: (8) 0:00:00.08 SNMPv2-MIB::sysORUpTime.2 = Timeticks: (8) 0:00:00.08 SNMPv2-MIB::sysORUpTime.3 = Timeticks: (8) 0:00:00.08 SNMPv2-MIB::sysORUpTime.4 = Timeticks: (8) 0:00:00.08 SNMPv2-MIB::sysORUpTime.5 = Timeticks: (8) 0:00:00.08 SNMPv2-MIB::sysORUpTime.6 = Timeticks: (8) 0:00:00.08 SNMPv2-MIB::sysORUpTime.7 = Timeticks: (8) 0:00:00.08 SNMPv2-MIB::sysORUpTime.8 = Timeticks: (8) 0:00:00.08 SNMPv2-SMI::mib-2.25.1.1.0 = Timeticks: (19911749) 2 days, 7:18:37.49 SNMPv2-SMI::mib-2.25.1.1.0 = No more variables left in this MIB View (It is past the end of the MIB tree) [root@SM-VPN mibs]# ------------------------------------------------------ I think .. need to add or register MIB files to somewhere. but can't find the way to add MIB to SNMP tree. Please help me.. T.T |
You won't get any smnpwalk output from the MIBS installed on your system. When you do an snmpwalk on localhost, snmpget actually communicates with localhost to retrieve snmp data. The snmpdata is returned from localhost, regardless of the presence of the MIB file. Without MIB file you'd get the same values, but no names in the smnptree, just numbers like 2.3.8.1.3.4.11.5.3.6.2.3.1.1.
Actually, the MIB only translates the numeric strings to meaningful names to make it easy for us humans. Just try it, do a snmpget -v OID, and when you got the numeric address do the same with the numeric address. MIB files are specified in /etc/snmp/snmp.conf (check snmp.conf and where they are on your system). This is an example: Code:
mibdirs /usr/share/snmp/mibs/ Code:
/usr/bin/snmpget -v 2c -m /usr/share/snmp/mibs/VISUS.MIB -c ****** 192.168.xxx.xxx VISUS::visus.hsv.\"RBE_RNW_NLANT:POWER.COMMON:STATUS.FUELLEVEL\" |
All times are GMT -5. The time now is 08:53 AM. |