Exclude property in File input plugin


(Pravin Kumar) #1

I have a directory with multiple log file [*.log], among which i need to exclude few logs that starts with CBATest.log,BPLTest.log and ARCTest.log. Below provided is the configuration used. But these files are not excluded while processing.

Kindly help resolve this.

file {
path => "E:/domain/DEV/application/logs/.log"
exclude => [ "E:/domain/DEV/application/logs/CBA
.log", "E:/domain/DEV/application/logs/BPL*.log" , "E:/domain/DEV/application/logs/ARC*.log" ]
type => "esbbwlog"
codec => multiline {
patterns_dir => "/patterns/devbw"
pattern => "^%{BWTIME}"
negate => true
what => "previous"
max_lines => "1000"
}


(Fabien Baligand) #2

Extract from file input doc, concerning "exclude" option :

Exclusions (matched against the filename, not full path).

So the right exclude option should be :
exclude => [ "CBA*.log", "BPL*.log" , "ARC*.log" ]


(Pravin Kumar) #3

Thanks Fabien

Its Working now.


(Fabien Baligand) #4

You're welcome :slight_smile:

Can you mark my previous comment as solution ?


(system) #5

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.