我正在尝试从prometheus数据源创建一个grafana变量。我将保持这一点,重点是:我在表单中有一组值:
kube_namespace_labels{container="kube-state-metrics", endpoint="http", instance="10.208.108.149:8080", job="kube-state-metrics", namespace="stg", pod="prometheus-kube-state-metrics-7b86b6b968-mpqg7", service="prometheus-kube-state-metrics"}
我需要获得与namespace (所以namespace="stg")相关联的值。
如何使用PromQL实现此功能?
发布于 2022-09-26 19:57:59
label_values(kube_namespace_labels,namespace)请参阅查询变量,特别是:
label_values(metric, label):返回指定metric中的label的标签值列表。
https://stackoverflow.com/questions/73856031
复制相似问题