I am able to run logstash as:
bin/logstash -f /etc/logstash/conf.d/config.json
but running logstash as a service
sudo service logstash start
is giving me the following error:
... Error: Expected one of #, input, filter, output at line 24, column 1 (byte 528) after "}
Not sure what I am doing wrong here? Configtest also says the config file is fine.
bin/logstash -f /etc/logstash/conf.d/config.json --configtest
Configuration OK
Any help is appreciated.
Thanks.
When logstash runs, it combines all the files in your config directory into one file. When there's an error, you're getting line and position information into that merged config.
Try:
cat /etc/logstash/conf.d/* > /tmp/total.conf
and then look at line 24 or 25 there.