Documentation

Telegraf output data formats

Telegraf uses serializers to convert metrics into output data formats. Many output plugins support the data_format option, which lets you choose how metrics are formatted before writing.

How output plugins use serializers

When you configure data_format in an output plugin, Telegraf uses a serializer to convert metrics into that format before writing. The output plugin controls where data goes; the serializer controls how it’s formatted.

Some output plugins support use_batch_format, which changes how the serializer processes metrics. When enabled, the serializer receives all metrics in a batch together rather than one at a time, enabling more efficient encoding and formats that represent multiple metrics as a unit (like JSON arrays).

[[outputs.file]]
  files = ["stdout"]

  ## Output plugin option: process metrics as a batch
  use_batch_format = true

  ## Serializer selection: format metrics as JSON
  data_format = "json"

Output plugins that support use_batch_format: file, http, amqp, kafka, nats, mqtt, exec, execd, remotefile

Choosing an output approach

By destination

DestinationRecommended Approach
Prometheus scrapingprometheus_client output plugin (exposes /metrics endpoint)
InfluxDBinfluxdb or influxdb_v2 output plugin (native protocol)
Remote HTTP endpointshttp output + serializer
Filesfile output + serializer
Message queueskafka, nats, amqp + serializer

By metric type

Some metric types require state across collection intervals:

  • Histograms accumulate observations into buckets
  • Summaries track quantiles over a sliding window

Serializers process each batch independently and cannot maintain this state. When a histogram or summary spans multiple batches, the serializer may produce incomplete or incorrect output.

For these metric types, use a dedicated output plugin that maintains state–for example:

Available serializers


Was this page helpful?

Thank you for your feedback!


InfluxDB 3.9: Performance upgrade preview

InfluxDB 3 Enterprise 3.9 includes a beta of major performance upgrades with faster single-series queries, wide-and-sparse table support, and more.

InfluxDB 3 Enterprise 3.9 includes a beta of major performance and feature updates.

Key improvements:

  • Faster single-series queries
  • Consistent resource usage
  • Wide-and-sparse table support
  • Automatic distinct value caches for reduced latency with metadata queries

Preview features are subject to breaking changes.

For more information, see:

Telegraf Enterprise now in public beta

Get early access to the Telegraf Controller and provide feedback to help shape the future of Telegraf Enterprise.

See the Blog Post

The upcoming Telegraf Enterprise offering is for organizations running Telegraf at scale and is comprised of two key components:

  • Telegraf Controller: A control plane (UI + API) that centralizes Telegraf configuration management and agent health visibility.
  • Telegraf Enterprise Support: Official support for Telegraf Controller and Telegraf plugins.

Join the Telegraf Enterprise beta to get early access to the Telegraf Controller and provide feedback to help shape the future of Telegraf Enterprise.

For more information:

InfluxDB Docker latest tag changing to InfluxDB 3 Core

On May 27, 2026, the latest tag for InfluxDB Docker images will point to InfluxDB 3 Core. To avoid unexpected upgrades, use specific version tags in your Docker deployments.

If using Docker to install and run InfluxDB, the latest tag will point to InfluxDB 3 Core. To avoid unexpected upgrades, use specific version tags in your Docker deployments. For example, if using Docker to run InfluxDB v2, replace the latest version tag with a specific version tag in your Docker pull command–for example:

docker pull influxdb:2