# Visualizing network traffic timelion (metricbeat)

**URL:** <https://discuss.elastic.co/t/visualizing-network-traffic-timelion-metricbeat/126333>\
**Category:** Kibana\
**Tags:** timelion\
**Created:** [March 31, 2018, 7:02pm UTC](https://discuss.elastic.co/t/visualizing-network-traffic-timelion-metricbeat/126333 "2018-03-31T19:02:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dinon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dinon/32/26342_2.png) [@dinon](https://discuss.elastic.co/u/dinon)\
**Post date:** [March 31, 2018, 7:02pm UTC](https://discuss.elastic.co/t/visualizing-network-traffic-timelion-metricbeat/126333/1 "2018-03-31T19:02:43Z")

</div>

Hi,  
I am using metricbeat to send network data to kibana from window mchine,  
What hapens is that these counters are reaching max value and then going back to zero

 ![43](https://us1.discourse-cdn.com/elastic/original/3X/d/3/d3ff0bdfce2cda08b5a4ab71f8e2856597ebf343.png)

When using below timelion formula it causes a big jump when counters are reset, how to overcome this situation?

.es(index=metricbeat-cloud-_, timefield=@timestamp, metric=max:system.network.in.bytes).derivative().divide(1048576).lines(fill=2, width=1).color(green).label("Inbound traffic").title("Network traffic (MB/s)"), .es(index=metricbeat-cloud-_, timefield=@timestamp, metric=max:system.network.out.bytes).derivative().multiply(-1).divide(1048576).lines(fill=2, width=1).color(red).label("Outbound traffic").legend(columns=2, position=nw)

 ![13](https://us1.discourse-cdn.com/elastic/original/3X/8/5/85c1498c352d8afc9d8e0682579c4e257acf3bed.png)

---

<div class="post-metadata">

**Author:** ![jbudz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jbudz/32/45922_2.png) [@jbudz](https://discuss.elastic.co/u/jbudz)\
**Post date:** [April 2, 2018, 7:12pm UTC](https://discuss.elastic.co/t/visualizing-network-traffic-timelion-metricbeat/126333/2 "2018-04-02T19:12:53Z")

</div>

Can you share your version ( \>= 5.4) ? If TSVB is available you can use the "Positive only" aggregation after the derivative aggregation to filter out negatives.

If not you can try digging into timelion's if statements, [https://www.elastic.co/blog/timeseries-if-then-else-with-timelion](https://www.elastic.co/blog/timeseries-if-then-else-with-timelion) has more info.

---

<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 30, 2018, 7:12pm UTC](https://discuss.elastic.co/t/visualizing-network-traffic-timelion-metricbeat/126333/3 "2018-04-30T19:12:55Z")

</div>

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