On Mon, Aug 17, 2020 at 11:54 AM [email protected] <
[email protected]> wrote:

> > Hi. I want to query all values of a label by http api, such as query all
> instances belonging to one job. How should I do that ?
>
> Did you ever find a solution for the above? I need the same - get all
> metrics -that have as speciflc label like {job="mytestjob"}
>

If you want to constrain it by the job, you would currently have to use the
series metadata API and then extract the label values from the returned
series:

https://prometheus.io/docs/prometheus/latest/querying/api/#finding-series-by-label-matchers

There is an open issue to allow providing matcher constraints for the
labels metadata API as well:
https://github.com/prometheus/prometheus/issues/6178


> tirsdag den 2. april 2019 kl. 10.03.11 UTC+2 skrev [email protected]:
>
>> 在 2016年8月28日星期日 UTC+8下午6:37:30,Julius Volz写道:
>> > Are you looking for "label_values(label)" (A Grafana feature)?
>> >
>> >
>> > See http://docs.grafana.org/datasources/prometheus/#templated-queries
>> >
>> >
>> > On Sun, Aug 28, 2016 at 8:38 AM, Yosef Yudilevich <[email protected]>
>> wrote:
>> >
>> > i want to add dropdown in grafana which lets me choose label,
>> > and then do some filtering with it
>> > as i see i can do it with query only
>> >
>> >
>> > thats why i am asking here
>> > 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 [email protected].
>> >
>> > For more options, visit https://groups.google.com/d/optout.
>>
>> Hi. I want to query all values of a label by http api, such as query all
>> instances belonging to one job. How should I do that ?
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-developers/2d379a5f-cbe8-4411-a7f5-1e460789114bn%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-developers/2d379a5f-cbe8-4411-a7f5-1e460789114bn%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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-developers/CA%2BT6YozCAeOT4h9K0QZQikRqe5TFmVeK0Op7j7Li76B6s82X-w%40mail.gmail.com.

Reply via email to