# I want to import only data that are on a several namespaces

**URL:** <https://discuss.elastic.co/t/i-want-to-import-only-data-that-are-on-a-several-namespaces/271521>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [April 28, 2021, 1:42pm UTC](https://discuss.elastic.co/t/i-want-to-import-only-data-that-are-on-a-several-namespaces/271521 "2021-04-28T13:42:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![zozo6015](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zozo6015/32/12117_2.png) [@zozo6015](https://discuss.elastic.co/u/zozo6015)\
**Post date:** [April 28, 2021, 1:42pm UTC](https://discuss.elastic.co/t/i-want-to-import-only-data-that-are-on-a-several-namespaces/271521/1 "2021-04-28T13:42:46Z")

</div>

Hello,

I want to injest via filebeat only data from containers that are in a certain namespace. Is there a possibility to do that?

---

<div class="post-metadata">

**Author:** ![zozo6015](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zozo6015/32/12117_2.png) [@zozo6015](https://discuss.elastic.co/u/zozo6015)\
**Post date:** [April 28, 2021, 2:57pm UTC](https://discuss.elastic.co/t/i-want-to-import-only-data-that-are-on-a-several-namespaces/271521/2 "2021-04-28T14:57:48Z")

</div>

I have tried the following and now it does drop all events.

```auto
processors:
  - drop_event:
      when:
        not:
          equals:
            kubernetes.namespace: ["name"]

```

Any idea on how to make this work?

---

<div class="post-metadata">

**Author:** ![shaunak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaunak/32/6643_2.png) [@shaunak](https://discuss.elastic.co/u/shaunak)\
**Post date:** [April 28, 2021, 8:57pm UTC](https://discuss.elastic.co/t/i-want-to-import-only-data-that-are-on-a-several-namespaces/271521/3 "2021-04-28T20:57:18Z")

</div>

Can you post a sample Filebeat event that should be ingested? You can use `output.console.enabled: true` in your Filebeat configuration to print out the event.

Shaunak

---

<div class="post-metadata">

**Author:** ![zozo6015](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zozo6015/32/12117_2.png) [@zozo6015](https://discuss.elastic.co/u/zozo6015)\
**Post date:** [April 28, 2021, 8:59pm UTC](https://discuss.elastic.co/t/i-want-to-import-only-data-that-are-on-a-several-namespaces/271521/4 "2021-04-28T20:59:31Z")

</div>

I have figured it out by using regexp and filtering the log.file.path field. with it.

---

<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 26, 2021, 11:00pm UTC](https://discuss.elastic.co/t/i-want-to-import-only-data-that-are-on-a-several-namespaces/271521/5 "2021-05-26T23:00:10Z")

</div>

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