# How to test filebeat can take log files and stdout to terminal?

**URL:** <https://discuss.elastic.co/t/how-to-test-filebeat-can-take-log-files-and-stdout-to-terminal/212047>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [December 16, 2019, 7:02pm UTC](https://discuss.elastic.co/t/how-to-test-filebeat-can-take-log-files-and-stdout-to-terminal/212047 "2019-12-16T19:02:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mehak\_Bhargava](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mehak_bhargava/32/54750_2.png) [@Mehak\_Bhargava](https://discuss.elastic.co/u/Mehak_Bhargava)\
**Post date:** [December 16, 2019, 7:02pm UTC](https://discuss.elastic.co/t/how-to-test-filebeat-can-take-log-files-and-stdout-to-terminal/212047/1 "2019-12-16T19:02:10Z")

</div>

This is my filebeat.yml and it is not harvesting the logs from the defined file path-

```auto
filebeat.inputs:
- type: log
  enabled: true
  paths:
     -/home/mehak/Documents/filebeat-7.4.0-linux-x86_64/logs/log2.log

  fields:
    type: other
  fields_under_root: true

output.logstash:
   hosts: ["localhost:5044"]
   index: "logstash-%{[beat.version]}-%{+yyyy.MM.dd}"

```

When I run in debug mode, I see this to confirm no file is harvested-

```auto
filebeat":{"harvester":{"open_files":0,"running":0}}

```

Please help!

---

<div class="post-metadata">

**Author:** ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)\
**Post date:** [December 17, 2019, 4:23pm UTC](https://discuss.elastic.co/t/how-to-test-filebeat-can-take-log-files-and-stdout-to-terminal/212047/2 "2019-12-17T16:23:22Z")

</div>

Hi @Mehak_Bhargava,

Can you try to quote the path with single quotes (`'`)?

Can you see a message about a started harvester in filebeat logs?

How are you starting filebeat? If it is started as docker you will need to mount a volume with the path from the host?

---

<div class="post-metadata">

**Author:** ![Mehak\_Bhargava](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mehak_bhargava/32/54750_2.png) [@Mehak\_Bhargava](https://discuss.elastic.co/u/Mehak_Bhargava)\
**Post date:** [December 17, 2019, 5:59pm UTC](https://discuss.elastic.co/t/how-to-test-filebeat-can-take-log-files-and-stdout-to-terminal/212047/3 "2019-12-17T17:59:14Z")

</div>

Hi, fixed the error. There needs to be a space between '-' and '/home'

> [@Mehak\_Bhargava](#):
>
> -/home

The harvester was starting and I was just running this command- `./filebeat -e -d "*"`

It is not started as docker, thanks!

---

<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:** [January 14, 2020, 5:59pm UTC](https://discuss.elastic.co/t/how-to-test-filebeat-can-take-log-files-and-stdout-to-terminal/212047/4 "2020-01-14T17:59:18Z")

</div>

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