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?
For the above I simply copied the test file into the directory being watched by FileBeat to produce those results. From what I've seen I generally have events that consist of single empty lines (e.g. a program may simply 'printf("\n")' into a log file). I am trying to reconstruct that log file at the receiving end, but FileBeat is leaving out the newlines so my files aren't matching.
It seems to be indeed the case that empty lines are ignored. But what is your use case for needing empty lines? Seems that in the logging use case they are not exactly useful.
Playing around with the multiline config, it is possible to append the empty lines to the previous line, so that they don't create a a dedicated event, but they are not completely lost either. This is the multiline config that I tried:
Thank you for looking. I will try the multiline pattern. Our use case is to rebuild the log files to their original format after processing. The empty lines keep the formatting of the file intact and make it easier to read should we need to examine them later.
The documentation seems to indicate these lines shouldn't be ignored. Is there something to be fixed or should the documentation be updated?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.