# Question about metrics

**URL:** <https://discuss.elastic.co/t/question-about-metrics/314317>\
**Category:** Elastic Observability\
**Created:** [September 13, 2022, 4:24pm UTC](https://discuss.elastic.co/t/question-about-metrics/314317 "2022-09-13T16:24:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kirtash](https://avatars.discourse-cdn.com/v4/letter/k/a8b319/32.png) [@Kirtash](https://discuss.elastic.co/u/Kirtash)\
**Post date:** [September 13, 2022, 4:24pm UTC](https://discuss.elastic.co/t/question-about-metrics/314317/1 "2022-09-13T16:24:57Z")

</div>

Hi!

I have a theory question about the metric indices. I use .net core and when I create a new service I specify the serviceName to be more clearly in APM.

In this moment, I see that elastic create automatically the next indice:

.ds-metrics-apm.app.anaster-default-2022.08.17-000002

"anaster" is the name of the service. I used this service only to make a test and I don't know how can I delete it.

When I try to delete it the response is the next:

```auto
"type" : "illegal_argument_exception",
        "reason" : "index [.ds-metrics-apm.app.anaster-default-2022.08.17-000002] is the write index for data stream [metrics-apm.app.anaster-default] and cannot be deleted"

```

If I try to delete the index "metrics-apm.app.anaster-default" not exists, but I have response with the GET operation.

Someone can help me please to understand the behaviour of these indices?

Thanks!!

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [September 13, 2022, 6:36pm UTC](https://discuss.elastic.co/t/question-about-metrics/314317/2 "2022-09-13T18:36:37Z")

</div>

> [@Kirtash](#):
>
> `metrics-apm.app.anaster-default]`

Its a Data Stream did you try the [data stream API](https://www.elastic.co/guide/en/elasticsearch/reference/current/data-stream-apis.html)

`DELETE /_data_stream/my-data-stream`

You might want to read about Data Streams... they are an abstraction on top of indices...

> **[Data streams | Elasticsearch Guide \[8.11\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html)**

---

<div class="post-metadata">

**Author:** ![Kirtash](https://avatars.discourse-cdn.com/v4/letter/k/a8b319/32.png) [@Kirtash](https://discuss.elastic.co/u/Kirtash)\
**Post date:** [September 15, 2022, 6:27am UTC](https://discuss.elastic.co/t/question-about-metrics/314317/3 "2022-09-15T06:27:04Z")

</div>

Hi @stephenb !!

Thank you very much!! I didn't manage the dataStreams using "index managment" and now is all ok 🙂

Best regards

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 4, 2022, 8:37am UTC](https://discuss.elastic.co/t/question-about-metrics/314317/4 "2022-11-04T08:37:00Z")

</div>


