Polling incorrect sensor data on breakup interface

LibreNMS Version 1.65

Hi I’m not sure did anyone report this problem before, LibreNMS somehow failed to poll the sensor current TX/Rx values from a break-up interface. We have a Cisco Nexus 9K, we break up some QSFP+ 40G into 4 x 10G,
The optic level from the device reported as below
Temperature 36.92 C 75.00 C -5.00 C 70.00 C 0.00 C
Voltage 3.26 V 3.63 V 2.97 V 3.46 V 3.09 V
Current 6.73 mA 10.00 mA 0.50 mA 9.50 mA 1.00 mA
Tx Power -2.32 dBm 1.99 dBm -11.61 dBm -1.00 dBm -7.61 dBm
Rx Power -8.96 dBm 3.39 dBm -13.56 dBm 2.39 dBm -9.50 dBm

however, librenms reported the current values was zero

mysql> select sensor_descr, sensor_current, poller_type,sensor_class,device_id,sensor_oid from sensors where sensor_id = 230;
±------------------------------------------------±---------------±------------±-------------±----------±----------------------------------------+
| sensor_descr | sensor_current | poller_type | sensor_class | device_id | sensor_oid |
±------------------------------------------------±---------------±------------±-------------±----------±----------------------------------------+
| Ethernet1/20 Lane 2 Transceiver Transmit Power | 0 | snmp | dbm | 9 | .1.3.6.1.4.1.9.9.91.1.1.1.1.4.300033470 |
±------------------------------------------------±---------------±------------±-------------±----------±----------------------------------------+
1 row in set (0.00 sec)

Also I would like to know how I link the optic sensor back to a physical port, so that it would not trigger an sensor value low alarm on admin down, ports,ifAdminStatus=“down”. I tried to use entPhysicalIndex, but entPhysical.ifIndex is not populate, therefore it could not link back to port table.

Regards
Sherman

Hi Anyone able to help ?

Hi @Sherma
As you identified, this is currently not supported by LibreNMS. So the solution requires to identify exactly how the SNMP replies from the Cisco device are structured, parse them, split them, and map them to the right DB cell.
Basically, one OID seems to provide multiple values when using a breakout cable. This probably requires deep changes (one OID should create 4 sensors and not only one as today).
If you decide to go for it, you should get in touch here (or in github) with the team to ensure the right solution is found.
Bye

HI PipoCanaja

Thanks for the reply, would you re-post the “here” href link, the link was missing on your post.

Kind regards
Sherman

Here is “here”, on this forum. And github is the repository :slight_smile:

Hi PipoCanaja

Sorry for late response, after further looking at the problem, i found the data did available if I snmpwalk .1.3.6.1.4.1.9.9.91.1.1.1.1.4
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.300033463 = INTEGER: 39519
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.300033469 = INTEGER: -2541
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.300033470 = INTEGER: -2132
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.300033475 = INTEGER: 3257

Use snmpwalk .1.3.6.1.2.1.47.1.1.1.1.7 to obtain the description
SNMPv2-SMI::mib-2.47.1.1.1.1.7.300033463 = STRING: “Ethernet1/20 Lane 2 Transceiver Temperature Sensor”
SNMPv2-SMI::mib-2.47.1.1.1.1.7.300033469 = STRING: “Ethernet1/20 Lane 2 Transceiver Receive Power Sensor”
SNMPv2-SMI::mib-2.47.1.1.1.1.7.300033470 = STRING: “Ethernet1/20 Lane 2 Transceiver Transmit Power Sensor”
SNMPv2-SMI::mib-2.47.1.1.1.1.7.300033475 = STRING: “Ethernet1/20 Lane 3 Transceiver Voltage Sensor”
SNMPv2-SMI::mib-2.47.1.1.1.1.7.300033476 = STRING: “Ethernet1/20 Lane 3 Transceiver Bias Current Sensor”
SNMPv2-SMI::mib-2.47.1.1.1.1.7.300033479 = STRING: “Ethernet1/20 Lane 3 Transceiver Temperature Sensor”
SNMPv2-SMI::mib-2.47.1.1.1.1.7.300033485 = STRING: “Ethernet1/20 Lane 3 Transceiver Receive Power Sensor”

However, I could not obtain the value simply by snmpget

Regards
Sherman

snmpget should be all right if you ask the exact oid :
.1.3.6.1.4.1.9.9.91.1.1.1.1.4.300033470

This is the OID we currently use in LibreNMS btw.

Starting from there, extending LibreNMS discovery to correctly find and display these is probably not very complicated. I would suspect that the siblings oids where scale, sensor type, etc, are not populated correctly.

You can check the code which discovers those sensors /opt/librenms/includes/discovery/sensors/cisco-entity-sensor.inc.php and make the necessary changes.
Then you would open a Pull Request in GitHub so we can check the code with you, ensure there is no regression (that is probably the tricky part) and improve LibreNMS handling of this device.

Bye

Hi PipoCanaja

Thanks for the hint, I would like to have more information on how that file gets included, although, I could dig out by going through discovery.php, but it would be quicker if you could tell me. The problem is not in includes/discovery/sensors/cisco-entity-sensor.inc.php, as $entry[‘entSensorValue’] does contains the correct value, and there is no problem on

$current = ($current * $multiplier / $divisor);

The discover_sensor() call only updates if the sensor if it was not on the table, sensors, or the warning/critical value on either high/low were different from the previous records.

I would like to know what happened after cisco-entity-sensor.inc.php was called, which function/script attempted to save the data to the db.

Regards

Sherman

So the sensors are correctly added to the DB, the detailed one of the breakup interface ? What I understood is that the specific sensors are not added, only the “original” Cisco one, which is unusable because it provides the 4 values into one single OID.

Hi PipoCanaja,
Sorry somehow I got you confused, librenms is able to pickup the sensors on those breakup interfaces, however, beside the 1st sub-interface, it could not pickup the sensor value, Rx/Tx/Temp. on the remaining sub interfaces, they always showing 0. See cut & paste from librenms on below

Eth1/20 Lane 1 Transceiver Receive Power -2.92 dBm
Eth1/20 Lane 1 Transceiver Transmit Power -2.15 dBm
Eth1/20 Lane 2 Transceiver Receive Power ** 0 dBm**
Eth1/20 Lane 2 Transceiver Transmit Power 0 dBm
Eth1/20 Lane 4 Transceiver Receive Power 0 dBm
Eth1/20 Lane 4 Transceiver Transmit Power ** 0 dBm**
Eth1/20 Lane 2 Transceiver ** 0 °C**
Eth1/20 Lane 4 Transceiver 0 °C

After I follow the hint you provided, /opt/librenms/includes/discovery/sensors, i found the scripts indeed picks up those value correctly, however, for some reason, unknown yet, those correct value did not saved into the database.

Each sub-interfaces have it own indexes for those sensors
Interface Ethernet1/20
Rx Tx
Lane1 = 300033453,300033454
Lane2 = 300033469,300033470
Lane3 = 300033485,300033486
Lane4 = 300033501,300033502

which get appended to 1.3.6.1.4.1.9.9.91.1.1.1.1.4

Hope I have explained clearly this time.

Regards
Sherman

Hi PipoCanaja

After digging around, I found poller.php is the script i’m after, it pulled the data via snmpget, which it would not able to retrieve the date

SNMP[^[[0;36m’/usr/bin/snmpget’ ‘-v2c’ ‘-c’ ‘Goubbecru’ ‘-OUQnte’ ‘-M’ ‘/var/opt/librenms/mibs:/var/opt/librenms/mibs/cisco’ ‘udp:sw6.eq.i.fetchtv.com.au:161’ ‘.1.3.6.1.4.1.9.9.91.1.1.1.1.4.300031741’ ‘.1.3.6.1.4.1.9.9.91.1.1.1.1.4.300031742’ ‘.1.3.6.1.4.1.9.9.91.1.1.1.1.4.300033453’ ‘.1.3.6.1.4.1.9.9.91.1.1.1.1.4.300033454’ ‘.1.3.6.1.4.1.9.9.91.1.1.1.1.4.300033469’ ‘.1.3.6.1.4.1.9.9.91.1.1.1.1.4.300033470’ ‘.1.3.6.1.4.1.9.9.91.1.1.1.1.4.300033501’ ‘.1.3.6.1.4.1.9.9.91.1.1.1.1.4.300033502’ ‘.1.3.6.1.4.1.9.9.91.1.1.1.1.4.300035213’ ‘.1.3.6.1.4.1.9.9.91.1.1.1.1.4.300035214’^[[0m]
.1.3.6.1.4.1.9.9.91.1.1.1.1.4.300031741 = -931
.1.3.6.1.4.1.9.9.91.1.1.1.1.4.300031742 = -1272
.1.3.6.1.4.1.9.9.91.1.1.1.1.4.300033453 = -2924
.1.3.6.1.4.1.9.9.91.1.1.1.1.4.300033454 = -2153
.1.3.6.1.4.1.9.9.91.1.1.1.1.4.300033469 = No Such Instance currently exists at this OID
.1.3.6.1.4.1.9.9.91.1.1.1.1.4.300033470 = No Such Instance currently exists at this OID
.1.3.6.1.4.1.9.9.91.1.1.1.1.4.300033501 = No Such Instance currently exists at this OID
.1.3.6.1.4.1.9.9.91.1.1.1.1.4.300033502 = No Such Instance currently exists at this OID
.1.3.6.1.4.1.9.9.91.1.1.1.1.4.300035213 = -2175
.1.3.6.1.4.1.9.9.91.1.1.1.1.4.300035214 = -846

The data only able to be pull by snmpwalk, not snmpget.
Cisco bugs?

Regards
Sherman