# Filebeat config using Docker labels as index and pipeline names

**URL:** https://discuss.elastic.co/t/filebeat-config-using-docker-labels-as-index-and-pipeline-names/252959
**Category:** Beats
**Tags:** docker, filebeat
**Created:** [October 22, 2020, 8:08am UTC](https://discuss.elastic.co/t/filebeat-config-using-docker-labels-as-index-and-pipeline-names/252959 "2020-10-22T08:08:16Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jbws](https://avatars.discourse-cdn.com/v4/letter/j/d6d6ee/32.png) [@jbws](https://discuss.elastic.co/u/jbws)
#### Post date: [October 22, 2020, 8:08am UTC](https://discuss.elastic.co/t/filebeat-config-using-docker-labels-as-index-and-pipeline-names/252959/1 "2020-10-22T08:08:16Z")

</div>

I am trying to use docker labels as the index and pipeline names. What is wrong with this config?

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

filebeat.autodiscover:
  providers:
    - type: docker
      hints.enabled: true
      hints.default_config.enabled: false

processors:
- add_cloud_metadata: ~

cloud.id: '${cloud.id}'
cloud.auth: '${cloud.auth}'

output.elasticsearch:
  pipelines:
    - pipeline: "%{[fields.docker.container.labels.co_elastic_logs/pipeline]}"
      when.equals:
        fields.docker.container.labels.co_elastic_logs/enabled: "true"
  indices:
    - index: "%{[fields.docker.container.labels.co_elastic_logs/index]}-%{+yyyy.MM.dd}"
      when.equals:
        fields.docker.container.labels.co_elastic_logs/enabled: "true"

setup.ilm.enabled: false

```

---

<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 19, 2020, 10:08am UTC](https://discuss.elastic.co/t/filebeat-config-using-docker-labels-as-index-and-pipeline-names/252959/2 "2020-11-19T10:08:30Z")

</div>

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