# Unable to delete deprecated destination

**URL:** <https://forum.opensearch.org/t/unable-to-delete-deprecated-destination/14582>\
**Category:** Alerting\
**Created:** [June 7, 2023, 11:02am UTC](https://forum.opensearch.org/t/unable-to-delete-deprecated-destination/14582 "2023-06-07T11:02:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![spapadop](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/spapadop/32/950_2.png) [@spapadop](https://forum.opensearch.org/u/spapadop)\
**Post date:** [June 7, 2023, 11:02am UTC](https://forum.opensearch.org/t/unable-to-delete-deprecated-destination/14582/1 "2023-06-07T11:02:28Z")

</div>

**Versions** (relevant - OpenSearch/Dashboard/Server OS/Browser):

- OpenSearch v2.7.0
- ALMA9
- Safari / Firefox

**Describe the issue** :  
I understand that Destinations have been deprecated, in favour of Notifications plugin. Now, I can see the deprecated destination under the Alerting and I want to delete it. According to the documentation (of the current release) there’s a [DELETE API](https://opensearch.org/docs/latest/observing-your-data/alerting/api/#delete-destination), however when trying to use it I get:

```auto
DELETE _plugins/_alerting/destinations/bDc7yIEB8OMekcTRynWQ
{
  "error" : "Incorrect HTTP method for uri [/_plugins/_alerting/destinations/bDc7yIEB8OMekcTRynWQ?pretty=true] and method [DELETE], allowed: [GET]",
  "status" : 405
}

```

Unfortunately I guess this deprecated Destination is producing INFO logs like:

```auto
Detected cluster change event for destination migration

```

as found on the codebase [here](https://github.com/opensearch-project/alerting/blob/ac868dd77cbaf92e21ee205117731a69bef77a76/alerting/src/main/kotlin/org/opensearch/alerting/util/destinationmigration/DestinationMigrationCoordinator.kt#L48).

Essentially my goal is to get rid of that log being produced constantly…  
I have found this on the [documentation](https://opensearch.org/docs/2.4/observing-your-data/alerting/monitors/#questions-about-destinations):

> Q: What happens if any destinations fail to migrate? A: If a destination failed to migrate, the monitor will continue using it until the monitor is migrated to a notification channel. You don’t need to do anything in this case.

That does not sound reassuring, as I don’t see how the corrupted destination will ever get transformed into Notification channel. And since it is never fixed, I’ll always be getting that above log.

Is there some kind of disruptive way to delete that Destination?

---

<div class="post-metadata">

**Author:** ![spapadop](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/spapadop/32/950_2.png) [@spapadop](https://forum.opensearch.org/u/spapadop)\
**Post date:** [July 5, 2023, 1:43pm UTC](https://forum.opensearch.org/t/unable-to-delete-deprecated-destination/14582/2 "2023-07-05T13:43:33Z")

</div>

bump. Providing a solution to the above I believe is a pretty viable request, let’s not let the thread close 🙃

---

<div class="post-metadata">

**Author:** ![gaobinlong](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/gaobinlong/32/5242_2.png) [@gaobinlong](https://forum.opensearch.org/u/gaobinlong)\
**Post date:** [July 6, 2023, 3:14am UTC](https://forum.opensearch.org/t/unable-to-delete-deprecated-destination/14582/3 "2023-07-06T03:14:11Z")

</div>

Maybe you can try to delete the destination from the system index: `.opendistro-alerting-config`, all configurations of alerting monitors and destinations are stored in that index, you can check that index by search api: `GET .opendistro-alerting-config/_search` and then delete the destination config by` DELETE .opendistro-alerting-config/{_id}`, but because the index is a system index, so you need to authenticate with a cert to execute the search and delete api, see this: [System indexes - OpenSearch documentation](https://opensearch.org/docs/latest/security/configuration/system-indices/)

---

<div class="post-metadata">

**Author:** ![spapadop](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/spapadop/32/950_2.png) [@spapadop](https://forum.opensearch.org/u/spapadop)\
**Post date:** [July 18, 2023, 1:07pm UTC](https://forum.opensearch.org/t/unable-to-delete-deprecated-destination/14582/4 "2023-07-18T13:07:17Z")

</div>

Many thanks for the suggestion, indeed good idea. Unfortunately after deleting them and also deleting entries from keystore (I had things like `opendistro.alerting.destination.email.myuser.username`) still the log pops up. Seems like a curse.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/3/33547ea01a5b12dcca2958411d3edd97ae2ea8c1.png) [@system](https://forum.opensearch.org/u/system)\
**Post date:** [September 16, 2023, 1:07pm UTC](https://forum.opensearch.org/t/unable-to-delete-deprecated-destination/14582/5 "2023-09-16T13:07:57Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
