# Time Series metric aggregation

**URL:** https://discuss.elastic.co/t/time-series-metric-aggregation/123040
**Category:** Kibana
**Created:** [March 8, 2018, 10:06am UTC](https://discuss.elastic.co/t/time-series-metric-aggregation/123040 "2018-03-08T10:06:52Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![jerrychen](https://avatars.discourse-cdn.com/v4/letter/j/839c29/32.png) [@jerrychen](https://discuss.elastic.co/u/jerrychen)
#### Post date: [March 8, 2018, 10:06am UTC](https://discuss.elastic.co/t/time-series-metric-aggregation/123040/1 "2018-03-08T10:06:52Z")

</div>

env: es 6.2 + kibana 6.2

There are 5 hosts.Every 2 minute,the value of network bandwidth indexing to es by each host.For example：  
host A.net\_bandwidth: 200  
host B.net\_bandwidth: 400  
...  
The unit of measurement is "KB/s"

How can I visualize the total bandwidth of 5 hosts in time series? Approximate value is ok.

If i choose sum aggregation to do this, when the time interval greater than 2m,the result is far greater than actual value.

Thinks for your help.

---

<div class="post-metadata">

### Author: ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)
#### Post date: [March 8, 2018, 6:06pm UTC](https://discuss.elastic.co/t/time-series-metric-aggregation/123040/2 "2018-03-08T18:06:34Z")

</div>

If you want to make the interval higher than 2 minutes, you could do a `sum of avg bandwidth` for each host. I would do it in TSVB, as you could even display each individual one on the same chart.

---

<div class="post-metadata">

### Author: ![jerrychen](https://avatars.discourse-cdn.com/v4/letter/j/839c29/32.png) [@jerrychen](https://discuss.elastic.co/u/jerrychen)
#### Post date: [March 9, 2018, 1:34am UTC](https://discuss.elastic.co/t/time-series-metric-aggregation/123040/3 "2018-03-09T01:34:41Z")

</div>

How to do `sum of avg`?

TSVB means Time Series Visual Builder?

I do it in visual builder,i wanna display one line that is total bandwidth of 5 host . I can display individual one using group by terms

---

<div class="post-metadata">

### Author: ![jerrychen](https://avatars.discourse-cdn.com/v4/letter/j/839c29/32.png) [@jerrychen](https://discuss.elastic.co/u/jerrychen)
#### Post date: [March 9, 2018, 1:05pm UTC](https://discuss.elastic.co/t/time-series-metric-aggregation/123040/4 "2018-03-09T13:05:55Z")

</div>

The result i want to get like below,if it is in SQL env.

> select \*  
> from (  
> select time\_format\_to\_interval\_10m,decode(grouping(ipaddr),1,'total',0) bindwidth,max(network\_bindwidth)  
> from tab\_index  
> group by time\_format\_to\_interval\_10m,rollup(ipaddr)  
> order by time\_format\_to\_interval\_10m  
> )  
> where bindwidth='total'

how can i do this in kibana.

---

<div class="post-metadata">

### Author: ![jerrychen](https://avatars.discourse-cdn.com/v4/letter/j/839c29/32.png) [@jerrychen](https://discuss.elastic.co/u/jerrychen)
#### Post date: [March 13, 2018, 1:53am UTC](https://discuss.elastic.co/t/time-series-metric-aggregation/123040/5 "2018-03-13T01:53:27Z")

</div>

I can do it in Timelion. such as .es().sum().

Is it right?

---

<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: [April 10, 2018, 1:53am UTC](https://discuss.elastic.co/t/time-series-metric-aggregation/123040/6 "2018-04-10T01:53:40Z")

</div>

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