I'm thinking the groups are not needed and also the asterisc in regex doesn't work like in linux.
Try this: ^filedata.*\.log$|^file_post.*\.log$ If it doesn't work, list the full names of the files that aren't ignored but should. You can use a tool like http://myregexp.com/ to test it. Regards, Gonzalo On 8 December 2015 at 15:18, Shashikant Kulkarni < [email protected]> wrote: > Hi All, > > As I understood from the documentation, I can specify the file pattern > which will be ignored by the flume agent. But when I tried it then I found > that I can specify only one file pattern which will be ignored. How can I > specify the value so that multiple files can be ignore by agent. For > example, > > I have a spool directory in which I have 3 different log files > log1.log > filedata.log > file_post_data.log > > Now I need to configure the agent source in such a way that it just reads > the file log1.log and ignore filedata.log and file_post_data.log. So how do > I specify this using > > agent1.sources.source1.ignorePattern= > > Please help me if I am missing on the correct regex for this. Is it a bug? > > I tried using the following pattern but it does not work > > Try 1 > > ^(filedata*\.log|file_post*\.log) > > Try 2 > ^(filedata*\.log)|^(file_post*\.log) > > In both the above approaches only the first file is ignored and not the > second one. Second one is processed by flume. I want both of these files to > be ignored by flume. > > Thanks. > Shashikant >
