# Correct syntax to my filter

**URL:** <https://discuss.elastic.co/t/correct-syntax-to-my-filter/174562>\
**Category:** Logstash\
**Created:** [March 29, 2019, 3:37pm UTC](https://discuss.elastic.co/t/correct-syntax-to-my-filter/174562 "2019-03-29T15:37:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![espacioint](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/espacioint/32/43107_2.png) [@espacioint](https://discuss.elastic.co/u/espacioint)\
**Post date:** [March 29, 2019, 3:37pm UTC](https://discuss.elastic.co/t/correct-syntax-to-my-filter/174562/1 "2019-03-29T15:37:28Z")

</div>

Hello,my name is Pablo, this is my first post so I ask for a bit a patience about me.. im new in elk.

I'm working with netflow.  
I have many fields that Im not interested to store, so I can have less data on my elk.  
Im trying to remove some field with mutate (is the only way that I found).

my code is this..

mutate {  
remove =\> ["netflow.xlate\_dst\_port"]  
}

I've tested many combinations but it seems that the field is not correctly defined by me.  
So logstash stop processing the logs.  
Only if I comment this it keep working.  
Can someone tell me the correct syntax to do this works?  
Thanks a lot to everybody.

---

<div class="post-metadata">

**Author:** ![A\_B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/a_b/32/17104_2.png) [@A\_B](https://discuss.elastic.co/u/A_B)\
**Post date:** [March 29, 2019, 3:48pm UTC](https://discuss.elastic.co/t/correct-syntax-to-my-filter/174562/2 "2019-03-29T15:48:57Z")

</div>

Hi @espacioint,

I find the Elastic documentation really good and full of great info. But it still takes some time to figure everything out 🙂

If you checkout the documentation for [plugin-filter-mutate](https://www.elastic.co/guide/en/logstash/6.6/plugins-filters-mutate.html#plugins-filters-mutate-remove_field) you will find that there is no `remove`. You should use `remove_field`. That should fix your problem.

Also, always check the documentation for the specific version you are using. My suggested fix is for version 6.6 (which I use). Looks like this has not changed in the latest version, which is 6.7.

---

<div class="post-metadata">

**Author:** ![espacioint](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/espacioint/32/43107_2.png) [@espacioint](https://discuss.elastic.co/u/espacioint)\
**Post date:** [March 29, 2019, 4:01pm UTC](https://discuss.elastic.co/t/correct-syntax-to-my-filter/174562/3 "2019-03-29T16:01:39Z")

</div>

Really thanks by your help.  
You are right, in the documentation says depreciated...  
I have changed to remove\_field but still not working...

mutate {  
remove\_field =\> ["netflow.dst\_mask","netflow.flowset\_id"]  
}

is there any other error there?  
thanks for your time.

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [March 29, 2019, 4:10pm UTC](https://discuss.elastic.co/t/correct-syntax-to-my-filter/174562/4 "2019-03-29T16:10:33Z")

</div>

Do you really have a period in your fieldname or do you mean

```
mutate { remove_field => ["[netflow][dst_mask]","[netflow][flowset_id]"] }
```

---

<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:** [April 26, 2019, 4:10pm UTC](https://discuss.elastic.co/t/correct-syntax-to-my-filter/174562/5 "2019-04-26T16:10:55Z")

</div>

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