Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upDeletion of metrics through API no longer working in 2.0 #3584
Comments
This comment has been minimized.
This comment has been minimized.
|
Hi, deletions are now in master and will be available with docs in the next release. For now, in 2.0, see: https://groups.google.com/forum/#!msg/prometheus-users/ToMKsb9fYp8/az6afuX3CgAJ |
gouthamve
closed this
Dec 13, 2017
This comment has been minimized.
This comment has been minimized.
|
Thanks! |
This comment has been minimized.
This comment has been minimized.
|
So tried this and doesn't seem to be actually deleting anything despite returning 200/OK
Getting a list of all the label values using |
This comment has been minimized.
This comment has been minimized.
|
Actually, looks like the data was deleted, but the job label is still in the system. The old delete method would get rid of the label as well once all the data was gone. There another API interface to do that? |
This comment has been minimized.
This comment has been minimized.
|
So we do tombstones and not actually delete the data. Even if you select the series with the joblabel, then nothing will turn up. We do have an endpoint which deletes the tombstones and cleans up the data and index but that is in master and not 2.0. |
This comment has been minimized.
This comment has been minimized.
|
Ok. Coworker did find this looking around in the github repo https://github.com/prometheus/prometheus/blob/master/documentation/dev/api/swagger.json But when I tried using the clean_tombstones command I was getting 404's. I guess that would be why! Main issue we're running into is with Grafana and the "label_values()" function. This is still apparently picking up these tombstones so we're having old systems still show up in the drop down lists. So sounds like we're going to have to wait for next release before we can clean these up? |
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 23, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
keithf4 commentedDec 13, 2017
•
edited
Using methods that were successful in Prometheus 1.8 and as suggested in previous issues (#2356), we're trying to remove specific job data from the prometheus database using the API. This seems to no longer work in 2.0. Not sure if it's relevant, but I did make sure that the admin api is turned on (--web.enable-admin-api is set at startup)
What did you do?
curl -XDELETE -g "http://localhost:9090/api/v1/series?match[]={job='devdb5'}"What did you expect to see?
Removal of all metrics with jobname devdb5
What did you see instead? Under which circumstances?
Returned with error:
Environment
CentOS7