如何让 metricbeat 向 Kibana 报告标准化的 CPU 百分比

How do I get metricbeat to report normalized CPU percentages to Kibana

我有以下metricbeat简单配置:

#==========================  Modules configuration ============================
metricbeat.modules:

#------------------------------- System Module -------------------------------
- module: system
  metricsets: ["cpu"]
  period: 10s
  cpu.metrics:  ["percentages", "normalized_percentages"]

#----------------------------- Logstash output --------------------------------
output.logstash:
# The Logstash hosts
    hosts: ["<ip>:5000"]

根据这些信息,当我进入 Kibana(或 Grafana)并尝试分析数据时,我只看到正常的 CPU 字段,而不是规范化的字段,例如

(...) 
"system": {
      "cpu": {
        "softirq": {
          "pct": 0
        },
        "user": {
          "pct": 0.0243
        },
        "nice": {
          "pct": 0
        },
        "irq": {
          "pct": 0
        },
        "iowait": {
          "pct": 0.0101
        },
        "idle": {
          "pct": 1.9545
        },
        "steal": {
          "pct": 0
        },
        "system": {
          "pct": 0.0111
        },
        "cores": 2
      }
    },
(...)

我在 Kibana 的 "Add a filter" 部分或索引模式部分中都没有看到标准化 % 作为一个选项,所以它一定不会以其他方式出现。

我是 运行 metricbeat 5.6.12 针对 6.4.2 ELK 单节点集群(在 Docker 内)。

我的 logstash 配置如下所示:

input {
        beats {
                port => 5000
        }
}

## Add your filters / logstash plugins configuration here

output {
        elasticsearch {
                hosts => "elasticsearch:9200"
                manage_template => false
                index => "%{[@metadata][beat]}-%{+YYYY.MM.dd}"
                document_type => "%{[@metadata][type]}"
        }
}

我已经重启metricbeat加载配置,确认问题依旧。

metricbeat 5.6.12 against a 6.4.2 ELK

今天重读这篇文章时,点击了一些内容!这只是版本不匹配。在确保我是 运行 一个 6.x 版本的 metricbeat 后,指标现在可以正确传播。