This article provides an overview on how to interpret the values returned by SNMP on polling certain MIB objects related to physical entities such as sensor values of different components from a switch.
Contents
Overview of Entity MIBS
To provide a quick overview, Arista supports the following standard MIBs:
..and also a proprietary MIB:
ENTITY-MIB describes a set of MIB objects that can be used to poll information regarding physical entities in a networking equipment such as entity name, class (if the unit is a sensor, module, fan, power supply, container etc), hardware / firmware / software revisions, serial number, manufacturer, model name etc.,
ENTITY-SENSOR-MIB defines a set of MIB in particular to poll information related to physical sensors, which are often found in networking equipment (such as chassis temperature, fan RPM, power supply voltage).
ARISTA-ENTITY-SENSOR-MIB augments the above MIB by providing information about the thresholds of various sensors in the switch (High/Low warnings, High/Low Critical values).
ENTITY-STATE-MIB defines a set of MIB objects, which can be used to poll information about the state of these entities.
How to find the correct MIB entries and OIDs
Every time when polling particular information from the switch via SNMP, it is arduous to remember the exact OID or the MIB entries (or even the MIB tree itself). Hence, we could always run a walk on .1, ‘grep’ for the relative keyword and find the MIB related information.
For example, to find the MIB objects returning power supply related information:
switch#show snmp mib walk .1 | grep "PowerSupply" ENTITY-MIB::entPhysicalDescr[100711000] = STRING: PowerSupply1 ENTITY-MIB::entPhysicalDescr[100711210] = STRING: PowerSupply1 Fan 1 ENTITY-MIB::entPhysicalDescr[100711211] = STRING: PowerSupply1 Fan 1 Sensor 1 ENTITY-MIB::entPhysicalDescr[100721000] = STRING: PowerSupply2 ENTITY-MIB::entPhysicalDescr[100721210] = STRING: PowerSupply2 Fan 1 ENTITY-MIB::entPhysicalDescr[100721211] = STRING: PowerSupply2 Fan 1 Sensor 1
Use the unique index (highlighted in red), and run a snmp walk on .1 grepping for that specific index to discover the MIB entries covering information related to it.
switch#show snmp mib walk .1 | grep "100711000" ENTITY-MIB::entPhysicalDescr[100711000] = STRING: PowerSupply1 ENTITY-MIB::entPhysicalVendorType[100711000] = OID: SNMPv2-SMI::zeroDotZero ENTITY-MIB::entPhysicalContainedIn[100711000] = INTEGER: 100710000 ENTITY-MIB::entPhysicalContainedIn[1100711100] = INTEGER: 100711000 ENTITY-MIB::entPhysicalContainedIn[1100711200] = INTEGER: 100711000 ENTITY-MIB::entPhysicalClass[100711000] = INTEGER: powerSupply(6) ENTITY-MIB::entPhysicalParentRelPos[100711000] = INTEGER: 1 ENTITY-MIB::entPhysicalName[100711000] = STRING: ENTITY-MIB::entPhysicalHardwareRev[100711000] = STRING: ENTITY-MIB::entPhysicalFirmwareRev[100711000] = STRING: ENTITY-MIB::entPhysicalSoftwareRev[100711000] = STRING: ENTITY-MIB::entPhysicalSerialNum[100711000] = STRING: HDLD6480513 ENTITY-MIB::entPhysicalMfgName[100711000] = STRING: DELTA ENTITY-MIB::entPhysicalModelName[100711000] = STRING: PWR-745AC-F ENTITY-MIB::entPhysicalAlias[100711000] = STRING: ENTITY-MIB::entPhysicalAssetID[100711000] = STRING: ENTITY-MIB::entPhysicalIsFRU[100711000] = INTEGER: true(1) ENTITY-MIB::entPhysicalMfgDate[100711000] = STRING: 0-0-0,0:0:0.0,.0:0 ENTITY-MIB::entPhysicalUris[100711000] = "" ENTITY-MIB::entPhysicalChildIndex[100710000][100711000] = INTEGER: 100711000 ENTITY-MIB::entPhysicalChildIndex[100711000][1100711100] = INTEGER: 1100711100 ENTITY-MIB::entPhysicalChildIndex[100711000][1100711200] = INTEGER: 1100711200 ENTITY-STATE-MIB::entStateLastChanged[100711000] = STRING: 2021-1-6,9:17:40.0,+0:0 ENTITY-STATE-MIB::entStateAdmin[100711000] = INTEGER: unlocked(4) ENTITY-STATE-MIB::entStateOper[100711000] = INTEGER: enabled(3) ENTITY-STATE-MIB::entStateUsage[100711000] = INTEGER: active(3) ENTITY-STATE-MIB::entStateAlarm[100711000] = BITS: 80 unknown(0) ENTITY-STATE-MIB::entStateStandby[100711000] = INTEGER: providingService(4)
Relatively, in order to find the OID, we can use the ‘show snmp mib translate’ CLI command:
switch#show snmp mib translate entPhysicalDescr.100711000 .1.3.6.1.2.1.47.1.1.1.1.2.100711000 switch#show snmp mib translate entPhysicalDescr.100721000 .1.3.6.1.2.1.47.1.1.1.1.2.100721000
switch#show snmp mib walk .1.3.6.1.2.1.47.1.1.1.1.2.100711000 ENTITY-MIB::entPhysicalDescr[100711000] = STRING: PowerSupply1 switch#show snmp mib walk .1.3.6.1.2.1.47.1.1.1.1.2.100721000 ENTITY-MIB::entPhysicalDescr[100721000] = STRING: PowerSupply2
Note: Append the index to the MIB like entry entPhysicalDescr.100711000 instead of using entPhysicalDescr[100711000] while using the ‘translate’ command.
Examples
Let us consider two examples on how to interpret the values returned by ENTITY based MIBs, and how to correlate them with CLI outputs.
Example 1.) Calculating and Interpreting Fan speeds
CLI command to check the fans speeds on an Arista Switch:
switch#show system environment cooling System cooling status is: Ok Ambient temperature: 20C Airflow: port-side intake Config Actual Speed Stable Fan Status Speed Speed Uptime Stability Uptime -------------- ------ ------ ------ --------------- ----------- --------------- 1/1 Ok 30% 29% 9 days, 8:04:14 Stable 9 days, 8:02:44 2/1 Ok 30% 29% 9 days, 8:04:14 Stable 9 days, 8:02:44 3/1 Ok 30% 29% 9 days, 8:04:14 Stable 9 days, 8:02:44 4/1 Ok 30% 29% 9 days, 8:04:14 Stable 9 days, 8:02:44 PowerSupply1/1 Ok 30% 33% 9 days, 8:04:03 FW Override N/A PowerSupply2/1 Ok 30% 33% 9 days, 8:04:03 FW Override N/A
Using the ‘how to’ section, we can find the MIB object which returns the value of the Fan 1 Sensor 1.
A.) Grep for ‘Fan 1’ by running a snmp walk on .1:
switch#show snmp mib walk .1 | grep "Fan 1" ENTITY-MIB::entPhysicalDescr[100601110] = STRING: Fan Tray 1 Fan 1 ENTITY-MIB::entPhysicalDescr[100601111] = STRING: Fan Tray 1 Fan 1 Sensor 1 ENTITY-MIB::entPhysicalDescr[100602110] = STRING: Fan Tray 2 Fan 1 ENTITY-MIB::entPhysicalDescr[100602111] = STRING: Fan Tray 2 Fan 1 Sensor 1 ENTITY-MIB::entPhysicalDescr[100603110] = STRING: Fan Tray 3 Fan 1 ENTITY-MIB::entPhysicalDescr[100603111] = STRING: Fan Tray 3 Fan 1 Sensor 1 ENTITY-MIB::entPhysicalDescr[100604110] = STRING: Fan Tray 4 Fan 1 ENTITY-MIB::entPhysicalDescr[100604111] = STRING: Fan Tray 4 Fan 1 Sensor 1 ENTITY-MIB::entPhysicalDescr[100711210] = STRING: PowerSupply1 Fan 1 ENTITY-MIB::entPhysicalDescr[100711211] = STRING: PowerSupply1 Fan 1 Sensor 1 ENTITY-MIB::entPhysicalDescr[100721210] = STRING: PowerSupply2 Fan 1 ENTITY-MIB::entPhysicalDescr[100721211] = STRING: PowerSupply2 Fan 1 Sensor 1
B.) Run a snmp walk on .1 again, and grep for the unique index:
switch#show snmp mib walk .1 | grep "100601111" ENTITY-MIB::entPhysicalDescr[100601111] = STRING: Fan Tray 1 Fan 1 Sensor 1 ENTITY-MIB::entPhysicalVendorType[100601111] = OID: SNMPv2-SMI::zeroDotZero ENTITY-MIB::entPhysicalContainedIn[100601111] = INTEGER: 100601110 ENTITY-MIB::entPhysicalClass[100601111] = INTEGER: sensor(8) ENTITY-MIB::entPhysicalParentRelPos[100601111] = INTEGER: 1 ENTITY-MIB::entPhysicalName[100601111] = STRING: ENTITY-MIB::entPhysicalHardwareRev[100601111] = STRING: ENTITY-MIB::entPhysicalFirmwareRev[100601111] = STRING: ENTITY-MIB::entPhysicalSoftwareRev[100601111] = STRING: ENTITY-MIB::entPhysicalSerialNum[100601111] = STRING: ENTITY-MIB::entPhysicalMfgName[100601111] = STRING: ENTITY-MIB::entPhysicalModelName[100601111] = STRING: ENTITY-MIB::entPhysicalAlias[100601111] = STRING: ENTITY-MIB::entPhysicalAssetID[100601111] = STRING: ENTITY-MIB::entPhysicalIsFRU[100601111] = INTEGER: false(2) ENTITY-MIB::entPhysicalMfgDate[100601111] = STRING: 0-0-0,0:0:0.0,.0:0 ENTITY-MIB::entPhysicalUris[100601111] = "" ENTITY-MIB::entPhysicalChildIndex[100601110][100601111] = INTEGER: 100601111 ENTITY-SENSOR-MIB::entPhySensorType[100601111] = INTEGER: rpm(10) ENTITY-SENSOR-MIB::entPhySensorScale[100601111] = INTEGER: units(9) ENTITY-SENSOR-MIB::entPhySensorPrecision[100601111] = INTEGER: 0 ENTITY-SENSOR-MIB::entPhySensorValue[100601111] = INTEGER: 2806 ENTITY-SENSOR-MIB::entPhySensorOperStatus[100601111] = INTEGER: ok(1) ENTITY-SENSOR-MIB::entPhySensorUnitsDisplay[100601111] = STRING: RPM ENTITY-SENSOR-MIB::entPhySensorValueTimeStamp[100601111] = Timeticks: (81182240) 9 days, 9:30:22.40 ENTITY-SENSOR-MIB::entPhySensorValueUpdateRate[100601111] = Gauge32: 2000 milliseconds ENTITY-STATE-MIB::entStateLastChanged[100601111] = STRING: 2021-1-6,9:17:29.0,+0:0 ENTITY-STATE-MIB::entStateAdmin[100601111] = INTEGER: unlocked(4) ENTITY-STATE-MIB::entStateOper[100601111] = INTEGER: enabled(3) ENTITY-STATE-MIB::entStateUsage[100601111] = INTEGER: active(3) ENTITY-STATE-MIB::entStateAlarm[100601111] = BITS: 80 unknown(0) ENTITY-STATE-MIB::entStateStandby[100601111] = INTEGER: providingService(4) ARISTA-ENTITY-SENSOR-MIB::aristaEntSensorThresholdLowWarning[100601111] = INTEGER: -1000000000 ARISTA-ENTITY-SENSOR-MIB::aristaEntSensorThresholdLowCritical[100601111] = INTEGER: -1000000000 ARISTA-ENTITY-SENSOR-MIB::aristaEntSensorThresholdHighWarning[100601111] = INTEGER: 1000000000 ARISTA-ENTITY-SENSOR-MIB::aristaEntSensorThresholdHighCritical[100601111] = INTEGER: 1000000000 ARISTA-ENTITY-SENSOR-MIB::aristaEntSensorStatusDescr[100601111] = STRING: No thresholds are defined
C.) Find the correct MIB object, and interpret the values obtained:
As highlighted in the above SNMP output, entPhySensorValue which gives the value of an associated physical entity. However, the ‘Actual Speed of Fan 1’ returned by the CLI command output is 29%, while the SNMP output is 2806 (which is quite bogus to correlate). This is because the entPhySensorValue is returning a value as defined by the RFC.
From RF3433:
entPhySensorValue OBJECT-TYPE SYNTAX EntitySensorValue MAX-ACCESS read-only STATUS current DESCRIPTION "The most recent measurement obtained by the agent for this sensor. To correctly interpret the value of this object, the associated entPhySensorType, entPhySensorScale, and entPhySensorPrecision objects must also be examined." ::= { entPhySensorEntry 4 }
Note that entPhySensorValue should be interpreted based on the values of entPhySensorType, entPhySensorScale, and entPhySensorPrecision.
where,
- entPhySensorType – the unit of measurement that the sensor is reporting.
- entPhySensorScale – the scale of the unit of measurement that the sensor is reporting.
- entPhySensorPrecision – the number of decimal places of precision in the value that the sensor is reporting (Refer RFC for more details).
Poll them next by appending the unique index as given below:
switch#show snmp mib walk entPhySensorType.100601111 ENTITY-SENSOR-MIB::entPhySensorType[100601111] = INTEGER: rpm(10) switch#show snmp mib walk entPhySensorScale.100601111 ENTITY-SENSOR-MIB::entPhySensorScale[100601111] = INTEGER: units(9) switch#show snmp mib walk entPhySensorPrecision.100601111 ENTITY-SENSOR-MIB::entPhySensorPrecision[100601111] = INTEGER: 0
D.) Convert and verify the Speed%:
Here,
- entPhySensorType = rpm (which is the unit we need – no conversion needed).
- entPhySensorScale = units (units mean 10^0 = 1).
- entPhySensorPrecision = 0 (0 decimal places).
Therefore, there isn’t much conversion needed here: 2806 x 10^1 x rpm = 2806 rpm.
Let us get the maxSpeed from ‘show system environment cooling | json’ output:
switch#show system environment cooling | json .. "fanTraySlots": [ { "status": "ok", "fans": [ { "status": "ok", "uptime": 1609924650.124999, "maxSpeed": 9550, "lastSpeedStableChangeTime": 1609924740.204952, "configuredSpeed": 30, "actualSpeed": 29, "speedHwOverride": false, "speedStable": true, "label": "1/1" } ], "speed": 30, "label": "1" },
Now we can verify if the value returned by entPhySensorValue is 29% of 9550:
9550 x 0.29 = 2769.5 ~= 2806 (value returned by the MIB).
From a monitoring tool perspective, we can calculate the speed% using the SNMP returned output in the following way:
(2806/9550) x 100 = 29.38 % = 29% (base value)
This is exactly the value returned by the ‘show system environment cooling’ command.
Example 2.) Calculating and Interpreting transceiver readings
CLI command to check the transceiver readings for an interface:
switch#show interfaces Et1/1 transceiver detail mA: milliamperes, dBm: decibels (milliwatts), NA or N/A: not applicable. A2D readouts (if they differ), are reported in parentheses. The threshold values are calibrated. High Alarm High Warn Low Alarm Low Warn Temperature Threshold Threshold Threshold Threshold Port (Celsius) (Celsius) (Celsius) (Celsius) (Celsius) ------- ------------ ---------- ---------- ---------- ---------- Et1/1 28.81 75.00 70.00 -5.00 0.00 High Alarm High Warn Low Alarm Low Warn Voltage Threshold Threshold Threshold Threshold Port (Volts) (Volts) (Volts) (Volts) (Volts) ------- ------------ ---------- ---------- ---------- ---------- Et1/1 3.29 3.63 3.47 2.97 3.13 High Alarm High Warn Low Alarm Low Warn Current Threshold Threshold Threshold Threshold Port (mA) (mA) (mA) (mA) (mA) ------- ------------ ---------- ---------- ---------- ---------- Et1/1 7.21 10.00 9.50 0.50 1.00 High Alarm High Warn Low Alarm Low Warn Tx Power Threshold Threshold Threshold Threshold Port (dBm) (dBm) (dBm) (dBm) (dBm) ------- ------------ ---------- ---------- ---------- ---------- Et1/1 -1.17 N/A N/A N/A N/A High Alarm High Warn Low Alarm Low Warn Rx Power Threshold Threshold Threshold Threshold Port (dBm) (dBm) (dBm) (dBm) (dBm) ------- ------------ ---------- ---------- ---------- ---------- Et1/1 -1.98 3.40 2.40 -13.51 -9.50
Say the target is to monitor Rx Power on interface Et1/1 via SNMP.
Cutting to the chase, and finding the associated MIB object as mentioned in Example 1:
switch#show snmp mib walk .1 | grep et1/1 LLDP-MIB::lldpLocPortId[5] = STRING: "Ethernet1/1" IF-MIB::ifDescr[1001] = STRING: Ethernet1/1 IF-MIB::ifName[1001] = STRING: Ethernet1/1 ENTITY-MIB::entPhysicalDescr[100100252] = STRING: Ethernet1/1 ENTITY-MIB::entPhysicalDescr[100301211] = STRING: DOM TX Bias Sensor for Ethernet1/1 ENTITY-MIB::entPhysicalDescr[100301212] = STRING: DOM TX Power Sensor for Ethernet1/1 ENTITY-MIB::entPhysicalDescr[100301213] = STRING: DOM RX Power Sensor for Ethernet1/1 switch#show snmp mib walk .1 | grep 100301213 ENTITY-MIB::entPhysicalDescr[100301213] = STRING: DOM RX Power Sensor for Ethernet1/1 ENTITY-MIB::entPhysicalVendorType[100301213] = OID: SNMPv2-SMI::zeroDotZero ENTITY-MIB::entPhysicalContainedIn[100301213] = INTEGER: 100301210 ENTITY-MIB::entPhysicalClass[100301213] = INTEGER: sensor(8) ENTITY-MIB::entPhysicalParentRelPos[100301213] = INTEGER: 3 ENTITY-MIB::entPhysicalName[100301213] = STRING: ENTITY-MIB::entPhysicalHardwareRev[100301213] = STRING: ENTITY-MIB::entPhysicalFirmwareRev[100301213] = STRING: ENTITY-MIB::entPhysicalSoftwareRev[100301213] = STRING: ENTITY-MIB::entPhysicalSerialNum[100301213] = STRING: ENTITY-MIB::entPhysicalMfgName[100301213] = STRING: ENTITY-MIB::entPhysicalModelName[100301213] = STRING: ENTITY-MIB::entPhysicalAlias[100301213] = STRING: ENTITY-MIB::entPhysicalAssetID[100301213] = STRING: ENTITY-MIB::entPhysicalIsFRU[100301213] = INTEGER: false(2) ENTITY-MIB::entPhysicalMfgDate[100301213] = STRING: 0-0-0,0:0:0.0,.0:0 ENTITY-MIB::entPhysicalUris[100301213] = "" ENTITY-MIB::entPhysicalChildIndex[100301210][100301213] = INTEGER: 100301213 ENTITY-SENSOR-MIB::entPhySensorType[100301213] = INTEGER: watts(6) ENTITY-SENSOR-MIB::entPhySensorScale[100301213] = INTEGER: milli(8) ENTITY-SENSOR-MIB::entPhySensorPrecision[100301213] = INTEGER: 4 ENTITY-SENSOR-MIB::entPhySensorValue[100301213] = INTEGER: 6352 ENTITY-SENSOR-MIB::entPhySensorOperStatus[100301213] = INTEGER: ok(1) ENTITY-SENSOR-MIB::entPhySensorUnitsDisplay[100301213] = STRING: mW ENTITY-SENSOR-MIB::entPhySensorValueTimeStamp[100301213] = Timeticks: (81797159) 9 days, 11:12:51.59 ENTITY-SENSOR-MIB::entPhySensorValueUpdateRate[100301213] = Gauge32: 6000 milliseconds ENTITY-STATE-MIB::entStateLastChanged[100301213] = STRING: 2021-1-6,9:17:42.0,+0:0 ENTITY-STATE-MIB::entStateAdmin[100301213] = INTEGER: unlocked(4) ENTITY-STATE-MIB::entStateOper[100301213] = INTEGER: enabled(3) ENTITY-STATE-MIB::entStateUsage[100301213] = INTEGER: active(3) ENTITY-STATE-MIB::entStateAlarm[100301213] = BITS: 00 ENTITY-STATE-MIB::entStateStandby[100301213] = INTEGER: providingService(4) ARISTA-ENTITY-SENSOR-MIB::aristaEntSensorThresholdLowWarning[100301213] = INTEGER: 1122 ARISTA-ENTITY-SENSOR-MIB::aristaEntSensorThresholdLowCritical[100301213] = INTEGER: 446 ARISTA-ENTITY-SENSOR-MIB::aristaEntSensorThresholdHighWarning[100301213] = INTEGER: 17378 ARISTA-ENTITY-SENSOR-MIB::aristaEntSensorThresholdHighCritical[100301213] = INTEGER: 21878 ARISTA-ENTITY-SENSOR-MIB::aristaEntSensorStatusDescr[100301213] = STRING: Sensor value 0.6340 mW is within bounds switch#show snmp mib walk entPhySensorValue.100301213 ENTITY-SENSOR-MIB::entPhySensorValue[100301213] = INTEGER: 6365
The value returned by entPhySensorValue is 6365, which needs to be converted, and interpreted the same way. Obtain the values of entPhySensorType, entPhySensorScale, and entPhySensorPrecision.
switch#show snmp mib walk entPhySensorType.100301213 ENTITY-SENSOR-MIB::entPhySensorType[100301213] = INTEGER: watts(6) switch#show snmp mib walk entPhySensorScale.100301213 ENTITY-SENSOR-MIB::entPhySensorScale[100301213] = INTEGER: milli(8) switch#show snmp mib walk entPhySensorPrecision.100301213 ENTITY-SENSOR-MIB::entPhySensorPrecision[100301213] = INTEGER: 4
Here,
- entPhySensorType = watts (Conversion to dBm needed).
- entPhySensorScale = milli (10-3).
- entPhySensorPrecision = 4 (4 decimal places).
Therefore, 6365 x 10-3 x 10-4 x watts = 0.0006325 watts.
Converting 0.0006325 watts to dBm, we get:
0.0006325 watts = -1.9893947015 dBm ~= -1.98dBm.
-1.98dBm is exactly the value returned by the ‘show interfaces Et1/1 transceiver detail’ command.
Key Takeaways
- Always refer to the RFCs for MIB Object definitions if the output thrown by them isn’t user-friendly to interpret.
- ‘Grep’ can be a powerful weapon. You can invariably run a snmp walk on .1 from the EOS CLI, and ‘grep’ for a relative ‘keyword’ (be it route information, interface statistics, storage/memory, hardware utilization etc.) in an attempt to find the MIB information.
Bonus example to find the OID for InDiscards (on Ma1):
switch#show interfaces counters discards | nz Port InDiscards OutDiscards --------------- ---------------- ----------- Ma1 16876738 0 --------- --------- --------- Totals 16876738 0 switch#show snmp mib walk .1 | no-more | grep Management LLDP-MIB::lldpLocPortId[97] = STRING: "Management1" SNMPv2-MIB::sysORDescr[6] = STRING: The SNMP Management Architecture MIB. IF-MIB::ifDescr[999001] = STRING: Management1 IF-MIB::ifName[999001] = STRING: Management1 ENTITY-MIB::entPhysicalDescr[100110145] = STRING: Management1 switch#show snmp mib walk .1 | no-more | grep 999001 | grep InDiscards IF-MIB::ifInDiscards[999001] = Counter32: 16876738 switch#show snmp mib translate ifInDiscards.999001 .1.3.6.1.2.1.2.2.1.13.999001 switch#show snmp mib walk .1.3.6.1.2.1.2.2.1.13.999001 IF-MIB::ifInDiscards[999001] = Counter32: 16876738
Say the InDiscards on Ma1 are not constantly increasing, we can easily get the MIB object using the value of counter itself:
switch#show snmp mib walk .1 | grep 16876738 IF-MIB::ifInDiscards[999001] = Counter32: 16876738
References
- Arista supported MIBs: https://www.arista.com/en/support/product-documentation/arista-snmp-mibs
- ENTITY-MIB : https://tools.ietf.org/html/rfc4133
- ENTITY-SENSOR-MIB: https://tools.ietf.org/html/rfc4268
- ENTITY-STATE-MIB: https://tools.ietf.org/html/rfc3433
- ARISTA-ENTITY-SENSOR-MIB: https://www.arista.com/assets/data/docs/MIBS/ARISTA-ENTITY-SENSOR-MIB.txt
- Watts to dBm calculator: https://www.rapidtables.com/convert/power/Watt_to_dBm.html