Documentation

CloudEvents output data format

Use the cloudevents output data format (serializer) to format Telegraf metrics as CloudEvents in JSON format. Versions v1.0 and v0.3 of the CloudEvents specification are supported, with v1.0 as the default.

Configuration

[[outputs.file]]
  files = ["stdout", "/tmp/metrics.out"]

  ## Data format to output.
  data_format = "cloudevents"

  ## Specification version to use for events.
  ## Supported versions: "0.3" and "1.0" (default).
  # cloudevents_version = "1.0"

  ## Event source specifier.
  ## Overwrites the source header field with the given value.
  # cloudevents_source = "telegraf"

  ## Tag to use as event source specifier.
  ## Overwrites the source header field with the value of the specified tag.
  ## Takes precedence over 'cloudevents_source' if both are set.
  ## Falls back to 'cloudevents_source' if the tag doesn't exist for a metric.
  # cloudevents_source_tag = ""

  ## Event-type specifier to overwrite the default value.
  ## Default for single metric: 'com.influxdata.telegraf.metric'
  ## Default for batch: 'com.influxdata.telegraf.metrics' (plural)
  # cloudevents_event_type = ""

  ## Set time header of the event.
  ## Supported values:
  ##   none     -- do not set event time
  ##   earliest -- use timestamp of the earliest metric
  ##   latest   -- use timestamp of the latest metric
  # cloudevents_time = "earliest"

Configuration options

OptionTypeDefaultDescription
cloudevents_versionstring"1.0"CloudEvents specification version ("0.3" or "1.0")
cloudevents_sourcestring"telegraf"Event source identifier
cloudevents_source_tagstring""Tag to use as source (overrides cloudevents_source)
cloudevents_event_typestringautoEvent type (auto-detected based on single/batch)
cloudevents_timestring"earliest"Event timestamp: "none", "earliest", or "latest"

Event types

By default, the serializer sets the event type based on the content:

  • Single metric: com.influxdata.telegraf.metric
  • Batch of metrics: com.influxdata.telegraf.metrics

Use cloudevents_event_type to override this behavior.


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