Delete old data in prometheus and grafana.

5,890 views
Skip to first unread message

Sebastian Glock

unread,
Mar 15, 2021, 9:33:51 AM3/15/21
to Prometheus Users
Hi I need an clearly information how to delete instance from prometheus and from grafana.
If i change TSDB storage for ex 10s it remove, but all of data from grafana too. Is there any possibly way to delete for example just 1 instance from prometheus & grafana?

Thanks for all your replies!

Matthias Rampke

unread,
Mar 16, 2021, 2:00:03 AM3/16/21
to Sebastian Glock, Prometheus Users
To delete specific sets of time series, enable administrative APIs and use the DeleteSeries endpoint:


To match all metrics from a given instance, use a matcher like

{instance="xxx:1234"}

without a metric name.

/MR

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/a1c33b8d-fd79-44a7-b9ae-9b3c1fbe8b47n%40googlegroups.com.

Matthias Rampke

unread,
Mar 16, 2021, 2:00:52 AM3/16/21
to Sebastian Glock, Prometheus Users
Foiled again by mobile Chrome, here is the link to the right section:

Sebastian Glock

unread,
Mar 16, 2021, 3:35:35 AM3/16/21
to Matthias Rampke, Prometheus Users
Ok so i need to do something like this yes? :

I see it removes from prometheus, but when it removes from grafana? after about 24h?

Stuart Clark

unread,
Mar 16, 2021, 5:02:51 AM3/16/21
to Sebastian Glock, Matthias Rampke, Prometheus Users
On 16/03/2021 07:35, Sebastian Glock wrote:
>
> I see it removes from prometheus, but when it removes from grafana?
> after about 24h?
Grafana doesn't store any data, it just performs queries against
Prometheus. So if you delete things from Prometheus it will no longer
appear in Grafana.

--
Stuart Clark

Sebastian Glock

unread,
Mar 16, 2021, 5:09:49 AM3/16/21
to Stuart Clark, Matthias Rampke, Prometheus Users
Thanks a lot for your replies!
Reply all
Reply to author
Forward
0 new messages