How to delete old data in prometheus

4,410 views
Skip to first unread message

瞿谷歌

unread,
Jul 16, 2021, 2:49:24 AM7/16/21
to Prometheus Users
I execute the api request as follow:
/api/v1/admin/tsdb/delete_series?match[]={job="xxx"}
and
/api/v1/admin/tsdb/clean_tombstones

but when i execute the query by "/api/v1/query" ,the data what should be deleted is still returned.
Can you give some suggestion?


Ian Billett

unread,
Jul 20, 2021, 7:47:35 AM7/20/21
to 瞿谷歌, Prometheus Users
Hello 瞿谷歌,

Per the documentation - this sequence of steps should indeed delete your series. This sounds like unexpected behaviour so I would suggest raising an issue against the Prometheus Github repository and provide as much relevant information as you can.

Best,

Ian

--
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/80d94bd7-b2fd-41de-825d-438869bf774dn%40googlegroups.com.

瞿谷歌

unread,
Jul 20, 2021, 11:55:36 PM7/20/21
to Ian Billett, Prometheus Users
Thanks, I will do that. 

Ian Billett <ibil...@redhat.com> 于2021年7月20日周二 下午7:47写道:

Brian Candler

unread,
Jul 21, 2021, 12:58:25 PM7/21/21
to Prometheus Users
You didn't say exactly how you submitted the request, but if you are using curl, then use the -g flag to stop it doing its own globbing.  You'll also need to quote the whole lot to stop the shell messing with it too.

Reply all
Reply to author
Forward
0 new messages