Flux guides

Warning! This page documents an earlier version of Flux, which is no longer actively developed. Flux v0.65 is the most recent stable version of Flux.

Different ways to execute Flux queries

A guide that covers the different options for executing Flux queries with InfluxDB and Chronograf v1.7+.

Window and aggregate data with Flux

This guide walks through windowing and aggregating data with Flux and demonstrates how data is shaped in the process.

Group data with Flux

This guide walks through grouping data in Flux with examples of how data is shaped in the process.

Join data with Flux

This guide walks through joining data with Flux, illustrating how joined data is output and how it can be used.

Sort and limit data with Flux

This guide walks through sorting and limiting data with Flux.

Optimize Flux queries

Optimize your Flux queries to reduce their memory and compute (CPU) requirements.

Query SQL data sources with Flux

The Flux sql package provides functions for working with SQL data sources. Use sql.from() to query SQL databases like PostgreSQL and MySQL.

Regular expressions in Flux

This guide walks through using regular expressions in evaluation logic in Flux functions.

Use Flux in dashboards

This guide walks through using Flux queries in Chronograf dashboard cells, what template variables are available, and how to use them.

Create histograms with Flux

This guide walks through using the histogram() function to create cumulative histograms with Flux.

Manipulate timestamps with Flux

Use Flux to process and manipulate timestamps.

Query using conditional logic

This guide describes how to use Flux conditional expressions, such as if, else, and then, to query and transform data.

Transform data with math

This guide describes how to use Flux to transform data with mathematic operations.

Extract scalar values with Flux

Use Flux stream and table functions to extract scalar values from Flux query output. This lets you, for example, dynamically set variables using query results.