100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace

InfluxDB (Time Series) Cheat Sheet

InfluxDB (Time Series) Cheat Sheet

InfluxDB line protocol, Flux and InfluxQL query basics, and core time-series concepts like tags, fields, and cardinality.

2 PagesIntermediateFeb 28, 2026

Line Protocol (Writing Data)

The text format used to write points.

bash
# measurement,tag_set field_set timestampcpu,host=server01,region=us-west usage=64.2 1465839830100400200# Write via CLI (InfluxDB 2.x)influx write \  --bucket mybucket \  --precision s \  "cpu,host=server01 usage=64.2"

Flux Query Basics (2.x)

Filtering and aggregating a bucket.

javascript
from(bucket: "mybucket")  |> range(start: -1h)  |> filter(fn: (r) => r._measurement == "cpu")  |> filter(fn: (r) => r.host == "server01")  |> mean()

InfluxQL Basics (1.x-style)

SQL-like querying still supported for compatibility.

sql
SELECT mean("usage") FROM "cpu"WHERE "host" = 'server01' AND time > now() - 1hGROUP BY time(5m)

Core Concepts

Time-series terminology and data model.

  • Measurement- analogous to a table; groups related time-series points
  • Tag- indexed, string-only metadata key/value used for filtering and grouping
  • Field- the actual, unindexed value being recorded, e.g. usage=64.2
  • Timestamp- every point is stored with nanosecond-precision time
  • Bucket (2.x)- a named storage location with an associated retention policy
  • Retention policy- defines how long data is kept before automatic deletion
Pro Tip

Keep high-cardinality values (like unique user IDs or request IDs) out of tags — every distinct tag-value combination creates a new series, and too many series causes a cardinality explosion that badly degrades performance.

Was this cheat sheet helpful?

Explore Topics

#InfluxDBTimeSeries#InfluxDBTimeSeriesCheatSheet#Database#Intermediate#LineProtocolWritingData#FluxQueryBasics2X#InfluxQLBasics1XStyle#CoreConcepts#Databases#CheatSheet#SkillVeris
Advertisement
Sri Hayavadhana Info-Tech

Professional Web Designing Services

  • Responsive Websites
  • E-commerce Solutions
  • SEO Friendly Design
  • Fast & Secure
  • Support & Maintenance
Get a Free Quote

Share this Cheat Sheet