Logstash doesn't ship with a file named logstash.conf. Are you conflating that file with logstash.yml (which should be found in /etc/logstash) or what makes you think logstash.conf should exist anywhere?
Fine now after going through the tutorials I was able to find it. But now I have given the encoder, inside the logback.xml. Only the debug and error logs are turned into JSON format, and other info, trace or not.
So you do have a conf.d, you just don't have anything in it. You need to
create a file in it that has an input, filter and output inside. Then try
running things
Unless you have configured Logstash to drop certain messages I find it hard to believe that some messages aren't being processed. What does your Logstash configuration look like? And have you tried creating a minimal example that reproduces the problem? Like a tiny file with just a few log entries and a stdout { codec => rubydebug } Logstash output that just dumps all events?
I have created a file named logstash.conf inside /etc/logstash/conf.d/logstash.conf. The configuration is as below. But when with the below command. Even though I have added the line path.settings: /etc/logstash/conf.d/ inside logstash.conf I still get the same issue.
**sawyer@ford11:/usr/share/logstash$ bin/logstash -f logstash.conf**
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
[ERROR] 2018-01-29 11:27:50.728 [Ruby-0-Thread-1:
/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/task.rb:22]
sourceloader - No configuration found in the configured sources.
input { stdin { } }
filter {
mutate {
strip => "message"
}
}
output {
stdout { }
}
You're running bin/logstash -f logstash.conf from /usr/share/logstash but logstash.conf is stored in /etc/logstash/conf.d so the file obviously won't be found.
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.