Diego Aguiari
Diego Aguiari

Reputation: 43

Speed rates on Grafana, influxdb

Details:

I was trying to get the current speed rate in megabit/s from a server interface but I cannot figure out how to transform "if_octets" in Megabit/s using Grafana. Or better I don't know what query to use.

I used this query but I have no output

select derivative(mean(value), 1s) from "interface_rx" where "istance" ='em1' and "type" = 'if_octects' and time > now() - 4h group by time(1m) 

Upvotes: 0

Views: 2593

Answers (1)

Michael Desa
Michael Desa

Reputation: 4747

The following query will give you the number of if_octets/s.

select derivative(sum(value), 1s) ... group by time(1s)

Essentially, for each second we want to sum together all of the values in the previous second, and take the rate of change of that value.

See this description of the derivative for more details on why we want to group by time(1s).

Upvotes: 1

Related Questions