About net-snmp using third-party MIB Library

Source: Internet
Author: User
Tags snmpwalk


Install net-snmp


 



# YumInstallNet-snmp *


By default, there are 65 built-in MIB under/usr/share/snmp/mibs.



By default, the path for searching the MIB library is$ Home/. snmp/mibs:/usr/share/snmp/mibs



Download the required MIB Library, under my is the H3C MIB library, address http://www.h3c.com/portal/Products___Solutions/Technology/MIB/



Decompress the zip package to a location, such as/tmp/comware, which contains three directories: H3C public MiB, H3C New Style Private MiB, and H3C compatible Style Private MIB, for ease of use, change the directory name to public, new, and compatible.



Decompress compatible/quick reference of H3C compatible style MIB objects description.rar to obtain quick reference of H3C compatible style MIB objects description.txt, and then search for the desired information, such as CPU, memory. Then run the snmpwalk command to test whether the data can be obtained. For example, h3centityextmemusage


# Snmpwalk-C public-V 2C192.168.1.1.1.3.6.1.4.1.2011.10.2.6.1.1.1.1.8


If data is available, this oid is valid on the current vswitch/vro. To use string search, you need to add the corresponding MIB library to net-snmp. In the quick reference of H3C compatible style MIB objects description.txt section of h3centityextmemusage just now-- From H3C-ENTITY-EXT-MIBDescription of which MIB it belongs to, and then search for the definition file starting with H3C-ENTITY-EXT-MIB In the MIB file under the compatible directory.


 



#Grep^ H3C-ENTITY-EXT-MIB/tmp/comware/compatible/*


Copy the found MIB file to the/usr/share/snmp/mibs/H3C/directory, and create the SNMP. conf file.


 



# Vim/etc/snmp/Conf


Enter the following content:


 



Mibdirs +/usr/share/snmp/mibs/H3cmibs+lswdevm-MiB: H3C-ENTITY-EXT-Mibmiballowunderline1


 



Save and exit. Run the snmpwalk command to test


 



# Snmpwalk-C public-V 2C192.168.1.1.1.3.6.1.4.1.2011.10.2.6.1.1.1.1.8


Copy the MIB library that is missing in the error message under/tmp/comware/compatible/to/usr/share/snmp/mibs/H3C/and run the command to test the library.


 



# Snmpwalk-C public-V 2C192.168.1.1-M-H3C-ENTITY-EXT-MIB h3centityextmemusage


If the output is similar to the following string, it is OK.


 



# Snmpwalk-C public-V 2C192.168.1.1-M-H3C-ENTITY-EXT-MIB h3centityextmemusage


 





Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.