1

I have a bytes counter being sent to InfluxDB and the below query to show the data:

from(bucket: "PolygonIoStreamTelemetry")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_measurement"] == "bytes-received" or r["_measurement"] == "bytes-sent")
  |> filter(fn: (r) => r["_field"] == "Value")
  |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)
  |> yield(name: "last")

This yields a straight line, I would however like to get a bytes per sample - the difference.

Also when the application resets, this counter would go from zero so there would be a large negative increase for the first sample on reset.

I see there is an Increase function, how would I use it in relation to the above?

morleyc
  • 2,169
  • 10
  • 48
  • 108

0 Answers0