Flux Query package

The Query package is experimental and subject to change at any time. By using this function, you accept the risks of experimental functions.

Flux Query functions provide functions meant to simplify common InfluxDB queries. Import the experimental/query package:

import "experimental/query"

inBucket()

The primary function in this package is query.inBucket(), which uses all other functions in this package.

import "experimental/query"

query.inBucket(
  bucket: "telegraf/autogen",
  start: -1h,
  stop: now(),
  measurement: "mem",
  fields: ["used_percent", "available_percent"],
  predicate: (r) => r.tagA == "foo" and r.tagB != "bar"
)

This documentation is open source. See a typo? Please, open an issue.


Need help getting up and running? Get Support