Filebeat docker

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

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:

enabled: true
path: /usr/share/filebeat/fb-configs/*.yml
required_acks: 1
sasl.enabled.mechanisms: PLAIN
compression: none
pretty: false
hosts: [""]

  • 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!!!

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.

  enabled: true

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

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