[snmp] Most useful Linux OIDs



Object Identifiers (OIDs) uniquely identify managed objects in a MIB (stands for Management Information Base) hierarchy. These are accessed using a SNMP protocol.

Below is a list of most useful Linux OID's that people may be looking for. I split them in several categories:

CPU
Percentages of user CPU time (ssCpuUser)

.1.3.6.1.4.1.2021.11.9

Percentages of system CPU time (ssCpuSystem)
.1.3.6.1.4.1.2021.11.10

Percentages of idle CPU time (ssCpuIdle)
.1.3.6.1.4.1.2021.11.11

Load
1 minute Load (laLoad.1)

.1.3.6.1.4.1.2021.10.1.3.1

5 minute Load (laLoad.2)
.1.3.6.1.4.1.2021.10.1.3.2

15 minute Load (laLoad.3)
.1.3.6.1.4.1.2021.10.1.3.3

Memory
Total Swap Size configured for the host (memTotalSwap)

.1.3.6.1.4.1.2021.4.3

Available Swap Space on the host (memAvailSwap)
.1.3.6.1.4.1.2021.4.4

Total Real/Physical Memory Size on the host (memTotalReal)
.1.3.6.1.4.1.2021.4.5

Available Real/Physical Memory Space on the host (memAvailReal)
.1.3.6.1.4.1.2021.4.6

Total RAM Free (memTotalFree)
.1.3.6.1.4.1.2021.4.11.0

Total RAM Shared (memShared)
.1.3.6.1.4.1.2021.4.13.0

Total RAM Buffered (memBuffer)
.1.3.6.1.4.1.2021.4.14.0

Total Cached Memory (memCached)
.1.3.6.1.4.1.2021.4.15.0

Disks
Disks names (ns-disk-1-name)

.1.3.6.1.4.1.2021.9.1.2

Disks avalaible space (ns-disk-1-avail)
.1.3.6.1.4.1.2021.9.1.7

Disks used space (ns-disk-1-used)
.1.3.6.1.4.1.2021.9.1.8

Disks use % (ns-disk-1-pct)
.1.3.6.1.4.1.2021.9.1.9

Note:
The snmpd.conf needs to be edited. Add the following (assuming a machine with a "/" and "/boot" partitions):
disk /
disk /boot

Interfaces
Interfaces Input Octets (ifInOctets)

.1.3.6.1.2.1.2.2.1.10

Interfaces Input Errors (ifInErrors)
.1.3.6.1.2.1.2.2.1.14

Interfaces Output Octets (ifOutOctets)
.1.3.6.1.2.1.2.2.1.16

Interfaces Output Errors (ifOutErrors)
.1.3.6.1.2.1.2.2.1.20

Use snmpwalk command to get the value of specific item for monitoring. For example, if I want to see via SNMP free memory in bytes, I will issue the command:

snmpwalk -v 2c -c utm1 81.180.74.70 .1.3.6.1.4.1.2021.4.6

Explanation:
-v - version of SNMP (2c)
-c - community name (utm1)
81.180.74.70 - the ip of server
.1.3.6.1.4.1.2021.4.6 - this is OID