我已经将 logstash 设置为发送到 Kibana,它使用两个自定义字段标记每个日志文件——集群和节点:
我想使用“字段”选项将相同的两个字段添加到我的 Metricbeat 配置中,但是当我这样做时,它会作为 Kibana 中的字典出现:
这是我正在使用的 Metricbeat 配置文件:
metricbeat.modules:
- module: system
metricsets:
# CPU stats
- cpu
# System Load stats
- load
# Per CPU core stats
#- core
# IO stats
#- diskio
# Per filesystem stats
- filesystem
# File system summary stats
- fsstat
# Memory stats
- memory
# Network stats
- network
# Per process stats
- process
# Sockets (linux only)
#- socket
enabled: true
period: 10s
processes: ['.*']
#Add Supervisor Cluster and Node ID
fields:
cluster: "Upswell ELK Testing Cluster"
node: "Nina's Macbook"
#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
# Array of hosts to connect to.
hosts: ["http://localhost:9200"]
我找不到任何关于如何格式化这些字段的文档;这是我应该在 Logstash 或 Metricbeat 配置中进行的调整吗?