Logstash Conf Error For Tweet

I fixed ES. But output config test results are here.

root@client:~# /opt/logstash/bin/logstash --configtest -f /etc/logstash/conf.d/30-elasticsearch-output.conf

Invalid setting for elasticsearch output plugin:
output {
elasticsearch {
# This setting must be a path
# File does not exist or cannot be opened twitter_template.json
template => "twitter_template.json"
} {:level=>:error}
Error: Something is wrong with your configuration.

How can i implement twitter_template.json to output conf

I need help

You need to provide the full path the the template file.

I did what you said. Error fixed but it still say Configuration error. Not restarting. Re-run with configtest parameter for details . I did detail configtest but all files just OK . Where do i have to look to fix it.

Can you provide the fill error you are seeing then?

root@client:~# /opt/logstash/bin/logstash --configtest -f /etc/logstash/conf.d/3 0-elasticsearch-output.conf Configuration OK root@client:~# /opt/logstash/bin/logstash --configtest -f /etc/logstash/conf.d/0 2-beats-input.conf Configuration OK root@client:~# /opt/logstash/bin/logstash --configtest -f /etc/logstash/conf.d/1 1-nginx.conf Configuration OK root@client:~# /opt/logstash/bin/logstash --configtest -f /etc/logstash/conf.d/1 0-syslog.conf Configuration OK root@client:~# sudo service logstash configtest Error: Expected one of #, input, filter, output at line 50, column 1 (byte 1338) after

and this is my output output { stdout { codec => dots } elasticsearch { hosts => ["localhost:9200"] index => "twitter" document_type => "tweet" template_name => "twitter" template => "/etc/logstash/conf.d/twitter_template.json" } }

Please don't post pictures of text, they are difficult to read and some people may not be even able to see them.

What other files do you have in /etc/logstash/conf.d? What if you run /opt/logstash/bin/logstash --configtest -f /etc/logstash/conf.d?

Error: Expected one of #, input, filter, output at line 50, column 1 (byte 133 after

there are 4 configuration file and just twitter_template.json. Configuration files are output , input, syslog, nginx.

I took a picture one of my old posts about documents.

Oh, you have twitter_template.json in /etc/logstash/conf.d. That won't do. That directory can only contain the Logstash configuration files you want to use.

thank you that help a lot. now i can't get any result but errors are gone. thank you again. warkolm you too.