# Mutate Add\_field

**URL:** <https://discuss.elastic.co/t/mutate-add-field/61791>\
**Category:** Logstash\
**Created:** [September 29, 2016, 8:32am UTC](https://discuss.elastic.co/t/mutate-add-field/61791 "2016-09-29T08:32:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![13koushik](https://avatars.discourse-cdn.com/v4/letter/1/13edae/32.png) [@13koushik](https://discuss.elastic.co/u/13koushik)\
**Post date:** [September 29, 2016, 8:32am UTC](https://discuss.elastic.co/t/mutate-add-field/61791/1 "2016-09-29T08:32:15Z")

</div>

I'm new to Logstash and I would be thankful if you could help me out. Is it possible to create an array using add\_field of mutate. Below is my config file,

input {  
file {  
path =\> "/opt/logAnalyzer/source/log\__/_.txt"  
start\_position =\> "beginning"  
}  
}  
filter {  
json {  
source =\> "message"  
target =\> "msg"  
}  
mutate {  
add\_field =\> {  
"Relation" =\> {  
"IP-Address" =\> "%{[msg][message][IP-Address]}",  
"Name" =\> "HostName"

```
		}
}

```

}  
output {  
stdout {  
codec =\> rubydebug  
}  
file {  
path =\> "/root/abc/def/ghi.txt"  
}  
}

add\_field is giving me an error. Thanks in advance.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 30, 2016, 5:26am UTC](https://discuss.elastic.co/t/mutate-add-field/61791/2 "2016-09-30T05:26:10Z")

</div>

Please don't post the same question more than once - [Add\_tag](https://discuss.elastic.co/t/add-tag/61837)

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 30, 2016, 5:26am UTC](https://discuss.elastic.co/t/mutate-add-field/61791/3 "2016-09-30T05:26:15Z")

</div>


