How to view SNMP MIB

Source: Internet
Author: User
Tags snmp snmpwalk

What is the MIB in SNMP? I believe you have some knowledge about SNMP MIB. This document describes how to view the local snmp mib. The specific operations are described in detail in this article.

Run the following command on the cluster node to check the MIB:

 
 
  1. #snmpwalk localhost -v 1 -c public  

This command should generate a long report showing the MIB on the cluster node, symbolizing the local SNMP proxy snmpd) responding to the query.

We use this command to query some useful information:

 
 
  1. #snmpwalk -v 1 localhost -c public .1.3.6.1.4.1.2021.9  

Note: In this command, we use a string of numbers instead of the symbol name to locate the information in the SNMP Management Information Library MIB. To find the symbol name or text represented by this numeric object identifier, use:

 
 
  1. #snmptranslate .1.3.6.1.4.1.2021.9  

If you set disk alert parameters as in the configuration file example, you will see:

 
 
  1. enterprises.ucdavis.dskTable.dskEntry.dskIndex.1 = 1enterprises.ucdavis.dskTable.dskEntry.dskIndex.2 = 2enterprises.ucdavis.dskTable.dskEntry.dskPath.1 = /enterprises.ucdavis.dskTable.dskEntry.dskPath.2 = /varenterprises.ucdavis.dskTable.dskEntry.dskDevice.1 = /dev/sdb2enterprises.ucdavis.dskTable.dskEntry.dskDevice.2 = /dev/sda3enterprises.ucdavis.dskTable.dskEntry.dskMinimum.1 = 100000enterprises.ucdavis.dskTable.dskEntry.dskMinimum.2 = 100000enterprises.ucdavis.dskTable.dskEntry.dskMinPercent.1 = -1enterprises.ucdavis.dskTable.dskEntry.dskMinPercent.2 = -1enterprises.ucdavis.dskTable.dskEntry.dskTotal.1 = 381121enterprises.ucdavis.dskTable.dskEntry.dskTotal.2 = 253871enterprises.ucdavis.dskTable.dskEntry.dskAvail.1 = 268888enterprises.ucdavis.dskTable.dskEntry.dskAvail.2 = 162940enterprises.ucdavis.dskTable.dskEntry.dskUsed.1 = 92554enterprises.ucdavis.dskTable.dskEntry.dskUsed.2 = 77824enterprises.ucdavis.dskTable.dskEntry.dskPercent.1 = 26enterprises.ucdavis.dskTable.dskEntry.dskPercent.2 = 32enterprises.ucdavis.dskTable.dskEntry.dskPercentNode.1 = 18enterprises.ucdavis.dskTable.dskEntry.dskPercentNode.2 = 0enterprises.ucdavis.dskTable.dskEntry.dskErrorFlag.1 = 0enterprises.ucdavis.dskTable.dskEntry.dskErrorFlag.2 = 0enterprises.ucdavis.dskTable.dskEntry.dskErrorMsg.1 =enterprises.ucdavis.dskTable.dskEntry.dskErrorMsg.2 =  

Note: In this disk space snmp mib report, you will see the name of the University of California, because this is what they developed.

Pay special attention to dskEntry. dskErrorFlag rows have been bold), these rows indicate that the disk is lower than the value 0) or higher than the value 1) You are in snmp. the value specified in conf is smaller than the remaining space in the disk partition. Use the df-M command to check the value. Then, enter:

 
 
  1. # Service snmpd restart
  2. Or
  3. #/Etc/init. d/snmpd restart

Note: The PID of the kill HUP snmpd daemon can achieve the same purpose.

Enter the same snmpwalk command again:

 
 
  1. #snmpwalk -v 1 localhost -c public .1.3.6.1.4.1.2021.9  

You should see the error mark indicating that the disk partition has used up disk space.

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.