Documentation

Prometheus Remote Write output data format

Use the prometheusremotewrite output data format (serializer) to convert Telegraf metrics into the Prometheus protobuf exposition format for remote write endpoints.

When generating histogram and summary types, output may not be correct if the metric spans multiple batches. Use outputs that support batch format to mitigate this issue. For histogram and summary types, the prometheus_client output is recommended.

Configuration

[[outputs.http]]
  ## URL of the remote write endpoint.
  url = "https://cortex/api/prom/push"

  ## Optional TLS configuration.
  # tls_ca = "/etc/telegraf/ca.pem"
  # tls_cert = "/etc/telegraf/cert.pem"
  # tls_key = "/etc/telegraf/key.pem"

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

  ## Required headers for Prometheus remote write.
  [outputs.http.headers]
    Content-Type = "application/x-protobuf"
    Content-Encoding = "snappy"
    X-Prometheus-Remote-Write-Version = "0.1.0"

Metrics

A Prometheus metric is created for each integer, float, boolean, or unsigned field:

  • Boolean values convert to 1.0 (true) or 0.0 (false)
  • String fields are ignored (set log_level = "trace" to see serialization issues)

Metric naming

Prometheus metric names are created by joining the measurement name with the field key.

Special case: When the measurement name is prometheus, it is not included in the final metric name.

Labels

Prometheus labels are created from Telegraf tags.

Example

Input metric:

cpu,host=server01 usage_idle=98.5,usage_user=1.2 1640000000000000000

Resulting Prometheus metrics (logical representation - actual output is binary protobuf format):

cpu_usage_idle{host="server01"} 98.5
cpu_usage_user{host="server01"} 1.2

Was this page helpful?

Thank you for your feedback!


New in InfluxDB 3.8

Key enhancements in InfluxDB 3.8 and the InfluxDB 3 Explorer 1.6.

See the Blog Post

InfluxDB 3.8 is now available for both Core and Enterprise, alongside the 1.6 release of the InfluxDB 3 Explorer UI. This release is focused on operational maturity and making InfluxDB easier to deploy, manage, and run reliably in production.

For more information, check out:

InfluxDB Docker latest tag changing to InfluxDB 3 Core

On February 3, 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