From 0f6664b26012c582d58ceedae47455e627022d90 Mon Sep 17 00:00:00 2001 From: Orne Brocaar Date: Thu, 9 Jul 2015 21:02:19 +0200 Subject: [PATCH] Remove that it only reads indices stats. --- README.md | 2 +- plugins/elasticsearch/elasticsearch.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 0c97264df..d24223949 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ Telegraf currently has support for collecting metrics from: * Prometheus (client libraries and exporters) * PostgreSQL * Redis -* Elasticsearch (indices stats) +* Elasticsearch * RethinkDB * Kafka diff --git a/plugins/elasticsearch/elasticsearch.go b/plugins/elasticsearch/elasticsearch.go index 9e9991b08..5607532e6 100644 --- a/plugins/elasticsearch/elasticsearch.go +++ b/plugins/elasticsearch/elasticsearch.go @@ -8,8 +8,8 @@ import ( "github.com/influxdb/telegraf/plugins" ) -const indicesStatsPath = "/_nodes/stats" -const indicesStatsPathLocal = "/_nodes/_local/stats" +const statsPath = "/_nodes/stats" +const statsPathLocal = "/_nodes/_local/stats" type node struct { Host string `json:"host"` @@ -56,7 +56,7 @@ func (e *Elasticsearch) SampleConfig() string { // Description returns the plugin description. func (e *Elasticsearch) Description() string { - return "Read indices stats from one or more Elasticsearch servers or clusters" + return "Read stats from one or more Elasticsearch servers or clusters" } // Gather reads the stats from Elasticsearch and writes it to the @@ -65,9 +65,9 @@ func (e *Elasticsearch) Gather(acc plugins.Accumulator) error { for _, serv := range e.Servers { var url string if e.Local { - url = serv + indicesStatsPathLocal + url = serv + statsPathLocal } else { - url = serv + indicesStatsPath + url = serv + statsPath } if err := e.gatherUrl(url, acc); err != nil { return err