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

**URL:** <https://discuss.elastic.co/t/filebeat-is-unable-to-read-from-the-source-directory-and-write-to-destination-file/158673>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [November 29, 2018, 2:14am UTC](https://discuss.elastic.co/t/filebeat-is-unable-to-read-from-the-source-directory-and-write-to-destination-file/158673 "2018-11-29T02:14:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mudigonda05](https://avatars.discourse-cdn.com/v4/letter/m/e9a140/32.png) [@mudigonda05](https://discuss.elastic.co/u/mudigonda05)\
**Post date:** [November 29, 2018, 2:14am UTC](https://discuss.elastic.co/t/filebeat-is-unable-to-read-from-the-source-directory-and-write-to-destination-file/158673/1 "2018-11-29T02:14:35Z")

</div>

Hi,  
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 [docker.elastic.co/beats/filebeat:6.5.1](http://docker.elastic.co/beats/filebeat:6.5.1)

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:

filebeat.inputs:

- type: log  
paths:
  - /home/filesource/\*.log  
output:  
file:  
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.

---

<div class="post-metadata">

**Author:** ![mudigonda05](https://avatars.discourse-cdn.com/v4/letter/m/e9a140/32.png) [@mudigonda05](https://discuss.elastic.co/u/mudigonda05)\
**Post date:** [November 29, 2018, 4:17am UTC](https://discuss.elastic.co/t/filebeat-is-unable-to-read-from-the-source-directory-and-write-to-destination-file/158673/3 "2018-11-29T04:17:50Z")

</div>

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.

---

<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:** [December 27, 2018, 4:27am UTC](https://discuss.elastic.co/t/filebeat-is-unable-to-read-from-the-source-directory-and-write-to-destination-file/158673/4 "2018-12-27T04:27:11Z")

</div>

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