Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do we know replication status in elasticsearch?

I have set up elastic-search cluster with a single node(node1) and indexed data. After indexing is complete on the node1, another node(node2) is added to the cluster. Now I have configured the number of replicas to 1. The replication is completed successfully. But how do we know that replication is complete? Is there any API available which returns the replication status like In progress, complete.. .

My requirement is that I should be notified when the replication is complete.

like image 611
Yasaswani Avatar asked Jul 14 '14 11:07

Yasaswani


1 Answers

In addition to John Petrone's answer, I would prefer using the below command

http://localhost:9200/_cat/shards/twitterindex?v

This will enlist the status of all the shards primary or replica specific to the index. Shards which are in "INITIALIZING" state are in process whereas which are marked as "STARTED" means they are successfully replicated.

like image 194
user1432155 Avatar answered Sep 26 '22 13:09

user1432155