Question about metrics

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:

"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!!

Its a Data Stream did you try the data stream API

DELETE /_data_stream/my-data-stream

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

Hi @stephenb !!

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

Best regards