I have tab separated data which I want to input into logstash
. Here is my configuration file:
input {
file {
path => "/*.csv"
type => "testSet"
start_position => "beginning"
}
}
filter {
csv {
separator => "\t"
}
}
output {
stdout {
codec => rubydebug
}
}
It simply looks for all .csv
files and separates them using tabs. For an input like this:
col1 col2
data1 data2
logstash
output is (for the two rows):
column1 => "col1\tcol2"
column1 => "data1\tdata2"
Obviously it is not correctly parsing it. I saw that this issue was brought up a while ago here but there was no solution. Does anyone know if this problem has been resolved or maybe there's another way to do it? Thanks!
Instead of using "\t" as the seperator, input an actual tab. like this:
filter {
csv {
separator => " "
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With