From 572258a6aedd8e9d63064c30935e9d34ee7b1d7c Mon Sep 17 00:00:00 2001 From: Surya Sashank Nistala Date: Thu, 10 Nov 2022 18:17:49 -0800 Subject: [PATCH] set lastnotification time as created time for new bucket level monitor alert Signed-off-by: Surya Sashank Nistala --- .../src/main/kotlin/org/opensearch/alerting/AlertService.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/AlertService.kt b/alerting/src/main/kotlin/org/opensearch/alerting/AlertService.kt index 2c913c135..5001f2c25 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/AlertService.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/AlertService.kt @@ -256,7 +256,7 @@ class AlertService( // New Alert val newAlert = Alert( monitor = monitor, trigger = trigger, startTime = currentTime, - lastNotificationTime = null, state = Alert.State.ACTIVE, errorMessage = null, + lastNotificationTime = currentTime, state = Alert.State.ACTIVE, errorMessage = null, errorHistory = mutableListOf(), actionExecutionResults = mutableListOf(), schemaVersion = IndexUtils.alertIndexSchemaVersion, aggregationResultBucket = aggAlertBucket, findingIds = findings