Run multiple instance of logstash

Easiest way is to add a distinct tag for each input using the tags parameter and then use conditionals to ensure that the correct filters and outputs are applied. Something like this:

input {
  jdbc {

    ...
    
    tags =>["jdbc1"]
  }
}

filter {
  if "jdbc1" in [tags] {

    ...
  
  }
}

output {
  if "jdbc1" in [tags] {
    elasticsearch {
  
      ...
  
    }
  }
}
1 Like