I can use logstash with the binaries by specifying the config file like this

./logstash -f ../config/logstash-sample.conf

But when it is installed rather than using the binaries it seems their site says you start logstash as a service like this

sudo initctl start logstash

How can I start it as a service and specify the same config file I would use if i were using the binaries.

something like this although this command doesn't work

sudo initctl start logstash -f logstash-simple.conf

Thanks

2 Answers

0
Mick O'Gorman On Best Solutions

By default the config files are specified in pipeline.yml, it can be overwritten in logstash.yml.

By default it looks for all files in etc/logstash/conf.d/*.conf

Created one there called logstash.conf and added my configuration in there. Needed to chmod 777 logstash.conf to allow permissions to it otherwise would not work.

1
Alain Collins On

The location of the config file is specified (and probably hard-coded relative to some other directory) in your startup script. Either change it there, or put the config in the expected location.