Skip to content
Tutorials Center
My learning

Topics

Lesson 5 of 39 ยท Concepts and Data Model

Time-series Data Fundamentals

Learn the core ideas behind time-series data: metrics versus events, regular and irregular sampling, gauges and counters, and how to choose a resolution.

Before you design anything in InfluxDB, it helps to understand the kinds of data you will store. Two sensors can look similar yet need different handling: one reports a temperature every minute, another reports a door opening whenever it happens. A web server may expose a request counter that only ever increases, while a battery reports a level that goes up and down. These differences decide how you store, query and aggregate the data.

This lesson builds the vocabulary: points, series, metrics, events, gauges, counters, resolution and out-of-order data. Everything here applies to every time-series database, not only InfluxDB.

Points and series

A point is one observation: a timestamp plus one or more values and some labels that say what was observed.

TEXT
time                 host     region   cpu_usage
2026-03-01T10:00:00Z web-01   eu       41.0

A series is all the points that share the same identity (the same labels) ordered by time. web-01 in eu is one series; web-02 in eu is another. When you plot a line on a graph, you are plotting one series.

flowchart TB
  M["measurement: cpu"] --> S1["series: host=web-01, region=eu"]
  M --> S2["series: host=web-02, region=eu"]
  S1 --> P1["points over time"]
  S2 --> P2["points over time"]

A measurement holds many series; each series holds many points.

Metrics versus events

Metrics Events
Timing Regular samples (every 10 s) Irregular, when something happens
Example CPU load, temperature A deployment, a login, an alarm
Typical question "What was the average?" "How many happened? When was the last?"
Gaps mean The collector stopped Nothing happened (this is normal!)

Both fit InfluxDB. Metrics are written by agents such as Telegraf; events are written by applications at the moment they occur. The important habit is to ask what a missing point means. A missing CPU sample is a problem; a missing "payment failed" event is good news.

Gauges, counters and deltas

How a number behaves over time decides which aggregation makes sense.

  • A gauge is a value that can go up and down: temperature, memory in use. Aggregate with mean, min, max.
  • A counter only increases (until it resets): total requests served, bytes sent. The raw value is rarely interesting; the rate of change (requests per second) is.
  • A delta is the change since the last sample. Some systems send deltas instead of totals.
  • A histogram or summary records a distribution (latency percentiles).

Counters reset to zero when a process restarts, so a good rate calculation notices a drop and treats it as a reset rather than a huge negative rate. This stand-in computes a per-second rate from counter samples and handles a reset. It is plain JavaScript, not an InfluxDB function (InfluxDB offers derivative, non_negative_derivative and similar for this job, later lessons introduce them).

JS Counter rate with reset handling (stand-in)

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Resolution and sampling

Resolution is the time between points. Finer resolution shows short spikes but costs more storage and queries. A useful rule: sample at least twice as fast as the fastest change you care about. A CPU spike that lasts five seconds will vanish with a one-minute interval.

A system can sample regularly (every 10 s, easy to aggregate) or irregularly (on change, saves space but needs careful interpolation). Whatever you choose, record it in your documentation so readers of the graph know what a flat line means: unchanged value or missing data?

Time also has a skew problem. Clocks drift, networks delay and batches arrive late. A point stamped 10:00:00 may reach the database at 10:00:07, or hours later after a reconnect. Databases accept out-of-order writes and put them in the right place by timestamp, so dashboards over past ranges can change slightly as late data arrives.

Stand-in: aggregating a series in SQL

The classic first task is summarizing a series over fixed windows. This uses SQLite, not InfluxDB, but the same table shape (time, labels, values) is what InfluxDB 3 exposes.

SQL Summarize a series per window (SQLite stand-in)

Press Run (or Ctrl + Enter) to see the result here.

Shape questions to ask about any dataset

  1. What is the identity of a series (which labels never change for it)?
  2. What are the measured values (the things that change)?
  3. Is each value a gauge, counter or event?
  4. What resolution and retention do I need?
  5. What does a gap mean?
  6. Who will query it and by which labels?

Your answers become the schema in the next lesson: Measurements, Tags and Fields.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What is a series?

    A series is the ordered sequence of points with the same measurement and label set.
  2. 2. Which value is best treated as a counter?

    A counter only increases, so you usually look at its rate of change.
  3. 3. A counter drops from 250 to 20. What most likely happened?

    Counters reset to zero on restart; rate calculations must handle that.
  4. 4. What does a gap in an event series usually mean?

    Events are irregular, so no point often means no event. For metrics a gap means a missing sample.

Summary

  • A point is a timestamped observation; a series is points sharing an identity.
  • Metrics are regular samples, events are irregular occurrences; decide what a gap means.
  • Gauges go up and down; counters only increase and need rate calculations with reset handling.
  • Resolution trades detail against storage and cost; late data arrives and is sorted by timestamp.

Next: Measurements, Tags and Fields