File pattern for prospect paths


(Srinivas Chamarthi) #1

Hi,

I want to use the following regex for a prospect path pattern "/logs///[a-zA-Z]+.log"

for any log files with application.log or error.log but not "application_12333.log" files.

but somehow I don't see any of the files are harvested with the given path.

can someone tell me whats the right regex for filebeat 5.0 ?

thx
srinivas


(Andrew Kroh) #2

The glob patterns are not full regular expressions. See docs for the Match. You could use the exclude_files option to ignore certain patterns.

So something like paths: ['/logs/*/*/*.log'] and exclude_files: ['_[\d]+\.log$'] should work.


(system) #3

This topic was automatically closed after 21 days. New replies are no longer allowed.