# Doubt regarding aggregation of metrics which are read from log files

**URL:** <https://discuss.elastic.co/t/doubt-regarding-aggregation-of-metrics-which-are-read-from-log-files/209936>\
**Category:** Elasticsearch\
**Created:** [November 29, 2019, 7:58am UTC](https://discuss.elastic.co/t/doubt-regarding-aggregation-of-metrics-which-are-read-from-log-files/209936 "2019-11-29T07:58:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rj23495](https://avatars.discourse-cdn.com/v4/letter/r/7ba0ec/32.png) [@rj23495](https://discuss.elastic.co/u/rj23495)\
**Post date:** [November 29, 2019, 7:58am UTC](https://discuss.elastic.co/t/doubt-regarding-aggregation-of-metrics-which-are-read-from-log-files/209936/1 "2019-11-29T07:58:13Z")

</div>

I have a very trivial doubt, when i read log files and send this to elasticsearch via filebeat and logstash, sp while doing aggregations and performing operations like sum, average does it read the log file before aggregating it or it has created a time series graph for itself and then present the data?

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [November 29, 2019, 8:06am UTC](https://discuss.elastic.co/t/doubt-regarding-aggregation-of-metrics-which-are-read-from-log-files/209936/2 "2019-11-29T08:06:37Z")

</div>

the contents of a log file are stored in elasticsearch for effecient retrieval of those aggregations, thus the original log file is not needed to execute an aggregation, as all the data is already within Elasticsearch.

---

<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:** [December 27, 2019, 8:14am UTC](https://discuss.elastic.co/t/doubt-regarding-aggregation-of-metrics-which-are-read-from-log-files/209936/3 "2019-12-27T08:14:40Z")

</div>

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