diff --git a/CHANGELOG.md b/CHANGELOG.md index 42847fd2b28a621ba41b97c8e8ced8acaf94a38d..638f357772efe7ae2a71556732087a2d536fc9f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - [#1348](https://github.com/influxdata/telegraf/issues/1348): Telegraf "internal" plugin for collecting stats on itself. - [#2127](https://github.com/influxdata/telegraf/pull/2127): Update Go version to 1.7.4. - [#2126](https://github.com/influxdata/telegraf/pull/2126): Support a metric.Split function. +- [#2026](https://github.com/influxdata/telegraf/pull/2065): elasticsearch "shield" (basic auth) support doc. ### Bugfixes diff --git a/etc/telegraf.conf b/etc/telegraf.conf index 8ebf0a7a7a7ee127cd15538374a65df25c7c79ea..a7b903388f69b8e437cf16294ff64cd0965d9f65 100644 --- a/etc/telegraf.conf +++ b/etc/telegraf.conf @@ -777,6 +777,8 @@ # # Read stats from one or more Elasticsearch servers or clusters # [[inputs.elasticsearch]] # ## specify a list of one or more Elasticsearch servers +# # you can add username and password to your url to use basic authentication: +# # servers = ["http://user:pass@localhost:9200"] # servers = ["http://localhost:9200"] # # ## Timeout for HTTP requests to the elastic search server(s) diff --git a/plugins/inputs/elasticsearch/elasticsearch.go b/plugins/inputs/elasticsearch/elasticsearch.go index 896e03f2e2be00d9e6fa4c06a0aaaee095a8b012..cce3d94ff49aded4f40e5454e33d09e34be28bf9 100644 --- a/plugins/inputs/elasticsearch/elasticsearch.go +++ b/plugins/inputs/elasticsearch/elasticsearch.go @@ -60,6 +60,8 @@ type indexHealth struct { const sampleConfig = ` ## specify a list of one or more Elasticsearch servers + # you can add username and password to your url to use basic authentication: + # servers = ["http://user:pass@localhost:9200"] servers = ["http://localhost:9200"] ## Timeout for HTTP requests to the elastic search server(s)