【问题标题】:Grafana templates for PrometheusPrometheus 的 Grafana 模板
【发布时间】:2017-09-14 14:48:01
【问题描述】:

我正在尝试使用我们的一些内部标签作为模板来更新 node-exporter-full Grafana 仪表板。我们有“pod”和“servertype”的标签,可用于获取“节点”的子集以在仪表板顶部列出。

我可以像这样添加“pod”:

label_values(pod)

然后我可以在节点查询中引用“pod”如下:

label_values(node_boot_time{job="clients",pod="$pod"}, instance)

这行得通。如果我想在中间添加服务器类型,我将如何根据选择的“pod”拉出“服务器类型”列表?

我已经知道“节点”可以过滤:

label_values(node_boot_time{job="clients",pod="$pod"},servertype="$servertype", instance)

【问题讨论】:

    标签: grafana prometheus grafana-templating


    【解决方案1】:

    重新阅读文档后,答案非常简单。目前使用“向上”功能,它工作正常,但可能有更好的解决方案。

    【讨论】:

      【解决方案2】:

      node_boot_time 已更改为 node_boot_time_seconds

      请参阅此链接以获取自 prometheus 0.16.0 以来的所有名称更改 https://github.com/prometheus/node_exporter/issues/830

      【讨论】:

      • 添加一些描述是什么意思?我已经清楚地告诉过他使用的指标已被重命名。此外,我还提供了链接以引用额外的名称更改/
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-04-18
      • 2019-12-07
      • 1970-01-01
      • 2016-12-01
      • 2019-12-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多