
as we will use distinct Influx and Grafana instances for the different stages/environments.
11 lines
510 B
Plaintext
11 lines
510 B
Plaintext
import "strings"
|
|
|
|
result = from(bucket: "poseidon")
|
|
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|
|
|> filter(fn: (r) => r["_measurement"] == "poseidon_aws_executions" or r["_measurement"] == "poseidon_nomad_executions")
|
|
|> filter(fn: (r) => contains(value: r["environment_id"], set: ${environment_ids:json}))
|
|
|> filter(fn: (r) => r["event_type"] == "creation")
|
|
|> group(columns: ["environment_id", "stage"], mode:"by")
|
|
|> count()
|
|
|> keep(columns: ["_value", "environment_id", "stage"])
|