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