Re: [prometheus-users] Prometheus query using variables from grafana templates having spaces doesn't work

2020-07-06 Thread sayf eddine Hammemi
Hello, did you try strict equality instead of regex?

On Mon, Jul 6, 2020 at 5:01 PM Debashish Ghosh 
wrote:

> Hi,
>I have created a grafana template varaible to extract names of
> organizations from Prometheus db using query
>
> label_values(custom_message_volume_endpoint_organization_total,Organization).
>
> This yields organization names that have spaces in some cases .. For
> example
> OrgA
> OrgB product1
> OrgC product2
>
> I use the following query to extract the timeseries corresponding to an
> organization..
>
> custom_latency_endpoint_organization_total{job="MyJob",Organization=~"$Organization"}
>
> It only works when I select the variable value OrgA but doesn't work for
> the other 2 . Apparently any organization name having space is discarded.
> Is there a workaround to get around this ?
>
> Thanks
> Debashish
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to prometheus-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-users/c0fe6136-8ce4-4309-8516-0826cc3f12fbo%40googlegroups.com
> 
> .
>

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


[prometheus-users] Prometheus query using variables from grafana templates having spaces doesn't work

2020-07-06 Thread Debashish Ghosh
Hi,
   I have created a grafana template varaible to extract names of 
organizations from Prometheus db using query 
label_values(custom_message_volume_endpoint_organization_total,Organization).

This yields organization names that have spaces in some cases .. For example
OrgA
OrgB product1
OrgC product2

I use the following query to extract the timeseries corresponding to an 
organization..
custom_latency_endpoint_organization_total{job="MyJob",Organization=~"$Organization"}

It only works when I select the variable value OrgA but doesn't work for 
the other 2 . Apparently any organization name having space is discarded.
Is there a workaround to get around this ?

Thanks
Debashish

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/c0fe6136-8ce4-4309-8516-0826cc3f12fbo%40googlegroups.com.