# Adding fields does not work with docker input

**URL:** https://discuss.elastic.co/t/adding-fields-does-not-work-with-docker-input/157852
**Category:** Beats
**Tags:** filebeat
**Created:** [November 22, 2018, 10:11am UTC](https://discuss.elastic.co/t/adding-fields-does-not-work-with-docker-input/157852 "2018-11-22T10:11:17Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![lifeofguenter](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lifeofguenter/32/17384_2.png) [@lifeofguenter](https://discuss.elastic.co/u/lifeofguenter)
#### Post date: [November 22, 2018, 10:11am UTC](https://discuss.elastic.co/t/adding-fields-does-not-work-with-docker-input/157852/1 "2018-11-22T10:11:17Z")

</div>

```auto
filebeat.autodiscover:
  providers:
    - type: docker
      templates:
        - condition:
            has_fields:
              - docker.container.labels.com.foobar.logs.type
          config:
            - type: docker
              containers:
                ids:
                  - "${data.docker.container.id}"
                stream: all
              paths:
                - /var/lib/docker/containers/${data.docker.container.id}/*.log
              fields:
                log_type: "${docker.container.labels.com.foobar.logs.type}"
                foo: bar

```

will not add any fields - according to logstash + rubydebug

---

<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: [December 20, 2018, 10:11am UTC](https://discuss.elastic.co/t/adding-fields-does-not-work-with-docker-input/157852/2 "2018-12-20T10:11:22Z")

</div>

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