0
日期 价值
2020-04-06 100
2020-04-05 90
------ -----
2019-09-06 60
2019-09-05 50

如何使用通量低于 rsult:

日期 减去 val
2020-04-06 40
2020-04-05 40
------ -----
2019-09-06 ...
2019-09-05 ...

现在我普通使用map,像这样

from(bucket:"example-bucket")
  |> filter(fn: (r) =>
    r._measurement == "cpu" and
    r._field == "usage_system" and
    r.cpu == "cpu-total"
  )
  |> range(start:-12h)
  |> map(fn: (r) => ({ r with _value: r._value - r.<Get 90 days value>}))
4

0 回答 0