我也跟着https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input-log.htmlgenerating filebeat自定义字段
我的filebeat.yml如下所示。
filebeat.inputs:
-
fields:
id: myId
category.name: mycategory
paths:
- "C:\\FREESOFT\\myfilebeatlogs\\*"
photoUrls: myPhoto
type: log
json.add_error_key: true
json.keys_under_root: true
json.message_key: log
output.elasticsearch:
hosts:
- "localhost:9200"
index: "hhh-%{+yyyy.MM}"
setup.ilm.enabled: false
setup.template:
enabled: false
name: hhh
pattern: hhh-*
setup.template.overwrite: true
我的.json输入文件如下。
[
{
"id": 9222968140491043000,
"category": {
"id": 0,
"name": "string"
},
"name": "doggie",
"photoUrls": [
"string"
],
"tags": [
{
"id": 0,
"name": "string"
}
],
"status": "available"
}
]
虽然记录被插入到kibana-7.9.2中,但它的解析不正确。任何帮助,或回答高度感谢。
暂无答案!
目前还没有任何答案,快来回答吧!