Following files in rotating directories


#1

Hello,

I need to follow rotating logs, but the rotation is done on directory level.

For example I need to follow file c:\logs\2015-05-11\mylog.txt which next day will be c:\logs\2015-05-12\mylog.txt and so on.

Is it possible to achieve this? I can only find examples/configurations for regular file rotations for the file input module (i.e in place in the same directory).

Thank you.


(Mark Walkom) #2

You can do multi-level globbing, eg;

input {
  file {
    path => [ "c:\logs\*\mylog.txt" ]
  }
}

#3

Excellent, thank you!


(system) #4