【问题标题】:I am looking for a way to monitor Kubernetes pod metrics for "CPU Throttling" using Telegraf and InfluxDB我正在寻找一种方法来使用 Telegraf 和 InfluxDB 监控 Kubernetes pod 指标的“CPU Throttling”
【发布时间】:2021-03-15 15:52:37
【问题描述】:

我正在寻找一种能够使用 Telegraf、InfluxDB 作为我的 TSD 和 Grafana 来监控 Kubernetes pod“CPU Throttling”指标的方法。

无论出于何种原因,我似乎只发现 Prometheus 提供了这个指标。我在这里错过了什么?

【问题讨论】:

    标签: grafana influxdb kubernetes-pod telegraf


    【解决方案1】:

    查看cgroups 输入。

    电报配置:

     [[inputs.cgroup]]
       paths = [
         "/sys/fs/cgroup/cpu",              # root cgroup
         "/sys/fs/cgroup/cpu/*",            # all container cgroups
         "/sys/fs/cgroup/cpu/*/*",          # all children cgroups under each container cgroup
       ]
       files = ["cpu.stat"]
    

    您要查找的指标来自cpu.stat file:

    • nr_periods – cgroup 中任何线程可运行的周期数
    • nr_throttled – 应用程序使用其全部配额并受到限制的可运行周期数

    根据您的集群大小(容器数量),您可能很快就会处理high cardinality issue。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-11-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-02-12
      • 1970-01-01
      • 1970-01-01
      • 2019-06-13
      相关资源
      最近更新 更多