# Remove field on logstash

**URL:** <https://discuss.elastic.co/t/remove-field-on-logstash/252088>\
**Category:** Logstash\
**Created:** [October 14, 2020, 5:59pm UTC](https://discuss.elastic.co/t/remove-field-on-logstash/252088 "2020-10-14T17:59:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)\
**Post date:** [October 14, 2020, 5:59pm UTC](https://discuss.elastic.co/t/remove-field-on-logstash/252088/1 "2020-10-14T17:59:59Z")

</div>

I am receiving metricbeat data on logstash and I want to remove certain part of it.

how can I remove this  
I try  
mutate { remove\_field =\> ["[process][args]0","[process][args]1" ] }  
try  
mutate { remove\_field =\> ["[process][args][0]","[process][args][1]" ] }

but none of them works.  
infact I did follow one of the link I found here to remove whole process.args but that didn't work either.

"process" =\> {  
"args" =\> [  
[0] "/usr/bin/perl",  
[1] "/report/bin/node\_agent.pl"

---

<div class="post-metadata">

**Author:** ![grumo35](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/grumo35/32/59451_2.png) [@grumo35](https://discuss.elastic.co/u/grumo35)\
**Post date:** [October 14, 2020, 6:34pm UTC](https://discuss.elastic.co/t/remove-field-on-logstash/252088/2 "2020-10-14T18:34:45Z")

</div>

> [@elasticforme](#):
>
> "process" =\> {  
> "args" =\> [  
> [0] "/usr/bin/perl",  
> [1] "/report/bin/node\_agent.pl"

Can you please return a valid json by getting a docuent in your elastic db ?

---

<div class="post-metadata">

**Author:** ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)\
**Post date:** [October 14, 2020, 6:38pm UTC](https://discuss.elastic.co/t/remove-field-on-logstash/252088/3 "2020-10-14T18:38:49Z")

</div>

oh well when I just try  
mutate { remove\_field =\> ["[process][args]"] }

it remove whole array and that is what I need 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:** [November 11, 2020, 6:39pm UTC](https://discuss.elastic.co/t/remove-field-on-logstash/252088/4 "2020-11-11T18:39:00Z")

</div>

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