# Rename fields names with logstash

**URL:** <https://discuss.elastic.co/t/rename-fields-names-with-logstash/300321>\
**Category:** Logstash\
**Created:** [March 22, 2022, 10:46am UTC](https://discuss.elastic.co/t/rename-fields-names-with-logstash/300321 "2022-03-22T10:46:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paf/32/99015_2.png) [@Paf](https://discuss.elastic.co/u/Paf)\
**Post date:** [March 22, 2022, 10:46am UTC](https://discuss.elastic.co/t/rename-fields-names-with-logstash/300321/1 "2022-03-22T10:46:20Z")

</div>

Hello,

I want to rename the field name "identity.claims.[http://schemas.microsoft.com/claims/authnclassreference](http://schemas.microsoft.com/claims/authnclassreference)" to "identity\_claims\_authnclassreference".  
For this, i use mutate filter with rename as follwing:

```auto
filter {
        mutate {
                rename => { "[identity][claims][http://schemas][microsoft][com/claims/authnclassreference]" => "identity_claims_authnclassreference" }
        }
}

```

This configuration dosen't work, the field name was not renamed.

Someone help-me?

Thanks

---

<div class="post-metadata">

**Author:** ![aaron-nimocks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron-nimocks/32/73965_2.png) [@aaron-nimocks](https://discuss.elastic.co/u/aaron-nimocks)\
**Post date:** [March 22, 2022, 11:26am UTC](https://discuss.elastic.co/t/rename-fields-names-with-logstash/300321/2 "2022-03-22T11:26:50Z")

</div>

If the field name has dots in it and aren't nested then you can just use dots.

```auto
  mutate {
    rename => { "identity.claims.http://schemas.microsoft.com/claims/authnclassreference" => "identity_claims_authnclassreference" }
  }

```

If they are nested then this should work.

```auto
  mutate {
    rename => { "[identity][claims][http://schemas.microsoft.com/claims/authnclassreference]" => "identity_claims_authnclassreference" }
  }

```

But it really depends on what the data looks like.

---

<div class="post-metadata">

**Author:** ![Paf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paf/32/99015_2.png) [@Paf](https://discuss.elastic.co/u/Paf)\
**Post date:** [March 22, 2022, 11:53am UTC](https://discuss.elastic.co/t/rename-fields-names-with-logstash/300321/3 "2022-03-22T11:53:54Z")

</div>

Everything works, the field name was rename.

Thanks for your help

---

<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:** [April 19, 2022, 11:54am UTC](https://discuss.elastic.co/t/rename-fields-names-with-logstash/300321/4 "2022-04-19T11:54:33Z")

</div>

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