# Elasticsearch.hosts setting in Kibana.yml with Cross-Cluster Searching

**URL:** <https://discuss.elastic.co/t/elasticsearch-hosts-setting-in-kibana-yml-with-cross-cluster-searching/200903>\
**Category:** Kibana\
**Tags:** ccs-cross-cluster-search\
**Created:** [September 24, 2019, 4:14pm UTC](https://discuss.elastic.co/t/elasticsearch-hosts-setting-in-kibana-yml-with-cross-cluster-searching/200903 "2019-09-24T16:14:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![seth.yes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seth.yes/32/11788_2.png) [@seth.yes](https://discuss.elastic.co/u/seth.yes)\
**Post date:** [September 24, 2019, 4:14pm UTC](https://discuss.elastic.co/t/elasticsearch-hosts-setting-in-kibana-yml-with-cross-cluster-searching/200903/1 "2019-09-24T16:14:22Z")

</div>

In `kibana.yml` , I have a setting I'm not sure about:

```auto
# The URL of the Elasticsearch instance to use for all your queries.
elasticsearch.hosts: "http://localhost:9400"

```

Which is pointing to a coordinating node running on the same host as Kibana - is this bottlenecking my setup? I have multiple coordinating nodes in this cluster, should I add them to `elasticsearch.hosts`?  
When I have cross-cluster search enabled;

- is `elasticsearch.hosts` just ignored in favor of the Seeds?
  - Otherwise, how does the request flow from Kibana to the next cluster?
  - As I'm supposed to only put local-cluster node names in my `elasticsearch.hosts`, does a request for data from another cluster get routed from the local-cluster coordinating nodes to the remote cluster nodes?

- Since I've got Kibana running in one cluster, should I still add that as a remote cluster?
  - e.g. index patterns would look like: `local_cluster1:logstash-*,remote_cluster2:logstash-*`
  - Or should I leave the kibana local cluster out of the Remote Clusters?
    - e.g. index patterns would look like: `logstash-*,remote_cluster2:logstash-*`

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [September 25, 2019, 9:52am UTC](https://discuss.elastic.co/t/elasticsearch-hosts-setting-in-kibana-yml-with-cross-cluster-searching/200903/2 "2019-09-25T09:52:45Z")

</div>

Hi @seth.yes,

thanks for your question.

> Which is pointing to a coordinating node running on the same host as Kibana - is this bottlenecking my setup? I have multiple coordinating nodes in this cluster, should I add them to `elasticsearch.hosts` ?

Yes it makes sense to add other coordinating nodes to the setting - then Kibana won't be down when this single elasticsearch host goes down because it can still query other nodes.

> is `elasticsearch.hosts` just ignored in favor of the Seeds?

Cross cluster search always hits the local cluster first, Kibana does not query remote clusters directly. The [elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-cross-cluster-search.html) nicely documents the data flow - Kibana acts as the client in this scenario.

> Since I've got Kibana running in one cluster, should I still add that as a remote cluster?

No, you can leave the local cluster out of remote clusters, `logstash-*,remote_cluster2:logstash-*` is the right configuration here.

---

<div class="post-metadata">

**Author:** ![seth.yes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seth.yes/32/11788_2.png) [@seth.yes](https://discuss.elastic.co/u/seth.yes)\
**Post date:** [September 25, 2019, 3:17pm UTC](https://discuss.elastic.co/t/elasticsearch-hosts-setting-in-kibana-yml-with-cross-cluster-searching/200903/3 "2019-09-25T15:17:16Z")

</div>

Thanks! You answered all of my questions perfectly.

---

<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:** [October 23, 2019, 3:17pm UTC](https://discuss.elastic.co/t/elasticsearch-hosts-setting-in-kibana-yml-with-cross-cluster-searching/200903/4 "2019-10-23T15:17:24Z")

</div>

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