Running Logstash config in background

I have created several config files and all are running with single run and stops when I close the terminal. How to make those config run forever in background and also do I have to run them again when server goes down/restart?

I have added schedule to make them run every 5 minutes. These config files fetches values from dB.

Which operating system?

1 Like

Unix @magnusbaeck

https://www.elastic.co/guide/en/logstash/current/running-logstash.html

1 Like

@magnusbaeck Ok that will start logstash service. Will it automatically pick up the config files ? How would it know the location of config files ?

Will it automatically pick up the config files ?

Yes, if they're stored in the right place.

How would it know the location of config files ?

1 Like

Thanks for the reply. What would be the right directory to store config files? I have extracted logstash from .tar.gz file.

The link you provided doesn't contain the path to keep config files.
@magnusbaeck

For rpm or debian installation on the path is there but it is not mentioned for tar.gz extracted setup @magnusbaeck

If you want to run Logstash as a service I strongly recommend that you rely on the packages.

When running Logstash from the tarball I believe Logstash will read config/logstash.yml and that file will configure where Logstash reads the rest of the configuration files.

1 Like

Thanks. Would you recommend running them simply with nohup command?
@magnusbaeck

No, absolutely not.

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