Logstash CSV plugin behaviour for realtime CSV files

Hi ,

I am facing some issue with logstash (5.6.2) CSV plugin's behaviour. Following is my scenarion :

I am receving .csv file every minute. I send this file to logstash. Intially around 10 mins everyhing works fine but after that logstash starts mixing the columns. For example: I start getting the values of column 3 in column 1 and it is random between the columns. Why is it happening?
Following is my conf for logstash.
input {

file {   
	type => "report"
	path => [ "/data/logs/feeder.csv" ]
	sincedb_path=> "dev/null"


filter {
csv {
separator => ","
columns => ["Name","Age","Salary","Address","Phone","ZipCode","City","Country","CarNumber"]

    mutate {convert => ["Salary", "float"]}       


output {

if [type] == "report" {
        elasticsearch {
		hosts => "localhost:9200"
		index => "logstash-report"
		document_type => "elkdoc"
stdout {codec => rubydebug}


Show an example of an incorrect document.

Hi Magnus,

I am able to resolve this problem. I was deleting the previous files just before feeding the new one to logstash. Due to this it was somehow misbehaving. May be, logstash still reading the previous files and I was trying to delete them at the same time.
When I removed the statement for deleting the previous file , it work fine. I will have to schedule the deletion in some other way.


This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.