I'm using Logstash 2.3.3 to load data from csv file to Elasticsearch 2.3.3.
Here is my Logstash configuration file:
input {
#stdin {
# type => "stdin-type"
#}
file {
path => "/Users/hieupm/export.txt"
start_position => "beginning"
codec => plain {
charset => "CP1252"
}
}
}
filter {
mutate {
gsub => [
"message", "\"", " ",
"message", " +", " ",
"message", " ;", ";",
"message", "; ", ";"
]
lowercase => ["message"]
}
csv {
columns => ["siren","raison_sociale","enseigne","cp_ville","naf","nature_juridique","code_tranche"]
separator => ","
}
}
output {
#stdout {
#}
elasticsearch {
hosts => "127.0.0.1:9200"
index => "ereputation"
document_id => "%{siren}"
}
}
The execution log (in terminal) didn't give any error but it just displayed as below and never finished
Settings: Default pipeline workers: 8
Pipeline main started
My sample data:
siren,raison_sociale,enseigne,cp_ville,naf,nature_juridique,code_tranche
5420021,ETABLISSEMENTS BIQUEZ,,80100 ABBEVILLE,4669B,5710,11
5420120,STE DES SUCRERIES DU MARQUENTERRE,,62140 MARCONNELLE,1081Z,5599,11
5480082,STE BRETONNE DE TRAVAUX PUBLICS,,44600 ST NAZAIRE,4312A,5599,21
5480546,SOCIETE DE DISTRIBUTION DE PAPIER,,44350 GUERANDE,1712Z,5710,21
5520176,CARTONNAGE HERNAS,,80210 FEUQUIERES EN VIMEU,1721A,5710,21
5520242,PROSPA,,80510 LONGPRE LES CORPS SAINTS,2030Z,5710,12
5520325,ETABLISSEMENTS ADRIEN RIQUIER,,80570 DARGNIES,4674B,5710,12
5540380,SNC COMTE ET CIE,PHARMACIE COMTE,04000 DIGNE LES BAINS,4773Z,5202,11
5541552,ETABLISSEMENTS BONNET FRERES,,04370 BEAUVEZER,5610C,5499,03
Thanks for any suggestions!
stdoutoutput. This is most likely a parsing issue.