How can I group labels in a Prometheus query?

前端 未结 3 624
梦毁少年i
梦毁少年i 2021-02-18 13:16

If I have a metric with the following labels:

my_metric{group=\"group a\"}  100
my_metric{group=\"group b\"}  100
my_metric{group=\"group c\"}  100
my_metric{gro         


        
3条回答
  •  伪装坚强ぢ
    2021-02-18 14:00

    You can use a regex query:

    my_metric{group=~"misc group.+"}
    

    That will give you everything where group starts with "misc group".

提交回复
热议问题