From 817d9ef6c2b439c0b943df2d699380a9a3d54975 Mon Sep 17 00:00:00 2001 From: Surya Sashank Nistala Date: Thu, 10 Nov 2022 18:52:17 -0800 Subject: [PATCH] set lastnotification time as created time for new bucket level monitor alert (#675) Signed-off-by: Surya Sashank Nistala 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