Logstash to EalsticSearch config error

Hello,

I'm very new to ELK stack and I'm trying to connect Logstash to Elastic Search and I keep getting the following error:

[2017-06-13T03:17:53,910][ERROR][logstash.agent ] Cannot create pipeline {:reason=>"Expected one of #, => at line 9, column 17 (byte 147) after input {\n redis {\n host => "172.16.17.20"\n data_type => "list"\n key => "sensu1"\n password => "testme"\n }\noutput {\n elasticsearch ", :backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:50:in initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:145:ininitialize'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:286:in create_pipeline'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:95:inregister_pipeline'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:274:in execute'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67:inrun'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:185:in run'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132:inrun'", "/usr/share/logstash/lib/bootstrap/environment.rb:71:in `(root)'"]}

Here is the config in Logstash:

input {
redis {
host => "172.16.17.20"
data_type => "list"
key => "sensu1"
password => "testme"
}
output {
elasticsearch { hosts => ["10.34.192.61:9200"] }
}
}

Please let me know if there is anything else I can send to better assist in helping and thank you very much in advanced for any and all help!

Thank You

Try closing the input with } before you do the output. I'm not familiar with the redis plugin but I think this could be your problem, so try the following and this should fix that parse error hopefully:

input {
	redis {
		host => "172.16.17.20"
		data_type => "list"
		key => "sensu1"
		password => "testme"
	}
}
output {
	elasticsearch { hosts => ["10.34.192.61:9200"] }
}
1 Like

Hello,

That seem to have worked.

Thank you so much for your help!!

1 Like

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