From c6f985a9913e1abaaa48ed54dc7d323630da8338 Mon Sep 17 00:00:00 2001 From: Riya Saxena Date: Tue, 17 Dec 2024 09:48:10 -0800 Subject: [PATCH] shards assignment to local Node when fanout flag is disabled Signed-off-by: Riya Saxena --- .../org/opensearch/alerting/DocumentLevelMonitorRunner.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/DocumentLevelMonitorRunner.kt b/alerting/src/main/kotlin/org/opensearch/alerting/DocumentLevelMonitorRunner.kt index c00d1ac21..5d5f8dbb4 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/DocumentLevelMonitorRunner.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/DocumentLevelMonitorRunner.kt @@ -245,7 +245,7 @@ class DocumentLevelMonitorRunner : MonitorRunner() { * This is done to avoid de-dupe Alerts generated by Aggregation Sigma Rules **/ val localNode = monitorCtx.clusterService!!.localNode() - val nodeMap: Map = if (monitor.fanoutEnabled == true) { + val nodeMap: Map = if (monitor?.fanoutEnabled == true) { getNodes(monitorCtx) } else { logger.info("Fan-out is disabled for chained findings monitor ${monitor.id}")