# How to filter the scan scope of containers.paths

**URL:** <https://discuss.elastic.co/t/how-to-filter-the-scan-scope-of-containers-paths/245518>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [August 19, 2020, 3:15am UTC](https://discuss.elastic.co/t/how-to-filter-the-scan-scope-of-containers-paths/245518 "2020-08-19T03:15:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wajika](https://avatars.discourse-cdn.com/v4/letter/w/977dab/32.png) [@wajika](https://discuss.elastic.co/u/wajika)\
**Post date:** [August 19, 2020, 3:15am UTC](https://discuss.elastic.co/t/how-to-filter-the-scan-scope-of-containers-paths/245518/1 "2020-08-19T03:15:54Z")

</div>

![image](https://us1.discourse-cdn.com/elastic/original/3X/3/3/33d886ee7bc0ba9797cf4e118074be54230c135f.png)  
I only want to collect the directories at the beginning of back and front, how should I set the filter?

> filebeat.inputs:
> 
> - type: container  
> paths:
> - "/var/log/pods/_/_/\*.log"  
> stream: "all"
> 
> processors:
> 
> - add\_host\_metadata: ~
> - add\_docker\_metadata: ~
> - add\_kubernetes\_metadata:  
> in\_cluster: true
> 
> output.elasticsearch:  
> hosts: ["[http://192.168.10.145:9200](http://192.168.10.145:9200)"]

---

<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 16, 2020, 5:16am UTC](https://discuss.elastic.co/t/how-to-filter-the-scan-scope-of-containers-paths/245518/2 "2020-09-16T05:16:12Z")

</div>

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