kafka.conf:
input{
input{
kafka{
bootstrap_servers =>["10.121.69.2:9092","數組,可以寫多個"]
group_id => "test_consumer_grup"
auto_offset_reset => "latest"
consumer_threads => 5
decorate_events => true
topics => ["kafka_logstash","數組,可以寫多個"]
type => "zhang"
}
}
output {
elasticsearch {
hosts => ["10.121.69.1:9200","數組,可以寫多個"]
index => "logstash-%{[可以是字段裏面的名字]}-%{+YYYY.MM.dd}"
}
}
}