# Filebeat Copy Field Processor

**URL:** <https://discuss.elastic.co/t/filebeat-copy-field-processor/143098>\
**Category:** Beats\
**Created:** [August 6, 2018, 6:44am UTC](https://discuss.elastic.co/t/filebeat-copy-field-processor/143098 "2018-08-06T06:44:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![prometheus1](https://avatars.discourse-cdn.com/v4/letter/p/bc8723/32.png) [@prometheus1](https://discuss.elastic.co/u/prometheus1)\
**Post date:** [August 6, 2018, 6:44am UTC](https://discuss.elastic.co/t/filebeat-copy-field-processor/143098/1 "2018-08-06T06:44:18Z")

</div>

I found the rename processor for filebeat, couldn't find anything related to a copy field processor. My usecase is I want to copy some fields from the kubernetes processor to a root field with the original fields remaining intact. I have a similar usecase in the case of journalbeat as well. Is there anyway I can do that?  
I tried using the `fields`, `fields_under_root` which instead of deriving the name of the variable use the variable name itself. For eg.

```auto
fields:
  test: "%{[kubernetes][namespace]}"

```

makes a field test with value `%{[kubernetes][namespace]}` instead of derived value of that actual namespace. Does anyone know a way to do this?

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [August 13, 2018, 8:12am UTC](https://discuss.elastic.co/t/filebeat-copy-field-processor/143098/2 "2018-08-13T08:12:31Z")

</div>

Instead of doing it on the Beats side you can use `copy_to` in the template [https://www.elastic.co/guide/en/elasticsearch/reference/current/copy-to.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/copy-to.html)

---

<div class="post-metadata">

**Author:** ![prometheus1](https://avatars.discourse-cdn.com/v4/letter/p/bc8723/32.png) [@prometheus1](https://discuss.elastic.co/u/prometheus1)\
**Post date:** [August 16, 2018, 10:58am UTC](https://discuss.elastic.co/t/filebeat-copy-field-processor/143098/3 "2018-08-16T10:58:01Z")

</div>

The same could have been said for the rename processor. I have a usecase which needs the copy processor hence the question. Maybe I'll open a feature request.

---

<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 13, 2018, 1:06pm UTC](https://discuss.elastic.co/t/filebeat-copy-field-processor/143098/4 "2018-09-13T13:06:50Z")

</div>

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