TransWikia.com

How to get Node status HighLevelRESTClient ElasticSearch

Stack Overflow Asked by Kavin on January 1, 2021

I am using the Java HighLevelRestClient to connect to my ElasticSearch.I was working on a task to get the health status of each nodes.

Tried with :

private string getHighLevelClientInfo(){
try{
ClusterHealthResponse res=restHighLevelClient.cluster().health(new ClusterHealthRequest(),RequestOptions.DEFAULT);
return res.getStatus.name();
}
catch(Exception e){
return "Error";
}
}

While doing so, i was getting all Cluster related information with Status as "Green" and number of nodes=3.

Any help, how to get the node specific information with node status.

Thanks

One Answer

There is no concept of node health status, it's a cluster health status which is made up of all the indices health status which again in turn made of shard health status.

I guess, you are looking for node stats API, which will print each node stats like, how CPU, memory, various queue size, and several other information.

Answered by Elasticsearch Ninja on January 1, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP