I wrote my conf file like this:
input{
file{
path => "/data/logs/2"
start_position => "beginning"
delimiter => "\n"
}
}
but it didn't work .But when I removed 'delimiter ',It workes well. I should not configred this ?
If I use 'file' to read files in windows , I has configured 'delimiter' to "\r\n". It did not work .
How can I set '\r\n' for 'delimiter'
If you are reading files with native line ending you do not need to use delimiter. On Windows it expects Windows style line endings, on UNIX it expect UNIX.
Also, unless you have configured config.support_escapes in logstash.yml a string like \r\n is not interpreted as escapes. On UNIX, to set delimiter to newline you would use a literal newline
delimiter => "
"
Now, on Windows, that would be equivalent to CR+NL
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.