I am trying to load data from a csv file into elasticsearch. When I try to load the data using the command
logstash -f "\Users\dell\Desktop\Data\logstash_cars.config"
The logstash_cars.config file is:
input{
file{
path=>"/Users/dell/Desktop/Data/cars.csv"
start_position =>"begining"
since_db => "/Users/dell/sincedb.txt"
}
}
filter{
csv{
separtor =>","
columns =>["maker","model","mileage","manufature_year","engine_displacement","engine_power","body_type","color_slug","skt_year","transmission","door_count","seat_count","fuel_type","date_created","date_last_seen","price_eur"]
}
mutate{convert =>["milege","integer"]}
mutate{convert =>["price_eur","float"]}
mutate{convert =>["engine_power","integer"]}
mutate{convert =>["door_count","integer"]}
mutate{convert =>["seat_count","integer"]}
}
output{
elasticsearch{
hosts => "localhost"
index => "cars"
document_type =>"sold_cars"
}
stdout{
}
}
The following is the output in terminal:
Sending Logstash's logs to C:/Software/elk/logstash-6.2.3/logs which is now configured via log4j2.properties
[2018-04-19T18:45:02,959][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"fb_apache", :directory=>"C:/Software/elk/logstash-6.2.3/modules/fb_apache/configuration"}
[2018-04-19T18:45:02,991][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"netflow", :directory=>"C:/Software/elk/logstash-6.2.3/modules/netflow/configuration"}
[2018-04-19T18:45:03,228][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2018-04-19T18:45:03,798][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"6.2.3"}
[2018-04-19T18:45:04,991][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2018-04-19T18:45:07,471][ERROR][logstash.inputs.file ] Invalid setting for file input plugin:
input {
file {
# This setting must be a ["beginning", "end"]
# Expected one of ["beginning", "end"], got ["begining"]
start_position => "begining"
...
}
}
[2018-04-19T18:45:07,818][ERROR][logstash.agent ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Something is wrong with your configuration.", :backtrace=>["C:/Software/elk/logstash-6.2.3/logstash-core/lib/logstash/config/mixin.rb:89:in config_init'", "C:/Software/elk/logstash-6.2.3/logstash-core/lib/logstash/inputs/base.rb:62:in
initialize'", "C:/Software/elk/logstash-6.2.3/logstash-core/lib/logstash/plugins/plugin_factory.rb:89:in plugin'", "C:/Software/elk/logstash-6.2.3/logstash-core/lib/logstash/pipeline.rb:112:in
plugin'", "(eval):8:in <eval>'", "org/jruby/RubyKernel.java:994:in
eval'", "C:/Software/elk/logstash-6.2.3/logstash-core/lib/logstash/pipeline.rb:84:in initialize'", "C:/Software/elk/logstash-6.2.3/logstash-core/lib/logstash/pipeline.rb:169:in
initialize'", "C:/Software/elk/logstash-6.2.3/logstash-core/lib/logstash/pipeline_action/create.rb:40:in execute'", "C:/Software/elk/logstash-6.2.3/logstash-core/lib/logstash/agent.rb:315:in
block in converge_state'", "C:/Software/elk/logstash-6.2.3/logstash-core/lib/logstash/agent.rb:141:in with_pipelines'", "C:/Software/elk/logstash-6.2.3/logstash-core/lib/logstash/agent.rb:312:in
block in converge_state'", "org/jruby/RubyArray.java:1734:in each'", "C:/Software/elk/logstash-6.2.3/logstash-core/lib/logstash/agent.rb:299:in
converge_state'", "C:/Software/elk/logstash-6.2.3/logstash-core/lib/logstash/agent.rb:166:in block in converge_state_and_update'", "C:/Software/elk/logstash-6.2.3/logstash-core/lib/logstash/agent.rb:141:in
with_pipelines'", "C:/Software/elk/logstash-6.2.3/logstash-core/lib/logstash/agent.rb:164:in converge_state_and_update'", "C:/Software/elk/logstash-6.2.3/logstash-core/lib/logstash/agent.rb:90:in
execute'", "C:/Software/elk/logstash-6.2.3/logstash-core/lib/logstash/runner.rb:348:in block in execute'", "C:/Software/elk/logstash-6.2.3/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/task.rb:24:in
block in initialize'"]}
Looks like there is something wrong with my configuration file.
Please help me resolve this, Thanks in advance!