Logstash Read and Write from 2 Different Kafka

  1. Can logstash read from 2 different kafka which has same topic&tag name?
  2. Can logstash write these 2 kafka logs to same Elasticsearch?

Example:

input {

kafka {
codec => “json”
bootstrap_servers => “172.16.1.15:9092”
topics => [“APP1_logs”]
tags => [“app1logs”]
}

kafka {
codec => “json”
bootstrap_servers => “172.16.1.25:9092”
topics => [“APP1_logs”]
tags => [“app1logs”]
}

}

output {

if “app1logs” in [tags] {
elasticsearch {
hosts => [“localhost:9200”]
index => “app1logs”
}
stdout {codec => rubydebug}
}

}

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