Currently LibreNMS doesn’t grab the right values for Arista switch High Alarm / High Warn / Low Alarm / Low Warn thresholds. It just makes guesses based on historic values but isn’t grabbing the actual levels the switch uses for alarming. I’ve checked w/ Arista to find the right way to grab those OID’s from the MIB. Please add this to the code so that LibreNMS can correctly alarm based on optic and temperature alarms.
Without these changes the Above and Below sensor default alarms constantly give false alarming in LibreNMS.
Step 1) Get the entity value you care about with this MIB:
snmpwalk -v1 -c [COMMUNITY] [HOSTNAME] 1.3.6.1.2.1.47.1.1.1.1.2
For an example, say you wanted to look at values for optic in 3/29 of a chassis switch:
snmpwalk -v1 -c [COMMUNITY] [HOSTNAME] 1.3.6.1.2.1.47.1.1.1.1.2 | grep 3/29
SNMPv2-SMI::mib-2.47.1.1.1.1.2.103100113 = STRING: "Ethernet3/29/1"
SNMPv2-SMI::mib-2.47.1.1.1.1.2.103100114 = STRING: "Ethernet3/29/2"
SNMPv2-SMI::mib-2.47.1.1.1.1.2.103100115 = STRING: "Ethernet3/29/3"
SNMPv2-SMI::mib-2.47.1.1.1.1.2.103100116 = STRING: "Ethernet3/29/4"
SNMPv2-SMI::mib-2.47.1.1.1.1.2.103329100 = STRING: "Xcvr for Ethernet3/29"
SNMPv2-SMI::mib-2.47.1.1.1.1.2.103329201 = STRING: "DOM Temperature Sensor for Ethernet3/29"
SNMPv2-SMI::mib-2.47.1.1.1.1.2.103329202 = STRING: "DOM Voltage Sensor for Ethernet3/29"
SNMPv2-SMI::mib-2.47.1.1.1.1.2.103329210 = STRING: "Lane 0 for Xcvr for Ethernet3/29"
SNMPv2-SMI::mib-2.47.1.1.1.1.2.103329211 = STRING: "DOM TX Bias Sensor for Ethernet3/29/1"
SNMPv2-SMI::mib-2.47.1.1.1.1.2.103329212 = STRING: "DOM TX Power Sensor for Ethernet3/29/1"
SNMPv2-SMI::mib-2.47.1.1.1.1.2.103329213 = STRING: "DOM RX Power Sensor for Ethernet3/29/1"
SNMPv2-SMI::mib-2.47.1.1.1.1.2.103329220 = STRING: "Lane 1 for Xcvr for Ethernet3/29"
SNMPv2-SMI::mib-2.47.1.1.1.1.2.103329221 = STRING: "DOM TX Bias Sensor for Ethernet3/29/2"
SNMPv2-SMI::mib-2.47.1.1.1.1.2.103329222 = STRING: "DOM TX Power Sensor for Ethernet3/29/2"
SNMPv2-SMI::mib-2.47.1.1.1.1.2.103329223 = STRING: "DOM RX Power Sensor for Ethernet3/29/2"
SNMPv2-SMI::mib-2.47.1.1.1.1.2.103329230 = STRING: "Lane 2 for Xcvr for Ethernet3/29"
SNMPv2-SMI::mib-2.47.1.1.1.1.2.103329231 = STRING: "DOM TX Bias Sensor for Ethernet3/29/3"
SNMPv2-SMI::mib-2.47.1.1.1.1.2.103329232 = STRING: "DOM TX Power Sensor for Ethernet3/29/3"
SNMPv2-SMI::mib-2.47.1.1.1.1.2.103329233 = STRING: "DOM RX Power Sensor for Ethernet3/29/3"
SNMPv2-SMI::mib-2.47.1.1.1.1.2.103329240 = STRING: "Lane 3 for Xcvr for Ethernet3/29"
SNMPv2-SMI::mib-2.47.1.1.1.1.2.103329241 = STRING: "DOM TX Bias Sensor for Ethernet3/29/4"
SNMPv2-SMI::mib-2.47.1.1.1.1.2.103329242 = STRING: "DOM TX Power Sensor for Ethernet3/29/4"
SNMPv2-SMI::mib-2.47.1.1.1.1.2.103329243 = STRING: “DOM RX Power Sensor for Ethernet3/29/4”
To get the thresholds for entities above, you take that last number and then use this:
.1.3.6.1.4.1.30065.3.12.1.1.1.1.[ENTITY_NUMBER_ABOVE] = Low Warning
.1.3.6.1.4.1.30065.3.12.1.1.1.2.[ENTITY_NUMBER_ABOVE] = Low Critical
.1.3.6.1.4.1.30065.3.12.1.1.1.3.[ENTITY_NUMBER_ABOVE] = High Warning
.1.3.6.1.4.1.30065.3.12.1.1.1.4.[ENTITY_NUMBER_ABOVE] = High Critical
So for example I want the high critical threshold for the above port Transmit power on 3/29/1:
SNMPv2-SMI::mib-2.47.1.1.1.1.2.103329212 = STRING: "DOM TX Power Sensor for Ethernet3/29/1"
So we would use 103329212 for the entity value
The outputs we would get would look like this, note the values don’t look correct though! we have to convert them. In order to get the correct values, divide by 10,000 and then convert from mw to dBm.
SNMPv2-SMI::enterprises.30065.3.12.1.1.1.1.103329212 = INTEGER: 4250
SNMPv2-SMI::enterprises.30065.3.12.1.1.1.2.103329212 = INTEGER: 4575
SNMPv2-SMI::enterprises.30065.3.12.1.1.1.3.103329212 = INTEGER: 19952
SNMPv2-SMI::enterprises.30065.3.12.1.1.1.4.103329212 = INTEGER: 22387
So converting them we get:
4250 / 10000 => 0.4250mw => -3.7161106995 dBm ~ -3.72 dBm
4575 / 10000 => 0.4575mw => -3.396089016 dBm ~ -3.40 dBm
19952 / 10000 => 1.9952mw => 2.9998643613 dBm ~ 3.00 dbm
22387 / 10000 => 2.2387mw => 3.4986008219 dBm ~ 3.50 dBm
Which matches the output we see on the switch:
High Alarm High Warn Low Alarm Low Warn
Tx Power Threshold Threshold Threshold Threshold
Port (dBm) (dBm) (dBm) (dBm) (dBm)
Et3/29/1 1.53 3.50 3.00 -3.40 -3.72