# Tribe node on multiple clusters with identical index names

**URL:** <https://discuss.elastic.co/t/tribe-node-on-multiple-clusters-with-identical-index-names/45145>\
**Category:** Elasticsearch\
**Created:** [March 22, 2016, 6:32pm UTC](https://discuss.elastic.co/t/tribe-node-on-multiple-clusters-with-identical-index-names/45145 "2016-03-22T18:32:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dloi](https://avatars.discourse-cdn.com/v4/letter/d/e9c0ed/32.png) [@dloi](https://discuss.elastic.co/u/dloi)\
**Post date:** [March 22, 2016, 6:32pm UTC](https://discuss.elastic.co/t/tribe-node-on-multiple-clusters-with-identical-index-names/45145/1 "2016-03-22T18:32:42Z")

</div>

Hi All,

I'm trying to set up a tribe node that connects to multiple clusters with identical index names. Tribe node is only able to return query results from just one cluster. According to the documentation, "When there is a conflict and multiple clusters hold the same index, by default the tribe node will pick one of them."

Changing index names from all clusters will be a nightmare. Is there an option for tribe node to use alias instead of index names?

Thanks,  
D.

---

<div class="post-metadata">

**Author:** ![tinle](https://avatars.discourse-cdn.com/v4/letter/t/c77e96/32.png) [@tinle](https://discuss.elastic.co/u/tinle)\
**Post date:** [March 22, 2016, 8:17pm UTC](https://discuss.elastic.co/t/tribe-node-on-multiple-clusters-with-identical-index-names/45145/2 "2016-03-22T20:17:49Z")

</div>

You are going to need to create aliases in the downstream clusters. Tribe nodes can't do anything, it's just a client.

Long term solution is to create unique index name in each cluster. I run into this a few years ago, and luckily fixed it before it became a nightmare that it would be now.

---

<div class="post-metadata">

**Author:** ![dloi](https://avatars.discourse-cdn.com/v4/letter/d/e9c0ed/32.png) [@dloi](https://discuss.elastic.co/u/dloi)\
**Post date:** [March 22, 2016, 8:32pm UTC](https://discuss.elastic.co/t/tribe-node-on-multiple-clusters-with-identical-index-names/45145/3 "2016-03-22T20:32:42Z")

</div>

Thank you for your reply Tinle. Can you elaborate more on how creating aliases in the clusters can help? If I have unique aliases in each clusters, can the tribe node add aliases instead of index?

---

<div class="post-metadata">

**Author:** ![tinle](https://avatars.discourse-cdn.com/v4/letter/t/c77e96/32.png) [@tinle](https://discuss.elastic.co/u/tinle)\
**Post date:** [March 22, 2016, 8:52pm UTC](https://discuss.elastic.co/t/tribe-node-on-multiple-clusters-with-identical-index-names/45145/4 "2016-03-22T20:52:45Z")

</div>

Tribe nodes is going to pick one when there is a conflict, e.g. duplicate index name. That's going to be your first problem there. Secondly I do not know if it is possible to create alias in downstream clusters from a tribe node.

You have some minor control over which cluster a tribe will favor via the on\_conflict: statement, but then you are stuck to always using that cluster :-). So that does not solve your problem.

The simplest solution I can see is to run a script in each downstream cluster and create aliases mapping the duplicate indices to unique name.

For example 3 downstream clusters that we will call cluster1, cluster2, cluster3 and the set of indices that are duplicate as idx-YYYY.MM.DD

Write script to use curator and create aliases in each cluster.

cluster1:  
alias cluster1-idx-YYYY.MM.DD ---\> idx-YYYY.MM.DD

cluster2:  
alias cluster2-idx-YYYY.MM.DD ---\> idx-YYYY.MM.DD

and so on.

Now in your tribe nodes, you can refer to the unique downstream indices via aliases.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 22, 2016, 10:37pm UTC](https://discuss.elastic.co/t/tribe-node-on-multiple-clusters-with-identical-index-names/45145/5 "2016-03-22T22:37:15Z")

</div>

> [@tinle](#):
>
> Secondly I do not know if it is possible to create alias in downstream clusters from a tribe node.

You cannot. Do it locally on the cluster.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:06pm UTC](https://discuss.elastic.co/t/tribe-node-on-multiple-clusters-with-identical-index-names/45145/6 "2017-07-05T23:06:04Z")

</div>


