I can see files scrolling past on the terminal, so closing it will kill the service.
So, my question is how do I run my command above so that my terminal is free - and I can continue working on it? Basically, I need a way to start this command in the background:
Thanks, I saw that link, but no where does it explain how to point to a config file. It assumes that that one is using the default config - at least that's my understanding.
So, how does running this command below know where my config file is?
sudo systemctl start logstash.service
I'm sorry if I sound daft but it doesn't show how to run a specific config file.
But no luck with sudo systemctl start logstash.service.
It says:
[2018-07-25T12:48:56,717][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"6.3.2"}
[2018-07-25T12:48:56,837][INFO ][logstash.config.source.local.configpathloader] No config files found in path {:path=>"/etc/logstash/conf.d/*.conf"}
[2018-07-25T12:48:56,847][ERROR][logstash.config.sourceloader] No configuration found in the configured sources.
[2018-07-25T12:48:57,103][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
Next thing I've done - I've copied my logstash.conf to /etc/logstash/conf.d/ and got Logstash service working. But its results were like the pipeline.workers: 1 wasn't set.
So it looks like Logstash service completely ignores logstash.yml settings file.
When you install Logstash with the deb or rpm package, its configuration is in /etc/logstash/logstash.yml, with the pipelines definition in /etc/logstash/pipelines.yml.
It is then picked up automatically when you start Logstash with systemctl start logstash.service
Just moved my logstash.yml to /etc/logstash and got logstash service running correctly.
The only issue now is that running Logstash from command line fails with warning:
Could not find logstash.yml which is typically located in $LS_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults
Have no idea why can't it find logstash.yml in /etc/logstash.
But anyway, I believe that topicstarters question was answered.
You can run it with --path.settings /etc/logstash on the CLI then, that's what I use to check if my configuration is syntactically correct (/usr/share/logstash/bin/logstash -t --path.settings /etc/logstash/ --config.debug --log.level debug).
But I think I see this warning all the time, it still picks up the configuration and runs correctly afterwards.
Thanks for your comment and sample code.
I will try your suggestion and see if that helps. You would expect this to be very simple but instead people are just pointing you to links that doesn't actually address your issue.
Thanks again, will let you know if it works for me.
Thanks, I saw that link, but no where does it explain how to point to a config file. It assumes that that one is using the default config - at least that's my understanding.
Well, if you start Logstash or any other Linux service via e.g. systemd it'll look in the predefined directories for configuration files. There's no way to pass an option to the service startup command to point Logstash elsewhere (however, if you change configuration files that systemd pays attention to you can make it run other files).
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.