Documentation

Common variable queries

This page documents an earlier version of InfluxDB. InfluxDB v2.6 is the latest stable version. View this page in the v2.6 documentation.

List buckets

List all buckets in the current organization.

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

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

List measurements

List all measurements in a specified bucket.

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

import "influxdata/influxdb/schema"

schema.measurements(bucket: "bucket-name")

List fields in a measurement

List all fields in a specified bucket and measurement.

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

import "influxdata/influxdb/schema"

schema.measurementTagValues(
    bucket: "bucket-name",
    measurement: "measurement-name",
    tag: "_field",
)

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 schema
Flux functions: schema.tagValues()

import "influxdata/influxdb/schema"

schema.tagValues(bucket: "bucket-name", tag: "host")

List Docker containers

List all Docker containers when using the Docker Telegraf plugin.

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

import "influxdata/influxdb/schema"

schema.tagValues(bucket: "bucket-name", tag: "container_name")

List Kubernetes pods

List all Kubernetes pods when using the Kubernetes Telegraf plugin.

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

import "influxdata/influxdb/schema"

schema.measurementTagValues(
    bucket: "bucket-name",
    measurement: "kubernetes_pod_container",
    tag: "pod_name",
)

List Kubernetes nodes

List all Kubernetes nodes when using the Kubernetes Telegraf plugin.

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

import "influxdata/influxdb/schema"

schema.measurementTagValues(
    bucket: "bucket-name",
    measurement: "kubernetes_node",
    tag: "node_name",
)

Was this page helpful?

Thank you for your feedback!


Set your InfluxDB URL

Linux Package Signing Key Rotation

All signed InfluxData Linux packages have been resigned with an updated key. If using Linux, you may need to update your package configuration to continue to download and verify InfluxData software packages.

For more information, see the Linux Package Signing Key Rotation blog post.

State of the InfluxDB Cloud (IOx) documentation

The new documentation for InfluxDB Cloud backed by InfluxDB IOx is a work in progress. We are adding new information and content almost daily. Thank you for your patience!

If there is specific information you’re looking for, please submit a documentation issue.