one directory with two types of files that i want to proccess with one pipeline each. File types are identified by his name. I am very new to pipeline logstash, i usually go with a single logstash configuration but things are getting complex and i would like to use different pipelines for each type of file to separate logic and a better maintenance
If logstash recieves type1 files apply pipeline-for-type1-files and if recieves type2 apply pipeline-for-type2-files. Could you give some sample code of how to handle this?
Thank you so much badger. Just to simplify a little and while i learn how distributor pattern works, should this simple configuration could work?.
If i understand well how pipeline config files work, if i filter by tag with and if statement in each pipeline config should filter and apply this pipeline only in the events from the file tagged as "type1". Am i correct Badger?
type1-pipeline.config
input {
beats {
port => "5044"
}
}
filter {
if [tags] == "type1" {
}
}
type2-pipeline.config
input {
beats {
port => "5044"
}
}
filter {
if [tags] == "type2" {
}
}
Having another pipeline for events that are neither type1 nor type2 is not mandatory, you could just make 'pipeline { send_to => type2 }' the 'else' option.
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.