【问题标题】:How do I get metricbeat to report normalized CPU percentages to Kibana如何让 metricbeat 向 Kibana 报告标准化的 CPU 百分比
【发布时间】:2018-11-06 17:12:53
【问题描述】:

我有以下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 的“添加过滤器”部分或“索引模式”部分中都没有看到规范化 % 作为选项,因此它一定不会以其他方式出现。

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

我的 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来加载配置,确认问题依旧。

【问题讨论】:

  • 尝试删除引号并将行设置为cpu.metrics: [percentages, normalized_percentages],我的猜测是度量节拍无法解析您的配置,只是回退到默认百分比
  • 在你尝试的时候去掉cpu的引号
  • 虽然,这不是一个常见的问题,所以我可能对引用搞砸的东西不正确。你可以测试你的配置问题elastic.co/guide/en/beats/libbeat/6.4/…
  • 不幸的是,事实并非如此。没有引号,问题仍然存在。使用 configtest 时:sudo metricbeat.sh -configtest 然后我得到 Config OK

标签: elasticsearch logstash kibana metricbeat


【解决方案1】:

metricbeat 5.6.12 与 6.4.2 ELK

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-06-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多