# Add\_kubernetes\_metadata logs\_path does not use provided value from config

**URL:** <https://discuss.elastic.co/t/add-kubernetes-metadata-logs-path-does-not-use-provided-value-from-config/239482>\
**Category:** Beats\
**Created:** [July 1, 2020, 12:27pm UTC](https://discuss.elastic.co/t/add-kubernetes-metadata-logs-path-does-not-use-provided-value-from-config/239482 "2020-07-01T12:27:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ntx-ben](https://avatars.discourse-cdn.com/v4/letter/n/3e96dc/32.png) [@ntx-ben](https://discuss.elastic.co/u/ntx-ben)\
**Post date:** [July 1, 2020, 12:27pm UTC](https://discuss.elastic.co/t/add-kubernetes-metadata-logs-path-does-not-use-provided-value-from-config/239482/1 "2020-07-01T12:27:51Z")

</div>

I just deployed filebeat 7.8.0 in Kubernetes. I cannot get the `add_kubernetes_metadata` to work correctly using logs in `/var/log/containers` folder location. I need to use that location because I am filtering on container logs using `exclude_files`, which would be like `["/var/log/containers/elasticsearch-*","/var/log/containers/filebeat-*",.......]`

filebeat has volumes mounted for both `/var/log` and `/var/lib/docker/containers`.

Relevant config:

```auto
    filebeat.inputs:
    - type: container
      exclude_files: ${FILEBEAT_EXCLUDE_FILES}
      paths:
      - /var/log/containers/*.log
      processors:
      - add_kubernetes_metadata:
          in_cluster: true
          default_matchers.enabled: false
          host: ${NODE_NAME}
          matchers:
          - logs_path:
              logs_path: "/var/log/containers/"
              resource_type: "container"

```

Errors in filebeat logs:  
`ERROR	[kubernetes]	add_kubernetes_metadata/matchers.go:91	Error extracting container id - source value does not contain matcher's logs_path '/var/lib/docker/containers/'.`

Am I missing something?

---

<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:** [July 29, 2020, 2:27pm UTC](https://discuss.elastic.co/t/add-kubernetes-metadata-logs-path-does-not-use-provided-value-from-config/239482/2 "2020-07-29T14:27:55Z")

</div>

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