Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Flux query to get alerts
from(bucket: "_monitoring") |>
range(start: -7d, stop: 1582912196) |>
filter(fn: (r) => r._measurement == "statuses" and r._field == "_message") |>
keep(columns: ["_time", "_value", "_check_id", "_check_name", "_level"]) |>
rename(columns: {"_time": "time", "_value": "message", "_check_id": "checkID", "_check_name": "checkName", "_level": "level"}) |>
group() |>
sort(columns: ["time"], desc: true) |>
limit(n: 100, offset: 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.