# How to setup Kafka output in Filebeat

**URL:** https://discuss.elastic.co/t/how-to-setup-kafka-output-in-filebeat/67154
**Category:** Beats
**Tags:** filebeat
**Created:** [November 25, 2016, 5:53am UTC](https://discuss.elastic.co/t/how-to-setup-kafka-output-in-filebeat/67154 "2016-11-25T05:53:42Z")
**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, 5:53am UTC](https://discuss.elastic.co/t/how-to-setup-kafka-output-in-filebeat/67154/1 "2016-11-25T05:53:42Z")

</div>

Hi,

I have the following Filebeat configuration;

```
output.kafka:
  enabled: true
  hosts: ["192.168.0.1:<PORT>"]
  topic: testtopic

```

What port should I provide 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 port should I mention in filebeat and where can I get that from?

Thanks.

---

<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: [November 28, 2016, 3:30pm UTC](https://discuss.elastic.co/t/how-to-setup-kafka-output-in-filebeat/67154/2 "2016-11-28T15:30:20Z")

</div>

In `hosts` setting you normally configure you bootstrapping brokers. These will provide the cluster meta-data used to find all brokers in the cluster. The kafka brokers normally use port 9092 (search for 'listeners' in server.propoerties).

---

<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 29, 2016, 5:14am UTC](https://discuss.elastic.co/t/how-to-setup-kafka-output-in-filebeat/67154/3 "2016-11-29T05:14:07Z")

</div>

Thank you so much @steffens People like you is the most important part of a discussion forum like this. There may be persons who already know solution, but hesitate to share their knowledge / answer questions, regardless of it's gravity, but the thing which is appreciable is your attitude, which made you respond to questions like these.

---

<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: [December 27, 2016, 5:14am UTC](https://discuss.elastic.co/t/how-to-setup-kafka-output-in-filebeat/67154/4 "2016-12-27T05:14:34Z")

</div>

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