fix dbm sensor for ios-xr #3291

Merged
merged 1 commit into from Mar 31, 2016

Projects

None yet

2 participants

@mmarchand
Contributor

Restore dbm sensors for IOS-XR

@mmarchand mmarchand fix dbm sensor for ios-xr
78e130e
@laf
Member
laf commented Mar 29, 2016

Can you show us the output of an snmpwalk on this so we can see?

Is it possible this varies between ios-xr versions?

@mmarchand
Contributor

I don't believe it's a change on XR side,
iirc it's a change in librenms, sensor descriptions used to be shortened automatically (things like "current/power/state/temperature/..." were cleaned out)

@laf
Member
laf commented Mar 30, 2016

Sorry it was more to see what the actual output from snmp was :)

@laf
Member
laf commented Mar 30, 2016

Do we need both checks as that output shows:

power Rx 0/11/CPU0/18

and

Transceiver Tx Power Sensor

?

@laf laf added the Discovery label Mar 30, 2016
@mmarchand
Contributor

hmm actually a sensor entry is like:

ENTITY-MIB::entPhysicalDescr.1247 = STRING: Transceiver Tx Power Sensor
ENTITY-MIB::entPhysicalVendorType.1247 = OID: SNMPv2-SMI::enterprises.9.12.3.1.8.47
ENTITY-MIB::entPhysicalContainedIn.1247 = INTEGER: 21556457
ENTITY-MIB::entPhysicalClass.1247 = INTEGER: sensor(8)
ENTITY-MIB::entPhysicalParentRelPos.1247 = INTEGER: 1
ENTITY-MIB::entPhysicalName.1247 = STRING: power Tx 0/13/CPU0/2
ENTITY-MIB::entPhysicalHardwareRev.1247 = STRING:
ENTITY-MIB::entPhysicalFirmwareRev.1247 = STRING:
ENTITY-MIB::entPhysicalSoftwareRev.1247 = STRING:
ENTITY-MIB::entPhysicalSerialNum.1247 = STRING:
ENTITY-MIB::entPhysicalMfgName.1247 = STRING:
ENTITY-MIB::entPhysicalModelName.1247 = STRING:
ENTITY-MIB::entPhysicalAlias.1247 = STRING:
ENTITY-MIB::entPhysicalAssetID.1247 = STRING:
ENTITY-MIB::entPhysicalIsFRU.1247 = INTEGER: false(2)

actually the root cause seems to be :

   if ($entity_array[$index]['entPhysicalName'] || $device['os'] == 'iosxr') {
                    $descr = rewrite_entity_descr($entity_array[$index]['entPhysicalName']);
                }

from #2767

Mik

@laf
Member
laf commented Mar 31, 2016

So before we would have had:

power Tx 0/13/CPU0/2 - Transceiver Tx Power Sensor

but now just show:

power Tx 0/13/CPU0/2

So you are right with this. Merging now.

@laf laf merged commit 90eef6a into librenms:master Mar 31, 2016

2 checks passed

Scrutinizer 2 new issues
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment