Connecting two OpenSearch instances to one OpenSearch Dashboard

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): 2.8

Describe the issue:

I am trying to connect two OpenSearch instances to one OpenSearch Dashboard. Based on what I’ve read so far it is possible, but it seems really convoluted and through the numerous tests so far I haven’t been able to achieve it.

I have one namespace called logging and another logging-2. In logging there are the dashboard and the first OpenSearch instance and in logging-2 is the second OpenSearch instance. I have deployed everything through the original OpenSearch Helm Charts. Both instances are called opensearch and the different nodes follow the same pattern opensearch-master etc.

I found several places in the OpenSearch Dashboard’s configuration where the second instance might be added, so here is what I don’t understand so far.

  1. There is this an opensearchHosts attribute in the dashboard’s values file. It is connected to an environment variable called OPENSEARCH_HOSTS. Despite the plural in the name, I wasn’t able to add more than one value and make it work. Is it actually possible to include multiple hosts and is adding multiple hosts the way to connect two instances to one dashboard?

  2. There is an opensearch.hosts setting in the opensearch_dashboard.yml with which I encountered the same problem. Is it actually possible to include multiple hosts and is adding multiple hosts the way to connect two instances to one dashboard?

  3. There is a data sources feature that requires an endpoint to connect a remote instance. What should be the endpoint address to the second instance in logging-2?

@AleksandarIvanov Are these two OpenSearch nodes in the same cluster or these are two single-node clusters?

Two multinode OpenSearch clusters on the same AKS in two different namespaces.

logging namespace:

  • opensearch-client-0
  • opensearch-data-0
  • opensearch-data-1
  • opensearch-master-0
  • opensearch-dashboards-12i4rh1i2

logging-2 namespace:

  • opensearch-client-0
  • opensearch-data-0
  • opensearch-data-1
  • opensearch-master-0

@AleksandarIvanov opensearchHosts, opensearch.hosts and OPENSEARCH_HOSTS are related to the same settings.
These options require a list of OpenSearch nodes from the same cluster. OpenSearch Dashboards will use them as a fallback in case one of them won’t work.

i.e.

OPENSEARCH_HOSTS: '["https://opensearch-node1:9200","https://opensearch-node2:9200"]'

The data sources is a feature that can be used only with compatible data sources Amazon S3 and Prometheus

Unfortunately, you can’t manage two separate OpenSearch clusters using single OpenSearch Dashboards.
However, you could consider Cross Cluster search to connect with a remote cluster.

Thank you, that clears it up!