@Badger I found the parameters what you say about, they're in file named as startup.options:
# Set a home directory
LS_HOME=/usr/share/logstash
# logstash settings directory, the path which contains logstash.yml
LS_SETTINGS_DIR=/etc/logstash
# Arguments to pass to logstash
LS_OPTS="--path.settings ${LS_SETTINGS_DIR}"
@Badger I checked this command in my nginx.conf file, the output was:
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
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
Could not find log4j2 configuration at path /usr/share/logstash/config/log4j2.properties. Using default config which logs errors to the console
[INFO ] 2022-02-17 10:16:03.234 [main] runner - Starting Logstash {"logstash.version"=>"7.16.2", "jruby.version"=>"jruby 9.2.20.1 (2.5.8) 2021-11-30 2a2962fbd1 OpenJDK 64-Bit Server VM 11.0.13+8 on 11.0.13+8 +indy +jit [linux-x86_64]"}
[WARN ] 2022-02-17 10:16:03.503 [LogStash::Runner] multilocal - Ignoring the 'pipelines.yml' file because modules or command line options are specified
[INFO ] 2022-02-17 10:16:04.041 [LogStash::Runner] Reflections - Reflections took 57 ms to scan 1 urls, producing 119 keys and 417 values
[WARN ] 2022-02-17 10:16:04.940 [LogStash::Runner] plain - Relying on default value of `pipeline.ecs_compatibility`, which may change in a future major release of Logstash. To avoid unexpected changes when upgrading Logstash, please explicitly declare your desired ECS Compatibility mode.
[WARN ] 2022-02-17 10:16:04.985 [LogStash::Runner] beats - Relying on default value of `pipeline.ecs_compatibility`, which may change in a future major release of Logstash. To avoid unexpected changes when upgrading Logstash, please explicitly declare your desired ECS Compatibility mode.
[WARN ] 2022-02-17 10:16:05.138 [LogStash::Runner] plain - Relying on default value of `pipeline.ecs_compatibility`, which may change in a future major release of Logstash. To avoid unexpected changes when upgrading Logstash, please explicitly declare your desired ECS Compatibility mode.
[WARN ] 2022-02-17 10:16:05.174 [LogStash::Runner] elasticsearch - Relying on default value of `pipeline.ecs_compatibility`, which may change in a future major release of Logstash. To avoid unexpected changes when upgrading Logstash, please explicitly declare your desired ECS Compatibility mode.
Configuration OK
[INFO ] 2022-02-17 10:16:05.195 [LogStash::Runner] runner - Using config.test_and_exit mode. Config Validation Result: OK. Exiting Logstash
I didn't see that I have any critical or syntax errors here. I only saw that it was ignoring pipelines.yml file, does it main problem? Or I have another problem that I couldn't see.
@Badger I used the command --config.debug --log.level debug as you said, and do I need to wait until this command finish process? And what is this command do? What is purpose of it?
When you run logstash with --config.debug --log.level debug it will print the actual value of path.settings that it is using, which I think may be different to the value you expect, meaning it is not loading the logstash.yml you are editing.
One of the debug messages will contain the value of path.settings that it is using. You need to see if that is set to the directory that contains logstash.yml
OK, let's go back to the beginning ... you were trying to change the log.level in logstash.yml, and you say you edited a file called that.
logstash is trying to read logstash.yml from /usr/share/logstash/config, which does not exist. On the command line you can set --path.settings to the directory in which you were editing your logstash.yml.
@Badger where can I set on the command line --path.settings to the directory in which you were editing your logstash.yml? Sorry, I didn't understand clearly what you mean.
You said you edited logstash.yml, if the path to that is /home/user/foo/logstash.yml then add --path.settings /home/user/foo to the command line. If it is /tmp/logstash.yml then add --path.settings /tmp
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.