【发布时间】:2018-10-26 08:20:50
【问题描述】:
我在尝试使用此公式创建 query 类型的自定义变量时遇到问题:
label_values(increase(nginx_ingress_controller_requests{namespace=~"$Namespace"}[10m])>0,ingress)
当我对 prometheus 服务器运行此查询时(没有“label_values”,这是一个 grafan 模板函数),它工作正常。
我有以下 toast 错误:
Template variables could not be initialized: parse error at char 9: could not parse remaining input "(nginx_ingress_"...
此变量的目的是仅列出在过去 10m 内有活动的 Ingress 标签。
【问题讨论】:
-
在我看来错误出在模板变量定义中,而不是与 Prometheus 有任何关系。
标签: grafana prometheus promql