Logstash Issue : Failed to execute action

Hello, i have installed elasticsearch, created template (server-logs) and started the service on 9200
Also, added below code in logstash config file but when i try to start logstash service it is throwing an error
input {
file {
path => "/Users/bhargavramreddy/eclipse-workspace/Servers/maps/output.log"
}
}
filter {

}

output {
elasticsearch {
hosts => ["localhost:9200"]
index => “logs-%{+YYYY.MM.dd}”
manage_template => true
template_name => "server-logs"
}
stdout {}
}

Can anyone help me with the solution? what's wrong here ?

ERROR LOG:
Bhargavs-MacBook-Pro:logstash-7.1.1 bhargavramreddy$ bin/logstash -f config/logstash-sample.conf
Sending Logstash logs to /Users/bhargavramreddy/Downloads/logstash-7.1.1/logs which is now configured via log4j2.properties
[2019-05-29T17:12:04,977][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2019-05-29T17:12:04,998][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"7.1.1"}
[2019-05-29T17:12:06,191][ERROR][logstash.agent ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Expected one of #, ", ', -, [, { at line 16, column 14 (byte 290) after output {\n elasticsearch {\n \thosts => ["localhost:9200"]\n \tindex => ", :backtrace=>["/Users/bhargavramreddy/Downloads/logstash-7.1.1/logstash-core/lib/logstash/compiler.rb:41:in compile_imperative'", "/Users/bhargavramreddy/Downloads/logstash-7.1.1/logstash-core/lib/logstash/compiler.rb:49:incompile_graph'", "/Users/bhargavramreddy/Downloads/logstash-7.1.1/logstash-core/lib/logstash/compiler.rb:11:in block in compile_sources'", "org/jruby/RubyArray.java:2577:inmap'", "/Users/bhargavramreddy/Downloads/logstash-7.1.1/logstash-core/lib/logstash/compiler.rb:10:in compile_sources'", "org/logstash/execution/AbstractPipelineExt.java:151:ininitialize'", "org/logstash/execution/JavaBasePipelineExt.java:47:in initialize'", "/Users/bhargavramreddy/Downloads/logstash-7.1.1/logstash-core/lib/logstash/java_pipeline.rb:23:ininitialize'", "/Users/bhargavramreddy/Downloads/logstash-7.1.1/logstash-core/lib/logstash/pipeline_action/create.rb:36:in execute'", "/Users/bhargavramreddy/Downloads/logstash-7.1.1/logstash-core/lib/logstash/agent.rb:325:inblock in converge_state'"]}
[2019-05-29T17:12:06,502][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2019-05-29T17:12:11,556][INFO ][logstash.runner ] Logstash shut down.

Your configuration appears to have curly quotes rather than regular double quotes around the value of index in the elasticsearch output.

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