# Filebeat send data to kafka

**URL:** <https://discuss.elastic.co/t/filebeat-send-data-to-kafka/46620>\
**Category:** Beats\
**Created:** [April 7, 2016, 3:35am UTC](https://discuss.elastic.co/t/filebeat-send-data-to-kafka/46620 "2016-04-07T03:35:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhanght1](https://avatars.discourse-cdn.com/v4/letter/z/958977/32.png) [@zhanght1](https://discuss.elastic.co/u/zhanght1)\
**Post date:** [April 7, 2016, 3:35am UTC](https://discuss.elastic.co/t/filebeat-send-data-to-kafka/46620/1 "2016-04-07T03:35:52Z")

</div>

After installed the filebeat filebeat-5.0.0-alpha1 with filebeat.yml.

```auto
filebeat:
  prospectors:
    -
      paths:
        - /var/log/test.log
      input_type: log
output:
  kafka:
    hosts: ["10.120.31.78:9092"]
    topic: "elk"
    use_type: true
    client_id: "beats"
    worker: 1
    max_retries: 0
  console:
    pretty: true
shipper:
logging:
  files:
    rotateeverybytes: 10485760 # = 1MB

```

Run the ./filebeat -v -c filebeat.yml successfully.

```auto
{
  "@timestamp": "2016-04-07T03:24:55.575Z",
  "beat": {
    "hostname": "peklnelh01",
    "name": "peklnelh01"
  },
  "input_type": "log",
  "message": "9999999",
  "offset": 23,
  "source": "/var/log/test.log",
  "type": "log"
}

```

But I can not see any data in kafka with `./kafka-console-consumer.sh --zookeeper localhost:2181 --topic elk --from-beginning`.  
BR

---

<div class="post-metadata">

**Author:** ![Jaren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaren/32/9986_2.png) [@Jaren](https://discuss.elastic.co/u/Jaren)\
**Post date:** [August 12, 2016, 4:55am UTC](https://discuss.elastic.co/t/filebeat-send-data-to-kafka/46620/2 "2016-08-12T04:55:46Z")

</div>

What does your filbeat log says?

---

<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:** [August 12, 2016, 1:56pm UTC](https://discuss.elastic.co/t/filebeat-send-data-to-kafka/46620/3 "2016-08-12T13:56:02Z")

</div>

you did set `use_type: true`, plus you have configued topic. Newer filebeat alpha versions will complain about this being an invalid config, as 2 options to set the kafka topic are configured. Disable `use_type` option and events should be send to `elk` topic.

---

<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 5, 2017, 9:50pm UTC](https://discuss.elastic.co/t/filebeat-send-data-to-kafka/46620/4 "2017-07-05T21:50:46Z")

</div>


