Filebeat is unable to read from the source directory and write to destination file

(Deepak Mudigonda) #1

I am new to Filebeat. I am trying to read a file using filebeat and save the read content to a new file in my local system.

I have pulled the docker image from the elastic docker repository and have mounted filebeat.yml file which I've created while running the container as below:
docker run -v /home/filebeat-poc/filebeat.yml:/usr/share/filebeat/filebeat.yml

After the container is started with the filebeat config file which I've specified, Filebeat is not reading the content from the source file and print/save to the destination file which i have specified in the filebeat config file.

Below is my filebeat.yml file:


  • type: log
    • /home/filesource/*.log
      path: "/tmp/filebeat"
      filename: filebeat
      rotate_every_kb: 1000
      number_of_files: 7

I am not able to figure out what am I doing wrong.

(Deepak Mudigonda) #3

After I've mounted the source and destination directories of the files along with docker run command, it worked. Now, Filebeat is successfully able to read from the file and write it to a file.

(system) closed #4

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