Hello . Cisco System Health Other Sensor on cisco ASR 9001 shows Interface Rx, Tx mW power . i want those values in dBm. can i somehow transform or change something ? :) thanks.
Cisco ASR 9001, Cisco System Health Other Sensor
Votes:
0
10 Replies
Votes:
1
There is a formula involved, math, to accomplish this. In the end - only what the device (Cisco ASR) provides you via SNMP can be used directly, everything else, well, might need some extra work.
Looking at the conversion, this is a more complex calculation
How to convert mW to dBm The power P(dBm) in dBm is equal to 10 times the base 10 logarithm of the power P(mW) in milliwatts (mW) divided by 1 milliwatt (mW): P(dBm) = 10 ⋅ log10( P(mW) / 1mW)
Source: https://www.rapidtables.com/convert/power/mW_to_dBm.html
I am not sure if you can do such complex math. operation in PRTG, I know that standard sensors can do simple multiplication and divide - but this is due to the LOG-10 a more complex calculation.
Possibly the Sensor-Factory-Sensor could help you - https://www.paessler.com/manuals/prtg/sensor_factory_sensor - but I do not see any LOG calculation in the documentation.
Another solution would be to engage an outside script like VBscript or similar - as parameter you inject the mW and as result you respond with dBm.
Just want to state clearly, Paessler like to keep the PRTG core process simple, so it performs well. This means that more complex calculations might need to be outsourced to e.g. scripts. As for the values you get, this depends really on the vendor of the device, especially with SNMP. I see similar requests a lot - while it is important to understand that PRTG can only process what the vendor makes available.
Regards
Florian Rossmark
Votes:
0
first of all , thank you for replay :)
yes saw formula and i could't not find nothing like logarithm on PRTG .
i have other R/S cisco's and i geting dBm values via health sensor other. and when i added asr 9001 i got mW :) and mW parametre is not comfortable for me .
also tried add oidlib cisco asr 9001 but i got Uncertain values with no interface names.
so at this time no results .
Votes:
2
Flo's right here, PowerShell to the rescue:
Install-Module SNMP # just add the OID of your mW value $mW = Get-SnmpData -IP 10.10.10.100 -Community public -OID .1.3.6.1.4.1.6574.2.1.1.6.0 # perform log calculations $dBm = 10*([math]::log10($mW / 1)) # Output to command line: Write-Host ([string]::Format("{0}:Current Power Ratio is {0}dBm",$dBm)
...something like that :) Not sure if the calculation is actually correct here.
PRTG Scheduler |
PRTGapi |
Feature Requests |
WMI Issues |
SNMP Issues
Kind regards,
Stephan Linke, Tech Support Team
Votes:
0
hello Stephan. this is PowerShell script as i see. but how to integrate formula in PRTG to graph dBm numbers instead of mW s . thanks
Votes:
0
Not possible as no sensor features log-based calculations I'm afraid :(
PRTG Scheduler |
PRTGapi |
Feature Requests |
WMI Issues |
SNMP Issues
Kind regards,
Stephan Linke, Tech Support Team
Votes:
0
What you actually do:
You create the PS script and have it respond the values you want - if it is for more then one single OID then up to 50 channels are possible.
As input parameter I would probably use the IP of the target device - script input parameter.
The response, if multi-channel / multi-OIDs should be XML - it would be a EXE-advanced script.
If a single channel/OID - a simple EXE sensor script will do.
This will create a separate sensor - you actually add this as a sensor to your target device - you get the data from the script as a result of the script doing the actual SNMP query and calculating the result so you get dBm instead of mW - this data again can be shown in some graphs.
If you then want a single sensor showing multiple graphs from various OIDs, you simply engage yet another sensor on top - the business data sensor - but lets get the PS script to work first...
Regards
Florian
Votes:
0
thank you . i will try to contact cisco to ask if they have specific Oid's for dBm values
Votes:
0
thank you florian , i will try later.
Votes:
0
I have Python source code to switch from mW to bBm and vice versa on Cisco ASR 9000 device but I don't know how to put in PRTG. Thanks to everyone for helping me. I tried using a sensor called Python Script Advanced Sensor in PRTG and using the Python code to convert but when I checked, an error message appeared. How can I embed Python source code to translate the value of mW to dBm in this sensor or a sensor called Sensor System Health Other
Sourcecode Python https://github.com/yadox666/dBm2mW
Votes:
0
What's the current output of the script? Make sure the output format matches what PRTG is expecting.
Add comment