# Aggregate destination ip addresses and destination ports

**URL:** https://discuss.elastic.co/t/aggregate-destination-ip-addresses-and-destination-ports/280342
**Category:** Elasticsearch
**Created:** [August 3, 2021, 3:38pm UTC](https://discuss.elastic.co/t/aggregate-destination-ip-addresses-and-destination-ports/280342 "2021-08-03T15:38:23Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Marco\_Lazzarotto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_lazzarotto/32/92486_2.png) [@Marco\_Lazzarotto](https://discuss.elastic.co/u/Marco_Lazzarotto)
#### Post date: [August 3, 2021, 3:38pm UTC](https://discuss.elastic.co/t/aggregate-destination-ip-addresses-and-destination-ports/280342/1 "2021-08-03T15:38:23Z")

</div>

I'm collecting hundreds of thousands of logs from a firewall (Cisco ASA).

On every log record, among other details, I have destination ip addresses and destination ports.  
Now, I need to have an aggregated list of all destination ip addresses and destination ports.  
I tried using both terms aggregation and significant terms aggregations, but neither of the 2 works well, because I always find something in the logs that has not been included in the aggregated list.

src 10.1.1.177:50022 dst 10.2.1.1:80  
src 10.1.1.1:5000 dst 10.2.1.1:443  
src 10.1.1.54:5000 dst 10.2.1.1:443  
src 10.1.1.85:5000 dst 10.2.1.1:443  
src 10.1.1.1:50022 dst 10.2.2.1:990  
src 10.1.1.112:50022 dst 10.2.2.1:990  
src 10.1.1.177:50022 dst 10.2.2.1:990

From the example above I want:  
10.2.1.1:80  
10.2.1.1:443  
10.2.2.1:990

From that data I will later create a pivot table in Excel.

**What kind of aggregation do I need?**

---

<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: [August 31, 2021, 3:38pm UTC](https://discuss.elastic.co/t/aggregate-destination-ip-addresses-and-destination-ports/280342/2 "2021-08-31T15:38:24Z")

</div>

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