[kafka_spout:7-MultipleThreadSpoutExecutors] WARN o.a.kafka.common.utils.AppInfoParser - Error registering AppInfo mbean
javax.management.InstanceAlreadyExistsException: kafka.consumer:type=app-info
阅读源码不难发现
问题出在配置每个kafka时需要指定唯一的client_id,有一篇里面讲到了,这里就不重复写了,http://www.mamicode.com/info-detail-1889211.html
贴个简单配置:
input {
kafka {
type => "system"
bootstrap_servers => "Kafka-01:19092,Kafka-02:19092,Kafka-03:19092"
group_id => "log_admin"
client_id => "log_system"
topics => ["system_log"]
auto_offset_reset = "earliest"
consumer_threads => 3
decorate_events => true
codec => 'json'
}
kafka {
type => "business"
bootstrap_servers => "Kafka-01:19092,Kafka-02:19092,Kafka-03:19092"
group_id => "log_admin"
client_id => "log_business"
topics => ["business_log"]
auto_offset_reset = "earliest"
consumer_threads => 3
decorate_events => true
codec => 'json'
}
}
output {
if[type] == "system" {
elasticsearch {
hosts => ["ES-01:9200", "ES-02:9200", "ES-03:9200"]
index => "system_log_managenment-%{+YYYY.MM.dd}"
}
} else if [type] == "business" {
elasticsearch {
hosts => ["ES-01:9200", "ES-02:9200", "ES-03:9200"]
index => "business_log_managenment-%{+YYYY.MM.dd}"
}
}
stdout {
codec => rubydebug
}
}