From fda17989d32e06526acb277837786817461fe6ac Mon Sep 17 00:00:00 2001 From: mwiegand Date: Wed, 27 Oct 2021 21:57:14 +0200 Subject: [PATCH] graphs --- data/grafana/flux.mako | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/grafana/flux.mako b/data/grafana/flux.mako index 48dc8ee..42de3f6 100644 --- a/data/grafana/flux.mako +++ b/data/grafana/flux.mako @@ -7,8 +7,8 @@ from(bucket: "${bucket}") % if function == 'derivative': |> derivative(nonNegative: true) % endif + |> aggregateWindow(every: duration(v: int(v: v.windowPeriod)*${resolution}), fn: mean, createEmpty: false) % if negative: |> map(fn: (r) => ({r with _value: r._value * - 1.0})) % endif - |> aggregateWindow(every: duration(v: int(v: v.windowPeriod)*${resolution}), fn: mean, createEmpty: false) |> yield(name: "mean")