# Logstash mutate rename

**URL:** <https://discuss.elastic.co/t/logstash-mutate-rename/265043>\
**Category:** Logstash\
**Created:** [February 22, 2021, 8:45am UTC](https://discuss.elastic.co/t/logstash-mutate-rename/265043 "2021-02-22T08:45:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jokie74](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jokie74/32/75504_2.png) [@Jokie74](https://discuss.elastic.co/u/Jokie74)\
**Post date:** [February 22, 2021, 8:45am UTC](https://discuss.elastic.co/t/logstash-mutate-rename/265043/1 "2021-02-22T08:45:54Z")

</div>

hello dear community,

I have a question about the "mutate rename" filter option.  
In my logstash filter I have this:

```
mutate {
            rename => {
                "[fields][host][name]" => "[host][name]"
                "[fields][host][domain]" => "[host][domain]"
                "[fields][log_topic]" => "log_topic"
                "[fields][log_type]" => "log_type"
                "[fields][os]" => "os"
            }

```

Logs are coming from filebeat with following fields added to the input config:

```
fields:
    log_topic: UnixSol-log-server-aix
    os: aix
    log_type: aix_syslog
    host:
      name: srvsinst.hs.domain.ch
      domain: hs.domain.ch

```

Unfortunately, the renaming is not working... Kibana shows the attributes as:  
fields.host.domain  
fields.host.name  
fields.log\_topic  
fields.log\_type  
fields.os

What is wrong with the config???

Thanks a lot in advance for your support...

best regards,  
Joerg

---

<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:** [February 22, 2021, 2:25pm UTC](https://discuss.elastic.co/t/logstash-mutate-rename/265043/2 "2021-02-22T14:25:08Z")

</div>

> [@Jokie74](#):
>
> What is wrong with the config???

I cannot see why that would not work, but have you considered setting [fields\_under\_root](https://www.elastic.co/guide/en/beats/filebeat/current/configuration-general-options.html#_fields_under_root) so that it is not required?

---

<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:** [March 22, 2021, 2:25pm UTC](https://discuss.elastic.co/t/logstash-mutate-rename/265043/3 "2021-03-22T14:25:49Z")

</div>

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