# Filebeat file path not working

**URL:** <https://discuss.elastic.co/t/filebeat-file-path-not-working/311473>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [August 5, 2022, 5:38am UTC](https://discuss.elastic.co/t/filebeat-file-path-not-working/311473 "2022-08-05T05:38:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shivendra95](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@shivendra95](https://discuss.elastic.co/u/shivendra95)\
**Post date:** [August 5, 2022, 5:38am UTC](https://discuss.elastic.co/t/filebeat-file-path-not-working/311473/1 "2022-08-05T05:38:37Z")

</div>

I have filebeat deployed through ECK on my Kubernetes cluster. I want to read the logs from a specific pod whose log file name is something like this **dev-be-svc-logistic-8c9bfbd85-qs6ng\_smartbox-dev\_dev-be-svc-logistic-4b3a4b4345fbf2c6f44545fdbcdd49a1c687512d08fa94c4f0d4c75f5dea06e9.log** and the pod name is something like this **dev-be-svc-logistic-8c9bfbd85-qs6ng**.  
In the filebeat deployment file, I have given the path like this

```auto
- type: container
      paths:
      - /var/log/containers/dev-be-svc-logistic-*.log

```

I have added the path like this because when pods go down and are created again, then this file name may change a little bit.  
Issue I'm facing is that no logs are being read and written to kafka topic.  
Is there anything I'm doing wrong here?

---

<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:** [August 22, 2022, 2:44pm UTC](https://discuss.elastic.co/t/filebeat-file-path-not-working/311473/2 "2022-08-22T14:44:56Z")

</div>

Hi,

Could you share the whole filebeat configuration?

Does filebeat has access to this file? Is this directory mounted in the filebeat container as a volume?

Could you check Filebeat logs in case you find some error there?

In any case, to discover the paths for logs of pods, you can also use autodiscover, that gives you higher-level configuration options for this purpouse, check docs here: [Autodiscover | Filebeat Reference [8.3] | Elastic](https://www.elastic.co/guide/en/beats/filebeat/8.3/configuration-autodiscover.html)

---

<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:** [September 19, 2022, 4:45pm UTC](https://discuss.elastic.co/t/filebeat-file-path-not-working/311473/3 "2022-09-19T16:45:05Z")

</div>

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