# How to setup Kafka input in Logstash

**URL:** https://discuss.elastic.co/t/how-to-setup-kafka-input-in-logstash/67155
**Category:** Logstash
**Created:** [November 25, 2016, 6:14am UTC](https://discuss.elastic.co/t/how-to-setup-kafka-input-in-logstash/67155 "2016-11-25T06:14:38Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![elasticheart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elasticheart/32/65189_2.png) [@elasticheart](https://discuss.elastic.co/u/elasticheart)
#### Post date: [November 25, 2016, 6:14am UTC](https://discuss.elastic.co/t/how-to-setup-kafka-input-in-logstash/67155/1 "2016-11-25T06:14:38Z")

</div>

Hi,

I want to read from Kafka and I have the following configuration;

```
kafka{
	group_id => "test-consumer-group"
	topics => ["testtopic"]
	bootstrap_servers => "192.168.0.1:<port>"
	codec => json
}

```

What port should I mention here? I am entirely new to Kafka. I have Kafka installed and I have the following config files under config folder;

- connect-console-sink.properties
- connect-console-source.properties
- connect-distributed.properties
- connect-file-sink.properties
- connect-file-source.properties
- connect-log4j.properties
- connect-standalone.properties
- consumer.properties
- log4j.properties
- producer.properties
- server.properties
- tools-log4j.properties
- zookeeper.properties

I have seen `clientPort=2181` in **zookeeper.properties** and `bootstrap.servers=192.168.0.1:9092` in **producer.properties**. So, what IP port should I mention here and where can I get that from? is that Zookeeper IP and PORT or Kafka IP and PORT?

Thanks.

---

<div class="post-metadata">

### Author: ![elasticheart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elasticheart/32/65189_2.png) [@elasticheart](https://discuss.elastic.co/u/elasticheart)
#### Post date: [December 14, 2016, 10:51am UTC](https://discuss.elastic.co/t/how-to-setup-kafka-input-in-logstash/67155/2 "2016-12-14T10:51:01Z")

</div>

Hi @steffens , it would be helpful if you try answering this question?

---

<div class="post-metadata">

### Author: ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)
#### Post date: [December 14, 2016, 12:59pm UTC](https://discuss.elastic.co/t/how-to-setup-kafka-input-in-logstash/67155/3 "2016-12-14T12:59:13Z")

</div>

According to [docs](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-kafka.html#plugins-inputs-kafka-bootstrap_servers),the bootstrap servers should be configured to 9092 (default kafka listener).

---

<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: [January 11, 2017, 12:59pm UTC](https://discuss.elastic.co/t/how-to-setup-kafka-input-in-logstash/67155/4 "2017-01-11T12:59:22Z")

</div>

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