2018-05-15 00:15:40 +00:00
|
|
|
# HTTP Output Plugin
|
|
|
|
|
2018-05-15 00:11:44 +00:00
|
|
|
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.
|
2018-05-15 00:15:40 +00:00
|
|
|
|
|
|
|
### Configuration:
|
|
|
|
|
|
|
|
```toml
|
2018-05-15 00:11:44 +00:00
|
|
|
# A plugin that can transmit metrics over HTTP
|
2018-05-15 00:15:40 +00:00
|
|
|
[[outputs.http]]
|
2018-05-15 00:11:44 +00:00
|
|
|
## URL is the address to send metrics to
|
2019-06-14 18:29:58 +00:00
|
|
|
url = "http://127.0.0.1:8080/telegraf"
|
2018-05-15 00:11:44 +00:00
|
|
|
|
|
|
|
## Timeout for HTTP message
|
|
|
|
# timeout = "5s"
|
|
|
|
|
|
|
|
## HTTP method, one of: "POST" or "PUT"
|
|
|
|
# method = "POST"
|
|
|
|
|
|
|
|
## HTTP Basic Auth credentials
|
|
|
|
# username = "username"
|
|
|
|
# password = "pa$$word"
|
|
|
|
|
2018-09-06 17:54:05 +00:00
|
|
|
## OAuth2 Client Credentials Grant
|
|
|
|
# client_id = "clientid"
|
|
|
|
# client_secret = "secret"
|
|
|
|
# token_url = "https://indentityprovider/oauth2/v1/token"
|
|
|
|
# scopes = ["urn:opc:idm:__myscopes__"]
|
|
|
|
|
2018-05-15 00:11:44 +00:00
|
|
|
## 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
|
|
|
|
|
2018-05-15 00:15:40 +00:00
|
|
|
## 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
|
2018-05-15 00:11:44 +00:00
|
|
|
# data_format = "influx"
|
2018-09-06 17:54:05 +00:00
|
|
|
|
2019-06-14 18:29:58 +00:00
|
|
|
## HTTP Content-Encoding for write request body, can be set to "gzip" to
|
|
|
|
## compress body or "identity" to apply no encoding.
|
|
|
|
# content_encoding = "identity"
|
|
|
|
|
2018-06-04 01:31:47 +00:00
|
|
|
## Additional HTTP headers
|
|
|
|
# [outputs.http.headers]
|
|
|
|
# # Should be set manually to "application/json" for json data_format
|
|
|
|
# Content-Type = "text/plain; charset=utf-8"
|
2018-05-15 00:15:40 +00:00
|
|
|
```
|