# Filebeat docker

**URL:** <https://discuss.elastic.co/t/filebeat-docker/188592>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [July 3, 2019, 1:15am UTC](https://discuss.elastic.co/t/filebeat-docker/188592 "2019-07-03T01:15:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harsha606](https://avatars.discourse-cdn.com/v4/letter/h/6a8cbe/32.png) [@Harsha606](https://discuss.elastic.co/u/Harsha606)\
**Post date:** [July 3, 2019, 1:15am UTC](https://discuss.elastic.co/t/filebeat-docker/188592/1 "2019-07-03T01:15:45Z")

</div>

Hi All, I am using official filebeat image, below is my dockerfile.

FROM [docker.elastic.co/beats/filebeat:7.1.1](http://docker.elastic.co/beats/filebeat:7.1.1)  
COPY filebeat.yml /usr/share/filebeat/filebeat.yml  
USER root  
RUN mkdir /usr/share/filebeat/fb-configs  
COPY configs /usr/share/filebeat/fb-configs  
RUN chown -R root:filebeat /usr/share/filebeat/fb-configs  
RUN chown root:filebeat /usr/share/filebeat/filebeat.yml

below is my filebeat.yml file:

filebeat.config.inputs:  
enabled: true  
path: /usr/share/filebeat/fb-configs/\*.yml  
output.kafka:  
required\_acks: 1  
sasl.enabled.mechanisms: PLAIN  
compression: none  
codec.json:  
pretty: false  
hosts: ["broker.kafka-elk.l4lb.thisdcos.directory:9092"]  
topics:

- topic: '%{[fields.env]}-%{[fields.log\_type]}'

my filebeat container starts and start parsing the logs but it doesn't send any **output to kafka**

can anyone help me out here, thanks in advance!!!

---

<div class="post-metadata">

**Author:** ![faec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/faec/32/46988_2.png) [@faec](https://discuss.elastic.co/u/faec)\
**Post date:** [July 5, 2019, 8:12pm UTC](https://discuss.elastic.co/t/filebeat-docker/188592/2 "2019-07-05T20:12:19Z")

</div>

The first thing I'd try is to use `topic` at the top-level rather than `topics` -- the latter is for an array of topics you want to use under different circumstances, and in this case it looks like you have only one. Using `topics` also expects a setting for `when` to decide between the different possibilities, which you don't have here and which might be causing problems.

If that doesn't work, could you share your configuration again surrounded by ```, e.g.

````auto
```
filebeat.config.inputs:
  enabled: true
  ...
```

````

this will preserve the indentation, since many configuration errors are caused by trying to set fields at the wrong indentation level.

---

<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:** [August 2, 2019, 8:12pm UTC](https://discuss.elastic.co/t/filebeat-docker/188592/3 "2019-08-02T20:12:22Z")

</div>

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