# How to re-name field names in logstash

**URL:** https://discuss.elastic.co/t/how-to-re-name-field-names-in-logstash/291803
**Category:** Logstash
**Created:** [December 14, 2021, 12:51pm UTC](https://discuss.elastic.co/t/how-to-re-name-field-names-in-logstash/291803 "2021-12-14T12:51:03Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [December 14, 2021, 6:19pm UTC](https://discuss.elastic.co/t/how-to-re-name-field-names-in-logstash/291803/4 "2021-12-14T18:19:06Z")

</div>

You would have to write a ruby filter that recursively descends into the fields on the event. There is an example of that [here](https://discuss.elastic.co/t/how-to-exclude-xml-json-key-value-if-key-length-is-greater-than-15-char-and-value-length-is-greater-than-100-char/270248/8).

---

_[View the full topic](https://discuss.elastic.co/t/how-to-re-name-field-names-in-logstash/291803)._
