# Rename field

**URL:** <https://discuss.elastic.co/t/rename-field/116799>\
**Category:** Logstash\
**Created:** [January 24, 2018, 5:06am UTC](https://discuss.elastic.co/t/rename-field/116799 "2018-01-24T05:06:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![abu.sayeed](https://avatars.discourse-cdn.com/v4/letter/a/dec6dc/32.png) [@abu.sayeed](https://discuss.elastic.co/u/abu.sayeed)\
**Post date:** [January 24, 2018, 5:06am UTC](https://discuss.elastic.co/t/rename-field/116799/1 "2018-01-24T05:06:06Z")

</div>

Winlogbeat fields name:

"event\_data": {  
"ProcessName"  
"LogonGuid"  
"IpPort"  
"SubjectLogonId"  
"TargetLogonGuid"  
"SubjectUserName"  
"TargetInfo"  
"TargetServerName"  
"SubjectDomainName"  
"IpAddress"  
"TargetUserName"  
"ProcessId"  
"TargetDomainName"  
"SubjectUserSid"  
},

But I wish

```
  "ProcessName"
  "LogonGuid"
  "IpPort"
  "SubjectLogonId"
  "TargetLogonGuid"
  "SubjectUserName"
  "TargetInfo"
  "TargetServerName"
  "SubjectDomainName"
  "IpAddress"
  "TargetUserName"
  "ProcessId"
  "TargetDomainName"
  "SubjectUserSid"

```

So how can I remove "event\_data" from every fields?  
need help.  
Thanks

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [January 24, 2018, 5:22am UTC](https://discuss.elastic.co/t/rename-field/116799/2 "2018-01-24T05:22:14Z")

</div>

Use a mutate filter to rename each field into the top level or use a ruby filter to rename them all in one batch without having to enumerate every field. Examples of the latter has been posted in the past.

---

<div class="post-metadata">

**Author:** ![abu.sayeed](https://avatars.discourse-cdn.com/v4/letter/a/dec6dc/32.png) [@abu.sayeed](https://discuss.elastic.co/u/abu.sayeed)\
**Post date:** [January 24, 2018, 6:46am UTC](https://discuss.elastic.co/t/rename-field/116799/3 "2018-01-24T06:46:05Z")

</div>

Thanks for your instruction. I change all by ruby filter.

---

<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:** [February 21, 2018, 6:56am UTC](https://discuss.elastic.co/t/rename-field/116799/4 "2018-02-21T06:56:04Z")

</div>

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