如何为 Kibana 解析自定义 Metricbeat 字典?
How can I parse custom Metricbeat dictionary for Kibana?
我设置了发送到 Kibana 的 logstash,它用两个自定义字段标记每个日志文件——集群和节点:
我想使用 "fields" 选项将相同的两个字段添加到我的 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 配置中进行的调整吗?
发件人:https://www.elastic.co/guide/en/beats/metricbeat/current/configuration-general.html
fields : By default, the fields that you specify here will be grouped under a fields sub-dictionary in the output document. To store the custom fields as top-level fields, set the fields_under_root option to true.
我设置了发送到 Kibana 的 logstash,它用两个自定义字段标记每个日志文件——集群和节点:
我想使用 "fields" 选项将相同的两个字段添加到我的 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 配置中进行的调整吗?
发件人:https://www.elastic.co/guide/en/beats/metricbeat/current/configuration-general.html
fields : By default, the fields that you specify here will be grouped under a fields sub-dictionary in the output document. To store the custom fields as top-level fields, set the fields_under_root option to true.