# Filebeat configuration file troubles

**URL:** <https://discuss.elastic.co/t/filebeat-configuration-file-troubles/277952>\
**Category:** Beats\
**Tags:** docker, filebeat\
**Created:** [July 6, 2021, 11:20am UTC](https://discuss.elastic.co/t/filebeat-configuration-file-troubles/277952 "2021-07-06T11:20:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![111489](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111489/32/91236_2.png) [@111489](https://discuss.elastic.co/u/111489)\
**Post date:** [July 6, 2021, 11:20am UTC](https://discuss.elastic.co/t/filebeat-configuration-file-troubles/277952/1 "2021-07-06T11:20:03Z")

</div>

Hello, I have installed elasticsearch, kibana and filebeat on kubernetes cluster version 7.6.1 within separate namespace.  
My main goal was gather logs from other two namespaces within this cluster.  
But still I have troubles with filebeat configuration file. I need to read logs from all pods of these namespaces. I have tried many configs and unfortunately it doesn't work well (gathers logs only from one namespace and/or from few pods).  
I am new in that direction, so I hope I made stupid mistake and You can help me)

Below is one of many configs I have tried:

```auto
    filebeat.autodiscover:
      providers:
        - type: kubernetes
          templates:
            - condition:
                contains:
                  kubernetes.namespace: "namespace-1"
              config:
                - type: container
                  paths:
                    - "/var/lib/docker/containers/${data.kubernetes.container.id}/${data.kubernetes.container.id}-json.log"
            - condition:
                contains:
                  kubernetes.namespace: "namespace-2"
              config:
                - type: container
                  paths:
                    - "/var/lib/docker/containers/${data.kubernetes.container.id}/${data.kubernetes.container.id}-json.log"

```

Thank you in advance)

---

<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:** [August 3, 2021, 1:20pm UTC](https://discuss.elastic.co/t/filebeat-configuration-file-troubles/277952/2 "2021-08-03T13:20:10Z")

</div>

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