Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to delete all metrics belong to one exporter when a target machine is dismissed #4804

Closed
justlooks opened this Issue Oct 30, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@justlooks
Copy link

justlooks commented Oct 30, 2018

i am working for build a auto-discovery target system ,the system monitor all application pods in k8s,due to the born and die of pods is very frequently ,i need delete all metrics which the dead pods pumped to prometheus, how to do this ?

@justlooks

This comment has been minimized.

Copy link
Author

justlooks commented Oct 30, 2018

not implemented ?
# curl -XDELETE -g 'http://192.168.216.130:9090/api/v1/series?match[]={pod_name="mysql-copy-76b856cdb6-4lcvv"}'
{"status":"error","errorType":"internal","error":"not implemented"}
not allowed?
# curl -XDELETE -g 'http://192.168.216.130:9090/api/v1/admin/tsdb/delete_series?match[]={pod_name="mysql-copy-76b856cdb6-4lcvv"}'
Method Not Allowed

my start command
# /opt/prometheus-2.4.3.linux-amd64/prometheus --config.file=/opt/test/prometheus.yml --web.enable-admin-api --storage.tsdb.path=/opt/data


ok,mistake delete command ,it should be this command

curl -X POST -g 'http://192.168.216.130:9090/api/v1/admin/tsdb/delete_series?match[]={pod_name="mysql-copy-76b856cdb6-4lcvv"}'

@justlooks justlooks closed this Oct 30, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.