How to specify logstash config file when running it as a service

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

Use path.config in your logstash.yml. It can be a file rather than a directory.

1 Like

This worked for me thanks a lot

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