# Autodiscover, docker, and nginx; "Fileset nginx/log is configured but doesn't exist"

**URL:** <https://discuss.elastic.co/t/autodiscover-docker-and-nginx-fileset-nginx-log-is-configured-but-doesnt-exist/136692>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [June 20, 2018, 12:40pm UTC](https://discuss.elastic.co/t/autodiscover-docker-and-nginx-fileset-nginx-log-is-configured-but-doesnt-exist/136692 "2018-06-20T12:40:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vputz](https://avatars.discourse-cdn.com/v4/letter/v/e79b87/32.png) [@vputz](https://discuss.elastic.co/u/vputz)\
**Post date:** [June 20, 2018, 12:40pm UTC](https://discuss.elastic.co/t/autodiscover-docker-and-nginx-fileset-nginx-log-is-configured-but-doesnt-exist/136692/1 "2018-06-20T12:40:23Z")

</div>

Okay, almost there! I have autodiscover running correctly and trying to parse logs from my docker containers, including nginx, using this filebeat.yml snippet:

```
filebeat.config.modules.path: /usr/share/filebeat/modules.d/*.yml

filebeat.autodiscover:
  providers:
    - type: docker
      templates:
        - condition:
            contains:
              docker.container.image: "nginx"
          config:
            - module: nginx
              log:
                prospector:
                  type: docker
                  containers.ids:
                    - "${data.docker.container.id}"

```

...good so far. Except perhaps not. Because when I run `filebeat -e -d autodiscover`, I see things like

```
2018-06-20T12:38:08.045Z DEBUG [autodiscover] autodiscover/autodiscover.go:109 Got a start event: map[host:172.17.0.2 port:80 docker:{"container":{"id":"ddced2486bf48fc5f2015c1633dce39a94af0da4c56bff1ad8977247454321b7","image":"nginx","labels":{"maintainer":"NGINX Docker Maintainers \u003cdocker-maint@nginx.com\u003e"},"name":"nginx"}} meta:{"docker":{"container":{"id":"ddced2486bf48fc5f2015c1633dce39a94af0da4c56bff1ad8977247454321b7","image":"nginx","labels":{"maintainer":"NGINX Docker Maintainers \u003cdocker-maint@nginx.com\u003e"},"name":"nginx"}}} config:[0xc42045b920] start:true], generated configs: [0xc42045b920]
2018-06-20T12:38:08.045Z DEBUG [autodiscover] autodiscover/autodiscover.go:193 Got a meta field in the event
2018-06-20T12:38:08.045Z DEBUG [autodiscover] autodiscover/autodiscover.go:141 Failed to create runner with config &{{<nil> } <nil> 0xc4200fdfc0}: Fileset nginx/log is configured but doesn't exist

```

"Fileset nginx/log is configured but doesn't exist" sounds bad. What am I missing here? Frustrating to be this close; it's aaaalmost working!

I should note that "nginx.yml" is copied into /usr/share/filebeat/modules.d, and contains

```
- module: nginx
  # Access logs
  access:
    enabled: true

    # Set custom paths for the log files. If left empty,
    # Filebeat will choose the paths depending on your OS.
    #var.paths:

  # Error logs
  error:
    enabled: true

    # Set custom paths for the log files. If left empty,
    # Filebeat will choose the paths depending on your OS.
    #var.paths:
```

---

<div class="post-metadata">

**Author:** ![exekias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/exekias/32/28718_2.png) [@exekias](https://discuss.elastic.co/u/exekias)\
**Post date:** [June 20, 2018, 10:25pm UTC](https://discuss.elastic.co/t/autodiscover-docker-and-nginx-fileset-nginx-log-is-configured-but-doesnt-exist/136692/2 "2018-06-20T22:25:43Z")

</div>

Hi @vputz,

You are almost there indeed!

The problem is that `log` is not a known fileset, it should be either `access` or `error`. This is (probably) what you want:

filebeat.config.modules.path: /usr/share/filebeat/modules.d/\*.yml

```auto
filebeat.autodiscover:
  providers:
    - type: docker
      templates:
        - condition:
            contains:
              docker.container.image: "nginx"
          config:
            - module: nginx
              access:
                prospector:
                  type: docker
                  containers.ids:
                    - "${data.docker.container.id}"

```

Also, FYI: we just released 6.3, which brings hints based autodiscover, have a look to: [https://www.elastic.co/blog/docker-and-kubernetes-hints-based-autodiscover-with-beats](https://www.elastic.co/blog/docker-and-kubernetes-hints-based-autodiscover-with-beats)

Best regards

---

<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 18, 2018, 10:25pm UTC](https://discuss.elastic.co/t/autodiscover-docker-and-nginx-fileset-nginx-log-is-configured-but-doesnt-exist/136692/3 "2018-07-18T22:25:45Z")

</div>

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