# Filebeat autodiscovery: appenders

**URL:** <https://discuss.elastic.co/t/filebeat-autodiscovery-appenders/126009>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [March 29, 2018, 2:49am UTC](https://discuss.elastic.co/t/filebeat-autodiscovery-appenders/126009 "2018-03-29T02:49:39Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![pytimer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pytimer/32/29331_2.png) [@pytimer](https://discuss.elastic.co/u/pytimer)\
**Post date:** [March 29, 2018, 2:49am UTC](https://discuss.elastic.co/t/filebeat-autodiscovery-appenders/126009/1 "2018-03-29T02:49:39Z")

</div>

Hi,  
I would like to set up Filebeat configuration with kubernetes autodiscovery provider to collect all namespaces pods logs. I use templates work well , but when i use appenders, filebeat run is wrong.

i also use filebeat docs, [https://www.elastic.co/guide/en/beats/filebeat/6.x/configuration-autodiscover.html#\_appenders](https://www.elastic.co/guide/en/beats/filebeat/6.x/configuration-autodiscover.html#_appenders) , but also wrong.

wrong logs : `Exiting: error loading config file: yaml: line 7: mapping values are not allowed in this context`

Filebeat version is master branch

filebeat.yml:

```auto
filebeat.autodiscover:
  providers:
    - type: kubernetes
      builders:
        - type: hints
      appenders:
        - type: config
            - condition.not.equals:
                kubernetes.namespace: ""
              config:
                fields:
                  kubernetes_cluster: beatcloud

```

Could anyone help me out with the correct appenders format? Thanks

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [March 29, 2018, 12:31pm UTC](https://discuss.elastic.co/t/filebeat-autodiscovery-appenders/126009/2 "2018-03-29T12:31:22Z")

</div>

Have you checked indentation and use of tabs (don't use tabs). Your sample config is no valid YAML. The error message is about your document being invalid and can not even be read.

Linters like [http://www.yamllint.com](http://www.yamllint.com) can be helpful to identify YAML errors.

---

<div class="post-metadata">

**Author:** ![pytimer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pytimer/32/29331_2.png) [@pytimer](https://discuss.elastic.co/u/pytimer)\
**Post date:** [March 30, 2018, 1:55am UTC](https://discuss.elastic.co/t/filebeat-autodiscovery-appenders/126009/3 "2018-03-30T01:55:06Z")

</div>

Thanks for your reply.

The sample config is no valid YAML. However it's official docs sample config, so i want Whether the official sample config is wrong?

I don't know the correct appenders format, can you help me?

---

<div class="post-metadata">

**Author:** ![pierhugues](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pierhugues/32/48383_2.png) [@pierhugues](https://discuss.elastic.co/u/pierhugues)\
**Post date:** [March 30, 2018, 1:16pm UTC](https://discuss.elastic.co/t/filebeat-autodiscovery-appenders/126009/4 "2018-03-30T13:16:26Z")

</div>

I think you are right there is a typo in the configuration concerning the `appenders` but this feature just got merged [18 days ago](https://github.com/elastic/beats/pull/6469), are you using a snapshot build of 6.x?

---

<div class="post-metadata">

**Author:** ![pierhugues](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pierhugues/32/48383_2.png) [@pierhugues](https://discuss.elastic.co/u/pierhugues)\
**Post date:** [March 30, 2018, 1:34pm UTC](https://discuss.elastic.co/t/filebeat-autodiscovery-appenders/126009/5 "2018-03-30T13:34:23Z")

</div>

Created [https://github.com/elastic/beats/pull/6720](https://github.com/elastic/beats/pull/6720) to fix the yaml in the example documentation

---

<div class="post-metadata">

**Author:** ![pytimer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pytimer/32/29331_2.png) [@pytimer](https://discuss.elastic.co/u/pytimer)\
**Post date:** [March 31, 2018, 5:32am UTC](https://discuss.elastic.co/t/filebeat-autodiscovery-appenders/126009/6 "2018-03-31T05:32:32Z")

</div>

no ,i use the newest master branch to build filebeat

---

<div class="post-metadata">

**Author:** ![pytimer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pytimer/32/29331_2.png) [@pytimer](https://discuss.elastic.co/u/pytimer)\
**Post date:** [March 31, 2018, 5:33am UTC](https://discuss.elastic.co/t/filebeat-autodiscovery-appenders/126009/7 "2018-03-31T05:33:08Z")

</div>

ok. 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:** [April 28, 2018, 5:33am UTC](https://discuss.elastic.co/t/filebeat-autodiscovery-appenders/126009/8 "2018-04-28T05:33:17Z")

</div>

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