【问题标题】:How to check a specific kubernetes pod is up or not in Grafana metrics如何在 Grafana 指标中检查特定的 kubernetes pod 是否启动
【发布时间】:2017-04-14 16:10:34
【问题描述】:

我正在创建一个 grafana 仪表板来显示指标。 我可以在查询中使用任何关键字来检查我的服务是否正在运行。 我正在使用 prometheus 从我的 api 中检索数据以创建指标。

【问题讨论】:

    标签: kubernetes grafana prometheus


    【解决方案1】:

    你可以像这样创建查询

    count_scalar(container_last_seen{name=<container_name>})
    

    这将为您提供使用该名称运行的容器数量

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-01-27
      • 2022-12-03
      • 2019-05-23
      • 2018-09-02
      • 2023-02-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多