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 885986ee3..e5f71133d 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) - deleteDocLevelMonitorQueriesAndIndices(client, monitor, monitorId) deleteMetadata(client, monitor) + deleteDocLevelMonitorQueriesAndIndices(client, monitor, monitorId) return deleteResponse }