# Assign beat.hostname to another field

**URL:** https://discuss.elastic.co/t/assign-beat-hostname-to-another-field/141145
**Category:** Beats
**Tags:** filebeat
**Created:** [July 23, 2018, 10:48am UTC](https://discuss.elastic.co/t/assign-beat-hostname-to-another-field/141145 "2018-07-23T10:48:38Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![sanek64](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@sanek64](https://discuss.elastic.co/u/sanek64)
#### Post date: [July 23, 2018, 10:48am UTC](https://discuss.elastic.co/t/assign-beat-hostname-to-another-field/141145/1 "2018-07-23T10:48:38Z")

</div>

Hi all,  
Is there a way to assign to some field a value of the beat.hostname field? Not to rename beat.hostname, not to smthg else, only to assign its value to another field like:

> ```
> - type: log
> enabled: true
> json.keys_under_root: true
> json.add_error_key: true
> fields_under_root: true
> close_removed: true
> fields:
> service: storm
> host: beat.hostname
> paths:
> - /u01/storm/stormlog/workers-artifacts/additional_logs/json*.log
> 
> ```

but it does not work.  
ELK version 6.2.1  
Thanks

---

<div class="post-metadata">

### Author: ![kvch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kvch/32/72058_2.png) [@kvch](https://discuss.elastic.co/u/kvch)
#### Post date: [July 23, 2018, 10:50am UTC](https://discuss.elastic.co/t/assign-beat-hostname-to-another-field/141145/2 "2018-07-23T10:50:11Z")

</div>

Could you please share your configuration formatted using `</>` so if you have config problems I can find them?

---

<div class="post-metadata">

### Author: ![sanek64](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@sanek64](https://discuss.elastic.co/u/sanek64)
#### Post date: [July 23, 2018, 10:59am UTC](https://discuss.elastic.co/t/assign-beat-hostname-to-another-field/141145/3 "2018-07-23T10:59:16Z")

</div>

Of course, edited.

---

<div class="post-metadata">

### Author: ![sanek64](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@sanek64](https://discuss.elastic.co/u/sanek64)
#### Post date: [July 25, 2018, 1:12pm UTC](https://discuss.elastic.co/t/assign-beat-hostname-to-another-field/141145/4 "2018-07-25T13:12:35Z")

</div>

Do you have any ideas?

---

<div class="post-metadata">

### Author: ![kvch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kvch/32/72058_2.png) [@kvch](https://discuss.elastic.co/u/kvch)
#### Post date: [July 30, 2018, 6:52pm UTC](https://discuss.elastic.co/t/assign-beat-hostname-to-another-field/141145/5 "2018-07-30T18:52:32Z")

</div>

Unfortunately, it's not supported by the current fields implementation. `fields` does not support referencing other fields.

---

<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: [August 27, 2018, 6:52pm UTC](https://discuss.elastic.co/t/assign-beat-hostname-to-another-field/141145/6 "2018-08-27T18:52:40Z")

</div>

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