You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When installing Logstash through the package managers (like yum install logstash), running as a service and using file input plugin, Logstash may not able to discover the files. It is because Logstash doesn't have a permission to consume and delete permission to the target folder/path files. Sometimes it is an expected behaviour but for the most cases users expect Logstash to directly consume files once it is installed. We somehow need to document and educate them how to overcome.
To figure out if Logstash is discovering files, we can go to Logstash dir and run following command: sudo runuser -u logstash -- bin/ruby -e 'puts Dir.glob("/home/logstash/files/*")' (change the path). Or we need to enable the trace logs. Add following config in /etc/logstash/log4j2.properties
Once we restart Logstash, in the plain log (/var/log/logstash/logstash-plain.log) we can observe the file watch discovery lines that tell us discouvery count is zero.
Description
When installing Logstash through the package managers (like
yum install logstash
), running as a service and using file input plugin, Logstash may not able to discover the files. It is because Logstash doesn't have a permission to consume and delete permission to the target folder/path files. Sometimes it is an expected behaviour but for the most cases users expect Logstash to directly consume files once it is installed. We somehow need to document and educate them how to overcome.To figure out if Logstash is discovering files, we can go to Logstash dir and run following command:
sudo runuser -u logstash -- bin/ruby -e 'puts Dir.glob("/home/logstash/files/*")'
(change the path). Or we need to enable the trace logs. Add following config in/etc/logstash/log4j2.properties
Once we restart Logstash, in the plain log (
/var/log/logstash/logstash-plain.log
) we can observe the file watch discovery lines that tell us discouvery count is zero.Solution as it sounds, is to provide a permission. Eg.:
sudo chown a+rwx /home/logstash/files
, make sure to change the command for proper user.The text was updated successfully, but these errors were encountered: