I have the Dockerfile for filebeat as below:
FROM docker.elastic.co/beats/filebeat:7.4.2
COPY filebeat.yml /usr/share/filebeat/filebeat.yml
USER root
RUN chown root:filebeat /usr/share/filebeat/filebeat.yml
USER filebeat
And I build the image like docker build -t filebeat-docker .
run the image like docker run -it --name filebeat-docker-test filebeat-docker
And I got below error:
And my filebeat.yml is as below:
filebeat.inputs:
- type: log
enabled: true
# Paths that should be crawled and fetched. Glob based paths.
paths:
- /Users/lachen/Documents/n-log/nifi*.log
tail_files: true
#----------------------------- Kafka output --------------------------------
output.kafka:
# codec.format:
# string: '%{[message]}'
hosts: ["localhost:9092"]
topic: pam-server-test
partition.round_robin:
reachable_only: false
required_acks: 1
compression: gzip
max_message_bytes: 1000000