Top up version to 1.5.0
[dcaegen2/collectors/hv-ves.git] / tools / performance / cloud / grafana / dashboards / k8s-metrics.yaml
1 # ============LICENSE_START=======================================================
2 # dcaegen2-collectors-veshv
3 # ================================================================================
4 # Copyright (C) 2020 NOKIA
5 # ================================================================================
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
9 #
10 #      http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 # ============LICENSE_END=========================================================
18
19 apiVersion: v1
20 kind: ConfigMap
21 metadata:
22   name: grafana-k8s-metrics
23   namespace: onap
24   labels:
25     name: grafana-dashboards
26 data:
27   k8s-metrics.json: |-
28     {
29       "annotations": {
30         "list": [
31           {
32             "builtIn": 1,
33             "datasource": "-- Grafana --",
34             "enable": true,
35             "hide": true,
36             "iconColor": "rgba(0, 211, 255, 1)",
37             "name": "Annotations & Alerts",
38             "type": "dashboard"
39           }
40         ]
41       },
42       "editable": true,
43       "gnetId": null,
44       "graphTooltip": 0,
45       "id": 5,
46       "links": [],
47       "panels": [
48         {
49           "datasource": null,
50           "gridPos": {
51             "h": 7,
52             "w": 8,
53             "x": 0,
54             "y": 0
55           },
56           "id": 8,
57           "options": {
58             "fieldOptions": {
59               "calcs": [
60                 "mean"
61               ],
62               "defaults": {
63                 "mappings": [],
64                 "max": 100,
65                 "min": 0,
66                 "thresholds": {
67                   "mode": "absolute",
68                   "steps": [
69                     {
70                       "color": "green",
71                       "value": null
72                     },
73                     {
74                       "color": "red",
75                       "value": 80
76                     }
77                   ]
78                 },
79                 "unit": "percent"
80               },
81               "overrides": [],
82               "values": false
83             },
84             "orientation": "auto",
85             "showThresholdLabels": false,
86             "showThresholdMarkers": true
87           },
88           "pluginVersion": "6.7.2",
89           "targets": [
90             {
91               "expr": "sum(container_memory_working_set_bytes{id=\"/\", instance=~\".*worker.*\"}) by(instance) / (sum(machine_memory_bytes{instance=~\".*worker.*\"}) by (instance))*100",
92               "interval": "",
93               "legendFormat": "{{instance}}",
94               "refId": "A"
95             }
96           ],
97           "timeFrom": null,
98           "timeShift": null,
99           "title": "Nodes RAM Usage",
100           "type": "gauge"
101         },
102         {
103           "datasource": null,
104           "gridPos": {
105             "h": 7,
106             "w": 8,
107             "x": 8,
108             "y": 0
109           },
110           "id": 6,
111           "options": {
112             "fieldOptions": {
113               "calcs": [
114                 "mean"
115               ],
116               "defaults": {
117                 "mappings": [],
118                 "max": 100,
119                 "min": 0,
120                 "thresholds": {
121                   "mode": "absolute",
122                   "steps": [
123                     {
124                       "color": "green",
125                       "value": null
126                     },
127                     {
128                       "color": "red",
129                       "value": 80
130                     }
131                   ]
132                 },
133                 "unit": "percent"
134               },
135               "overrides": [],
136               "values": false
137             },
138             "orientation": "auto",
139             "showThresholdLabels": false,
140             "showThresholdMarkers": true
141           },
142           "pluginVersion": "6.7.2",
143           "targets": [
144             {
145               "expr": "sum(rate(container_cpu_usage_seconds_total{id=\"/\", instance=~\".*worker.*\"}[1m])) by(instance) / (sum(machine_cpu_cores{instance=~\".*worker.*\"}) by (instance))*100",
146               "interval": "",
147               "legendFormat": "{{instance}}",
148               "refId": "A"
149             }
150           ],
151           "timeFrom": null,
152           "timeShift": null,
153           "title": "Nodes CPU Usage",
154           "type": "gauge"
155         },
156         {
157           "aliasColors": {},
158           "bars": false,
159           "dashLength": 10,
160           "dashes": false,
161           "datasource": null,
162           "fill": 0,
163           "fillGradient": 0,
164           "gridPos": {
165             "h": 12,
166             "w": 8,
167             "x": 16,
168             "y": 0
169           },
170           "hiddenSeries": false,
171           "id": 10,
172           "legend": {
173             "avg": false,
174             "current": false,
175             "max": false,
176             "min": false,
177             "show": true,
178             "total": false,
179             "values": false
180           },
181           "lines": true,
182           "linewidth": 1,
183           "nullPointMode": "null",
184           "options": {
185             "dataLinks": []
186           },
187           "percentage": false,
188           "pointradius": 2,
189           "points": false,
190           "renderer": "flot",
191           "seriesOverrides": [],
192           "spaceLength": 10,
193           "stack": false,
194           "steppedLine": false,
195           "targets": [
196             {
197               "expr": "sum(irate(container_network_receive_bytes_total{pod!=\"\", namespace=\"onap\", instance=~\".*worker.*\"}[1m])) by (instance)",
198               "hide": false,
199               "interval": "",
200               "legendFormat": "{{instance}}",
201               "refId": "C"
202             },
203             {
204               "expr": "sum(irate(container_network_receive_bytes_total{pod!=\"\", namespace=\"onap\", instance=~\".*worker.*\"}[1m]))",
205               "hide": false,
206               "interval": "",
207               "legendFormat": "Total Receive",
208               "refId": "D"
209             }
210           ],
211           "thresholds": [],
212           "timeFrom": "20m",
213           "timeRegions": [],
214           "timeShift": null,
215           "title": "Network Usage - Receive",
216           "tooltip": {
217             "shared": true,
218             "sort": 0,
219             "value_type": "individual"
220           },
221           "type": "graph",
222           "xaxis": {
223             "buckets": null,
224             "mode": "time",
225             "name": null,
226             "show": true,
227             "values": []
228           },
229           "yaxes": [
230             {
231               "format": "Bps",
232               "label": null,
233               "logBase": 1,
234               "max": null,
235               "min": null,
236               "show": true
237             },
238             {
239               "format": "short",
240               "label": null,
241               "logBase": 1,
242               "max": null,
243               "min": null,
244               "show": true
245             }
246           ],
247           "yaxis": {
248             "align": false,
249             "alignLevel": null
250           }
251         },
252         {
253           "aliasColors": {},
254           "bars": false,
255           "dashLength": 10,
256           "dashes": false,
257           "datasource": null,
258           "fill": 0,
259           "fillGradient": 0,
260           "gridPos": {
261             "h": 16,
262             "w": 8,
263             "x": 0,
264             "y": 7
265           },
266           "hiddenSeries": false,
267           "id": 4,
268           "legend": {
269             "avg": false,
270             "current": false,
271             "max": false,
272             "min": false,
273             "show": true,
274             "total": false,
275             "values": false
276           },
277           "lines": true,
278           "linewidth": 1,
279           "nullPointMode": "null",
280           "options": {
281             "dataLinks": []
282           },
283           "percentage": false,
284           "pointradius": 2,
285           "points": false,
286           "renderer": "flot",
287           "seriesOverrides": [],
288           "spaceLength": 10,
289           "stack": false,
290           "steppedLine": false,
291           "targets": [
292             {
293               "expr": "sum(container_memory_working_set_bytes{id=\"/\"}) by (instance) / (sum(machine_memory_bytes) by (instance))*100",
294               "interval": "",
295               "legendFormat": "{{instance}}",
296               "refId": "A"
297             }
298           ],
299           "thresholds": [],
300           "timeFrom": "20m",
301           "timeRegions": [],
302           "timeShift": null,
303           "title": "Nodes Total RAM Usage",
304           "tooltip": {
305             "shared": true,
306             "sort": 0,
307             "value_type": "individual"
308           },
309           "type": "graph",
310           "xaxis": {
311             "buckets": null,
312             "mode": "time",
313             "name": null,
314             "show": true,
315             "values": []
316           },
317           "yaxes": [
318             {
319               "format": "percent",
320               "label": null,
321               "logBase": 1,
322               "max": null,
323               "min": null,
324               "show": true
325             },
326             {
327               "format": "short",
328               "label": null,
329               "logBase": 1,
330               "max": null,
331               "min": null,
332               "show": true
333             }
334           ],
335           "yaxis": {
336             "align": false,
337             "alignLevel": null
338           }
339         },
340         {
341           "aliasColors": {},
342           "bars": false,
343           "dashLength": 10,
344           "dashes": false,
345           "datasource": null,
346           "fill": 0,
347           "fillGradient": 0,
348           "gridPos": {
349             "h": 16,
350             "w": 8,
351             "x": 8,
352             "y": 7
353           },
354           "hiddenSeries": false,
355           "id": 2,
356           "legend": {
357             "avg": false,
358             "current": false,
359             "max": false,
360             "min": false,
361             "show": true,
362             "total": false,
363             "values": false
364           },
365           "lines": true,
366           "linewidth": 1,
367           "nullPointMode": "null",
368           "options": {
369             "dataLinks": []
370           },
371           "percentage": false,
372           "pointradius": 2,
373           "points": false,
374           "renderer": "flot",
375           "seriesOverrides": [],
376           "spaceLength": 10,
377           "stack": false,
378           "steppedLine": false,
379           "targets": [
380             {
381               "expr": "sum(rate(container_cpu_usage_seconds_total{id=\"/\"}[1m])) by(instance) / (sum(machine_cpu_cores) by (instance))*100",
382               "interval": "",
383               "legendFormat": "{{instance}}",
384               "refId": "A"
385             }
386           ],
387           "thresholds": [],
388           "timeFrom": "20m",
389           "timeRegions": [],
390           "timeShift": null,
391           "title": "Nodes Total CPU usage",
392           "tooltip": {
393             "shared": true,
394             "sort": 0,
395             "value_type": "individual"
396           },
397           "type": "graph",
398           "xaxis": {
399             "buckets": null,
400             "mode": "time",
401             "name": null,
402             "show": true,
403             "values": []
404           },
405           "yaxes": [
406             {
407               "format": "percent",
408               "label": null,
409               "logBase": 1,
410               "max": null,
411               "min": null,
412               "show": true
413             },
414             {
415               "format": "short",
416               "label": null,
417               "logBase": 1,
418               "max": null,
419               "min": null,
420               "show": true
421             }
422           ],
423           "yaxis": {
424             "align": false,
425             "alignLevel": null
426           }
427         },
428         {
429           "aliasColors": {},
430           "bars": false,
431           "dashLength": 10,
432           "dashes": false,
433           "datasource": null,
434           "fill": 0,
435           "fillGradient": 0,
436           "gridPos": {
437             "h": 11,
438             "w": 8,
439             "x": 16,
440             "y": 12
441           },
442           "hiddenSeries": false,
443           "id": 11,
444           "legend": {
445             "avg": false,
446             "current": false,
447             "max": false,
448             "min": false,
449             "show": true,
450             "total": false,
451             "values": false
452           },
453           "lines": true,
454           "linewidth": 1,
455           "nullPointMode": "null",
456           "options": {
457             "dataLinks": []
458           },
459           "percentage": false,
460           "pointradius": 2,
461           "points": false,
462           "renderer": "flot",
463           "seriesOverrides": [],
464           "spaceLength": 10,
465           "stack": false,
466           "steppedLine": false,
467           "targets": [
468             {
469               "expr": "sum(irate(container_network_transmit_bytes_total{pod!=\"\", namespace=\"onap\", instance=~\".*worker.*\"}[1m])) by (instance)",
470               "hide": false,
471               "interval": "",
472               "legendFormat": "{{instance}}",
473               "refId": "A"
474             },
475             {
476               "expr": "sum(irate(container_network_transmit_bytes_total{pod!=\"\", namespace=\"onap\", instance=~\".*worker.*\"}[1m]))",
477               "hide": false,
478               "interval": "",
479               "legendFormat": "Total Transmit",
480               "refId": "B"
481             }
482           ],
483           "thresholds": [],
484           "timeFrom": "20m",
485           "timeRegions": [],
486           "timeShift": null,
487           "title": "Network Usage - Transmit",
488           "tooltip": {
489             "shared": true,
490             "sort": 0,
491             "value_type": "individual"
492           },
493           "type": "graph",
494           "xaxis": {
495             "buckets": null,
496             "mode": "time",
497             "name": null,
498             "show": true,
499             "values": []
500           },
501           "yaxes": [
502             {
503               "format": "Bps",
504               "label": null,
505               "logBase": 1,
506               "max": null,
507               "min": null,
508               "show": true
509             },
510             {
511               "format": "short",
512               "label": null,
513               "logBase": 1,
514               "max": null,
515               "min": null,
516               "show": true
517             }
518           ],
519           "yaxis": {
520             "align": false,
521             "alignLevel": null
522           }
523         }
524       ],
525       "refresh": "5s",
526       "schemaVersion": 22,
527       "style": "dark",
528       "tags": [],
529       "templating": {
530         "list": []
531       },
532       "time": {
533         "from": "now-6h",
534         "to": "now"
535       },
536       "timepicker": {
537         "refresh_intervals": [
538           "5s",
539           "10s",
540           "30s",
541           "1m",
542           "5m",
543           "15m",
544           "30m",
545           "1h",
546           "2h",
547           "1d"
548         ]
549       },
550       "timezone": "",
551       "title": "K8s metrics",
552       "uid": "RxjnWpjZk",
553       "variables": {
554         "list": []
555       },
556       "version": 1
557     }