Uploaded image for project: 'Observium'
  1. Observium
  2. OBS-4494

tmnxDDMLaneRxOpticalPower wrongly classified as sensor_class: power. should be dbm.

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • Professional Edition
    • Discovery

    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'

       

      Attachments

        Activity

          [OBS-4494] tmnxDDMLaneRxOpticalPower wrongly classified as sensor_class: power. should be 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.

          osv Sven Van Den Steene added a comment - 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.

          In MIB description:

              //        "The value of tmnxDDMRxOpticalPower indicates the current Received
              //          Optical Power of the SFF in one tenths of a microwatt (uW).
              //
              //          If the SFF is externally calibrated, the objects
              //          tmnxDDMExtCalRxPower4, tmnxDDMExtCalRxPower3, tmnxDDMExtCalRxPower2,
              //          tmnxDDMExtCalRxPower1 and tmnxDDMExtCalRxPower0 affect the output
              //          power calculation.
              //          Table 3.16 in the SFF Committee Standard's document SFF-8472 Rev 10.2.
              //
              //          For example (internally calibrated SFF):
              //          Using the SNMP value of 790, and using units of tenths of microwatt,
              //          790 becomes 79 microwatts or 0.079 milliwatts. Converting to dBm:
              //                10 x log10(0.079) = -11.0 dBm"
          

          and all data which I seen, was in Watt units.

          landy Mike Stupalov added a comment - In MIB description: // "The value of tmnxDDMRxOpticalPower indicates the current Received // Optical Power of the SFF in one tenths of a microwatt (uW). // // If the SFF is externally calibrated, the objects // tmnxDDMExtCalRxPower4, tmnxDDMExtCalRxPower3, tmnxDDMExtCalRxPower2, // tmnxDDMExtCalRxPower1 and tmnxDDMExtCalRxPower0 affect the output // power calculation. // Table 3.16 in the SFF Committee Standard's document SFF-8472 Rev 10.2. // // For example (internally calibrated SFF): // Using the SNMP value of 790, and using units of tenths of microwatt, // 790 becomes 79 microwatts or 0.079 milliwatts. Converting to dBm: // 10 x log10(0.079) = -11.0 dBm" and all data which I seen, was in Watt units.

          General questions and device support can be discussed in our Discord channel, click here to join.


          Please make and attach additional information about the device:

          • full snmp dump from device:

            snmpwalk -v2c -c <community> -t 3 -Cc --hexOutputLength=0 -ObentxU <hostname> .1 > myagent.snmpwalk
            snmpwalk -v2c -c <community> -t 3 -Cc --hexOutputLength=0 -ObentxU <hostname> .1.3.6.1.4.1 >> myagent.snmpwalk

            If device not support SNMP version 2c, replace -v2c with -v1.

          • If you have problems with discovery or poller processes, please do and attach these debugs:

            ./discovery.php -d -h <device>
            ./poller.php -d -h <device>

          • additionally attach device and/or vendor specific MIB files

          This comment is added automatically.

          bot Observium Bot added a comment - General questions and device support can be discussed in our Discord channel, click here to join . Please make and attach additional information about the device: full snmp dump from device: snmpwalk -v2c -c <community> -t 3 -Cc --hexOutputLength=0 -ObentxU <hostname> .1 > myagent.snmpwalk snmpwalk -v2c -c <community> -t 3 -Cc --hexOutputLength=0 -ObentxU <hostname> .1.3.6.1.4.1 >> myagent.snmpwalk If device not support SNMP version 2c, replace -v2c with -v1. If you have problems with discovery or poller processes, please do and attach these debugs: ./discovery.php -d -h <device> ./poller.php -d -h <device> additionally attach device and/or vendor specific MIB files This comment is added automatically.

          People

            landy Mike Stupalov
            osv Sven Van Den Steene
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: