We want to get all metric names from Prometheus server filtered by a particular label.
Step 1 : Used following query to get all metric names, query succeeded with all metric names.
curl -g 'http://localhost:9090/api/v1/label/__name__/values
Step 2 : Used following query to get all metrics names filtered by label, but query still returned all metric names.
curl -g 'http://localhost:9090/api/v1/label/__name__/values?match[]={job!="prometheus"}'
Can somebody please help me filter all metric names by label over http? Thanks
curl -G -XGET http://localhost:9090/api/v1/label/__name__/values --data-urlencode 'match[]={__name__=~".+", job!="prometheus"}'
@anemyte, Still returns all the results. Can you please check the query