Closed cambierr closed 7 years ago
Would be good to add stats on:
We already have the following optional fields in stat
messages:
"pfrm":"Kerlink"
- the gateway platform"mail":"contact@email.network"
- contact info of the gateway owner"desc":"Contacts Home Gateway"
- description of the gatewayIt would be possible to add some system metrics to the packet_forwarder protocol like @cambierr suggests. We'd have to specify a set of "supported" fields (because sending arbitrary data is usually a bad idea):
"load":"1.54 1.93 2.03"
- system load of the gateway host "cpu":12
- average total CPU usage (in percent) since the last stat
message"mem":12
- total memory usage (in percent)"temp":31.5
- temperatureThe other statistics mentioned, can easily be determined on the server-side.
Implementing the system metrics fields is not much work on the server side, and it sounds like @cambierr already implemented this for the packet forwarder. Let's try to formalize a specification for these fields (also the existing ones, because those are not really documented either).
The gateway.Status
proto now contains the following fields:
float load_1
float load_5
float load_15
float cpu_percentage
float memory_percentage
float temperature
These fields will have to be filled by the gateway. If the gateway uses the ttn-gateway-connector
this can be done by simply filling the protocol buffer. The packet_forwarder does not support these fields.
It could be great to add more monitoring fields to gateways. In our case, we are monitoring cpu load, ram % use, bandwidth, packet losses, and two temperatures.
This could be achieved by adding a repeated meta field which is a Key/Value pair for instance, so that custom monitoring is possible by adding fields in different gateways / forwarder implementations