架构:filebeat+kafka+elk
版本:5.4.1
问题:logstash-input-kafka(即logstash主动pull-kafka)报错
logstash-kfk.conf
报错信息
经验证kafka中topic存在
版本:5.4.1
问题:logstash-input-kafka(即logstash主动pull-kafka)报错
logstash-kfk.conf
input{
kafka{
bootstrap_servers => ["10.25.80.146:9092,10.25.80.129:9092"]
auto_offset_reset => "latest"
decorate_events => true
topics => ["citymain77"]
type => "cty77"
}
}
output {
if [type] == "citymain77" {
elasticsearch {
hosts => ["10.20.112.229:9200","10.20.112.231:9200"]
manage_template => false
index => "cty77-%{+YYYY.MM.dd}"
document_type => "log"
}
}
if [type] == "citymain231" {
elasticsearch {
hosts => ["10.20.112.229:9200","10.20.112.231:9200"]
manage_template => false
index => "cty231-%{+YYYY.MM.dd}"
document_type => "log"
}
}
}
报错信息
[2018-03-01T17:55:33,937][ERROR][logstash.inputs.kafka ] Invalid setting for kafka input plugin:
input {
kafka {
# This setting must be a string
# Expected string, got ["kfk-host1:9092", "kfka-host2:9092"]
bootstrap_servers => ["kfk-host1:9092", "kfk-host1:9092"]
...
}
}
[2018-03-01T17:55:33,958][ERROR][logstash.agent ] Cannot create pipeline {:reason=>"Something is wrong with your configuration."}
经验证kafka中topic存在
/bin/kafka-topics.sh --zookeeper zk-host:2181 --describe --topic tpc77
....
18/03/01 16:59:34 INFO zkclient.ZkClient: zookeeper state changed (SyncConnected)
Topic:citymain77 PartitionCount:1 ReplicationFactor:1 Configs:
Topic: tpc77 Partition: 0 Leader: 233 Replicas: 233 Isr: 233
18/03/01 16:59:34 INFO zkclient.ZkEventThread: Terminate ZkClient event thread.
18/03/01 16:59:34 INFO zookeeper.ZooKeeper: Session: 0x161daa6c9640d29 closed
18/03/01 16:59:34 INFO zookeeper.ClientCnxn: EventThread shut down for session: 0x161daa6c9640d29
1 个回复
lbx6z
赞同来自: