HTTP Listener v2 Monitoring

Powerful performance with an easy integration, powered by Telegraf, the open source data connector built by InfluxData.

5B+

Telegraf downloads

#1

Time series database
Source: DB Engines

1B+

Downloads of InfluxDB

2,800+

Contributors

Table of Contents

Powerful Performance, Limitless Scale

Collect, organize, and act on massive volumes of high-velocity data. Any data is more valuable when you think of it as time series data. with InfluxDB, the #1 time series platform built to scale with Telegraf.

See Ways to Get Started

HTTP Listener v2 is a service input plugin that listens for metrics sent via HTTP (incoming HTTP POST/PUT requests). The data can be parsed and then forwarded to InfluxDB or any other supported database. Metrics may be sent in any supported data format. This plugin allows Telegraf to serve as a proxy or router for the /write endpoint of the InfluxDB v2110 HTTP API.

Telegraf Input Plugin: HTTP Listener v2

The HTTP Listener v2 plugin was written by Julius Marozas when he wanted to collect metrics from my Fronius solar inverter via the Push Service, and at the time, Telegraf did not have a plugin that would accept data sent via HTTP in JSON format. How he utilized the http_listener_v2 Telegraf plugin is described in his blog post titled “Collecting Time Series Data with Telegraf: A Case for Fronius Solar Inverter’s Push Service”. In this post, he shows how to configure the Telegraf server to listen for the incoming JSON data sent by the inverter and how he set up the http_listener_v2 plugin in the Telegraf’s config.

HTTP Listener v2 Basics

After receiving the HTTP POST request, thehttp_listener_v2 plugin parses the data based on data_format option (all available formats can be found here). The plugin can be used in various cases. It can be configured to save non-numeric values as tags or parse other data formats such as CSV.

This is a sample configuration for the plugin.

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

  ## Path to listen to.
  # path = "/telegraf"

  ## HTTP methods to accept.
  # methods = ["POST", "PUT"]

  ## 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 524,288,000 bytes (500 mebibytes)
  # max_body_size = "500MB"

  ## 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 username and password to accept for HTTP basic authentication.
  ## You probably want to make sure you have TLS configured above for this.
  # basic_username = "foobar"
  # basic_password = "barfoo"

  ## Data format to consume.
  ## Each data format has its own unique set of configuration options, read
  ## more about them here:
  ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
  data_format = "influx"

Note: The plugin previously known as http_listener has been renamed influxdb_listener. If you would like Telegraf to act as a proxy/relay for InfluxDB it is recommended to use influxdb_listener.

For more information, please check out the documentation.

Project URL   Documentation

Powerful Performance, Limitless Scale

Collect, organize, and act on massive volumes of high-velocity data. Any data is more valuable when you think of it as time series data. with InfluxDB, the #1 time series platform built to scale with Telegraf.

See Ways to Get Started

Related Integrations