所以我有 2 个指标,我需要从第一个指标获取标签值,然后查询第二个指标,其中 {param="label_values_from_1st_metric"}。例如:
metric_1{instance="abc"}- 返回 3 个时间序列:metric_1{name="my-service", env="production", host="example-0.org"}
metric_1{name="my-service", env="production", host="example-1.org"}
metric_1{name="my-service", env="production", host="example-2.org"}
metric_2{domain="exmple-0,1,2.org"}
所以问题是,如何将 label_values 传递给第二个查询?据我了解,我只能对 grafana 面板中的变量使用 label_values() ,所以我无法编写一个查询来为我做到这一点。