EDIT: Trying to watch Magento report logs. Magento writes its crash report to a new file everytime an exception occurs.
According to Logstash oficial documentation: https://www.elastic.co/guide/en/logstash/current/plugins-inputs-file.html the option dicover_interval means "How often (in seconds) we expand the filename patterns in the path option to discover new files to watch."
The problem: I have a system that writes its logs on a new file every time a new exception occurs (The file name is the exception number). However, Logstash on startup, starts watching the existing files , but I cant get Logstash to read the new files.
My conf file:
input {
file {
type => "error-report-log"
path => "/srv/www/var/report"
#start_position => "beginning"
ignore_older => 30
close_older => 30
discover_interval => 5
codec => multiline {
pattern => "."
what => "previous"
}
}
}
As you can see, I've tried discover_interval with no luck. New files are not getting watched.
Am I missing something or Logstash simply does not support this kind of behavior ?
Thanks in advance.
I guess you're missing out the sincedb_path within your
file
. What if you have your input as such:Once you have it, logstash should pick up any new lines or new files which are being added.