Is there a way to specify a pattern to a specific file? For example I have a filter working for all byte_count files. I want to add more filters for other files. How would I do this to match the file and pattern combination properly?
This is my current filter:
filter {
grok {
match => { "message" => "%{NUMBER:ts}%{SPACE}%{NUMBER:ts_delta}%{SPACE}%{IP:orig_h}%{SPACE}%{INT:unique_hosts}%{SPACE}%{INT:flows}%{SPACE}%{INT:bytes}%{SPACE}%{INT:flow_avg}%{SPACE}%{INT:host_avg}" }
}
}
Assuming your input adds the file name to the event (for example, the file input adds a path field to the event) you could use a conditional to decide whether to apply the filter.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.