Re: [prometheus-users] split by labels values

2022-05-26 Thread Brian Brazil
On Fri, 27 May 2022 at 05:44, Javier Mendiara Cañardo wrote: > Thank you Brians for your responses! > I was hopping this problem could be solved with some dark magic promQL > queries. I'd probably go with the vm_tag solution, as it is a general > purpose metric that allows queries with group_righ

Re: [prometheus-users] split by labels values

2022-05-26 Thread Javier Mendiara Cañardo
Thank you Brians for your responses! I was hopping this problem could be solved with some dark magic promQL queries. I'd probably go with the vm_tag solution, as it is a general purpose metric that allows queries with group_right vector matching, solving more use cases around "tagging". FYI: T

Re: [prometheus-users] split by labels values

2022-05-26 Thread Brian Candler
... although that doesn't help you with your count-by-arbitrary-tag problem, sorry. For that as Brian B says, you need separate series: vm_tag{name="A",tag="big"} 1 vm_tag{name="A",tag="azure"} 1 On Thursday, 26 May 2022 at 16:57:41 UTC+1 Brian Candler wrote: > Or separate the tags int

Re: [prometheus-users] split by labels values

2022-05-26 Thread Brian Candler
Or separate the tags into individual labels: vm_info{name="A",tag_big="1",tag_azure="1"} 1 On Thursday, 26 May 2022 at 13:51:43 UTC+1 Brian Brazil wrote: > On Thu, 26 May 2022 at 13:42, Javier Mendiara Cañardo > wrote: > >> Hi, >> >> I have an info metric with all possible tag values >> t

Re: [prometheus-users] split by labels values

2022-05-26 Thread Brian Brazil
On Thu, 26 May 2022 at 13:42, Javier Mendiara Cañardo wrote: > Hi, > > I have an info metric with all possible tag values > tag_info{tag="small"} 1 > tag_info{tag="medium"} 1 > tag_info{tag="big"} 1 > tag_info{tag="azure"} 1 > tag_info{tag="aws"} 1 > > I have an info metric with a multi-value lab

[prometheus-users] split by labels values

2022-05-26 Thread Javier Mendiara Cañardo
Hi, I have an info metric with all possible tag values tag_info{tag="small"} 1 tag_info{tag="medium"} 1 tag_info{tag="big"} 1 tag_info{tag="azure"} 1 tag_info{tag="aws"} 1 I have an info metric with a multi-value label called "tags", as a csv with commas envelope vm_info{name="A" tags