# Filebeat with kafka.output

**URL:** <https://discuss.elastic.co/t/filebeat-with-kafka-output/146483>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [August 29, 2018, 7:58am UTC](https://discuss.elastic.co/t/filebeat-with-kafka-output/146483 "2018-08-29T07:58:28Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steve1](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@Steve1](https://discuss.elastic.co/u/Steve1)\
**Post date:** [August 29, 2018, 7:58am UTC](https://discuss.elastic.co/t/filebeat-with-kafka-output/146483/1 "2018-08-29T07:58:28Z")

</div>

So i use filebeat 6.4.0 - Apache Kafka 2.11-2.0.0

---

<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 29, 2018, 11:27am UTC](https://discuss.elastic.co/t/filebeat-with-kafka-output/146483/2 "2018-08-29T11:27:54Z")

</div>

Have you had a look at filebeat logs and metrics?

Filebeat does not drop message that can be published. It retries from forever on error. But 'invalid' events (kafka imposes a size limit per event) must be dropped, so to not block filebeat. Trying to send Java logs to kafka is kind of a red flag here (java logs with stack traces tend to become very big).

Do you run your tests with a complete log file, or do you have an application just dumping logs? In the later case:

- do you have a flush timeout/signal on the appender?
- do you just write logs like crazy? If so, do you have log rotation enabled? Is there a chance a file becomes unavailable before filebeat can pick it up?

---

<div class="post-metadata">

**Author:** ![Steve1](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@Steve1](https://discuss.elastic.co/u/Steve1)\
**Post date:** [August 29, 2018, 1:16pm UTC](https://discuss.elastic.co/t/filebeat-with-kafka-output/146483/3 "2018-08-29T13:16:16Z")

</div>

Filebeat log

---

<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 29, 2018, 1:22pm UTC](https://discuss.elastic.co/t/filebeat-with-kafka-output/146483/4 "2018-08-29T13:22:46Z")

</div>

Check your kafka broker configs. In beats the default max message size is 1000000 bytes. Dropping these small messages looks like kafka is rejecting them.

---

<div class="post-metadata">

**Author:** ![Steve1](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@Steve1](https://discuss.elastic.co/u/Steve1)\
**Post date:** [August 29, 2018, 1:26pm UTC](https://discuss.elastic.co/t/filebeat-with-kafka-output/146483/5 "2018-08-29T13:26:20Z")

</div>

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:** [August 29, 2018, 5:31pm UTC](https://discuss.elastic.co/t/filebeat-with-kafka-output/146483/6 "2018-08-29T17:31:58Z")

</div>

Size depends on your logs. What's your current setting in the broker? Given the small sizes I'd say you have to update the broker settings.

---

<div class="post-metadata">

**Author:** ![Steve1](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@Steve1](https://discuss.elastic.co/u/Steve1)\
**Post date:** [August 30, 2018, 1:47pm UTC](https://discuss.elastic.co/t/filebeat-with-kafka-output/146483/7 "2018-08-30T13:47:36Z")

</div>

swes

---

<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:** [September 27, 2018, 1:47pm UTC](https://discuss.elastic.co/t/filebeat-with-kafka-output/146483/8 "2018-09-27T13:47:36Z")

</div>

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