- Can logstash read from 2 different kafka which has same topic&tag name?
- 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}
}
}