From 662ae920a012cfe1198a7732378ff3f688855de1 Mon Sep 17 00:00:00 2001 From: AWSHurneyt Date: Wed, 4 Oct 2023 17:01:58 -0700 Subject: [PATCH] Troubleshooting. Signed-off-by: AWSHurneyt --- .../main/kotlin/org/opensearch/alerting/InputService.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/InputService.kt b/alerting/src/main/kotlin/org/opensearch/alerting/InputService.kt index fac0264c5..cd898f01a 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/InputService.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/InputService.kt @@ -126,11 +126,12 @@ class InputService( logger.info("hurneyt ClusterMetricsInput HAS REMOTE CLUSTERS") val responseMap = mutableMapOf>() client.threadPool().threadContext.stashContext().use { - scope.launch { - input.clusters.forEach { cluster -> - logger.info("hurneyt ClusterMetricsInput::cluster = $cluster") + input.clusters.forEach { cluster -> + logger.info("hurneyt ClusterMetricsInput::cluster = $cluster") + scope.launch { val targetClient = CrossClusterMonitorUtils.getClientForCluster(cluster, client, clusterService) val response = executeTransportAction(input, targetClient) + logger.info("hurneyt ClusterMetricsInput::response = ${response.toMap()}") // Not all supported API reference the cluster name in their response. // Mapping each response to the cluster name before adding to results.