Logstash dosn't import CSV file


(Tal) #1

Hi
I'm trying to import CSV with Logstash.
My config file looking like this:
input{
file{
path=>"/Users/office/Desktop/Elasticsearch data/ufo.csv"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter{
csv{
separator => ","
columns =>["User_Id","Age","Gender","Occupation","Zip_Code"]

}
#mutate{convert => ["User_Id","interger"]}
#mutate{convert => ["Age","interger"]}
}
output{
elasticsearch{
hosts=>"http://localhost:9200"
index=>"ufo"
document_type => "found"
}
stdout{}
}

I got this as answer from Logstash
Sending Logstash's logs to C:/logstash/logs which is now configured via log4j2.properties
[2017-08-08T17:41:47,927][INFO ][logstash.outputs.elasticsearch] Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[http://localhost:9200/]}}
[2017-08-08T17:41:48,003][INFO ][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck_url=>http://localhost:9200/, :path=>"/"}
[2017-08-08T17:41:48,179][WARN ][logstash.outputs.elasticsearch] Restored connection to ES instance {:url=>#<URI::HTTP:0x2f4c52fe URL:http://localhost:9200/>}
[2017-08-08T17:41:48,181][INFO ][logstash.outputs.elasticsearch] Using mapping template from {:path=>nil}
[2017-08-08T17:41:48,264][INFO ][logstash.outputs.elasticsearch] Attempting to install template {:manage_template=>{"template"=>"logstash-", "version"=>50001, "settings"=>{"index.refresh_interval"=>"5s"}, "mappings"=>{"default"=>{"_all"=>{"enabled"=>true, "norms"=>false}, "dynamic_templates"=>[{"message_field"=>{"path_match"=>"message", "match_mapping_type"=>"string", "mapping"=>{"type"=>"text", "norms"=>false}}}, {"string_fields"=>{"match"=>"", "match_mapping_type"=>"string", "mapping"=>{"type"=>"text", "norms"=>false, "fields"=>{"keyword"=>{"type"=>"keyword"}}}}}], "properties"=>{"@timestamp"=>{"type"=>"date", "include_in_all"=>false}, "@version"=>{"type"=>"keyword", "include_in_all"=>false}, "geoip"=>{"dynamic"=>true, "properties"=>{"ip"=>{"type"=>"ip"}, "location"=>{"type"=>"geo_point"}, "latitude"=>{"type"=>"half_float"}, "longitude"=>{"type"=>"half_float"}}}}}}}}
[2017-08-08T17:41:48,272][INFO ][logstash.outputs.elasticsearch] New Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearch", :hosts=>[#<URI::HTTP:0x343e3f39 URL:http://localhost:9200>]}
[2017-08-08T17:41:48,279][INFO ][logstash.pipeline ] Starting pipeline {"id"=>"main", "pipeline.workers"=>4, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>5, "pipeline.max_inflight"=>500}
[2017-08-08T17:41:48,952][INFO ][logstash.pipeline ] Pipeline main started
[2017-08-08T17:41:49,146][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}

But I can't see the documents on ES


(system) #2

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