neuralfraud / grafana-prtg

A PRTG Datasource plugin for Grafana
181 stars 75 forks source link

Units incorrect #102

Closed wlolato closed 5 years ago

wlolato commented 6 years ago

Hi,

My graph on grafana displays units in Tbps, that is incorrect.

image

PRTG displays correct traffic in Mbits/S

image

What can a fix to resolve this ?

Thanks.

ktngoykalolo commented 6 years ago

Hi, any update on this ? I have the same issue

Zxurian commented 6 years ago

It looks like the response from PRTG may be off? This is the raw XML received by grafana from pinging PRTG:

   <item>
    <datetime>6/25/2018 12:10:14 PM</datetime>
    <datetime_raw>43276.6737732870</datetime_raw>
    ...
    <value channel="Traffic In (volume)" channelid="0">32 MByte</value>
    <value_raw channel="Traffic In (volume)" channelid="0">33635451.0000</value_raw>
    <value channel="Traffic In (speed)" channelid="0">0.90 Mbit/s</value>
    <value_raw channel="Traffic In (speed)" channelid="0">112118.1700</value_raw>
    <value channel="Traffic Out (volume)" channelid="1">85 MByte</value>
    <value_raw channel="Traffic Out (volume)" channelid="1">89027133.0000</value_raw>
    <value channel="Traffic Out (speed)" channelid="1">2.37 Mbit/s</value>
    <value_raw channel="Traffic Out (speed)" channelid="1">296757.1100</value_raw>
    ...
    <coverage>100 %</coverage>
    <coverage_raw>0000010000</coverage_raw>
   </item>

the volume channel matches up to it's raw, but the speed channel doesn't look like the calculations are matching up.

If I view the sensor directly on PRTG, and view the table as XML, the raw value shown matches what is received by Grafana. so the problem might be with PRTG?

tehSMK commented 6 years ago

They Problem lies within the value_raw format. It is returned as bytes instead of bits. So what happens is that there is some calculation between value_raw and value.

when you look at the values from above this post:

2.37 Mbit/s
<value_raw channel="Traffic Out (speed)" channelid="1">296757.1100</value_raw>

296757 bytes/s / 1000 / 1000 =~ 0.297Mbytes/s

Now multiply by 8 0.297Mbytes/s * 8 =~ 2.37MBits/s

Don't know why this is done this way. So its a "problem" of PRTG instead of Grafana(Plugin)

Hope this is understandable :D

hungdohuy commented 6 years ago

Hi,

I notice the same issue here, On PRTG: image

But on Grafana: image

Max on PRTG is 10,450 kbit/s Max on Grafana is 1153615 so as from comment of tehSMK, is it possible to convert it to bits?

biloriaj commented 5 years ago

How could we solve this issue? I am having the same problem when I pull out the data from the PRTG and try to graph in the Grafana. Any comments that it could help to overcome this issue or any workaround?

tehSMK commented 5 years ago

there is a multiplier field in the grafana dashboard when you choose PRTG Datasource on the metrics tab.

biloriaj commented 5 years ago

Hi, TehSMk. I could not find any field, could you please share more details about this? Thank you in advance. Jesus Viloria

tehSMK commented 5 years ago

@biloriaj you should have an option when you select your datasource.

datasource

biloriaj commented 5 years ago

Hi, TehSMK. Thank you for your comments. unfortunately, I do not have the option, please take a look:

grafana multiplier

biloriaj commented 5 years ago

guys! any comments about this issue I am having, thanks in advance. Jesus Viloria

neuralfraud commented 5 years ago

Prtg bandwidth values are in Bytes/s.

The dev branch has a feature which allows you to specify a multiplier for the data if you wish to scale it down to bits, kbytes, etc.

Sent from my iPhone

On Jun 25, 2019, at 4:18 PM, biloriaj notifications@github.com wrote:

guys! any comments about this issue I am having, thanks in advance. Jesus Viloria

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

RamiroCarlos commented 2 years ago

Hi, thanks for your work, it definitely helped us to solve the problem, cuted the work in half. We fixed the units in (data rate) bits/sec(SI) ignoring the raw values that are in Bytes, next we Transform the value from Bytes to Bits throught the multiplication of 8 values