My prometheus is set to hold 10years data but currently my disk is 95% full. So i want to delete some metrics that i never use.
- First we need to enable admin web api
containers:
- args:
- --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.path=/prometheus
- --storage.tsdb.retention.time=3650d
- --web.enable-admin-api
- Delete node_load15 metrics
curl -X POST http://localhost:9090/api/v1/admin/tsdb/delete_series?match[]=node_load15
curl -X POST -g 'http://localhost:9090/api/v1/admin/tsdb/delete_series?match[]={kubernetes_pod_name!=""}'
curl -X POST http://localhost:9090/api/v1/admin/tsdb/clean_tombstones