Skip to content

Flow Accounting / Network Service Config statistics

Use-Case: Presenting Peer to Peer statistics in a traffic portal.

Proposal:

Statistics read endpoint returns an array: GET /network-service-configs/42/peer-statistics

Additional Filters: ?asn= ?mac_address= ?ip_address= ?ip_version=

With peer the fields asn and ip are optional / non required. mac_address is required.

[
{
   "peer": {
      "asn": 12345,
      "ip": { 
        "address": "fc23:4242::1",
        "version": 6,
      },
      "mac_address": "...",
    },

  "aggregates": {
    "5m": {
      "title": "5 Minutes",
      "precision": 300,
      "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
    },
    "30d": {
      "title": "30 Days",
      "precision": 3600,
      "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
    }
  }
}
]

Timeseries

GET /network-service-configs/42/peer-statistics/{aggregate}/timeseries

It will return a list of timeseries, same as the aggregates endpoint, with peer information:

[
{
  "title": "5 Minutes",
  "precision": 300,
  "created_at": "2019-08-24T14:15:22Z",
  "next_update_at": "2019-08-24T14:15:22Z",
  "origin_timezone": "Europe/Amsterdam",

  "peer": {
      "asn": 12345,
      "ip": { 
        "address": "fc23:4242::1",
        "version": 6,
      },
      "mac_address": "...",
  },

  "samples": [
    [
      "2019-08-24T14:15:22Z",
      120302,
      42980203,
      320302,
      84990203
    ]
  ]
}
]
Edited by Annika Hannig