Delete all metrics grouped by job only not working
I have the following data in pushgateway:
job="myjobtest_1464406264" instance="127.0.0.1_574910f84b454" job="myjobtest_1464406264" instance="127.0.0.1_574910f8491c3" job="myjobtest_1464406264" instance="127.0.0.1_574910f84ae0d" job="myjobtest_1464406264" instance="127.0.0.1_574910f829084"
curl -X DELETE http://mypushgateway:9091/metrics/job/myjobtest_1464406264
My expectation is that all will be deleted as based on the documentation "Delete all metrics grouped by job only" and since they are all in the same job name. But no data deleted (0/4). Is this a bug?
build info of pushgateway that I used: branch HEAD commit add82b8 date 20150902-14:52:33 user bjoern@reasonableresolution version 0.2.0
I'm guessing that instance is also in the grouping, so you need to delete each group individually.
I see. I just based my curl call based on the documentation, so I thought by just providing the same job name, it will be automatically removed in group. Or maybe I just misinterpret this. : . . . . . . . .
Delete all metrics grouped by job and instance:
curl -X DELETE http://pushgateway.example.org:9091/metrics/job/some_job/instance/some_instance
Delete all metrics grouped by job only:
curl -X DELETE http://pushgateway.example.org:9091/metrics/job/some_job
Grouping is decided upon push. You can only delete those groups. You cannot define a new grouping just for deletion.
thanks brain and beorn7!