【问题标题】:What is rate node_context_switches_total ans why rate(node_context_switches_total[5m]) > 1000?什么是速率 node_context_switches_total 以及为什么 rate(node_context_switches_total[5m]) > 1000?
【发布时间】:2019-06-23 13:49:02
【问题描述】:

我已经在我的集群上设置了 prometheus,并设置了一些类似这样的警报规则:

  • 警报:上下文切换 expr: 速率(node_context_switches_total[5m]) > 1000 适用于:30m 标签: 严重性:警告

有人能解释一下这条规则的目的吗? 另外,在我的情况下,rate(node_context_switches_total[5m]) 总是大于 2000。

这是我应该担心的事情吗?

【问题讨论】:

    标签: kubernetes monitoring prometheus-node-exporter


    【解决方案1】:

    上下文切换是存储进程或线程状态的动作。 根据Prometheus Documentation book 和metrics description -

    node_context_switches_total 是上下文切换的总数。

    典型的警报如下所示:

      - alert: ContextSwitching
        expr: rate(node_context_switches_total[5m]) > 1000
        for: 30m
        labels:
          severity: warning
        annotations:
          summary: "Context switching (instance {{ $labels.instance }})"
          description: "Context switching is growing on node (> 1000 / s)\n  VALUE = {{ $value }}\n  LABELS: {{ $labels }}"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-10-06
      • 2011-06-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多