I want my logstash to read the following pattern of files from the logs directory
Current Date File -> server.log
Historical File Name -> server.log.yyyy-mm-dd
In my system I have 22 files in my logs folder
server.log
server.log.2016-09-22
server.log.2016-09-21
server.log.2016-09-20
server.log.2016-09-19
server.log.2016-09-18
server.log.2016-09-17
and so on in this way everyday files are renamed with date appended to name and current date file is named as server.log
my conf file is as follows
input {
file {
type => "serverlog"
path => ["E:/Code_Athon/test/test1/server.log"]
start_position => "beginning"}
}
I found the above configuration does not work for me and is reading only server.log file. No past files
I also tried the below configurations
input {
file {
type => "serverlog"
path => ["E:/test/test1/server.log","E:/test/test1/server.log*"]
start_position => "beginning"}
}
In the above configuration i observed that logstash picked up server.log and server.log.2016-09-21 and it does not go to other
files in past , may be because of performance issues or worker thread , but I did not get any error on console.
input {
file {
type => "serverlog"
path => ["E:/test/test1/server.log","E:/test/test1/server.log*"]
path => ["E:/test/test1/server.log.--*"]
start_position => "beginning"}
}
Even this configuration does not solve my issue.
Can anyone suggest what should be my configuration so that my lohgstash can read the current file , past file and daily rollover file
named as server.log
Am i missing any configurations here ?