2015-11-13 17:39:36 +00:00
# InfluxDB Output Plugin
This plugin writes to [InfluxDB ](https://www.influxdb.com ) via HTTP or UDP.
2016-08-09 06:50:35 +00:00
### Configuration:
```toml
# Configuration for influxdb server to send metrics to
[[outputs.influxdb]]
2017-09-14 00:27:01 +00:00
## The full HTTP or UDP URL for your InfluxDB instance.
2017-03-24 23:01:35 +00:00
##
2016-08-09 06:50:35 +00:00
## Multiple urls can be specified as part of the same cluster,
## this means that only ONE of the urls will be written to each interval.
2017-09-05 19:55:21 +00:00
# urls = ["udp://127.0.0.1:8089"] # UDP endpoint example
urls = ["http://127.0.0.1:8086"] # required
2016-08-09 06:50:35 +00:00
## The target database for metrics (telegraf will create it if not exists).
database = "telegraf" # required
2017-04-28 20:40:58 +00:00
## Name of existing retention policy to write to. Empty string writes to
## the default retention policy.
2016-08-09 06:50:35 +00:00
retention_policy = ""
2016-08-10 16:51:21 +00:00
## Write consistency (clusters only), can be: "any", "one", "quorum", "all"
2016-08-09 06:50:35 +00:00
write_consistency = "any"
## Write timeout (for the InfluxDB client), formatted as a string.
## If not provided, will default to 5s. 0s means no timeout (not recommended).
timeout = "5s"
# username = "telegraf"
# password = "metricsmetricsmetricsmetrics"
## Set the user agent for HTTP POSTs (can be useful for log differentiation)
# user_agent = "telegraf"
## Set UDP payload size, defaults to InfluxDB UDP Client default (512 bytes)
# udp_payload = 512
## Optional SSL Config
# ssl_ca = "/etc/telegraf/ca.pem"
# ssl_cert = "/etc/telegraf/cert.pem"
# ssl_key = "/etc/telegraf/key.pem"
## Use SSL but skip chain & host verification
# insecure_skip_verify = false
2017-06-16 19:05:08 +00:00
## HTTP Proxy Config
# http_proxy = "http://corporate.proxy:3128"
2017-08-14 21:50:15 +00:00
2017-08-28 23:08:50 +00:00
## Optional HTTP headers
# http_headers = {"X-Special-Header" = "Special-Value"}
2017-08-14 21:50:15 +00:00
## Compress each HTTP request payload using GZIP.
# content_encoding = "gzip"
2016-08-09 06:50:35 +00:00
```
2016-03-21 23:20:09 +00:00
### Required parameters:
2015-11-13 17:39:36 +00:00
* `urls` : List of strings, this is for InfluxDB clustering
support. On each flush interval, Telegraf will randomly choose one of the urls
to write to. Each URL should start with either `http://` or `udp://`
* `database` : The name of the database to write to.
2016-03-21 23:20:09 +00:00
### Optional parameters:
2016-08-10 16:51:21 +00:00
* `write_consistency` : Write consistency (clusters only), can be: "any", "one", "quorum", "all".
2017-04-28 20:40:58 +00:00
* `retention_policy` : Name of existing retention policy to write to. Empty string writes to the default retention policy.
2016-03-21 23:20:09 +00:00
* `timeout` : Write timeout (for the InfluxDB client), formatted as a string. If not provided, will default to 5s. 0s means no timeout (not recommended).
* `username` : Username for influxdb
* `password` : Password for influxdb
* `user_agent` : Set the user agent for HTTP POSTs (can be useful for log differentiation)
* `udp_payload` : Set UDP payload size, defaults to InfluxDB UDP Client default (512 bytes)
* `ssl_ca` : SSL CA
* `ssl_cert` : SSL CERT
* `ssl_key` : SSL key
* `insecure_skip_verify` : Use SSL but skip chain & host verification (default: false)
2017-06-16 19:05:08 +00:00
* `http_proxy` : HTTP Proxy URI
2017-08-28 23:08:50 +00:00
* `http_headers` : HTTP headers to add to each HTTP request
2017-08-14 21:50:15 +00:00
* `content_encoding` : Compress each HTTP request payload using gzip if set to: "gzip"