Metric Sharing / Available capacity
In the aggregate response of the network service config add an additional field with the available capacity left on the nsc: (allocated capacity - current traffic, current traffic = peer traffic + all other peers)
nsc_available_capacity
, nsc_available_capacity_change_perc
are optional.
Also in the shared_statistics
object, to indicate if the implementor supports this feature.
GET network-service-configs/23/peer-statistics
[
{
"peer": {
"asn": 12345,
"ip": {
"address": "fc23:4242::1",
"version": 6,
},
"mac_address": "...",
},
"aggregates": {
"5m": {
"title": "5 Minutes",
"accuracy": 0.98,
"total_samples": 1,
"created_at": "2019-08-24T14:15:22Z",
"next_update_at": "2019-08-24T14:15:22Z",
"average_pps_in": 1730224,
"average_pps_out": 17456,
"average_ops_in": 1734882240,
"average_ops_out": 173220,
"nsc_available_capacity": 13456,
"nsc_available_capacity_change_perc": -13.0
},
}
]
Add GET network-service-configs/23/statistics
{
"aggregates": {
"5m": {
"title": "5 Minutes",
"accuracy": 0.94,
"total_samples": 1,
"created_at": "2019-08-24T14:15:22Z",
"next_update_at": "2019-08-24T14:15:22Z",
"average_pps_in": 1730224,
"average_pps_out": 17456,
"average_ops_in": 1734882240,
"average_ops_out": 173220
"nsc_available_capacity": ...
},
"30d": {
"title": "30 Days",
"accuracy": 0.89,
"total_samples": 720,
"created_at": "2019-08-24T14:15:22Z",
"next_update_at": "2019-08-24T14:15:22Z",
"average_pps_in": 1730224,
"average_pps_out": 17456,
"average_ops_in": 1734882240,
"average_ops_out": 173220
}
}
}
Add to {GET, PATCH, POST} /network-service-configs/23
:
NSC only exchange_lan
:
{
shared_statistics: {
nsc_available_capacity: [ <account_id>, ... ],
rtt: [ ... ],
}
}
Edited by Annika Hannig