Not sure what's wrong. I am using 6.3.1
This is the config file:::
input {
file {
path => ["C:\study\elasticsearch\data.csv"]
start_position => "beginning"
sincedb_path => "nul"
codec => rubydebug
}
}
filter {
csv {
separator => ","
columns => ["Date","Open","High","Low","Close","Volume","Adj Close"]
}
mutate {convert => ["High", "float"]}
mutate {convert => ["Open", "float"]}
mutate {convert => ["Low", "float"]}
mutate {convert => ["Close", "float"]}
mutate {convert => ["Volume", "float"]}
}
output {
elasticsearch {
action => "index"
hosts => ["http://localhost:9200"]
index => "stock"
workers => 1
}
stdout {}
}
This is the log.
C:\ogstash-6.3.1\logstash-6.3.1\bin>logstash -f C:\study\elasticsearch\logstash.conf
Sending Logstash's logs to C:/ogstash-6.3.1/logstash-6.3.1/logs which is now configured via log4j2.properties
[2018-09-10T10:39:15,632][INFO ][logstash.setting.writabledirectory] Creating directory {:setting=>"path.queue", :path=>"C:/ogstash-6.3.1/logstash-6.3.1/data/queue"}
[2018-09-10T10:39:15,647][INFO ][logstash.setting.writabledirectory] Creating directory {:setting=>"path.dead_letter_queue", :path=>"C:/ogstash-6.3.1/logstash-6.3.1/data/dead_letter_queue"}
[2018-09-10T10:39:15,849][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2018-09-10T10:39:15,908][INFO ][logstash.agent ] No persistent UUID file found. Generating new UUID {:uuid=>"62d5de98-11ee-4435-ad21-ccfffedb528b", :path=>"C:/ogstash-6.3.1/logstash-6.3.1/data/uuid"}
[2018-09-10T10:39:17,074][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"6.3.1"}
[2018-09-10T10:39:23,637][INFO ][logstash.pipeline ] Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=>4, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50}
[2018-09-10T10:39:24,235][INFO ][logstash.outputs.elasticsearch] Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[http://localhost:9200/]}}
[2018-09-10T10:39:24,249][INFO ][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck_url=>http://localhost:9200/, :path=>"/"}
[2018-09-10T10:39:24,506][WARN ][logstash.outputs.elasticsearch] Restored connection to ES instance {:url=>"http://localhost:9200/"}
[2018-09-10T10:39:24,567][INFO ][logstash.outputs.elasticsearch] ES Output version determined {:es_version=>6}
[2018-09-10T10:39:24,572][WARN ][logstash.outputs.elasticsearch] Detected a 6.x and above cluster: the type
event field won't be used to determine the document _type {:es_version=>6}
[2018-09-10T10:39:24,602][INFO ][logstash.outputs.elasticsearch] New Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearch", :hosts=>["http://localhost:9200"]}
[2018-09-10T10:39:24,625][INFO ][logstash.outputs.elasticsearch] Using mapping template from {:path=>nil}
[2018-09-10T10:39:24,693][INFO ][logstash.outputs.elasticsearch] Attempting to install template {:manage_template=>{"template"=>"logstash-", "version"=>60001, "settings"=>{"index.refresh_interval"=>"5s"}, "mappings"=>{"default"=>{"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", "ignore_above"=>256}}}}}], "properties"=>{"@timestamp"=>{"type"=>"date"}, "@version"=>{"type"=>"keyword"}, "geoip"=>{"dynamic"=>true, "properties"=>{"ip"=>{"type"=>"ip"}, "location"=>{"type"=>"geo_point"}, "latitude"=>{"type"=>"half_float"}, "longitude"=>{"type"=>"half_float"}}}}}}}}
[2018-09-10T10:39:25,881][INFO ][logstash.pipeline ] Pipeline started successfully {:pipeline_id=>"main", :thread=>"#<Thread:0x40bd183d run>"}
[2018-09-10T10:39:26,046][INFO ][logstash.agent ] Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]}
[2018-09-10T10:39:26,640][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}