telegraf/plugins/inputs/http
Max U 674b9578d7 readability tweak 2018-06-28 15:56:36 -07:00
..
README.md Simplify testing with TLS (#4095) 2018-05-04 16:33:23 -07:00
http.go Simplify testing with TLS (#4095) 2018-05-04 16:33:23 -07:00
http_test.go readability tweak 2018-06-28 15:56:36 -07:00

README.md

HTTP Input Plugin

The HTTP input plugin collects metrics from one or more HTTP(S) endpoints. The endpoint should have metrics formatted in one of the supported input data formats. Each data format has its own unique set of configuration options which can be added to the input configuration.

Configuration:

# Read formatted metrics from one or more HTTP endpoints
[[inputs.http]]
  ## One or more URLs from which to read formatted metrics
  urls = [
    "http://localhost/metrics"
  ]

  ## HTTP method
  # method = "GET"

  ## Optional HTTP headers
  # headers = {"X-Special-Header" = "Special-Value"}

  ## Optional HTTP Basic Auth Credentials
  # username = "username"
  # password = "pa$$word"

  ## 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

  ## Amount of time allowed to complete the HTTP request
  # timeout = "5s"

  ## 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"

Metrics:

The metrics collected by this input plugin will depend on the configured data_format and the payload returned by the HTTP endpoint(s).

The default values below are added if the input format does not specify a value:

  • http
    • tags:
      • url