# Sum values of two csv inputfiles result to an index file

**URL:** <https://discuss.elastic.co/t/sum-values-of-two-csv-inputfiles-result-to-an-index-file/188699>\
**Category:** Logstash\
**Created:** [July 3, 2019, 11:55am UTC](https://discuss.elastic.co/t/sum-values-of-two-csv-inputfiles-result-to-an-index-file/188699 "2019-07-03T11:55:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![subok](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@subok](https://discuss.elastic.co/u/subok)\
**Post date:** [July 3, 2019, 11:55am UTC](https://discuss.elastic.co/t/sum-values-of-two-csv-inputfiles-result-to-an-index-file/188699/1 "2019-07-03T11:55:00Z")

</div>

Hi,  
I need some help and don't know how to start with it.

Basically, i have two csv input files (coming from 2 different nodes) and would like to sum the values with the result going to elasticsearch..

Any help is greatly appreciated...

CSV1  
node link rate-in rate-out  
node1 link1 10 20  
node1 link2 30 50  
node1 link3 40 60

CSV2  
node link rate-in rate-out  
node2 link1 20 10  
node2 link2 50 70  
node2 link3 80 40

Result --\> create elasticsearch index  
node link rate-in rate-out  
allnode link1 30 30  
allnode link2 80 120  
allnode link3 120 100

Thanks!

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [July 3, 2019, 1:07pm UTC](https://discuss.elastic.co/t/sum-values-of-two-csv-inputfiles-result-to-an-index-file/188699/2 "2019-07-03T13:07:27Z")

</div>

You could try using an [aggregate](https://www.elastic.co/guide/en/logstash/current/plugins-filters-aggregate.html) filter with the link as the task id.

---

<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:** [July 31, 2019, 1:07pm UTC](https://discuss.elastic.co/t/sum-values-of-two-csv-inputfiles-result-to-an-index-file/188699/3 "2019-07-31T13:07:35Z")

</div>

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