diff --git a/modules/elastic/api/cluster_overview.go b/modules/elastic/api/cluster_overview.go index cca784ff..39979af3 100644 --- a/modules/elastic/api/cluster_overview.go +++ b/modules/elastic/api/cluster_overview.go @@ -566,9 +566,23 @@ func (h *APIHandler) GetClusterNodes(w http.ResponseWriter, req *http.Request, p }, }, { - "term": util.MapStr{ - "metadata.labels.cluster_uuid": util.MapStr{ - "value": clusterUUID, + "bool": util.MapStr{ + "minimum_should_match": 1, + "should": []util.MapStr{ + { + "term": util.MapStr{ + "metadata.labels.cluster_id": util.MapStr{ + "value": id, + }, + }, + }, + { + "term": util.MapStr{ + "metadata.labels.cluster_uuid": util.MapStr{ + "value": clusterUUID, + }, + }, + }, }, }, }, diff --git a/modules/elastic/api/node_metrics.go b/modules/elastic/api/node_metrics.go index f3ddc425..d42d3cf2 100644 --- a/modules/elastic/api/node_metrics.go +++ b/modules/elastic/api/node_metrics.go @@ -117,9 +117,23 @@ func (h *APIHandler) getNodeMetrics(ctx context.Context, clusterID string, bucke var must = []util.MapStr{ { - "term":util.MapStr{ - "metadata.labels.cluster_uuid":util.MapStr{ - "value": clusterUUID, + "bool": util.MapStr{ + "minimum_should_match": 1, + "should": []util.MapStr{ + { + "term": util.MapStr{ + "metadata.labels.cluster_id": util.MapStr{ + "value": clusterID, + }, + }, + }, + { + "term": util.MapStr{ + "metadata.labels.cluster_uuid": util.MapStr{ + "value": clusterUUID, + }, + }, + }, }, }, },