Hello,
I have my last line of csv data that I get with http_poller plugin that is not imported. Some people have solved the problem by adding a blank newline at the end of the csv file. But me in my case my file is recovered directly through an http_poller so I tried to add a new line with ruby code but it did not work and I'm looking for that normal because I read in codec line . and I tried in multiline but it does not work to parser the file in csv. So How to fix this problem??
here is my code below:
It looks like the HTTP Poller Input was failing to flush its codec at the end of its response; since the line codec is set to only emit events when it encounters a newline, it was holding onto the last bit and not releasing it. I've opened up a Pull-Request to fix it here: logstash-plugins/logstash-input-http_poller#97.
In the mean-time, you could get by with a combination of the plain codec and the split filter:
input {
http_poller {
# ...
codec => plain { charset => "UTF-16" }
}
}
# split the "batch" of events into individual events
filter {
split {
"field" => "message"
}
}
# at this point, each event is a single line from the source,
# and the last item is included, whether or not it had a trailing newline.
filter {
csv {
# ...
}
}
Thank you for answering me,
Ok I will test the solution that you propose on Monday because today being Saturday I do not work and therefore I have no access to the servers. Then I will see you confirm if the soluton has walked, waiting for you fix the bug.
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.