# Hints based autodiscovery not working as described in documentation

**URL:** <https://discuss.elastic.co/t/hints-based-autodiscovery-not-working-as-described-in-documentation/293150>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [December 29, 2021, 7:02pm UTC](https://discuss.elastic.co/t/hints-based-autodiscovery-not-working-as-described-in-documentation/293150 "2021-12-29T19:02:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gehgerds](https://avatars.discourse-cdn.com/v4/letter/g/22d042/32.png) [@gehgerds](https://discuss.elastic.co/u/gehgerds)\
**Post date:** [December 29, 2021, 7:02pm UTC](https://discuss.elastic.co/t/hints-based-autodiscovery-not-working-as-described-in-documentation/293150/1 "2021-12-29T19:02:53Z")

</div>

I'm following documentation on hints based autodiscovery. I want to use annotations to control which pods logs are being discovered. When I use example config like this, then all containers in cluster gets discovered and all logs are sent to Elasticsearch:

```auto
filebeat.autodiscover:
  providers:
    - type: kubernetes
      hints.enabled: true
      hints.default_config:
        type: container
        paths:
          - /var/log/containers/*-${data.container.id}.log

```

So following documentation I disable default config:

```auto
filebeat.autodiscover:
  providers:
    - type: kubernetes
      hints.enabled: true
      hints.default_config.enabled: false

```

And annotate one pod:

```auto
co.elastic.logs/enabled: true

```

I can see in filebeat logs that the pod gets discovered, but no logs are being sent to Elasticsearch.  
What am I missing? Do I need to add additional annotations?

---

<div class="post-metadata">

**Author:** ![bizmate](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bizmate/32/24977_2.png) [@bizmate](https://discuss.elastic.co/u/bizmate)\
**Post date:** [January 7, 2022, 5:33pm UTC](https://discuss.elastic.co/t/hints-based-autodiscovery-not-working-as-described-in-documentation/293150/2 "2022-01-07T17:33:43Z")

</div>

Your example does not show a full configuration so it is impossible to know if you doing all that is needed.

In this context filebeat does the autodiscovery and collects the input, then it needs to send it to Logstash and Logstash to ES.

Take a look at this project and you will be fine to connect it all together

> <https://github.com/mleczkomi/logging-poc/blob/master/.docker/filebeat/filebeat.yml>

Test on local instance like on minikube or similar. I use docker-compose so i cannot confirm about kubernetes but it should work if all of the above is connected well

---

<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:** [February 4, 2022, 7:34pm UTC](https://discuss.elastic.co/t/hints-based-autodiscovery-not-working-as-described-in-documentation/293150/3 "2022-02-04T19:34:29Z")

</div>

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