Good afternoon, I can't seem to find the relationship between SNMP traffic data returned by the historic data API and the data returned/displayed in PRTG

My API request is as follows:/api/historicdata.json?id=3007&avg=60&sdate="+startdatestring+"&edate="+enddatestring+"&usecaption=1"

This returns (single value taken for readability): Downtime:0

Traffic In (speed):223144.9389

Traffic In (volume):13857300.704

Traffic Out (speed):40778.2848

Traffic Out (volume):2532331.4877

Traffic Total (speed):263923.2237

Traffic Total (volume):16389632.1917

coverage:"100 %"

datetime:"28/08/2018 12:45:00 - 12:46:00"

When I check the same data via the PRTG report web interface for the same sensor and same timespan I get

28/08/2018 12:45:00 - 12:46:00

15.466 KByte Traffic Total (volume)

2.112 kbit/s Traffic Total (speed)

13.077 KByte Traffic In (volume)

1.786 kbit/s Traffic In (speed)

2.388 KByte Traffic Out (volume)

326 kbit/s Traffic Out (speed)

Could you explain how to convert the data from the API to the actual values in Kbps. I have tried the obvious bits to bytes to seconds etc but can't seem to find it.

Thanks Michaël


Article Comments

Did you use the raw data interval for the historic data report? Just to ensure we're not dealing with averaged values.


Kind regards,
Stephan Linke, Tech Support Team


Aug, 2018 - Permalink

Hi Stephan, I did use averaged values ("avg=60" see above) and got a 1 minute interval (datetime:"28/08/2018 12:45:00 - 12:46:00") which is also what I need. Thanks Michaël


Aug, 2018 - Permalink

Could you please provide me with the actual CSV of the historic data for the sensor as well as the report? You can simply link them here, but please add !nopublish to your post in order to avoid publishing them :)


Kind regards, Stephan Linke, Tech Support Team


Aug, 2018 - Permalink

Hi Stephan, I looked at the data a bit further andthe translation from raw to actual speed is * 8 / 1024 in my case. This then gives a pretty accurate result. I do see some differences in data whether I export raw historic values (with 1 minute polling interval) or if I take an average (of that same 1 minute polling interval) but I will look into that later. Thanks Michaël


Aug, 2018 - Permalink

Thanks for the update :)


Kind regards,
Stephan Linke, Tech Support Team


Aug, 2018 - Permalink