# Filebeat reports config is invalid but it all passes YAML Linting (with solution)

**URL:** <https://discuss.elastic.co/t/filebeat-reports-config-is-invalid-but-it-all-passes-yaml-linting-with-solution/204071>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [October 17, 2019, 1:57pm UTC](https://discuss.elastic.co/t/filebeat-reports-config-is-invalid-but-it-all-passes-yaml-linting-with-solution/204071 "2019-10-17T13:57:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dnorth98](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dnorth98/32/54823_2.png) [@dnorth98](https://discuss.elastic.co/u/dnorth98)\
**Post date:** [October 17, 2019, 1:57pm UTC](https://discuss.elastic.co/t/filebeat-reports-config-is-invalid-but-it-all-passes-yaml-linting-with-solution/204071/1 "2019-10-17T13:57:52Z")

</div>

I've just spent the last 30 minutes figuring this out and finally found the problem and figure it may help someone else so posting here.

Starting filebeat, it starts ok but then exits right away. In the log the last line is

`Exiting: 2 errors: invalid config: yaml: line 5: did not find expected '-' indicator; invalid config: yaml: line 5: did not find expected '-' indicator`

Clearly a YAML error in the config file right? Well I triple checked it, ran it though a YAML linter, ran `filebeat test config -c filebeat.yml` and it all passed. So what gives?

Turns out there was a YAML error...but it was in the yaml for one of the modules! Scrolling back up in the log file, the error was more clearly IDed and looking in the module file, it was an obvious YAML indentation problem.

So, lesson learned - check ALL of the config files! It's too bad that `filebeat test config -c filebeat.yml` doesn't suck in the configured modules as well and test them or I suspect it would have caught this.

Hope this helps someone else!

---

<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:** [November 14, 2019, 1:58pm UTC](https://discuss.elastic.co/t/filebeat-reports-config-is-invalid-but-it-all-passes-yaml-linting-with-solution/204071/2 "2019-11-14T13:58:35Z")

</div>

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