Filebeat json file transfer

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:

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

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

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?

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