My filebeat start occur error

Here is my configuration information:

processors:
  - add_host_metadata: ~
  - add_cloud_metadata: ~
  - drop_fields:
    fields: ["beat"]

I want to add a filter to remove the beat attribute, However, a startup error occurs after the drop_fields filter is added.The following is an error message

2022-05-08T20:16:22.126+0800	INFO	instance/beat.go:611	Home path: [/Users/zhanghao/software/filebeat-6.8.6-darwin-x86_64] Config path: [/Users/zhanghao/software/filebeat-6.8.6-darwin-x86_64] Data path: [/Users/zhanghao/software/filebeat-6.8.6-darwin-x86_64/data] Logs path: [/Users/zhanghao/software/filebeat-6.8.6-darwin-x86_64/logs]
2022-05-08T20:16:22.129+0800	INFO	instance/beat.go:618	Beat UUID: 9663eb85-bcf7-4a87-b183-d354d067711a
2022-05-08T20:16:22.130+0800	INFO	[beat]	instance/beat.go:931	Beat info	{"system_info": {"beat": {"path": {"config": "/Users/zhanghao/software/filebeat-6.8.6-darwin-x86_64", "data": "/Users/zhanghao/software/filebeat-6.8.6-darwin-x86_64/data", "home": "/Users/zhanghao/software/filebeat-6.8.6-darwin-x86_64", "logs": "/Users/zhanghao/software/filebeat-6.8.6-darwin-x86_64/logs"}, "type": "filebeat", "uuid": "9663eb85-bcf7-4a87-b183-d354d067711a"}}}
2022-05-08T20:16:22.130+0800	INFO	[beat]	instance/beat.go:940	Build info	{"system_info": {"build": {"commit": "4fa63eb23a94bf23650023317bdff335c4705fc2", "libbeat": "6.8.6", "time": "2019-12-13T16:14:30.000Z", "version": "6.8.6"}}}
2022-05-08T20:16:22.130+0800	INFO	[beat]	instance/beat.go:943	Go runtime info	{"system_info": {"go": {"os":"darwin","arch":"amd64","max_procs":8,"version":"go1.10.8"}}}
2022-05-08T20:16:22.134+0800	INFO	[beat]	instance/beat.go:947	Host info	{"system_info": {"host": {"architecture":"x86_64","boot_time":"2022-05-08T09:04:29.71666+08:00","name":"zhanghaodeMacBook-Pro.local","ip":["127.0.0.1/8","::1/128","fe80::1/64","fe80::aede:48ff:fe00:1122/64","fe80::c3b:2f22:8602:592a/64","192.168.31.163/24","fe80::dc04:80ff:fed1:2d4/64","fe80::dc04:80ff:fed1:2d4/64","fe80::5990:474b:fab0:1a60/64","fe80::867c:48d4:1117:3a8d/64","fe80::ce81:b1c:bd2c:69e/64"],"kernel_version":"21.3.0","mac":["ac:de:48:00:11:22","78:4f:43:88:fa:90","82:88:56:20:b8:04","82:88:56:20:b8:05","82:88:56:20:b8:00","82:88:56:20:b8:01","00:e0:4c:6b:0e:39","82:88:56:20:b8:00","0a:4f:43:88:fa:90","de:04:80:d1:02:d4","de:04:80:d1:02:d4","6e:5f:a9:00:ad:9e","7a:4f:43:88:3f:64","32:8c:e9:dc:02:02","96:80:da:68:c7:8f"],"os":{"family":"darwin","platform":"darwin","name":"macOS","version":"12.2.1","major":12,"minor":2,"patch":1,"build":"21D62"},"timezone":"CST","timezone_offset_sec":28800,"id":"404F0891-68C0-5458-A074-D70293F0C184"}}}
2022-05-08T20:16:22.134+0800	INFO	[beat]	instance/beat.go:976	Process info	{"system_info": {"process": {"cwd": "/Users/zhanghao/software/filebeat-6.8.6-darwin-x86_64", "exe": "./filebeat", "name": "filebeat", "pid": 3448, "ppid": 3446, "start_time": "2022-05-08T20:16:21.964+0800"}}}
2022-05-08T20:16:22.134+0800	INFO	instance/beat.go:280	Setup Beat: filebeat; Version: 6.8.6
2022-05-08T20:16:22.136+0800	INFO	instance/beat.go:359	filebeat stopped.
2022-05-08T20:16:22.136+0800	ERROR	instance/beat.go:906	Exiting: error initializing publisher: error initializing processors: each processor needs to have exactly one action, but found 2 actions
Exiting: error initializing publisher: error initializing processors: each processor needs to have exactly one action, but found 2 actions

I don't know why

Hi @zhanghao116560 Bad Syntax / indentation

processors:
  - add_host_metadata: ~
  - add_cloud_metadata: ~
  - drop_fields:
      fields: ["beat"]  <!-- Note Indented 2 spaces
1 Like

That's settled. Thank you very much

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.