Regarding opensearch_dashboards.yml "opensearch.optimizedHealthcheck" configuration

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

Describe the issue:

On the out-of-the-box opensearch_dashboards.yml there’s this configuration:


# Setting for an optimized healthcheck that only uses the local OpenSearch node to do Dashboards healthcheck.
# This settings should be used for large clusters or for clusters with ingest heavy nodes.
# It allows Dashboards to only healthcheck using the local OpenSearch node rather than fan out requests across all nodes.
#
# It requires the user to create an OpenSearch node attribute with the same name as the value used in the setting
# This node attribute should assign all nodes of the same cluster an integer value that increments with each new cluster that is spun up
# e.g. in opensearch.yml file you would set the value to a setting using node.attr.cluster_id:
# Should only be enabled if there is a corresponding node attribute created in your OpenSearch config that matches the value here
#opensearch.optimizedHealthcheck.id: "cluster_id"
#opensearch.optimizedHealthcheck.filters: {
#  attribute_key: "attribute_value",
#}

Our cluster consists of many data/ingest nodes, but the opensearch-dashboards service is running on two dedicated VMs, which also run an opensearch service, meaning they’re part of the cluster, but do not have any role.

From reading the description of this configuration, it seems it would make sense to have a node.attr.cluster_id configuration on the opensearch.yml of these same nodes in order to funnel the healthchecks only to these two nodes themselves, avoiding unnecessary health checks being done to ingest nodes.

My question is - how would the configurations on both opensearch.yml and opensearch_dashboards.yml have to be to pull this off? Would this have any impact on the cluster as a whole?

If I understood correctly, it would look something like this:

# opensearch.yml - coordinator node 1
node.attr.cluster_id: coord_1
# opensearch.yml - coordinator node 2
node.attr.cluster_id: coord_2
# opensearch_dashboards.yml - on both coordinator (dashboards) nodes
opensearch.optimizedHealthcheck.id: "cluster_id"
opensearch.optimizedHealthcheck.filters:
  cluster_id: ["coord_1", "coord_2"]

And then restart both opensearch and opensearch-dashboards.

Is this the correct approach? Would adding an attribute to two “roleless” nodes (coordinators) impact the rest of the cluster in any way? Would I also need to add any configuration to the other nodes?

Thanks.