Ad Widget

Collapse

Convert miliWatts to dBM

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wojciech.wojcik
    Junior Member
    • Sep 2015
    • 4

    #1

    Convert miliWatts to dBM

    Hello,

    I want to grab RX/TX power of optic transceiver off Arista/Cisco. The problem is that Arista reports that in miliWatts and I would like to see it in dBm. Obviously dBm is a logarithmic function of power but I have no idea how to make a conversion.

    Many thanks in advance

    Wojtek
  • jvgenderen
    Member
    • Nov 2014
    • 37

    #2
    mw 2 dBm

    milliwatt (mW) to dBm, power conversion: calculator and how to convert.


    possible done with external script ..

    grt Joost

    Comment

    • davidalain
      Junior Member
      • Dec 2019
      • 3

      #3
      Old but important question!!

      I also need to monitoring signal of TX/RX optical transceivers, but in my case was from EPON ONU devices.

      I did not found any solution about this, so I have needed to create by my own.

      Using following link, I could to implement a JavaScript function to make conversion.

      Originally posted by jvgenderen
      mw 2 dBm
      milliwatt (mW) to dBm, power conversion: calculator and how to convert.

      grt Joost
      So, I wrote this JavaScript function in Zabbix 4.2.8 as a pre-processing of the item of type SNMPv2 Agent:
      Code:
      function(value)
      return 10*Math.log10(value*0.0001);
      }
      Running snmpwalk against my EPON OLT device I have got this result:
      Code:
      iso.3.6.1.4.1.34592.1.3.4.1.1.36.1.1.2 = INTEGER: 1958
      iso.3.6.1.4.1.34592.1.3.4.1.1.36.1.1.3 = INTEGER: 110
      iso.3.6.1.4.1.34592.1.3.4.1.1.36.1.1.4 = INTEGER: 60
      iso.3.6.1.4.1.34592.1.3.4.1.1.36.1.1.7 = INTEGER: 907
      Note: these values above are with precision of 0.1 micro-watt per unit, because of this I have needed to multiply the read value by 0.0001 to get values in mW.

      Those values are respectively (in dBm):
      Code:
      -7.08187312532881
      -19.58607314841775
      -22.21848749616356
      -10.423927129399047

      Comment

      • geysonpls
        Junior Member
        • Apr 2020
        • 2

        #4
        Originally posted by davidalain
        Old but important question!!

        I also need to monitoring signal of TX/RX optical transceivers, but in my case was from EPON ONU devices.

        I did not found any solution about this, so I have needed to create by my own.

        Using following link, I could to implement a JavaScript function to make conversion.



        So, I wrote this JavaScript function in Zabbix 4.2.8 as a pre-processing of the item of type SNMPv2 Agent:
        Code:
        function(value)
        return 10*Math.log10(value*0.0001);
        }
        Running snmpwalk against my EPON OLT device I have got this result:
        Code:
        iso.3.6.1.4.1.34592.1.3.4.1.1.36.1.1.2 = INTEGER: 1958
        iso.3.6.1.4.1.34592.1.3.4.1.1.36.1.1.3 = INTEGER: 110
        iso.3.6.1.4.1.34592.1.3.4.1.1.36.1.1.4 = INTEGER: 60
        iso.3.6.1.4.1.34592.1.3.4.1.1.36.1.1.7 = INTEGER: 907
        Note: these values above are with precision of 0.1 micro-watt per unit, because of this I have needed to multiply the read value by 0.0001 to get values in mW.

        Those values are respectively (in dBm):
        Code:
        -7.08187312532881
        -19.58607314841775
        -22.21848749616356
        -10.423927129399047

        When you added the item to Grafana it does not show the result in dBm -7.08187312532881, show only a number of 3 decimal places

        Comment

        Working...