Collectd operator utilties
[demo.git] / vnfs / DAaaS / operator / charts / prometheus-operator / templates / grafana / dashboards / k8s-resources-namespace.yaml
1 # Generated from 'k8s-resources-namespace' from https://raw.githubusercontent.com/coreos/prometheus-operator/master/contrib/kube-prometheus/manifests/grafana-dashboardDefinitions.yaml
2 # Do not change in-place! In order to change this file first read following link:
3 # https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
4 {{- if and .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }}
5 apiVersion: v1
6 kind: ConfigMap
7 metadata:
8   name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-namespace" | trunc 63 | trimSuffix "-" }}
9   labels:
10     {{- if $.Values.grafana.sidecar.dashboards.label }}
11     {{ $.Values.grafana.sidecar.dashboards.label }}: "1"
12     {{- end }}
13     app: {{ template "prometheus-operator.name" $ }}-grafana
14 {{ include "prometheus-operator.labels" $ | indent 4 }}
15 data:
16   k8s-resources-namespace.json: |-
17     {
18         "annotations": {
19             "list": [
20
21             ]
22         },
23         "editable": true,
24         "gnetId": null,
25         "graphTooltip": 0,
26         "hideControls": false,
27         "links": [
28
29         ],
30         "refresh": "10s",
31         "rows": [
32             {
33                 "collapse": false,
34                 "height": "250px",
35                 "panels": [
36                     {
37                         "aliasColors": {
38
39                         },
40                         "bars": false,
41                         "dashLength": 10,
42                         "dashes": false,
43                         "datasource": "$datasource",
44                         "fill": 10,
45                         "id": 1,
46                         "legend": {
47                             "avg": false,
48                             "current": false,
49                             "max": false,
50                             "min": false,
51                             "show": true,
52                             "total": false,
53                             "values": false
54                         },
55                         "lines": true,
56                         "linewidth": 0,
57                         "links": [
58
59                         ],
60                         "nullPointMode": "null as zero",
61                         "percentage": false,
62                         "pointradius": 5,
63                         "points": false,
64                         "renderer": "flot",
65                         "seriesOverrides": [
66
67                         ],
68                         "spaceLength": 10,
69                         "span": 12,
70                         "stack": true,
71                         "steppedLine": false,
72                         "targets": [
73                             {
74                                 "expr": "sum(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=\"$namespace\"}) by (pod_name)",
75                                 "format": "time_series",
76                                 "intervalFactor": 2,
77                                 "legendFormat": "{{`{{pod_name}}`}}",
78                                 "legendLink": null,
79                                 "step": 10
80                             }
81                         ],
82                         "thresholds": [
83
84                         ],
85                         "timeFrom": null,
86                         "timeShift": null,
87                         "title": "CPU Usage",
88                         "tooltip": {
89                             "shared": true,
90                             "sort": 0,
91                             "value_type": "individual"
92                         },
93                         "type": "graph",
94                         "xaxis": {
95                             "buckets": null,
96                             "mode": "time",
97                             "name": null,
98                             "show": true,
99                             "values": [
100
101                             ]
102                         },
103                         "yaxes": [
104                             {
105                                 "format": "short",
106                                 "label": null,
107                                 "logBase": 1,
108                                 "max": null,
109                                 "min": 0,
110                                 "show": true
111                             },
112                             {
113                                 "format": "short",
114                                 "label": null,
115                                 "logBase": 1,
116                                 "max": null,
117                                 "min": null,
118                                 "show": false
119                             }
120                         ]
121                     }
122                 ],
123                 "repeat": null,
124                 "repeatIteration": null,
125                 "repeatRowId": null,
126                 "showTitle": true,
127                 "title": "CPU Usage",
128                 "titleSize": "h6"
129             },
130             {
131                 "collapse": false,
132                 "height": "250px",
133                 "panels": [
134                     {
135                         "aliasColors": {
136
137                         },
138                         "bars": false,
139                         "dashLength": 10,
140                         "dashes": false,
141                         "datasource": "$datasource",
142                         "fill": 1,
143                         "id": 2,
144                         "legend": {
145                             "avg": false,
146                             "current": false,
147                             "max": false,
148                             "min": false,
149                             "show": true,
150                             "total": false,
151                             "values": false
152                         },
153                         "lines": true,
154                         "linewidth": 1,
155                         "links": [
156
157                         ],
158                         "nullPointMode": "null as zero",
159                         "percentage": false,
160                         "pointradius": 5,
161                         "points": false,
162                         "renderer": "flot",
163                         "seriesOverrides": [
164
165                         ],
166                         "spaceLength": 10,
167                         "span": 12,
168                         "stack": false,
169                         "steppedLine": false,
170                         "styles": [
171                             {
172                                 "alias": "Time",
173                                 "dateFormat": "YYYY-MM-DD HH:mm:ss",
174                                 "pattern": "Time",
175                                 "type": "hidden"
176                             },
177                             {
178                                 "alias": "CPU Usage",
179                                 "colorMode": null,
180                                 "colors": [
181
182                                 ],
183                                 "dateFormat": "YYYY-MM-DD HH:mm:ss",
184                                 "decimals": 2,
185                                 "link": false,
186                                 "linkTooltip": "Drill down",
187                                 "linkUrl": "",
188                                 "pattern": "Value #A",
189                                 "thresholds": [
190
191                                 ],
192                                 "type": "number",
193                                 "unit": "short"
194                             },
195                             {
196                                 "alias": "CPU Requests",
197                                 "colorMode": null,
198                                 "colors": [
199
200                                 ],
201                                 "dateFormat": "YYYY-MM-DD HH:mm:ss",
202                                 "decimals": 2,
203                                 "link": false,
204                                 "linkTooltip": "Drill down",
205                                 "linkUrl": "",
206                                 "pattern": "Value #B",
207                                 "thresholds": [
208
209                                 ],
210                                 "type": "number",
211                                 "unit": "short"
212                             },
213                             {
214                                 "alias": "CPU Requests %",
215                                 "colorMode": null,
216                                 "colors": [
217
218                                 ],
219                                 "dateFormat": "YYYY-MM-DD HH:mm:ss",
220                                 "decimals": 2,
221                                 "link": false,
222                                 "linkTooltip": "Drill down",
223                                 "linkUrl": "",
224                                 "pattern": "Value #C",
225                                 "thresholds": [
226
227                                 ],
228                                 "type": "number",
229                                 "unit": "percentunit"
230                             },
231                             {
232                                 "alias": "CPU Limits",
233                                 "colorMode": null,
234                                 "colors": [
235
236                                 ],
237                                 "dateFormat": "YYYY-MM-DD HH:mm:ss",
238                                 "decimals": 2,
239                                 "link": false,
240                                 "linkTooltip": "Drill down",
241                                 "linkUrl": "",
242                                 "pattern": "Value #D",
243                                 "thresholds": [
244
245                                 ],
246                                 "type": "number",
247                                 "unit": "short"
248                             },
249                             {
250                                 "alias": "CPU Limits %",
251                                 "colorMode": null,
252                                 "colors": [
253
254                                 ],
255                                 "dateFormat": "YYYY-MM-DD HH:mm:ss",
256                                 "decimals": 2,
257                                 "link": false,
258                                 "linkTooltip": "Drill down",
259                                 "linkUrl": "",
260                                 "pattern": "Value #E",
261                                 "thresholds": [
262
263                                 ],
264                                 "type": "number",
265                                 "unit": "percentunit"
266                             },
267                             {
268                                 "alias": "Pod",
269                                 "colorMode": null,
270                                 "colors": [
271
272                                 ],
273                                 "dateFormat": "YYYY-MM-DD HH:mm:ss",
274                                 "decimals": 2,
275                                 "link": true,
276                                 "linkTooltip": "Drill down",
277                                 "linkUrl": "/d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-namespace=$namespace&var-pod=$__cell",
278                                 "pattern": "pod",
279                                 "thresholds": [
280
281                                 ],
282                                 "type": "number",
283                                 "unit": "short"
284                             },
285                             {
286                                 "alias": "",
287                                 "colorMode": null,
288                                 "colors": [
289
290                                 ],
291                                 "dateFormat": "YYYY-MM-DD HH:mm:ss",
292                                 "decimals": 2,
293                                 "pattern": "/.*/",
294                                 "thresholds": [
295
296                                 ],
297                                 "type": "string",
298                                 "unit": "short"
299                             }
300                         ],
301                         "targets": [
302                             {
303                                 "expr": "sum(label_replace(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=\"$namespace\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod)",
304                                 "format": "table",
305                                 "instant": true,
306                                 "intervalFactor": 2,
307                                 "legendFormat": "",
308                                 "refId": "A",
309                                 "step": 10
310                             },
311                             {
312                                 "expr": "sum(kube_pod_container_resource_requests_cpu_cores{namespace=\"$namespace\"}) by (pod)",
313                                 "format": "table",
314                                 "instant": true,
315                                 "intervalFactor": 2,
316                                 "legendFormat": "",
317                                 "refId": "B",
318                                 "step": 10
319                             },
320                             {
321                                 "expr": "sum(label_replace(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=\"$namespace\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod) / sum(kube_pod_container_resource_requests_cpu_cores{namespace=\"$namespace\"}) by (pod)",
322                                 "format": "table",
323                                 "instant": true,
324                                 "intervalFactor": 2,
325                                 "legendFormat": "",
326                                 "refId": "C",
327                                 "step": 10
328                             },
329                             {
330                                 "expr": "sum(kube_pod_container_resource_limits_cpu_cores{namespace=\"$namespace\"}) by (pod)",
331                                 "format": "table",
332                                 "instant": true,
333                                 "intervalFactor": 2,
334                                 "legendFormat": "",
335                                 "refId": "D",
336                                 "step": 10
337                             },
338                             {
339                                 "expr": "sum(label_replace(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=\"$namespace\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod) / sum(kube_pod_container_resource_limits_cpu_cores{namespace=\"$namespace\"}) by (pod)",
340                                 "format": "table",
341                                 "instant": true,
342                                 "intervalFactor": 2,
343                                 "legendFormat": "",
344                                 "refId": "E",
345                                 "step": 10
346                             }
347                         ],
348                         "thresholds": [
349
350                         ],
351                         "timeFrom": null,
352                         "timeShift": null,
353                         "title": "CPU Quota",
354                         "tooltip": {
355                             "shared": true,
356                             "sort": 0,
357                             "value_type": "individual"
358                         },
359                         "transform": "table",
360                         "type": "table",
361                         "xaxis": {
362                             "buckets": null,
363                             "mode": "time",
364                             "name": null,
365                             "show": true,
366                             "values": [
367
368                             ]
369                         },
370                         "yaxes": [
371                             {
372                                 "format": "short",
373                                 "label": null,
374                                 "logBase": 1,
375                                 "max": null,
376                                 "min": 0,
377                                 "show": true
378                             },
379                             {
380                                 "format": "short",
381                                 "label": null,
382                                 "logBase": 1,
383                                 "max": null,
384                                 "min": null,
385                                 "show": false
386                             }
387                         ]
388                     }
389                 ],
390                 "repeat": null,
391                 "repeatIteration": null,
392                 "repeatRowId": null,
393                 "showTitle": true,
394                 "title": "CPU Quota",
395                 "titleSize": "h6"
396             },
397             {
398                 "collapse": false,
399                 "height": "250px",
400                 "panels": [
401                     {
402                         "aliasColors": {
403
404                         },
405                         "bars": false,
406                         "dashLength": 10,
407                         "dashes": false,
408                         "datasource": "$datasource",
409                         "fill": 10,
410                         "id": 3,
411                         "legend": {
412                             "avg": false,
413                             "current": false,
414                             "max": false,
415                             "min": false,
416                             "show": true,
417                             "total": false,
418                             "values": false
419                         },
420                         "lines": true,
421                         "linewidth": 0,
422                         "links": [
423
424                         ],
425                         "nullPointMode": "null as zero",
426                         "percentage": false,
427                         "pointradius": 5,
428                         "points": false,
429                         "renderer": "flot",
430                         "seriesOverrides": [
431
432                         ],
433                         "spaceLength": 10,
434                         "span": 12,
435                         "stack": true,
436                         "steppedLine": false,
437                         "targets": [
438                             {
439                                 "expr": "sum(container_memory_usage_bytes{namespace=\"$namespace\", container_name!=\"\"}) by (pod_name)",
440                                 "format": "time_series",
441                                 "intervalFactor": 2,
442                                 "legendFormat": "{{`{{pod_name}}`}}",
443                                 "legendLink": null,
444                                 "step": 10
445                             }
446                         ],
447                         "thresholds": [
448
449                         ],
450                         "timeFrom": null,
451                         "timeShift": null,
452                         "title": "Memory Usage",
453                         "tooltip": {
454                             "shared": true,
455                             "sort": 0,
456                             "value_type": "individual"
457                         },
458                         "type": "graph",
459                         "xaxis": {
460                             "buckets": null,
461                             "mode": "time",
462                             "name": null,
463                             "show": true,
464                             "values": [
465
466                             ]
467                         },
468                         "yaxes": [
469                             {
470                                 "format": "decbytes",
471                                 "label": null,
472                                 "logBase": 1,
473                                 "max": null,
474                                 "min": 0,
475                                 "show": true
476                             },
477                             {
478                                 "format": "short",
479                                 "label": null,
480                                 "logBase": 1,
481                                 "max": null,
482                                 "min": null,
483                                 "show": false
484                             }
485                         ]
486                     }
487                 ],
488                 "repeat": null,
489                 "repeatIteration": null,
490                 "repeatRowId": null,
491                 "showTitle": true,
492                 "title": "Memory Usage",
493                 "titleSize": "h6"
494             },
495             {
496                 "collapse": false,
497                 "height": "250px",
498                 "panels": [
499                     {
500                         "aliasColors": {
501
502                         },
503                         "bars": false,
504                         "dashLength": 10,
505                         "dashes": false,
506                         "datasource": "$datasource",
507                         "fill": 1,
508                         "id": 4,
509                         "legend": {
510                             "avg": false,
511                             "current": false,
512                             "max": false,
513                             "min": false,
514                             "show": true,
515                             "total": false,
516                             "values": false
517                         },
518                         "lines": true,
519                         "linewidth": 1,
520                         "links": [
521
522                         ],
523                         "nullPointMode": "null as zero",
524                         "percentage": false,
525                         "pointradius": 5,
526                         "points": false,
527                         "renderer": "flot",
528                         "seriesOverrides": [
529
530                         ],
531                         "spaceLength": 10,
532                         "span": 12,
533                         "stack": false,
534                         "steppedLine": false,
535                         "styles": [
536                             {
537                                 "alias": "Time",
538                                 "dateFormat": "YYYY-MM-DD HH:mm:ss",
539                                 "pattern": "Time",
540                                 "type": "hidden"
541                             },
542                             {
543                                 "alias": "Memory Usage",
544                                 "colorMode": null,
545                                 "colors": [
546
547                                 ],
548                                 "dateFormat": "YYYY-MM-DD HH:mm:ss",
549                                 "decimals": 2,
550                                 "link": false,
551                                 "linkTooltip": "Drill down",
552                                 "linkUrl": "",
553                                 "pattern": "Value #A",
554                                 "thresholds": [
555
556                                 ],
557                                 "type": "number",
558                                 "unit": "decbytes"
559                             },
560                             {
561                                 "alias": "Memory Requests",
562                                 "colorMode": null,
563                                 "colors": [
564
565                                 ],
566                                 "dateFormat": "YYYY-MM-DD HH:mm:ss",
567                                 "decimals": 2,
568                                 "link": false,
569                                 "linkTooltip": "Drill down",
570                                 "linkUrl": "",
571                                 "pattern": "Value #B",
572                                 "thresholds": [
573
574                                 ],
575                                 "type": "number",
576                                 "unit": "decbytes"
577                             },
578                             {
579                                 "alias": "Memory Requests %",
580                                 "colorMode": null,
581                                 "colors": [
582
583                                 ],
584                                 "dateFormat": "YYYY-MM-DD HH:mm:ss",
585                                 "decimals": 2,
586                                 "link": false,
587                                 "linkTooltip": "Drill down",
588                                 "linkUrl": "",
589                                 "pattern": "Value #C",
590                                 "thresholds": [
591
592                                 ],
593                                 "type": "number",
594                                 "unit": "percentunit"
595                             },
596                             {
597                                 "alias": "Memory Limits",
598                                 "colorMode": null,
599                                 "colors": [
600
601                                 ],
602                                 "dateFormat": "YYYY-MM-DD HH:mm:ss",
603                                 "decimals": 2,
604                                 "link": false,
605                                 "linkTooltip": "Drill down",
606                                 "linkUrl": "",
607                                 "pattern": "Value #D",
608                                 "thresholds": [
609
610                                 ],
611                                 "type": "number",
612                                 "unit": "decbytes"
613                             },
614                             {
615                                 "alias": "Memory Limits %",
616                                 "colorMode": null,
617                                 "colors": [
618
619                                 ],
620                                 "dateFormat": "YYYY-MM-DD HH:mm:ss",
621                                 "decimals": 2,
622                                 "link": false,
623                                 "linkTooltip": "Drill down",
624                                 "linkUrl": "",
625                                 "pattern": "Value #E",
626                                 "thresholds": [
627
628                                 ],
629                                 "type": "number",
630                                 "unit": "percentunit"
631                             },
632                             {
633                                 "alias": "Pod",
634                                 "colorMode": null,
635                                 "colors": [
636
637                                 ],
638                                 "dateFormat": "YYYY-MM-DD HH:mm:ss",
639                                 "decimals": 2,
640                                 "link": true,
641                                 "linkTooltip": "Drill down",
642                                 "linkUrl": "/d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-namespace=$namespace&var-pod=$__cell",
643                                 "pattern": "pod",
644                                 "thresholds": [
645
646                                 ],
647                                 "type": "number",
648                                 "unit": "short"
649                             },
650                             {
651                                 "alias": "",
652                                 "colorMode": null,
653                                 "colors": [
654
655                                 ],
656                                 "dateFormat": "YYYY-MM-DD HH:mm:ss",
657                                 "decimals": 2,
658                                 "pattern": "/.*/",
659                                 "thresholds": [
660
661                                 ],
662                                 "type": "string",
663                                 "unit": "short"
664                             }
665                         ],
666                         "targets": [
667                             {
668                                 "expr": "sum(label_replace(container_memory_usage_bytes{namespace=\"$namespace\",container_name!=\"\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod)",
669                                 "format": "table",
670                                 "instant": true,
671                                 "intervalFactor": 2,
672                                 "legendFormat": "",
673                                 "refId": "A",
674                                 "step": 10
675                             },
676                             {
677                                 "expr": "sum(kube_pod_container_resource_requests_memory_bytes{namespace=\"$namespace\"}) by (pod)",
678                                 "format": "table",
679                                 "instant": true,
680                                 "intervalFactor": 2,
681                                 "legendFormat": "",
682                                 "refId": "B",
683                                 "step": 10
684                             },
685                             {
686                                 "expr": "sum(label_replace(container_memory_usage_bytes{namespace=\"$namespace\",container_name!=\"\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod) / sum(kube_pod_container_resource_requests_memory_bytes{namespace=\"$namespace\"}) by (pod)",
687                                 "format": "table",
688                                 "instant": true,
689                                 "intervalFactor": 2,
690                                 "legendFormat": "",
691                                 "refId": "C",
692                                 "step": 10
693                             },
694                             {
695                                 "expr": "sum(kube_pod_container_resource_limits_memory_bytes{namespace=\"$namespace\"}) by (pod)",
696                                 "format": "table",
697                                 "instant": true,
698                                 "intervalFactor": 2,
699                                 "legendFormat": "",
700                                 "refId": "D",
701                                 "step": 10
702                             },
703                             {
704                                 "expr": "sum(label_replace(container_memory_usage_bytes{namespace=\"$namespace\",container_name!=\"\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod) / sum(kube_pod_container_resource_limits_memory_bytes{namespace=\"$namespace\"}) by (pod)",
705                                 "format": "table",
706                                 "instant": true,
707                                 "intervalFactor": 2,
708                                 "legendFormat": "",
709                                 "refId": "E",
710                                 "step": 10
711                             }
712                         ],
713                         "thresholds": [
714
715                         ],
716                         "timeFrom": null,
717                         "timeShift": null,
718                         "title": "Memory Quota",
719                         "tooltip": {
720                             "shared": true,
721                             "sort": 0,
722                             "value_type": "individual"
723                         },
724                         "transform": "table",
725                         "type": "table",
726                         "xaxis": {
727                             "buckets": null,
728                             "mode": "time",
729                             "name": null,
730                             "show": true,
731                             "values": [
732
733                             ]
734                         },
735                         "yaxes": [
736                             {
737                                 "format": "short",
738                                 "label": null,
739                                 "logBase": 1,
740                                 "max": null,
741                                 "min": 0,
742                                 "show": true
743                             },
744                             {
745                                 "format": "short",
746                                 "label": null,
747                                 "logBase": 1,
748                                 "max": null,
749                                 "min": null,
750                                 "show": false
751                             }
752                         ]
753                     }
754                 ],
755                 "repeat": null,
756                 "repeatIteration": null,
757                 "repeatRowId": null,
758                 "showTitle": true,
759                 "title": "Memory Quota",
760                 "titleSize": "h6"
761             }
762         ],
763         "schemaVersion": 14,
764         "style": "dark",
765         "tags": [
766             "kubernetes-mixin"
767         ],
768         "templating": {
769             "list": [
770                 {
771                     "current": {
772                         "text": "Prometheus",
773                         "value": "Prometheus"
774                     },
775                     "hide": 0,
776                     "label": null,
777                     "name": "datasource",
778                     "options": [
779
780                     ],
781                     "query": "prometheus",
782                     "refresh": 1,
783                     "regex": "",
784                     "type": "datasource"
785                 },
786                 {
787                     "allValue": null,
788                     "current": {
789                         "text": "prod",
790                         "value": "prod"
791                     },
792                     "datasource": "$datasource",
793                     "hide": 0,
794                     "includeAll": false,
795                     "label": "namespace",
796                     "multi": false,
797                     "name": "namespace",
798                     "options": [
799
800                     ],
801                     "query": "label_values(kube_pod_info, namespace)",
802                     "refresh": 1,
803                     "regex": "",
804                     "sort": 2,
805                     "tagValuesQuery": "",
806                     "tags": [
807
808                     ],
809                     "tagsQuery": "",
810                     "type": "query",
811                     "useTags": false
812                 }
813             ]
814         },
815         "time": {
816             "from": "now-1h",
817             "to": "now"
818         },
819         "timepicker": {
820             "refresh_intervals": [
821                 "5s",
822                 "10s",
823                 "30s",
824                 "1m",
825                 "5m",
826                 "15m",
827                 "30m",
828                 "1h",
829                 "2h",
830                 "1d"
831             ],
832             "time_options": [
833                 "5m",
834                 "15m",
835                 "1h",
836                 "6h",
837                 "12h",
838                 "24h",
839                 "2d",
840                 "7d",
841                 "30d"
842             ]
843         },
844         "timezone": "",
845         "title": "Kubernetes / Compute Resources / Namespace",
846         "uid": "85a562078cdf77779eaa1add43ccec1e",
847         "version": 0
848     }
849 {{- end }}