---
title: ''
description: Telegraf plugin for collecting metrics from InfluxDB V2 Listener
url: https://docs.influxdata.com/telegraf/v1/input-plugins/influxdb_v2_listener/
estimated_tokens: 1047
product: Telegraf Controller
version: v1
publisher: InfluxData
canonical: https://docs.influxdata.com/telegraf/v1/input-plugins/influxdb_v2_listener/
date: '2026-06-08T21:54:11+02:00'
lastmod: '2026-06-08T21:54:11+02:00'
---

==========

* Telegraf v1.16.0+

[Plugin source](https://github.com/influxdata/telegraf/tree/v1.39.0/plugins/inputs/influxdb_v2_listener/)[Download configuration](https://raw.githubusercontent.com/influxdata/telegraf/refs/tags/v1.39.0/plugins/inputs/influxdb_v2_listener/sample.conf)

# InfluxDB V2 Listener Input Plugin

This plugin listens for requests sent according to the[InfluxDB HTTP v2 API](https://docs.influxdata.com/influxdb/v2/api/). This allows Telegraf to serve as a
proxy/router for the `/api/v2/write` endpoint of the InfluxDB HTTP API.

The `/api/v2/write` endpoint supports the `precision` query parameter and can be
set to one of `ns`, `us`, `ms`, `s`. All other parameters are ignored and defer
to the output plugins configuration.

**Introduced in:** Telegraf v1.16.0**Tags:** datastore**OS support:** all

## Service Input

This plugin is a service input. Normal plugins gather metrics determined by the
interval setting. Service plugins start a service to listen and wait for
metrics or events to occur. Service plugins have two key differences from
normal plugins:

1. The global or plugin specific `interval` setting may not apply
2. The CLI options of `--test`, `--test-wait`, and `--once` may not produce
   output for this plugin

## Tracking metric support

This plugin supports [tracking metrics](../../../docs/METRICS.md#tracking-metrics), which allows the plugin
to be notified when metrics have been delivered to all outputs, enabling proper
acknowledgment back to the source.

## Global configuration options

Plugins support additional global and plugin configuration settings for tasks
such as modifying metrics, tags, and fields, creating aliases, and configuring
plugin ordering. See [CONFIGURATION.md](/telegraf/v1/configuration/#plugins) for more details.

## Secret store support

This plugin supports secrets from secret stores for the `token` option.
See the [secret store documentation](/telegraf/v1/configuration/#secret-store-secrets) for more details on how
to use them.

## Configuration

```toml
# Accept metrics over InfluxDB 2.x HTTP API
[[inputs.influxdb_v2_listener]]
  ## Address and port to host InfluxDB listener on
  ## (Double check the port. Could be 9999 if using OSS Beta)
  service_address = ":8086"

  ## Maximum undelivered metrics before rate limit kicks in.
  ## When the rate limit kicks in, HTTP status 429 will be returned.
  ## 0 disables rate limiting
  # max_undelivered_metrics = 0

  ## Maximum duration before timing out read of the request
  # read_timeout = "10s"
  ## Maximum duration before timing out write of the response
  # write_timeout = "10s"

  ## Maximum allowed HTTP request body size in bytes.
  ## 0 means to use the default of 32MiB.
  # max_body_size = "32MiB"

  ## Optional tag to determine the bucket.
  ## If the write has a bucket in the query string then it will be kept in this tag name.
  ## This tag can be used in downstream outputs.
  ## The default value of nothing means it will be off and the database will not be recorded.
  # bucket_tag = ""

  ## Set one or more allowed client CA certificate file names to
  ## enable mutually authenticated TLS connections
  # tls_allowed_cacerts = ["/etc/telegraf/clientca.pem"]

  ## Add service certificate and key
  # tls_cert = "/etc/telegraf/cert.pem"
  # tls_key = "/etc/telegraf/key.pem"

  ## Optional token to accept for HTTP authentication.
  ## You probably want to make sure you have TLS configured above for this.
  # token = "some-long-shared-secret-token"

  ## Influx line protocol parser
  ## 'internal' is the default. 'upstream' is a newer parser that is faster
  ## and more memory efficient.
  # parser_type = "internal"

  ## Use new internal metrics. When true, it adds tag for alias if set.
  # use_internal_statistics = false
```

## Metrics

Metrics are created from InfluxDB Line Protocol in the request body.

## Example Output

Using

```sh
curl -i -XPOST 'http://localhost:8186/api/v2/write' --data-binary 'cpu_load_short,host=server01,region=us-west value=0.64 1434055562000000000'
```

will produce the following metric

```text
cpu_load_short,host=server01,region=us-west value=0.64 1434055562000000000
```
