I have an index of data traffic across the network. I am able to select a list of the "top 10" IP addresses by IP and want to show a table of IP/PORT/IP-PORT DATA USAGE for only those top 10.
If I do the stats then try a sort+head i get the top 10 IP-PORT instead of the top 10 IP.
Example:
If I only wanted top 2 (to keep it simple) then from the data:
ip bytes port
-----------------------------
1.1.1.1, 1000023, 80
1.1.1.1, 43243, 443
2.2.2.2, 1000025, 3493
3.3.3.3, 1000026, 5542
4.4.4.4, 1000027, 3332
I would get results for 4.4.4.4 and 3.3.3.3.... because stats sum(bytes) by ip, port is not merging the sum of bytes for the two 1.1.1.1 entries.
... View more