####我的配置#######
processors:
- drop_event:
when:
regexp:
message: "^DBG:"
- add_fields:
target: project
fields:
name: myproject
id: '574734885120952459'
- add_host_metadata:
when.not.contains.tags: forwarded
- add_cloud_metadata: ~
- add_docker_metadata: ~
- add_kubernetes_metadata: ~
#######然后出现的效果是这样的#######
{
"@timestamp": "2023-03-17T07:36:56.620Z",
"@metadata": {
"beat": "filebeat",
"type": "_doc",
"version": "8.6.2"
},
"log": {
"file": {
"path": "/tmp/access.log"
},
"offset": 1482
},
"message": "123.127.39.51 ‐ ‐ [04/Mar/2021:10:50:28 +0800] \"GET /logo.jpg HTTP/1.1\" 200 14137 \"http://81.68.233.173/\" \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36(KHTML, like Gecko) Chrome/88.0.4324.192 Safari/537.36\" \"‐\"",
"input": {
"type": "filestream"
},
"host": {
"architecture": "x86_64",
"os": {
"kernel": "3.10.0-1062.el7.x86_64",
"codename": "Core",
"type": "linux",
"platform": "centos",
"version": "7 (Core)",
"family": "redhat",
"name": "CentOS Linux"
},
"id": "f10d1d0602e4440fb35614d6cdcf8786",
"containerized": false,
"ip": [
"192.168.128.151",
"fe80::e0ea:a350:12ab:f2b4"
],
"mac": [
"00-0C-29-AB-EA-14"
],
"hostname": "test",
"name": "test"
},
"agent": {
"id": "481b08c8-9a89-469f-acec-6b2fa72bacb2",
"name": "test",
"type": "filebeat",
"version": "8.6.2",
"ephemeral_id": "b13717a6-e2de-4155-b65b-681daff46869"
},
"ecs": {
"version": "8.0.0"
}
}
感觉配置完全没生效,求指出错误。