【发布时间】:2018-04-11 06:02:31
【问题描述】:
我使用relabeling 将 gce 标签带到 Prometheus 标签,通过在 Prometheus yml 中使用以下代码:
relabel_configs:
- source_labels: [__meta_gce_tags]
target_label: tags
标签如下所示:
tags=",node_a,node_prod,node_centos,"
问题是它给出了一个字符串列表,而我希望有标签列表以便我可以查询它。例如,而不是使用:
sum(elasticsearch_node_stats_up{tags=~".*?noda_a.*node_prod.?"})
我将能够在没有正则表达式的情况下使用它。有什么办法吗?
【问题讨论】:
标签: regex prometheus