# Mutate is not working

**URL:** https://discuss.elastic.co/t/mutate-is-not-working/82041
**Category:** Logstash
**Created:** [April 11, 2017, 7:19pm UTC](https://discuss.elastic.co/t/mutate-is-not-working/82041 "2017-04-11T19:19:19Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![saad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saad/32/17214_2.png) [@saad](https://discuss.elastic.co/u/saad)
#### Post date: [April 11, 2017, 7:19pm UTC](https://discuss.elastic.co/t/mutate-is-not-working/82041/1 "2017-04-11T19:19:19Z")

</div>

Hi,

I am trying to work on mutate to convert some the source and destination IP addresses from string to ip. However, it is not working

below are the results  
**logstash.conf**  
input  
{  
stdin  
{  
type=\>"soc"  
}  
}

filter  
{  
csv {columns =\> ["eventId","eventCode","srcAddr","dstAddr"] separator =\> ","}  
mutate{  
convert =\> { "srcAddr" =\> "ip"}  
}  
}  
output  
{  
stdout{ codec =\> rubydebug}  
}

the logstash didnt work successfully. is there something wrong

 ![](https://us1.discourse-cdn.com/elastic/original/3X/d/6/d62a640e3712a704dfa87e1f6657e72ce5eef535.png)

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [April 12, 2017, 5:26am UTC](https://discuss.elastic.co/t/mutate-is-not-working/82041/2 "2017-04-12T05:26:12Z")

</div>

If you look in the documentation of the mutate filter, is "ip" a valid data type to convert to?

The IP address data type exists only on the Elasticsearch side.

---

<div class="post-metadata">

### Author: ![saad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saad/32/17214_2.png) [@saad](https://discuss.elastic.co/u/saad)
#### Post date: [April 12, 2017, 1:18pm UTC](https://discuss.elastic.co/t/mutate-is-not-working/82041/3 "2017-04-12T13:18:40Z")

</div>

Thank you

---

<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: [May 10, 2017, 1:19pm UTC](https://discuss.elastic.co/t/mutate-is-not-working/82041/4 "2017-05-10T13:19:59Z")

</div>

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