# Count network traffic

**URL:** <https://community.influxdata.com/t/count-network-traffic/19072>\
**Category:** InfluxDB 2\
**Tags:** influxdb\
**Created:** [March 24, 2021, 9:27pm UTC](https://community.influxdata.com/t/count-network-traffic/19072 "2021-03-24T21:27:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thunem](https://avatars.discourse-cdn.com/v4/letter/t/e9bcb4/32.png) [@thunem](https://community.influxdata.com/u/thunem)\
**Post date:** [March 24, 2021, 9:27pm UTC](https://community.influxdata.com/t/count-network-traffic/19072/1 "2021-03-24T21:27:01Z")

</div>

I´m running home assistant and got a tp-link router that I want to show how much data that I send/receive. The problem seems that the router is getting reset when it reaches some values.

Is there a way to keep the counting in a positive value. What I want is to how mutch data each day / month etc and show this in grafana. Is there a way to create a new entry that count byte sent/recieved each day? I want to show this by using grafana.

```
SELECT mean("value") AS "mean_value" FROM "home_assistant"."autogen"."B" WHERE time > :dashboardTime: AND time < :upperDashboardTime: AND ("entity_id"='m9plus_b_received' OR "entity_id"='m9plus_b_sent') GROUP BY time(:interval:) FILL(null)

```

 ![Screenshot 2021-03-24 at 22.26.46](https://us1.discourse-cdn.com/flex023/uploads/influxdata/original/2X/e/e6a76aeba97256b77522fafb5964926897cdbd98.png)
