Your second query is using not-equals. I would expect it to return all
metrics names that do not have job="prometheus". Seems to be
working correctly.

On Fri, Dec 10, 2021 at 9:10 AM Amey Barve <amey.ba...@gmail.com> wrote:

> 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 without filtering those metrics
> which do not have job label equal to "prometheus"
> 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
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prometheus Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to prometheus-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-developers/d1b87f13-e584-49b9-9eee-4526cf6da392n%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-developers/d1b87f13-e584-49b9-9eee-4526cf6da392n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-developers/CABbyFmqq4-QbUeMHqznFbighZzqMadUp7utv7-0jCFTxkaeKFg%40mail.gmail.com.

Reply via email to