diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportDeleteMonitorAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportDeleteMonitorAction.kt index e5f71133d..885986ee3 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportDeleteMonitorAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportDeleteMonitorAction.kt @@ -155,8 +155,8 @@ class TransportDeleteMonitorAction @Inject constructor( monitorId: String, ): DeleteResponse { val deleteResponse = deleteMonitorDocument(client, deleteRequest) - deleteMetadata(client, monitor) deleteDocLevelMonitorQueriesAndIndices(client, monitor, monitorId) + deleteMetadata(client, monitor) return deleteResponse }