From 435cf0191e96ece0e9129288f51f4694524e765a Mon Sep 17 00:00:00 2001 From: AWSHurneyt Date: Mon, 11 Sep 2023 23:57:13 -0700 Subject: [PATCH] Refactored doc level monitor metadata creation to accommodate cross cluster monitors. Signed-off-by: AWSHurneyt --- .../kotlin/org/opensearch/alerting/MonitorMetadataService.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/MonitorMetadataService.kt b/alerting/src/main/kotlin/org/opensearch/alerting/MonitorMetadataService.kt index 7217241ac..9bdb4d398 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/MonitorMetadataService.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/MonitorMetadataService.kt @@ -218,7 +218,7 @@ object MonitorMetadataService : if (index == null) return mutableMapOf() val getIndexRequest = GetIndexRequest().indices(index) val getIndexResponse: GetIndexResponse = getClient(index).suspendUntil { - client.admin().indices().getIndex(getIndexRequest, it) + getClient(index).admin().indices().getIndex(getIndexRequest, it) } val indices = getIndexResponse.indices()