Details
Description
On r12751
Path: includes/discovery/sensors/timetra-port-mib.inc.php
|
Name: timetra-port-mib.inc.php
|
URL: http://svn.observium.org/svn/observium/trunk/includes/discovery/sensors/timetra-port-mib.inc.php |
Repository Root: http://svn.observium.org/svn |
Repository UUID: 61d68cd4-352d-0410-923a-c4978735b2b8 |
Revision: 12751 |
Node Kind: file
|
Schedule: normal
|
Last Changed Author: mike
|
Last Changed Rev: 12708 |
Last Changed Date: 2023-04-21 15:25:42 +0200 (Fri, 21 Apr 2023) |
Text Last Updated: 2023-04-27 13:15:42 +0200 (Thu, 27 Apr 2023) |
Checksum: e0e8261935c342ee7482918d5867fcaf
|
Issue contained in file includes/discovery/sensors/timetra-port-mib.inc.php
On line 559 the OID tmnxDDMRxOpticalPower has sensor_class 'power' assigned to it where this is an Optical Power and should be mapped to the sensor_class 'dbm'
Hello,
While looking a bit further into the issue I noticed that in the discover_sensor_ng() there is a check to convert the $class='power' into $class='dbm' if the sensor_unit !== 'W' and if the option $config['sensors']['port']['power_to_dbm'] is set to 'TRUE' , per default this config-setting is set to 'FALSE'.
So it seems the solution to this misclassification is not to change the discovery routine, but to set the appropriate config setting.
Solution:
$config['sensors']['port']['power_to_dbm'] = TRUE; // Convert power Port DOM sensors to dBm
If your code style permits it, may I suggest to place a small note about this for the oid's: tmnxDDMTxOutputPower, tmnxDDMRxOpticalPower, tmnxDDMLaneTxOutputPower, tmnxDDMLaneRxOpticalPower.