我有以下 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 以加载配置,并确认问题仍然存在。