Documentation

Common variable queries

List buckets

List all buckets in the current organization.

Flux functions: buckets(), rename(), keep()

buckets()
    |> rename(columns: {"name": "_value"})
    |> keep(columns: ["_value"])
  • Copy
  • Fill window

List measurements

List all measurements in a specified bucket.

Flux package: InfluxDB v1
Flux functions: v1.measurements()

import "influxdata/influxdb/v1"

v1.measurements(bucket: "bucket-name")
  • Copy
  • Fill window

List fields in a measurement

List all fields in a specified bucket and measurement.

Flux package: InfluxDB v1
Flux functions: v1.measurementTagValues()

import "influxdata/influxdb/v1"

v1.measurementTagValues(
    bucket: "bucket-name",
    measurement: "measurement-name",
    tag: "_field",
)
  • Copy
  • Fill window

List unique tag values

List all unique tag values for a specific tag in a specified bucket. The example below lists all unique values of the host tag.

Flux package: InfluxDB v1
Flux functions: v1.tagValues()

import "influxdata/influxdb/v1"

v1.tagValues(bucket: "bucket-name", tag: "host")
  • Copy
  • Fill window

List Docker containers

List all Docker containers when using the Docker Telegraf plugin.

Telegraf plugin: Docker
Flux package: InfluxDB v1
Flux functions: v1.tagValues()

import "influxdata/influxdb/v1"

v1.tagValues(bucket: "bucket-name", tag: "container_name")
  • Copy
  • Fill window

List Kubernetes pods

List all Kubernetes pods when using the Kubernetes Telegraf plugin.

Telegraf plugin: Kubernetes
Flux package: InfluxDB v1
Flux functions: v1.measurementTagValues()

import "influxdata/influxdb/v1"

v1.measurementTagValues(
    bucket: "bucket-name",
    measurement: "kubernetes_pod_container",
    tag: "pod_name",
)
  • Copy
  • Fill window

List Kubernetes nodes

List all Kubernetes nodes when using the Kubernetes Telegraf plugin.

Telegraf plugin: Kubernetes
Flux package: InfluxDB v1
Flux functions: v1.measurementTagValues()

import "influxdata/influxdb/v1"

v1.measurementTagValues(
    bucket: "bucket-name",
    measurement: "kubernetes_node",
    tag: "node_name",
)
  • Copy
  • Fill window

Was this page helpful?

Thank you for your feedback!


The future of Flux

Flux is going into maintenance mode. You can continue using it as you currently are without any changes to your code.

Read more

InfluxDB 3 Core and Enterprise are now in Beta

InfluxDB 3 Core and Enterprise are now available for beta testing, available under MIT or Apache 2 license.

InfluxDB 3 Core is a high-speed, recent-data engine that collects and processes data in real-time, while persisting it to local disk or object storage. InfluxDB 3 Enterprise is a commercial product that builds on Core’s foundation, adding high availability, read replicas, enhanced security, and data compaction for faster queries. A free tier of InfluxDB 3 Enterprise will also be available for at-home, non-commercial use for hobbyists to get the full historical time series database set of capabilities.

For more information, check out:

InfluxDB Cloud powered by TSM