Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Elasticsearch] Multi-server, No metric if there is a node down #464

Closed
jeremy-albinet opened this issue Dec 26, 2015 · 1 comment · Fixed by #567
Closed

[Elasticsearch] Multi-server, No metric if there is a node down #464

jeremy-albinet opened this issue Dec 26, 2015 · 1 comment · Fixed by #567
Labels
bug unexpected problem or unintended behavior

Comments

@jeremy-albinet
Copy link

Hi,

My conf for elasticsearch plugin :

# Read stats from one or more Elasticsearch servers or clusters
[elasticsearch]
  # specify a list of one or more Elasticsearch servers
  servers = ["http://127.0.0.1:9200","http://127.0.0.1:9202"]

  # set local to false when you want to read the indices stats from all nodes
  # within the cluster
  local = true

Currently my node on :9200 is stopped/down, and no metric about elasticsearch are flushed but I want :9202's metrics.

I've got an error for :9200 as expected :
2015/12/26 19:57:30 Error in plugin [elasticsearch]: Get http://127.0.0.1:9200/_nodes/_local/stats: dial tcp 127.0.0.1:9200: getsockopt: connection refused

If I switch the order of servers list, I got :9202's metrics + error message for :9200 :
servers = ["http://127.0.0.1:9202","http://127.0.0.1:9200"]

I think this return breaks the process that loops over all servers : https://github.com/influxdb/telegraf/blob/master/plugins/elasticsearch/elasticsearch.go#L103

@zstyblik
Copy link
Contributor

So it seems. I wanted to say that something like func escalate(old_state error, new_state error) error could be handy, but I'm not sure how this case should be handled. @sparrc?

@sparrc sparrc added the bug unexpected problem or unintended behavior label Jan 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants