2
votes

I have a metric in Prometheus called unifi_devices_wireless_received_bytes_total, it represents the cumulative total amount of bytes a wireless device has received. I'd like to convert this to the download speed in Mbps (or even MBps to start).

I've tried:

rate(unifi_devices_wireless_received_bytes_total[5m])

Which I think is saying: "please give me the rate of bytes received per second", over the last 5 minutes, based on the documentation of rate, here.

But I don't understand what "over the last 5 minutes" means in this context.

In short, how can I determine the Mbps based on this cumulative amount of bytes metric? This is ultimately to display in a Grafana graph.

1

1 Answers

0
votes

You want rate(unifi_devices_wireless_received_bytes_total[5m]) / 1000 / 1000

But I don't understand what "over the last 5 minutes" means in this context.

It's the average over the last 5 minutes.