Probably a n00b issue trying to get the json_lines codec to read data from a file.
Here's what my config file looks like
input {
file {
path => ['C:/dev/logstash-5.1.2/data/sample.log']
start_position => "beginning"
sincedb_path => 'C:/dev/logstash-5.1.2/data/.sincedb'
codec => "json_lines"
}
}
output {
file {
path => ['C:/dev/logstash-5.1.2/data/sample-output.log']
flush_interval => 0
}
}
Here's what my super simple input file looks like
{"id":1,"name":"A green door","price":12.50,"tags":["home","green"]}
{"id":2,"name":"A red door","price":12.50,"tags":["home","red"]}
When I switch the codec to plain
the file gets read and output gets written as expected. But no matter what I do I'm unable to get the json_lines
codec to read and write this data.
I am pretty new to logstash, so this might just be something simple that I'm just not able to wrap my head around. Any help would be most appreciated!
Cheers!