Config Err

I just started working with ELK stack in my virtual box, below errors are not clear to me to debug.
my csv file :

1,"pg100","dg101",2,"2016-01-01 00:29:24","2016-01-01 00:39:36",1
2,"pg100","dg2002",2,"2016-01-02 20:31:43","2016-01-02 20:42:31",1
3,"pg100","dg3903",2,"2016-01-05 00:24:16","2016-01-05 00:32:26",1
4,"pg100","dg904",1,"2016-01-07 12:36:47","2016-01-07 12:46:33",1
5,"pg100","dg2805",2,"2016-01-09 12:36:10","2016-01-09 12:47:27",1> 

and i tried to logstash config file as :

input
{
file
{
 path => "/opt/elk/data/gt.csv"
 start_position => "beginning"
 sincedb_path => "/dev/null"
}
 }

filter
{
csv 
{
separator = ","

 columns => ["gt_id", "pid", "did", "vid", "created_at","modified_at","amount"]
    }
    mutate { convert => ["amount" => "float"] }
 }


output
{
elasticsearch{
hosts => "localhost"
index => "gt"
document_type => "sample"
}
stdout{}

}

the error info :

 Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, 
 :exception=>"LogStash::ConfigurationError", :message=>"Expected one of #, => at line 15, column 12 
 (byte 157) after filter\n{\n\tcsv \n\t{\n\tseparator ", :backtrace=>["/opt/elk/logstash/logstash- 
 core/lib/logstash/compiler.rb:42:in `compile_imperative'", "/opt/elk/logstash/logstash- 
 core/lib/logstash/compiler.rb:50:in `compile_graph'", "/opt/elk/logstash/logstash- 
 core/lib/logstash/compiler.rb:12:in `block in compile_sources'", "org/jruby/RubyArray.java:2486:in 
 `map'", "/opt/elk/logstash/logstash-core/lib/logstash/compiler.rb:11:in `compile_sources'", 
  "/opt/elk/logstash/logstash-core/lib/logstash/pipeline.rb:51:in `initialize'", "/opt/elk/logstash/logstash- 
 core/lib/logstash/pipeline.rb:169:in `initialize'", "/opt/elk/logstash/logstash- 
 core/lib/logstash/pipeline_action/create.rb:40:in `execute'", "/opt/elk/logstash/logstash- 
 core/lib/logstash/agent.rb:315:in `block in converge_state'", "/opt/elk/logstash/logstash- 
 core/lib/logstash/agent.rb:141:in `with_pipelines'", "/opt/elk/logstash/logstash- 
 core/lib/logstash/agent.rb:312:in `block in converge_state'", "org/jruby/RubyArray.java:1734:in `each'", 
 "/opt/elk/logstash/logstash-core/lib/logstash/agent.rb:299:in `converge_state'", 
  "/opt/elk/logstash/logstash-core/lib/logstash/agent.rb:166:in `block in converge_state_and_update'", 
 "/opt/elk/logstash/logstash-core/lib/logstash/agent.rb:141:in `with_pipelines'", 
 "/opt/elk/logstash/logstash-core/lib/logstash/agent.rb:164:in `converge_state_and_update'", 
 "/opt/elk/logstash/logstash-core/lib/logstash/agent.rb:90:in `execute'", "/opt/elk/logstash/logstash- 
 core/lib/logstash/runner.rb:348:in `block in execute'", 
 "/opt/elk/logstash/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/task.rb:24:in `block in 
  initialize'"]}

Open your configuration file and go to line 15. You will find

separator = ","

Column 12 there the first double quote. It is trying to tell you that it wants to see

separator => ","

Awesome , its working

 mutate { convert => ["amount" => "float"] }

also need to be

 mutate { convert => ["amount", "float"] }

... or mutate { convert => {"amount" => "float"} } :wink:

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