Why all csv columns are saved inside message field

Hi,
I'm trying to load a CSV file into Elasticsearch using Logstash, but the problem is all the csv columns are saved inside message fiels heres the config file:
input {
file {
path => "C:/Users/zya/Documents/ELK_Stack/logstash-6.6.0/logstash-6.6.0/config/statistique_logs_bledina_prod.csv"
start_position => "beginning"
sincedb_path => "null"
}
}
filter {
csv {
separator => ","
columns => ["Date","Serveur","......"]

}
}
output {
elasticsearch {
hosts => "http://localhost:9200"
index => "bledina185"
document_type => "bledinaio72"
}
stdout {}
}

heres a pic the data in Elasticsearch :

You have specified , as separator in your CSV filter but the data seems to be separated by ;.

1 Like

thanks for your answer ser, I tried to change the separator, but I always get the same probleme, here a picture of the csv file

In addition to changing the separator to be ; you should change that to be NUL.

1 Like

its working as expected thank u guys @Badger and @Christian_Dahlqvist for your help

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