Grafana as Code

Transfer our dashboard into a code representation via grafanalib.
This commit is contained in:
Maximilian Paß
2022-10-26 16:51:56 +01:00
parent b98e3deb40
commit 44aa5d73a2
31 changed files with 745 additions and 1746 deletions

View File

@ -0,0 +1,8 @@
from(bucket: "poseidon/autogen")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "poseidon_used_runners")
|> filter(fn: (r) => r["_field"] == "count")
|> filter(fn: (r) => (not exists r.stage) or contains(value: r["stage"], set: ${stages:json}))
|> group(columns: ["stage"], mode:"by")
|> keep(columns: ["_value", "_time", "stage"])
|> aggregateWindow(every: duration(v: int(v: v.windowPeriod) * 5), fn: mean, createEmpty: false)