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:
- #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:
- #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:
- #snmptranslate .1.3.6.1.4.1.2021.9
If you set disk alert parameters as in the configuration file example, you will see:
- 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:
- # Service snmpd restart
- Or
- #/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:
- #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.