I'm trying to use Boto3 to return data about the nodes in an AWS elastic search cluster like free storage space, CPU usage, etc. I know that the Ids of the nodes in the cluster can change when the cluster is restarted so I don't want to hardcode them. Is there a way to return a list of NodeIds present in the cluster so I don't have to hardcode them?
Asked
Active
Viewed 457 times
1 Answers
0
Basically Nodes information is allocated can be extracted from ES cluster by API calls only. So to extract those values what you need to do is use https://elasticsearch-py.readthedocs.io/en/master/index.html library and connect to ES Domain. Than execute this API call(GET /_nodes) https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-info.html.
Thanks
Ashish

Ashish Bhatia
- 569
- 5
- 14