telegraf/plugins/inputs/http_listener
Cameron Sparr 2eee1b84fb
break telegraf registry into separate package
this is for supporting external plugins.

external plugins will depend on a few telegraf interface types, as well
as a common telegraf registry.

this will allow external and internal plugins to both share this package
and make it easier to vendor/version the whole thing semantically, which
will make it easier to keep plugins supported across build and telegraf
versions.

see #1717
2017-02-06 11:16:29 +00:00
..
testdata http_listener input unit tests 2016-10-24 18:17:49 +01:00
README.md initial http_listener implementation 2016-09-06 17:21:01 +01:00
bufferpool.go http listener refactor 2016-10-24 18:17:49 +01:00
http_listener.go break telegraf registry into separate package 2017-02-06 11:16:29 +00:00
http_listener_test.go Accept an HTTP request body without newline at end (#2266) 2017-01-13 11:43:50 +00:00

README.md

HTTP listener service input plugin

The HTTP listener is a service input plugin that listens for messages sent via HTTP POST. The plugin expects messages in the InfluxDB line-protocol ONLY, other Telegraf input data formats are not supported. The intent of the plugin is to allow Telegraf to serve as a proxy/router for the /write endpoint of the InfluxDB HTTP API. When chaining Telegraf instances using this plugin, CREATE DATABASE requests receive a 200 OK response with message body {"results":[]} but they are not relayed. The output configuration of the Telegraf instance which ultimately submits data to InfluxDB determines the destination database.

See: Telegraf Input Data Formats. Example: curl -i -XPOST 'http://localhost:8186/write' --data-binary 'cpu_load_short,host=server01,region=us-west value=0.64 1434055562000000000'

Configuration:

This is a sample configuration for the plugin.

# # Influx HTTP write listener
[[inputs.http_listener]]
  ## Address and port to host HTTP listener on
  service_address = ":8186"

  ## timeouts
  read_timeout = "10s"
  write_timeout = "10s"