From a1c5497f0ca3f9cc16fd64a0dcc36fa2776306c4 Mon Sep 17 00:00:00 2001 From: Annika Hannig Date: Fri, 8 May 2020 15:32:21 +0200 Subject: [PATCH 1/9] initial commit --- README.md | 34 +++++++++++++++++++++++++- schema/json-traffic-timeseries-v1.json | 0 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 schema/json-traffic-timeseries-v1.json diff --git a/README.md b/README.md index dddc985..05dbf1b 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,34 @@ # json-traffic -JSON schema for sharing traffic data +JSON schema for sharing traffic data. + +The following document describes schemata for +aggregated and timeseries data. + +## Timeseries Data + +Timeseries data of traffic is a list of samples with a timestamp. +The sampled data is aggregated over a given window (`aggregate_interval` seconds). +Knowing the interval, we can check if the samples have any missing data. + +The sources should be identified by their ixf_ixid and should be unique. + +### Example +{ + "version": "1.0", + "created_at": "2001-10-23T23:30:12Z", + "next_update_at": "2001-10-23T23:45:12Z", + "sources": { + "": { + "url": "https://...", + "title": "IX LAN 1", + "aggregate_interval": 300, + }, + }, + "samples": { + "": [ + ["2001-10-23T23:42:10Z", 23, 42, 12897, 481], + ] + } +} + + diff --git a/schema/json-traffic-timeseries-v1.json b/schema/json-traffic-timeseries-v1.json new file mode 100644 index 0000000..e69de29 From c691eccd8cb195b1e81cf169e3a21d6b6ff592ad Mon Sep 17 00:00:00 2001 From: Annika Hannig Date: Fri, 8 May 2020 15:32:44 +0200 Subject: [PATCH 2/9] updated example --- README.md | 49 +++++++++++++++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 05dbf1b..d8adb8f 100644 --- a/README.md +++ b/README.md @@ -12,23 +12,40 @@ Knowing the interval, we can check if the samples have any missing data. The sources should be identified by their ixf_ixid and should be unique. +The samples arn n-tuples of + + - `timestamp` (ISO 8601) + - `packets_in` + - `packets_out` + - `octets_in` + - `octets_out` + + ### Example -{ - "version": "1.0", - "created_at": "2001-10-23T23:30:12Z", - "next_update_at": "2001-10-23T23:45:12Z", - "sources": { - "": { - "url": "https://...", - "title": "IX LAN 1", - "aggregate_interval": 300, - }, - }, - "samples": { - "": [ - ["2001-10-23T23:42:10Z", 23, 42, 12897, 481], - ] + { + "version": "1.0", + "created_at": "2001-10-23T23:30:12Z", + "next_update_at": "2001-10-23T23:45:12Z", + "sources": { + "": { + "url": "https://...", + "title": "IX LAN 1", + "aggregate_interval": 300, + }, + }, + "samples": { + "": [ + ["2001-10-23T23:42:10Z", 23, 42, 12897, 481], + ] + } } -} + +### Schema + +... link ... + +## Aggregate Data + + From 856cebdd9b55f6111526131e3aff34df1ab464e2 Mon Sep 17 00:00:00 2001 From: Annika Hannig Date: Fri, 8 May 2020 16:09:44 +0200 Subject: [PATCH 3/9] added schema draft --- README.md | 2 +- schema/json-traffic-timeseries-v1.json | 94 ++++++++++++++++++++++++++ 2 files changed, 95 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d8adb8f..3aec8c7 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ aggregated and timeseries data. Timeseries data of traffic is a list of samples with a timestamp. The sampled data is aggregated over a given window (`aggregate_interval` seconds). -Knowing the interval, we can check if the samples have any missing data. +Knowing the interval, we can check the integrity of the series. The sources should be identified by their ixf_ixid and should be unique. diff --git a/schema/json-traffic-timeseries-v1.json b/schema/json-traffic-timeseries-v1.json index e69de29..8e89c2d 100644 --- a/schema/json-traffic-timeseries-v1.json +++ b/schema/json-traffic-timeseries-v1.json @@ -0,0 +1,94 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "title": "IXP Statistics Timeseries Schema", + "description": "A JSON schema representing the timeseries traffic at an IXP", + "type": "object", + "required": [ + "version", + "created_at", + "next_update_at", + "sources", + "samples" + ], + "properties": { + "version": { + "title": "Schema Version", + "description": "Version number of the schema; this is not the version of the file within an IXP; but the schema version", + "type": "string" + }, + "created_at": { + "title": "Datetime of export", + "description": "Datetime (ISO 8601) of when the data was exported", + "type": "string", + "format": "date-time" + }, + "next_update_at": { + "title": "Datetime of next export", + "description": "Datetime (ISO 8601) of the next time when the data will be exported", + "type": "string", + "format": "date-time" + }, + "sources": { + "title": "Statistic Sources", + "description": "A hash of sources, with ixf_ixid as the key", + "type": "object", + "properties": {}, + "additionalProperties": { + "type": "object", + "required": [ + "title", + "url", + "aggregate_interval" + ], + "properties": { + "url": { + "type": "string", + "title": "URL of the IXP's statistics page", + "description": "Url of the IXP's own statistics page" + }, + "title": { + "type": "string", + "title": "Title / Display name", + "description": "The title or display name of the series" + }, + "aggregate_interval": { + "type": "integer", + "title": "Aggregate Interval", + "description": "Width of the aggregate window between samples in seconds." + } + } + } + }, + "samples": { + "description": "A collection of samples", + "type": "object", + "properties": {}, + "additionalProperties": { + "type": "array", + "items": [ + { + "description": "Datetime of the sample", + "type": "string", + "format": "date-time" + }, + { + "description": "Packets in", + "type": "integer" + }, + { + "description": "Packets out", + "type": "integer" + }, + { + "description": "Octets in", + "type": "integer" + }, + { + "description": "Octets out", + "type": "integer" + } + ] + } + } + } +} From b087458590925c5f5d9dae71be07ba088db5b9c2 Mon Sep 17 00:00:00 2001 From: Annika Hannig Date: Fri, 8 May 2020 16:16:10 +0200 Subject: [PATCH 4/9] fixed link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3aec8c7..4283bf3 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ The samples arn n-tuples of ### Schema -... link ... +[schema/json-traffic-timeseries-v1.json](schema/json-traffic-timeseries-v1.json) ## Aggregate Data From 273bb324684a3c06821ac6c0592099b5f9c90a6e Mon Sep 17 00:00:00 2001 From: Annika Hannig Date: Fri, 8 May 2020 16:47:54 +0200 Subject: [PATCH 5/9] added aggregated traffic schema proposal --- schema/json-traffic-aggregates-v1.json | 149 +++++++++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 schema/json-traffic-aggregates-v1.json diff --git a/schema/json-traffic-aggregates-v1.json b/schema/json-traffic-aggregates-v1.json new file mode 100644 index 0000000..2136468 --- /dev/null +++ b/schema/json-traffic-aggregates-v1.json @@ -0,0 +1,149 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "title": "IXP Statistics Aggregates Schema", + "description": "A JSON schema representing the aggregated traffic at an IXP", + "type": "object", + "required": [ + "version", + "created_at", + "next_update_at", + "sources", + "aggregated" + ], + "properties": { + "version": { + "title": "Schema Version", + "description": "Version number of the schema; this is not the version of the file within an IXP; but the schema version", + "type": "string" + }, + "created_at": { + "title": "Datetime of export", + "description": "Datetime (ISO 8601) of when the data was exported", + "type": "string", + "format": "date-time" + }, + "next_update_at": { + "title": "Datetime of next export", + "description": "Datetime (ISO 8601) of the next time when the data will be exported", + "type": "string", + "format": "date-time" + }, + "sources": { + "title": "Statistic Sources", + "description": "A hash of sources, with ixf_ixid as the key", + "type": "object", + "properties": {}, + "additionalProperties": { + "type": "object", + "required": [ + "title", + "url", + "aggregate_interval" + ], + "properties": { + "url": { + "type": "string", + "title": "URL of the IXP's statistics page", + "description": "Url of the IXP's own statistics page" + }, + "title": { + "type": "string", + "title": "Title / Display name", + "description": "The title or display name of the IXP", + "example": "MY-IXP LAN-1" + }, + "aggregate_interval": { + "type": "integer", + "title": "Aggregate Interval", + "description": "Width of the aggregate window in seconds.", + "example": 86400 + } + } + } + }, + "statistics": { + "type": "object", + "properties": {}, + "additionalProperties": { + "type": "object", + "required": [ + "current_packets_in", + "current_packets_out", + "current_octets_in", + "current_octets_out", + "average_packets_in", + "average_packets_out", + "average_octets_in", + "average_octets_out", + "maximum_packets_in", + "maximum_packets_out", + "maximum_octets_in", + "maximum_octets_out", + "maximum_in_at", + "maximum_out_at" + ], + "properties": { + "current_packets_in": { + "type": "integer", + "description": "The current number of packets going in" + }, + "current_packets_out": { + "type": "integer", + "description": "The current number of packets going out" + }, + "current_octets_in": { + "type": "integer", + "description": "The current number of octets going in" + }, + "current_octets_out": { + "type": "integer", + "description": "The current number of octets going out" + }, + "average_packets_in": { + "type": "integer", + "description": "The average number of packets going in" + }, + "average_packets_out": { + "type": "integer", + "description": "The average number of packets going out" + }, + "average_octets_in": { + "type": "integer", + "description": "The average number of octets going in" + }, + "average_octets_out": { + "type": "integer", + "description": "The average number of octets going out" + }, + "maximum_packets_in": { + "type": "integer", + "description": "The maximum number of packets going in" + }, + "maximum_packets_out": { + "type": "integer", + "description": "The maximum number of packets going out" + }, + "maximum_octets_in": { + "type": "integer", + "description": "The maximum number of octets going in" + }, + "maximum_octets_out": { + "type": "integer", + "description": "The maximum number of octets going out" + }, + "maximum_in_at": { + "type": "string", + "description": "The datetime of the peak", + "format": "date-time" + }, + "maximum_out_at": { + "type": "string", + "description": "The datetime of the peak", + "format": "date-time" + } + } + } + } + } + } +} From 51c352006eccd5f985bdf09bf7a4acf8596951bb Mon Sep 17 00:00:00 2001 From: Annika Hannig Date: Fri, 8 May 2020 16:51:09 +0200 Subject: [PATCH 6/9] added aggregated example --- README.md | 33 ++++++++++++++++++++++++++ schema/json-traffic-aggregates-v1.json | 1 - 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4283bf3..6296b92 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,39 @@ The samples arn n-tuples of ## Aggregate Data +This is a schema for aggregated data for the ixp. It should should be serverd separatly +from the timeseries data. +### Example + { + "version": "1.0", + "created_at": "2001-10-23T23:30:12Z", + "next_update_at": "2001-10-23T23:45:12Z", + "sources": { + "": { + "url": "https://...", + "title": "IXP LAN 1", + "aggregate_interval": 300, + }, + }, + "statistics": { + "": { + "current_packets_in": 1730224, + "current_packets_out": 17456, + "current_octets_in": 1734882240, + "current_octets_out": 173220, + "average_packets_in": 18470161, + "average_packets_out": 305805818, + "average_octets_in": 18470161, + "average_octets_out": 305805818, + "maximum_packets_in": 431179242464, + "maximum_packets_out": 431870526584, + "maximum_octets_in": 431179242464, + "maximum_octets_out": 431870526584, + "maximum_in_at": "2020-05-07T14:40:00Z", + "maximum_out_at": "2020-05-07T14:40:00Z" + } + } + diff --git a/schema/json-traffic-aggregates-v1.json b/schema/json-traffic-aggregates-v1.json index 2136468..6b88ab2 100644 --- a/schema/json-traffic-aggregates-v1.json +++ b/schema/json-traffic-aggregates-v1.json @@ -141,7 +141,6 @@ "description": "The datetime of the peak", "format": "date-time" } - } } } } From 758e8ba191920c9bfd87f99e028d944ea78c346e Mon Sep 17 00:00:00 2001 From: Annika Hannig Date: Fri, 8 May 2020 16:53:52 +0200 Subject: [PATCH 7/9] clarified aggregate window in example --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6296b92..f44c69b 100644 --- a/README.md +++ b/README.md @@ -58,8 +58,8 @@ from the timeseries data. "sources": { "": { "url": "https://...", - "title": "IXP LAN 1", - "aggregate_interval": 300, + "title": "IXP LAN 1 (1 Day)", + "aggregate_interval": 86400, }, }, "statistics": { From fd9e8a39e4baad09693cf4088fb4c736baf5b226 Mon Sep 17 00:00:00 2001 From: Annika Hannig Date: Fri, 8 May 2020 16:56:06 +0200 Subject: [PATCH 8/9] added link, renamed schema file --- README.md | 3 +++ ...ffic-aggregates-v1.json => json-traffic-aggregated-v1.json} | 0 2 files changed, 3 insertions(+) rename schema/{json-traffic-aggregates-v1.json => json-traffic-aggregated-v1.json} (100%) diff --git a/README.md b/README.md index f44c69b..de6602d 100644 --- a/README.md +++ b/README.md @@ -81,4 +81,7 @@ from the timeseries data. } } +### Schema + +[schema/json-traffic-aggregated-v1.json](schema/json-traffic-aggregated-v1.json) diff --git a/schema/json-traffic-aggregates-v1.json b/schema/json-traffic-aggregated-v1.json similarity index 100% rename from schema/json-traffic-aggregates-v1.json rename to schema/json-traffic-aggregated-v1.json From 273b2f52a242b5992921239c4f4cf30b6016f561 Mon Sep 17 00:00:00 2001 From: Annika Hannig Date: Fri, 8 May 2020 16:56:59 +0200 Subject: [PATCH 9/9] fixed typo --- schema/json-traffic-aggregated-v1.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/json-traffic-aggregated-v1.json b/schema/json-traffic-aggregated-v1.json index 6b88ab2..146d94c 100644 --- a/schema/json-traffic-aggregated-v1.json +++ b/schema/json-traffic-aggregated-v1.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema", - "title": "IXP Statistics Aggregates Schema", + "title": "IXP Statistics Aggregated Schema", "description": "A JSON schema representing the aggregated traffic at an IXP", "type": "object", "required": [