# Dockerized Filebeat & NGINX Logs

**URL:** <https://discuss.elastic.co/t/dockerized-filebeat-nginx-logs/128299>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [April 17, 2018, 7:02am UTC](https://discuss.elastic.co/t/dockerized-filebeat-nginx-logs/128299 "2018-04-17T07:02:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthew\_Zeemann](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matthew_zeemann/32/30067_2.png) [@Matthew\_Zeemann](https://discuss.elastic.co/u/Matthew_Zeemann)\
**Post date:** [April 17, 2018, 7:02am UTC](https://discuss.elastic.co/t/dockerized-filebeat-nginx-logs/128299/1 "2018-04-17T07:02:22Z")

</div>

Does anyone know how to use filebeat.autodiscover with the nginx module?

I have filebeat.autodiscover working with nginx, e.g.

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

```

But if I really want to use the nginx module... e.g.

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

```

Should I be able to do this?

---

<div class="post-metadata">

**Author:** ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)\
**Post date:** [April 17, 2018, 2:16pm UTC](https://discuss.elastic.co/t/dockerized-filebeat-nginx-logs/128299/2 "2018-04-17T14:16:02Z")

</div>

Yes, this should work, but this `input` entry should be `prospector` instead. You can see the documentation about filebeat autodiscover here: [https://www.elastic.co/guide/en/beats/filebeat/6.2/configuration-autodiscover.html](https://www.elastic.co/guide/en/beats/filebeat/6.2/configuration-autodiscover.html)

---

<div class="post-metadata">

**Author:** ![Matthew\_Zeemann](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matthew_zeemann/32/30067_2.png) [@Matthew\_Zeemann](https://discuss.elastic.co/u/Matthew_Zeemann)\
**Post date:** [April 18, 2018, 4:16am UTC](https://discuss.elastic.co/t/dockerized-filebeat-nginx-logs/128299/3 "2018-04-18T04:16:17Z")

</div>

Thanks so much !

---

<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:** [May 16, 2018, 4:16am UTC](https://discuss.elastic.co/t/dockerized-filebeat-nginx-logs/128299/4 "2018-05-16T04:16:23Z")

</div>

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