# Logstash output to kafka does not working?

**URL:** <https://discuss.elastic.co/t/logstash-output-to-kafka-does-not-working/88176>\
**Category:** Logstash\
**Created:** [June 4, 2017, 8:24am UTC](https://discuss.elastic.co/t/logstash-output-to-kafka-does-not-working/88176 "2017-06-04T08:24:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhaochl](https://avatars.discourse-cdn.com/v4/letter/z/7ba0ec/32.png) [@zhaochl](https://discuss.elastic.co/u/zhaochl)\
**Post date:** [June 4, 2017, 8:24am UTC](https://discuss.elastic.co/t/logstash-output-to-kafka-does-not-working/88176/1 "2017-06-04T08:24:18Z")

</div>

as question is, who can give me a example,  
my config as follows:

input {  
#stdin { }  
kafka {  
bootstrap\_servers =\> "bi1:9092,bi2:9092,bi3:9092"  
topics =\> "test"  
reset\_beginning=\>true  
}  
}

output {  
stdout { codec =\> rubydebug }  
}

thanks

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 4, 2017, 8:37am UTC](https://discuss.elastic.co/t/logstash-output-to-kafka-does-not-working/88176/2 "2017-06-04T08:37:17Z")

</div>

What you are showing is an input from Kafka, not an output, which is what the title of the thread mentions. Please provide some more details around what you are trying to do, what you have tried so far and exactly what is not working, as this will make it easier for the community to assist.

---

<div class="post-metadata">

**Author:** ![zhaochl](https://avatars.discourse-cdn.com/v4/letter/z/7ba0ec/32.png) [@zhaochl](https://discuss.elastic.co/u/zhaochl)\
**Post date:** [June 4, 2017, 8:41am UTC](https://discuss.elastic.co/t/logstash-output-to-kafka-does-not-working/88176/3 "2017-06-04T08:41:42Z")

</div>

sorry,maybe I did not describe my broblem clearly

I want to fetch data from kafka to show in conose or to es,

I version 1.4  
get data from kafka is useful by ,in version 5.3.1 ,it does not work

1.4 config  
input {  
kafka {  
zk\_connect =\> "bi-kf1:2181,bi-kf2:2181,bi-kf3:2181"  
topic\_id =\> "appuplogs"  
}  
}

5.3 config

input {  
#stdin { }  
kafka {  
bootstrap\_servers =\> "bi1:9092,bi2:9092,bi3:9092"  
topics =\> "test"  
reset\_beginning=\>true

```
}

```

}

thank you very much

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 4, 2017, 8:46am UTC](https://discuss.elastic.co/t/logstash-output-to-kafka-does-not-working/88176/4 "2017-06-04T08:46:26Z")

</div>

Please format you config as it will make it a lot easier to read. What version of Kafka are you using?

---

<div class="post-metadata">

**Author:** ![zhaochl](https://avatars.discourse-cdn.com/v4/letter/z/7ba0ec/32.png) [@zhaochl](https://discuss.elastic.co/u/zhaochl)\
**Post date:** [June 4, 2017, 8:54am UTC](https://discuss.elastic.co/t/logstash-output-to-kafka-does-not-working/88176/5 "2017-06-04T08:54:15Z")

</div>

sorry ,I format the configration,  
My kafka version is 2.1.1-1.2.1.1.p0.18

thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 2, 2017, 8:55am UTC](https://discuss.elastic.co/t/logstash-output-to-kafka-does-not-working/88176/6 "2017-07-02T08:55:12Z")

</div>

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