Logstash configuration error - 15-01-2018

Hi All below in my conf file ,

input {

    kafka {
            bootstrap_servers => "sev1:9092 , sev2:9092 , sev3:9092"
            topics => ["mytopic]
          }
   }

The filter part of this file is commented out to indicate that it is

filter {

                           json {
                                         source => "message"
                                }



                        mutate {

                                       rename => { "source" => "Log_File" }

                                       remove_field => [ "offset", "tags"  ,  "prospector" , "beat"  ,  "@version"]
                                  }
}

output {
stdout { codec => rubydebug }
elasticsearch {
hosts => ["sev1:9200","sev2:9200", "sev3:9200"]
index => "myindex"
user => test
password => mypwd
}

   }

While starting , i am getting below exception,

[2018-01-15T07:46:42,415][DEBUG][logstash.agent ] Executing action {:action=>LogStash::PipelineAction::Create/pipeline_id:mypipeline
[2018-01-15T07:46:42,420][ERROR][logstash.agent ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:mypipeline, :exception=>"LogStash::ConfigurationError", :message=>"Expected one of #, { at line 35, column 31 (byte 1232) after output {\r\n stdout { codec => rubydebug }\r\n elasticsearch {\r\n hosts => ["sev1:9200","sev2:9200", "sev3:9200"]\r\n index => "myindex"\r\n user => test\r\n password => mypwd\r\n ", :backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:42:in compile_imperative'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:50:incompile_graph'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:12:in block in compile_sources'", "org/jruby/RubyArray.java:2486:inmap'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:11:in compile_sources'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:51:ininitialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:171:in initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline_action/create.rb:40:inexecute'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:335:in block in converge_state'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:141:inwith_pipelines'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:332:in block in converge_state'", "org/jruby/RubyArray.java:1734:ineach'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:319:in converge_state'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:166:inblock in converge_state_and_update'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:141:in with_pipelines'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:164:inconverge_state_and_update'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:105:in block in execute'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/interval.rb:18:ininterval'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:94:in execute'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:343:inblock in execute'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/task.rb:24:in `block in initialize'"]}

It is related to configuration , please help on the same .
as i cant see any issue with my configuration file

Please format your code using </> icon as explained in this guide. It will make your post more readable and will help us help you.

Alternatively use markdown style like this:

```
CODE
```
1 Like

Hey Mark ,

Thanks , but i got the solution .

user => test
password => mypwd

above two should be in double quotes .

They should, yes.

But please keep the formatting in mind for future posts, it really makes it much easier to read, and help :slight_smile:

Sure , will do .

Thanks .

1 Like

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