Add Kibana visualizations examples for NDR result
[nfvbench.git] / kibana / visualizations / ndr_capacity_pps_scatter_plot.json
1 {
2   $schema: "https://vega.github.io/schema/vega-lite/v2.json"
3   title: "Capacity in Mpps - 0,001% loss ratio"
4   data: {
5     url: {
6       %context%: true
7       %timefield%: "@timestamp"
8       index: resu*
9       body: {
10         _source: ["@timestamp", "_source", "rate_pps", "flow_count", "frame_size", "user_label"]
11       },
12       size: 10000
13     },
14     format: { property: "hits.hits" }
15   },
16   transform: [
17     { calculate: "datum._source['rate_pps'] / 1000000" as: "Offered load (Mpps)"},
18     { calculate: "datum._source['flow_count']" as: "Flow count"},
19     { calculate: "isNaN(toNumber(datum._source['frame_size'])) ? 362 : toNumber(datum._source['frame_size'])" as: "Frame size (bytes)"}
20     { calculate: "datum._source['user_label'] + '-' + datum._source['flow_count']" as: "label"}
21   ],
22   center: true,
23   hconcat: [
24   {
25       width:10,
26       selection: {
27         legendSel: {
28           type: "multi",
29           encodings: [ "color", "shape" ],
30           toggle: "event.shiftKey"
31         }
32       },
33       encoding: {
34         y: {
35           field: "label",
36           type: "nominal",
37           axis: {
38             title: "",
39             domain: false,
40             ticks: false,
41             offset: 10
42           },
43         },
44         color: {
45           condition: {
46             selection: "legendSel",
47             field: "label",
48             type: "nominal",
49             legend: null
50           },
51           value: "lightgrey"
52         }
53       },
54       mark: {
55         type: "square",
56         size: 120,
57         opacity: 1
58       }
59     },
60     {
61       width:500,
62       height:280,
63         transform: [
64           {filter: { selection: "legendSel"}}
65       
66       ],
67       mark: {
68         "type": "point",
69         "tooltip": true
70       },
71       selection: {
72         grid: {
73           type: "interval",
74           resolve: "global",
75           bind: "scales",
76           translate: "[mousedown[!event.shiftKey], window:mouseup] > window:mousemove!",
77           zoom: "wheel![!event.shiftKey]"
78         },
79         pts: {
80           type: "single",
81           fields: ["label"]
82         }
83       },
84       encoding: {
85         x: {
86           field: "Frame size (bytes)",
87           type: "quantitative"
88         }
89         y: {
90           field: "Offered load (Mpps)",
91           type: "quantitative"
92         }
93         color: {
94           field: "label", "type": "nominal",
95                "legend": null
96         }
97         shape: {
98           field: "Flow count",
99           type: "nominal"
100         }
101         tooltip: {
102           "field": "Offered load (Mpps)",
103           "type": "quantitative"
104         }
105       }
106     }
107   ]
108 }