# Gatway stastistics

**URL:** <https://www.thethingsnetwork.org/forum/t/gatway-stastistics/38681>\
**Category:** Gateways\
**Created:** [July 21, 2020, 8:01pm UTC](https://www.thethingsnetwork.org/forum/t/gatway-stastistics/38681 "2020-07-21T20:01:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johan\_Scheepers](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/johan_scheepers/32/46550_2.png) [@Johan\_Scheepers](https://www.thethingsnetwork.org/forum/u/Johan_Scheepers)\
**Post date:** [July 21, 2020, 8:01pm UTC](https://www.thethingsnetwork.org/forum/t/gatway-stastistics/38681/1 "2020-07-21T20:01:14Z")

</div>

Hi,

I am looking for the API to get the following statistical data from my gateways,

Messages per hour.  
Messages per day.  
Number of nodes connected per hour.  
Number of nodes connected per day.

I have read the following but have not notice the relevant API.

- [Getting gateway statistics](https://www.thethingsnetwork.org/forum/t/getting-gateway-statistics/3411)
- [API Access to Gateway Statistics?](https://www.thethingsnetwork.org/forum/t/api-access-to-gateway-statistics/19832)
- [Can we still get statistics from all gateways and nodes?](https://www.thethingsnetwork.org/forum/t/can-we-still-get-statistics-from-all-gateways-and-nodes/2033)

The API [https://noc.thethingsnetwork.org:8085/api/v2/gateways/eui-xxxxxxx](https://noc.thethingsnetwork.org:8085/api/v2/gateways/eui-xxxxxxx) - do give some of the information I want.

Help will be appropriated, thank you.

---

<div class="post-metadata">

**Author:** ![pe1mew](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/pe1mew/32/48520_2.png) [@pe1mew](https://www.thethingsnetwork.org/forum/u/pe1mew)\
**Post date:** [July 22, 2020, 9:20am UTC](https://www.thethingsnetwork.org/forum/t/gatway-stastistics/38681/2 "2020-07-22T09:20:22Z")

</div>

There is no such API within TTN. You will have to make it yourself. What you can do is create an endpoint where UDP traffic is duplicated to by a gateway where you will collect and analyse data.  
I have made this as A POC on Node Red.

---

<div class="post-metadata">

**Author:** ![Johan\_Scheepers](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/johan_scheepers/32/46550_2.png) [@Johan\_Scheepers](https://www.thethingsnetwork.org/forum/u/Johan_Scheepers)\
**Post date:** [July 26, 2020, 9:02am UTC](https://www.thethingsnetwork.org/forum/t/gatway-stastistics/38681/3 "2020-07-26T09:02:17Z")

</div>

Thanks,

I know from [http://noc.thethingsnetwork.org:8085/api/v2/gateways/eui-xxxxxx](http://noc.thethingsnetwork.org:8085/api/v2/gateways/eui-xxxxxx)

I can get  
{“timestamp”:“2020-07-26T08:54:22.038428811Z”,“uplink”:“1378”,“downlink”:“277”,“location”:{},“frequency\_plan”:“EU\_863\_870”,“gps”:{},“time”:“1595753662038428811”,“rx\_ok”:1378,“tx\_in”:277}

From this I can do a request every hour and the put that in a db and calculate every hour, day, week and monthly amount of packets.

I am interested to see as well the amount of nodes connecting to a gateway, so were interested if there is a AIP for this?

---

<div class="post-metadata">

**Author:** ![arjanvanb](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/arjanvanb/32/46626_2.png) [@arjanvanb](https://www.thethingsnetwork.org/forum/u/arjanvanb)\
**Post date:** [July 26, 2020, 10:50am UTC](https://www.thethingsnetwork.org/forum/t/gatway-stastistics/38681/4 "2020-07-26T10:50:40Z")

</div>

@pe1mew’s answer says it all, and this is just repeating details from the existing forum posts; I’m closing this one. Also, like already noted in a private message before you created this topic:

> [@Can we still get statistics from all gateways and nodes?](https://www.thethingsnetwork.org/forum/t/can-we-still-get-statistics-from-all-gateways-and-nodes/2033/12):
>
> The v3 stack will not contain a NOC component as we have it now.

I’d not spend time on creating anything for V2.

---

<div class="post-metadata">

**Author:** ![arjanvanb](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/arjanvanb/32/46626_2.png) [@arjanvanb](https://www.thethingsnetwork.org/forum/u/arjanvanb)\
**Post date:** [July 26, 2020, 12:54pm UTC](https://www.thethingsnetwork.org/forum/t/gatway-stastistics/38681/7 "2020-07-26T12:54:56Z")

</div>

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