How to delete logs, traces and metrics in Grafana Cloud (or setting a retention period without a log collector)

Hi,

I am wondering if there is an interface where I can delete metrics, logs and traces in Prometheus, Loki and Tempo. I expected there is sth like a button with: delete anything older than x days or set a retention period on specific timeseries.

It feels like the only option is using API right?

Nobody of you is deleting data? :smiley:

Did you check the doc? For example:

1 Like

Ok but that means I am right, that I need to use the API. I expected a UI for this to be honest…

@jangaraj thanks for answering so much questions of mine. I really appreciate that.

Anyone with an idea how to delete metrics? API endpint to query is https://prometheus-prod-24-prod-eu-west-2.grafana.net/api/prom/api/v1/query?query=up so delete endpoint should be https://prometheus-prod-24-prod-eu-west-2.grafana.net/api/prom/api/v1/admin/tsdb/delete_series?match[]={job=“oldJob”}

Unfortunately it always sais 404

Maybe adaptive metrics:

@jangaraj: Yes, that helps a little bit but I think I have found the solution.

It does not matter as you are only payed for active time series. So as soon as you do not feed a time series anymore, you do not pay for it (Grafana Cloud). So at least the next month it does not matter anymore.

Loki: there is an API.
Prometheus, does not matter

But what about Tempo? I did not find a API but it seems there is a “compactor” that delets traces after some time. Does anyone now how this time is defined in Grafana Cloud and is there the option to change that?