Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I delete old Jobs from Prometheus?

I have 2 jobs. One is new, the other is old.

I need to delete the old one, so that it gets removed from Grafana dashboard too.

like image 683
Sijo M Cyril Avatar asked Oct 29 '25 00:10

Sijo M Cyril


1 Answers

Expanding on evgenyl's answer, the exact command would be something like:

curl -X POST -g 'http://localhost:9090/api/v1/admin/tsdb/delete_series?match[]={job="name_of_old_job"}'

Replace name_of_old_job with the name of the job you want deleted.

Reminder that you need to have started Prometheus with the --web.enable-admin-api flag

like image 158
EzPaulZ Avatar answered Nov 01 '25 18:11

EzPaulZ



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!