telegraf/plugins/outputs/http
Daniel Nelson a4eb9c2205
Use the product token for the user agent in more locations (#7378)
2020-04-21 10:02:18 -07:00
..
README.md Add default url for http output (#5976) 2019-06-14 11:29:58 -07:00
http.go Use the product token for the user agent in more locations (#7378) 2020-04-21 10:02:18 -07:00
http_test.go Use the product token for the user agent in more locations (#7378) 2020-04-21 10:02:18 -07:00

README.md

HTTP Output Plugin

This plugin sends metrics in a HTTP message encoded using one of the output data formats. For data_formats that support batching, metrics are sent in batch format.

Configuration:

# A plugin that can transmit metrics over HTTP
[[outputs.http]]
  ## URL is the address to send metrics to
  url = "http://127.0.0.1:8080/telegraf"

  ## Timeout for HTTP message
  # timeout = "5s"

  ## HTTP method, one of: "POST" or "PUT"
  # method = "POST"

  ## HTTP Basic Auth credentials
  # username = "username"
  # password = "pa$$word"

  ## OAuth2 Client Credentials Grant
  # client_id = "clientid"
  # client_secret = "secret"
  # token_url = "https://indentityprovider/oauth2/v1/token"
  # scopes = ["urn:opc:idm:__myscopes__"]

  ## Optional TLS Config
  # tls_ca = "/etc/telegraf/ca.pem"
  # tls_cert = "/etc/telegraf/cert.pem"
  # tls_key = "/etc/telegraf/key.pem"
  ## Use TLS but skip chain & host verification
  # insecure_skip_verify = false

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

  ## HTTP Content-Encoding for write request body, can be set to "gzip" to
  ## compress body or "identity" to apply no encoding.
  # content_encoding = "identity"

  ## Additional HTTP headers
  # [outputs.http.headers]
  #   # Should be set manually to "application/json" for json data_format
  #   Content-Type = "text/plain; charset=utf-8"