# How do I use the logstash alter coalesce plugin?

**URL:** <https://discuss.elastic.co/t/how-do-i-use-the-logstash-alter-coalesce-plugin/71494>\
**Category:** Logstash\
**Created:** [January 13, 2017, 9:12am UTC](https://discuss.elastic.co/t/how-do-i-use-the-logstash-alter-coalesce-plugin/71494 "2017-01-13T09:12:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sliddjur](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sliddjur/32/65260_2.png) [@sliddjur](https://discuss.elastic.co/u/sliddjur)\
**Post date:** [January 13, 2017, 9:12am UTC](https://discuss.elastic.co/t/how-do-i-use-the-logstash-alter-coalesce-plugin/71494/1 "2017-01-13T09:12:58Z")

</div>

Each of my event contains one type of src addr and one type of dst addr.

These variations always produce errors. How do I properly use the coalesce filter in logstash? It isnt clear to me in examples. This is what I've tried, and some variations of them.

```
alter { coalesce => [[flow][SourceIP], "%{[netflow][ipv4_dst_addr]}", "%{[netflow][ipv4_dst_addr]}", "%{[ipfix][sourceIPv4Address]}", "%{[ipfix][sourceIPv6Address]}" }
alter { coalesce => ["[flow][DestinationIP]", [netflow][ipv4_dst_addr], [netflow][ipv6_dst_addr], [ipfix][destinationIPv4Address], [ipfix][destinationIPv6Address] ] }

```

logstash-filter-alter is installed.

---

<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:** [February 10, 2017, 9:13am UTC](https://discuss.elastic.co/t/how-do-i-use-the-logstash-alter-coalesce-plugin/71494/2 "2017-02-10T09:13:10Z")

</div>

Closed on February 10, 2017, 9:13am UTC

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