# Filebeat json file transfer

**URL:** <https://discuss.elastic.co/t/filebeat-json-file-transfer/235574>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [June 3, 2020, 2:18pm UTC](https://discuss.elastic.co/t/filebeat-json-file-transfer/235574 "2020-06-03T14:18:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jshi](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@jshi](https://discuss.elastic.co/u/jshi)\
**Post date:** [June 3, 2020, 2:18pm UTC](https://discuss.elastic.co/t/filebeat-json-file-transfer/235574/1 "2020-06-03T14:18:28Z")

</div>

Hi,  
I'm wondering if I have filebeat configured correctly to ship a json file from a local directory to elasticsearch.  
I'm running filebeat and the elastic stack on a ubuntu AWS VM server and the local json file is stored at /testfile/testfile.json  
My filebeat.yml configuration is:

```auto
filebeat.inputs:
        -type: log
        paths:
                - /testfile/testfile.json
        json.keys_under_root: false
        json.add_error_key: true
...
output.elasticsearch:
        hosts: ["localhost:9200"]

```

---

<div class="post-metadata">

**Author:** ![kvch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kvch/32/72058_2.png) [@kvch](https://discuss.elastic.co/u/kvch)\
**Post date:** [June 3, 2020, 4:07pm UTC](https://discuss.elastic.co/t/filebeat-json-file-transfer/235574/2 "2020-06-03T16:07:54Z")

</div>

The whitespaces seem off to me. This should be the correct indentation:

```auto
filebeat.inputs:
- type: log
  paths:
  - /testfile/testfile.json
  json.keys_under_root: false
  json.add_error_key: true

output.elasticsearch:
  hosts: ["localhost:9200"]

```

Why are you asking? What issues are you seeing?

---

<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:** [July 1, 2020, 6:07pm UTC](https://discuss.elastic.co/t/filebeat-json-file-transfer/235574/3 "2020-07-01T18:07:55Z")

</div>

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