# Copying field values

**URL:** <https://discuss.elastic.co/t/copying-field-values/242520>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [July 24, 2020, 2:13pm UTC](https://discuss.elastic.co/t/copying-field-values/242520 "2020-07-24T14:13:50Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![macg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/macg/32/72712_2.png) [@macg](https://discuss.elastic.co/u/macg)\
**Post date:** [August 4, 2020, 12:05pm UTC](https://discuss.elastic.co/t/copying-field-values/242520/7 "2020-08-04T12:05:03Z")

</div>

Sorry for the slow response. I was away from work for a couple of days without reliable access.

Adding the `add_host_metadata` processor brings a lot of additional information about the device shipping data into my documents/JSON, but does not make the `host.hostname` field available to `rename`.

Processors now appear to read `host.hostname` as containing the value in the `host.name` field, which is not the case when I look at the JSON.

The behaviour of this processor is very unexpected:

```auto
processors:
    - add_host_metadata: ~
    - rename:
        fields:
          - from: host.hostname
            to: new_name
        fail_on_error: false
        ignore_missing: true

```

A `new_name` field will be created, containing the value of `host.name`, and both `host.hostname` and `host.name` will remain as document fields... which is to say, no `rename` operation takes place at all. I'm fairly stumped.

---

_[View the full topic](https://discuss.elastic.co/t/copying-field-values/242520)._
