Spikes on graphs in grafana

Hello
I need to get the network interface bandwidth, but my flux code gives strange spikes on the graphs in grafana
I can’t figure out what’s going on.
If anyone has encountered this, please help me)

My flux

from(bucket: “my_bucket”)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r[“hostname”] == “${host}”)
|> filter(fn: (r) => r[“intname”] == “${interface}”)
|> filter(fn: (r) => r[“_field”] == “ifout”)
|> filter(fn: (r) => r[“host”] == “monitoring”)
|> derivative(unit: 1s, nonNegative: false)
|> map(fn: (r) => ({ r with _value: r._value * 8.0}))
|> aggregateWindow(every: 5m, fn: last, createEmpty: false)

What oid are you using to calculate? To get these correct in grafana you have to make sure you choose the correct unit and then possibly add a calculation on top of it.