# Filter to change the field name to be more user friendly

**URL:** https://discuss.elastic.co/t/filter-to-change-the-field-name-to-be-more-user-friendly/283543
**Category:** Logstash
**Created:** [September 7, 2021, 1:53pm UTC](https://discuss.elastic.co/t/filter-to-change-the-field-name-to-be-more-user-friendly/283543 "2021-09-07T13:53:12Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Shreesh\_Narayanan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shreesh_narayanan/32/87312_2.png) [@Shreesh\_Narayanan](https://discuss.elastic.co/u/Shreesh_Narayanan)
#### Post date: [September 7, 2021, 1:53pm UTC](https://discuss.elastic.co/t/filter-to-change-the-field-name-to-be-more-user-friendly/283543/1 "2021-09-07T13:53:12Z")

</div>

Hello,

I have a log line for diskusage such as

```auto
disk-usage: [1]=76% [2]=26% [3]=26% [4]=24% [5]=24% [6]=28%

```

i used dissect and kv to get the values as needed .

```auto
{
    "@timestamp" => 2021-09-06T08:22:46.944Z,
             "4" => "24%",
             "1" => "76%",
             "6" => "28%",
             "5" => "24%",
             "3" => "26%",
             "2" => "26%"
}

```

However i needed to rename the field name to something more user friendly . such as renaming [1]=\>"76%" to disk#1 =\> "76%" . I have logs from various machines that have varying number of disks on them . would mutate's rename filter help ? i tried and it doesnt seem to be working .

```auto
	dissect
	{
	mapping => {"message" => "%{time}|%{threadID}|%{?rest}:%{DISK}"}
	}
	kv 
	{
	source => "DISK"
	trim_value => "="
	}
	mutate
	{
	rename => {"[0-9]" => "Disk [0-9]"}
	}	
	}

```

---

<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: [September 7, 2021, 2:32pm UTC](https://discuss.elastic.co/t/filter-to-change-the-field-name-to-be-more-user-friendly/283543/2 "2021-09-07T14:32:46Z")

</div>

> [@Shreesh\_Narayanan](#):
>
> However i needed to rename the field name to something more user friendly . such as renaming [1]=\>"76%" to disk#1 =\> "76%"

I [explained](https://discuss.elastic.co/t/logstash-filter-for-varying-number-of-disks-info-in-the-logs/281400/2) how to do that the last time I answered this question for you.

---

<div class="post-metadata">

### Author: ![Shreesh\_Narayanan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shreesh_narayanan/32/87312_2.png) [@Shreesh\_Narayanan](https://discuss.elastic.co/u/Shreesh_Narayanan)
#### Post date: [September 8, 2021, 4:38am UTC](https://discuss.elastic.co/t/filter-to-change-the-field-name-to-be-more-user-friendly/283543/3 "2021-09-08T04:38:16Z")

</div>

Thank you @Badger🙂 . I lost track of that thread .

---

<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: [October 6, 2021, 4:39am UTC](https://discuss.elastic.co/t/filter-to-change-the-field-name-to-be-more-user-friendly/283543/4 "2021-10-06T04:39:00Z")

</div>

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