From c3e9d0fc0076f0a2930f13366255b0e8e65fb814 Mon Sep 17 00:00:00 2001 From: fmenguy Date: Mon, 5 Oct 2020 18:13:05 +0200 Subject: Add Kibana visualizations examples for NDR result Change-Id: I652dc2c3d69ae5f6bff5019b0868d1becaceec63 Signed-off-by: fmenguy --- .../ndr_capacity_pps_line_chart.json | 98 ++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 kibana/visualizations/ndr_capacity_pps_line_chart.json (limited to 'kibana/visualizations/ndr_capacity_pps_line_chart.json') diff --git a/kibana/visualizations/ndr_capacity_pps_line_chart.json b/kibana/visualizations/ndr_capacity_pps_line_chart.json new file mode 100644 index 0000000..ad79caa --- /dev/null +++ b/kibana/visualizations/ndr_capacity_pps_line_chart.json @@ -0,0 +1,98 @@ +{ + $schema: https: //vega.github.io/schema/vega-lite/v2.json + title: "Capacity in Mpps - 0,001% loss ratio" + data: { + url: { + %context%: true + %timefield%: "@timestamp" + index: resu* + body: { + _source: ["@timestamp", "_source", "rate_pps", "flow_count", "frame_size", "user_label", "type"] + }, + size: 10000 + }, + format: { property: "hits.hits" } + }, + + transform: [ + { calculate: "datum._source['rate_pps'] / 1000000" as: "offered_load_pps"}, + { calculate: "datum._source['flow_count']" as: "flow_count"}, + { calculate: "isNaN(toNumber(datum._source['frame_size'])) ? 362 : toNumber(datum._source['frame_size'])" as: "frame_size"}, + { calculate: "datum._source['user_label'] + '-' + datum._source['flow_count']" as: "label"} + { aggregate: [{op: "max", field: "offered_load_pps", as: "max_offered_load_pps"}], groupby: ["frame_size", "label","flow_count"]} + + ], + center: true, + hconcat: [ + { + width:10, + selection: { + legendSel: { + type: "multi", + encodings: [ "color", "shape" ], + toggle: "event.shiftKey" + } + }, + encoding: { + y: { + field: "label", + type: "nominal", + axis: { + title: "", + domain: false, + ticks: false, + offset: 10 + }, + }, + color: { + condition: { + selection: "legendSel", + field: "label", + type: "nominal", + legend: null + }, + value: "lightgrey" + } + }, + mark: { + type: "square", + size: 120, + opacity: 1 + } + }, + { + width:500, + height:280, + transform: [ + {filter: { selection: "legendSel"}} + + ], + mark: { + type: "line", + tooltip: true, + point: true + }, + selection: { + grid: { + type: "interval", + resolve: "global", + bind: "scales", + translate: "[mousedown[!event.shiftKey], window:mouseup] > window:mousemove!", + zoom: "wheel![!event.shiftKey]" + }, + pts: { + type: "single", + fields: ["Label"] + } + }, + encoding: { + x: { field: "frame_size", type: "quantitative", title: "Frame size (bytes)", axis: {offset: 10} } + y: { field: "max_offered_load_pps", type: "quantitative", title: "Offered load (Mpps)" , axis: {offset: 10} } + color: {field: "label", "type": "nominal", + "legend": null} + tooltip: {"field": "max_offered_load_pps", "type": "quantitative"}, + shape: {field: "flow_count", type: "nominal"} + } + } + ] +} \ No newline at end of file -- cgit 1.2.3-korg