Grafana: Evaluate date name (Flux)

Aus Wiki-WebPerfect
Version vom 21. Januar 2021, 10:05 Uhr von Admin (Diskussion | Beiträge)

(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Wechseln zu: Navigation, Suche

Goal: Add two columns (namedMonth and namedDay) with name of the month and day.
Steps:

  • Aggregate the data with an window of 1d and the function last.
  • Group the data by _time.
  • Calculate the sum for each timeseries (foreach grouped _time).
  • Truncate the data to whole days.
  • Select first to remove the last not completed day.
  • Evaluate the month and the day and add these as new columns.