# Exiting: 1 error: error loading config file: invalid config: yaml: line 13: did not find expected key

**URL:** <https://discuss.elastic.co/t/exiting-1-error-error-loading-config-file-invalid-config-yaml-line-13-did-not-find-expected-key/294162>\
**Category:** Beats\
**Tags:** beats-module, filebeat\
**Created:** [January 12, 2022, 12:34pm UTC](https://discuss.elastic.co/t/exiting-1-error-error-loading-config-file-invalid-config-yaml-line-13-did-not-find-expected-key/294162 "2022-01-12T12:34:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![awis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/awis/32/100207_2.png) [@awis](https://discuss.elastic.co/u/awis)\
**Post date:** [January 12, 2022, 12:34pm UTC](https://discuss.elastic.co/t/exiting-1-error-error-loading-config-file-invalid-config-yaml-line-13-did-not-find-expected-key/294162/1 "2022-01-12T12:34:18Z")

</div>

Hi there,

I'm trying to connect Filebeat Snort module with my Elasticsearch and when i run command `.\filebeat.exe setup -e` on Windows 10 Pro VM, I got this error.

This is my configuration for filebeat.yml

```auto

filebeat.inputs:
- type: log
  enabled: true
  paths:
    - 'C:\Snort\log\'

filebeat.config.modules:
  path: ${path.config}/modules.d/*.yml
  reload.enabled: false

#setup.template.settings:
  #index.number_of_shards: 1

setup.kibana:
  host: "MY KIBANA:5601"
 
output.elasticsearch:
  hosts: ["MY ELASTIC:9200"]
  username: "USERNAME"
  password: "PASSWORD"

processors:
  - add_host_metadata:
      when.not.contains.tags: forwarded
  - add_cloud_metadata: ~
  - add_docker_metadata: ~
  - add_kubernetes_metadata: ~

```

Thank you.

---

<div class="post-metadata">

**Author:** ![ChrsMark](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chrsmark/32/55858_2.png) [@ChrsMark](https://discuss.elastic.co/u/ChrsMark)\
**Post date:** [January 12, 2022, 1:01pm UTC](https://discuss.elastic.co/t/exiting-1-error-error-loading-config-file-invalid-config-yaml-line-13-did-not-find-expected-key/294162/2 "2022-01-12T13:01:47Z")

</div>

Hi!

From the error message it seems that something is wrong with the indentation in your config file.

C.

---

<div class="post-metadata">

**Author:** ![awis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/awis/32/100207_2.png) [@awis](https://discuss.elastic.co/u/awis)\
**Post date:** [January 12, 2022, 6:28pm UTC](https://discuss.elastic.co/t/exiting-1-error-error-loading-config-file-invalid-config-yaml-line-13-did-not-find-expected-key/294162/3 "2022-01-12T18:28:40Z")

</div>

Thank you for replying, I run command `.\filebeat.exe test config -e` and it shows that the Config is okay. I also try to use [yamllint.com](http://yamllint.com) to check and there is nothing wrong. I really stuck right now.

---

<div class="post-metadata">

**Author:** ![FALEN](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/falen/32/82754_2.png) [@FALEN](https://discuss.elastic.co/u/FALEN)\
**Post date:** [January 12, 2022, 6:56pm UTC](https://discuss.elastic.co/t/exiting-1-error-error-loading-config-file-invalid-config-yaml-line-13-did-not-find-expected-key/294162/4 "2022-01-12T18:56:30Z")

</div>

Had similiar problem before, to avoid config errors im always using below format examples in such cases

instead of ;

```auto
output.elasticsearch:
  hosts: ["MY ELASTIC:9200"]
  username: "USERNAME"
  password: "PASSWORD"

```

use this;

```auto
output.elasticsearch.hosts: ["MY ELASTIC:9200"]
output.elasticsearch.username: "USERNAME"
output.elasticsearch.password: "PASSWORD"

```

and edit all your config according to this format

---

<div class="post-metadata">

**Author:** ![awis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/awis/32/100207_2.png) [@awis](https://discuss.elastic.co/u/awis)\
**Post date:** [January 13, 2022, 1:18pm UTC](https://discuss.elastic.co/t/exiting-1-error-error-loading-config-file-invalid-config-yaml-line-13-did-not-find-expected-key/294162/5 "2022-01-13T13:18:03Z")

</div>

Thank you for your recommendation, tried this but the problem still remains. Wish this could solve it.

---

<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:** [February 10, 2022, 3:18pm UTC](https://discuss.elastic.co/t/exiting-1-error-error-loading-config-file-invalid-config-yaml-line-13-did-not-find-expected-key/294162/6 "2022-02-10T15:18:24Z")

</div>

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