Hi all,
I looked around and it seems like filebeat should be sending empty lines in the log files. Running version 6.1.3 with a pretty basic configuration but it looks like the harvester is ignoring them. Am I missing something?
Config file:
filebeat.prospectors:
- type: log
enabled: true
paths:
- /usr/*.log
filebeat.config.modules:
path: ${path.config}/modules.d/*.yml
reload.enabled: false
output.logstash:
# The Logstash hosts
hosts: ["localhost:5044"]
Test file:
hello
the lines above are ignored.
Run with command line (debug mode):
/usr/share/filebeat/bin/filebeat -e -d "*" -c /etc/filebeat/filebeat.yml -path.home /usr/share/filebeat -path.config /etc/filebeat -path.data /var/lib/filebeat -path.logs /var/log/filebeat
Events published (notice empty lines not published):
2018/02/01 15:55:11.560440 processor.go:275: DBG [publish] Publish event: {
"@timestamp": "2018-02-01T15:55:11.560Z",
"@metadata": {
"beat": "filebeat",
"type": "doc",
"version": "6.1.3"
},
"offset": 6,
"message": "hello",
"prospector": {
"type": "log"
},
"beat": {
"name": "myhost",
"hostname": "myhost",
"version": "6.1.3"
},
"source": "/usr/test2.log"
}
2018/02/01 15:55:11.560507 processor.go:275: DBG [publish] Publish event: {
"@timestamp": "2018-02-01T15:55:11.560Z",
"@metadata": {
"beat": "filebeat",
"type": "doc",
"version": "6.1.3"
},
"source": "/usr/test2.log",
"offset": 37,
"message": "the lines above are ignored.",
"prospector": {
"type": "log"
},
"beat": {
"hostname": "myhost",
"version": "6.1.3",
"name": "myhost"
}
}
Thank you.