Flux

From air
Jump to: navigation, search

new data scripting language to make querying and analyzing time series

https://www.influxdata.com/blog/learning-flux-fluxlang-is-about-as-difficult-as-learning-an-api/

https://docs.influxdata.com/flux/v0.65/

Exemple


dataStream1 = from(bucket: "bucket1")
  |> range(start: -1h)
  |> filter(fn: (r) =>
    r._measurement == "network" and
    r._field == "bytes-transferred"
  )

dataStream2 = from(bucket: "bucket1")
  |> range(start: -1h)
  |> filter(fn: (r) =>
    r._measurement == "httpd" and
    r._field == "requests-per-sec"
    )

join(
    tables: {d1:dataStream1, d2:dataStream2},
    on: ["_time", "_stop", "_start", "host"]
  )