Expected one of #, {, ,, ] Error

Getting below error:

[2018-01-25T21:29:32,237][ERROR][logstash.agent ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Expected one of #, {, ,, ] at line 22, column 35 (byte 730) after filter {\n csv {\n \t\tseparator => ","\n\t\t\tcolumns => ["crimedate","crimetime","crimecode","location","description","inside_outside","weapon","post","district","neighborhood","longitude","latitude","premise","total_incidents"] \n }\n\tdate {\n\t\tmatch => ["crimedate", "mm/dd/yy"]\n\t }\n\tmutate {convert => ["longitude", "float"]}\n\tmutate {convert => ["latitude"

CANT'T FIGURE OUT WHAT'S THE ERROR IN THIS CODE

// input {
file { path => "/home/ppunj/md-c.csv"
start_position => 'beginning'
sincedb_path => '/dev/null'
}
}
filter {
csv {
separator => ","
columns => ["crimedate","crimetime","crimecode","location","description","inside_outside","weapon","post","district","neighborhood","longitude","latitude","premise","total_incidents"]
}
date {
match => ["crimedate", "mm/dd/yy"]
}
mutate {convert => ["longitude", "float"]}
mutate {convert => ["latitude", "float"]}
mutate {rename => {"longitude" => "[location][lon]"}}
mutate {rename => {"latitude" => "[location][lat]"}}
mutate {convert => ["total_incidents", "integer]}
}
output {
elasticsearch { hosts => "localhost:9200"
index => "md-c"
index_type => "mc_data"
}
stdout {}
}

mutate {convert => ["total_incidents", "integer]}

This line lacks a }. Compare with the other mutate filter lines.

The line metioned from @magnusbaeck lacks a " after integer and not a } on the end

Thank you for answering the question.

But now I am getting some pipeline worker error as below:

//

[2018-01-26T10:03:34,155][ERROR][logstash.pipeline ] Exception in pipelineworker, the pipeline stopped processing new events, please check your filter configuration and restart Logstash. {:pipeline_id=>"main", "exception"=>"org.jruby.RubyString cannot be cast to org.logstash.ConvertedList", "backtrace"=>["org.logstash.Accessors.setChild(Accessors.java:107)", "org.logstash.Accessors.set(Accessors.java:16)", "org.logstash.Event.setField(Event.java:162)", "org.logstash.ext.JrubyEventExtLibrary$RubyEvent.ruby_set_field(JrubyEventExtLibrary.java:95)", "home.ppunj.logstash_minus_6_dot_1_dot_1.vendor.bundle.jruby.$2_dot_3_dot_0.gems.logstash_minus_filter_minus_mutate_minus_3_dot_2_dot_0.lib.logstash.filters.mutate.RUBY$block$rename$1(/home/ppunj/logstash-6.1.1/vendor/bundle/jruby/2.3.0/gems/logstash-filter-mutate-3.2.0/lib/logstash/filters/mutate.rb:243)", "org.jruby.runtime.CompiledIRBlockBody.yieldDirect(CompiledIRBlockBody.java:156)", "org.jruby.runtime.BlockBody.yield(BlockBody.java:114)", "org.jruby.runtime.Block.yield(Block.java:165)", "org.jruby.RubyHash$12.visit(RubyHash.java:1362)", "org.jruby.RubyHash$12.visit(RubyHash.java:1359)", "org.jruby.RubyHash.visitLimited(RubyHash.java:662)", "org.jruby.RubyHash.visitAll(RubyHash.java:647)", "org.jruby.RubyHash.iteratorVisitAll(RubyHash.java:1319)", "org.jruby.RubyHash.each_pairCommon(RubyHash.java:1354)", "org.jruby.RubyHash.each(RubyHash.java:1343)", "home.ppunj.logstash_minus_6_dot_1_dot_1.vendor.bundle.jruby.$2_dot_3_dot_0.gems.logstash_minus_filter_minus_mutate_minus_3_dot_2_dot_0.lib.logstash.filters.mutate.RUBY$method$rename$0(/home/ppunj/logstash-6.1.1/vendor/bundle/jruby/2.3.0/gems/logstash-filter-mutate-3.2.0/lib/logstash/filters/mutate.rb:239)", "home.ppunj.logstash_minus_6_dot_1_dot_1.vendor.bundle.jruby.$2_dot_3_dot_0.gems.logstash_minus_filter_minus_mutate_minus_3_dot_2_dot_0.lib.logstash.filters.mutate.RUBY$method$filter$0(/home/ppunj/logstash-6.1.1/vendor/bundle/jruby/2.3.0/gems/logstash-filter-mutate-

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