Closed Patt92 closed 2 years ago
@Patt92 it helps to know which page this is from, which user interface you are using, and the exact controller version.
@malle-pietje I'm using Controller 6.5.55 (New Interface). The values are from devices tab
I checked this page but it appears this data isn't being pulled from the API. These are the API endpoints that are being polled:
None of these appears to contain these stats.
Here's the output from the most logical endpoint /proxy/network/api/s/default/stat/health
:
I'm afraid it looks as if you cannot access this data through the API...
@malle-pietje it is not the the tx_bytes-r
and rx_bytes-r
? ( I know you can get it from the WS, but I saw it on your screen too ) .
I do a litte test, rying to download a big file :
"rx_bytes": 546391321,
"rx_bytes-r": 1045,
"rx_packets": 1773121,
"tx_bytes": 3787885701,
"tx_bytes-r": 800,
"tx_packets": 4867683,
"rx_bytes": 548651670,
"rx_bytes-r": 279792,
"rx_packets": 1795244,
"tx_bytes": 4154698172,
"tx_bytes-r": 74902519,
"tx_packets": 5111118,
rx_bytes-r
move from 1045
to 279792
. and tx_bytes-r
from 800
to 74902519
(seems strange that rx change too, but why not)
Yes, but if I understand correctly you were looking for the stats per UniFi device, not the WAN stats. The rx_bytes could be the HTTP request, exact details will depend on how you are downloading.
@malle-pietje this stats are coming from a client object, and not the client doing the HTTP request .
My client is just downloading a random 10Gb file from outside of the unifi network .
Ah OK, would have been good to know the source of the data you showed. Anyway, you'll probably have to do some math to get the deltas.
@malle-pietje maybe wait before close ;) ? . I'm just trying to help, I'm not the author of this issue :) .
About the Math, data are in Kb, and -r
(tx_bytes-r
/rx_bytes-r
) properties are showing the "current" rate ... So no math needed ?
thank I, I just noted, when I was about to do the calculation. It is indeed the rate in Byte
@Patt92 ( comment removed ... It seems I did a misstake, seems to be bytes )
I did it at port level from list_devices
Those values are Byte "tx_errors":0, "tx_dropped":0, "rx_bytes":4128331366485, "rx_broadcast":19822061, "rx_multicast":25603262, "rx_packets":3864636915, "rx_errors":0, "rx_dropped":0, "tx_bytes-r":42071, "rx_bytes-r":1372939, "bytes-r":1415011, "name":"Internet", "masked":false,
I did *8/1024/1024 and got the same value as on the Controller shown. Sorry the values up there and the screen don't match, but it is indeed Byte there
Nice, thanks for sharing!
@malle-pietje maybe wait before close ;) ? . I'm just trying to help, I'm not the author of this issue :) . ...
OK, missed that:wink:
No further feedback received
I have checked the functions so far, but wasn't able to find a way to get the stats like in the Dashboard. Is there a way to get those, or do you have to calculate with from 2 times running list_devices(), which will be most likely not accurate?