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