---
title: Prometheus Remote Write input data format
description: Use the prometheusremotewrite input data format to parse Prometheus Remote Write samples into Telegraf metrics.
url: https://docs.influxdata.com/telegraf/v1/data_formats/input/prometheus-remote-write/
estimated_tokens: 856
product: Telegraf Enterprise
version: v1
publisher: InfluxData
canonical: https://docs.influxdata.com/telegraf/v1/data_formats/input/prometheus-remote-write/
date: '2026-10-30T14:50:45-06:00'
lastmod: '2026-10-30T14:50:45-06:00'
---

Use the `prometheusremotewrite` input data format to parse[Prometheus Remote Write](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_write)samples into Telegraf metrics.
Use it with a listener plugin, such as[http\_listener\_v2](/telegraf/v1/input-plugins/http_listener_v2/), to
receive metrics pushed by Prometheus.

## Configuration

```toml
[[inputs.http_listener_v2]]
  ## Address and port to host HTTP listener on
  service_address = ":1234"

  ## Paths to listen to.
  paths = ["/receive"]

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

  ## Metric layout to produce (see below).
  ## Use 1 when writing to InfluxDB 3.
  # prometheus_metric_version = 2
```

### prometheus\_metric\_version

Controls how Prometheus samples translate to Telegraf metrics.

**Type:** integer (`1` or `2`)  
**Default:** `2`

* `2`: each sample becomes a Telegraf metric named`prometheus_remote_write`, labels become tags, and the field name is the
  Prometheus metric name.
  All samples share one measurement, with a field for each Prometheus metric
  name.
* `1`: the Prometheus metric name becomes the Telegraf metric name, labels
  become tags, and the field is named `value`.
  Each Prometheus metric gets its own measurement.
  Requires Telegraf 1.34 or later.

The right version depends on the destination you write to.
Use `1` when writing to InfluxDB 3, where the version 2 layout produces a
single wide, sparse `prometheus_remote_write` table with a column for every
metric name that Prometheus sends.
InfluxDB v2 and InfluxDB Cloud (TSM) accept either layout.
Use `2` to match the layout that Flux `prometheus.scrape()` produces.
See [Choose a metric version](/telegraf/v1/examples/scrape-prometheus/#choose-a-metric-version).

## Example Input

```go
prompb.WriteRequest{
        Timeseries: []*prompb.TimeSeries{
            {
                Labels: []*prompb.Label{
                    {Name: "__name__", Value: "go_gc_duration_seconds"},
                    {Name: "instance", Value: "localhost:9090"},
                    {Name: "job", Value: "prometheus"},
                    {Name: "quantile", Value: "0.99"},
                },
                Samples: []prompb.Sample{
                    {Value: 4.63, Timestamp: time.Date(2020, 4, 1, 0, 0, 0, 0, time.UTC).UnixNano()},
                },
            },
        },
    }
```

## Example Output (version 2, default)

```text
prometheus_remote_write,instance=localhost:9090,job=prometheus,quantile=0.99 go_gc_duration_seconds=4.63 1614889298859000000
```

## Example Output (version 1)

```text
go_gc_duration_seconds,instance=localhost:9090,job=prometheus,quantile=0.99 value=4.63 1614889298859000000
```

## Align with the InfluxDB v1.x Prometheus Remote Write spec

To align the output with the[InfluxDB v1.x Prometheus Remote Write spec](/influxdb/v1/supported_protocols/prometheus/#how-prometheus-metrics-are-parsed-in-influxdb),
use the[Starlark processor rename prometheus remote write script](https://github.com/influxdata/telegraf/blob/master/plugins/processors/starlark/testdata/rename_prometheus_remote_write.star)to rename the measurement name to the field name and rename the field name
to `value`.

#### Related

* [Prometheus input data format](/telegraf/v1/data_formats/input/prometheus/)
* [Prometheus Remote Write output data format](/telegraf/v1/data_formats/output/prometheusremotewrite/)
