Elastic/elasticsearch-ruby

Hi Team,
After going through the below repo

I haven't seen anything related to down node information in any of the API like client.cluster.health or client.cluster.state or client.cluster.stats etc
For example I have 6 data nodes and 3 master nodes, if one of my one data node goes down, how do I identify that that particular node went down. Is there a way around here.

Your answer here is highly appreciated

Thanks & regards,
Karthik

Hello, once the node is down, ie. not accessible, it is removed from the cluster state, and therefore isn't included in any API output. You should, of course, see the requests to a node like that fail in the logs, ie. when you enable the logging for the Ruby client.

(...) how do I identify that that particular node went down.

The question is why would you like to do that? The Ruby client has the "Reloading Nodes" feature (https://github.com/elastic/elasticsearch-ruby/tree/master/elasticsearch-transport#reloading-hosts), where you can reload the list of nodes from the cluster state dynamically.

Hi Karel, Thanks for your answer here. However, I am trying to get the node which went down so that I can setup an alert when the node goes down. In that way I know exactly which node went down and I work on that node itself.

Understood! This sounds like a job for Elasticsearch monitoring, rather than the client — have a look at https://www.elastic.co/products/stack/monitoring, which is included in the default distribution.

Ok. That looks pretty good monitoring. Just one question here. Thanks for your help.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.