f2bc6c407605012853d1b2817a9e399bd864bc47
[demo.git] / vnfs / DAaaS / operator / charts / prometheus-operator / templates / grafana / dashboards / pods.yaml
1 # Generated from 'pods' 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" $) "pods" | 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   pods.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                         "aliasColors": {
45
46                         },
47                         "bars": false,
48                         "dashLength": 10,
49                         "dashes": false,
50                         "datasource": "$datasource",
51                         "fill": 1,
52                         "gridPos": {
53
54                         },
55                         "id": 2,
56                         "legend": {
57                             "alignAsTable": true,
58                             "avg": true,
59                             "current": true,
60                             "max": false,
61                             "min": false,
62                             "rightSide": true,
63                             "show": true,
64                             "total": false,
65                             "values": false
66                         },
67                         "lines": true,
68                         "linewidth": 1,
69                         "links": [
70
71                         ],
72                         "nullPointMode": "null",
73                         "percentage": false,
74                         "pointradius": 5,
75                         "points": false,
76                         "renderer": "flot",
77                         "repeat": null,
78                         "seriesOverrides": [
79
80                         ],
81                         "spaceLength": 10,
82                         "stack": false,
83                         "steppedLine": false,
84                         "targets": [
85                             {
86                                 "expr": "sum by(container_name) (container_memory_usage_bytes{job=\"kubelet\", namespace=\"$namespace\", pod_name=\"$pod\", container_name=\u007e\"$container\", container_name!=\"POD\"})",
87                                 "format": "time_series",
88                                 "intervalFactor": 2,
89                                 "legendFormat": "Current: {{`{{ container_name }}`}}",
90                                 "refId": "A"
91                             },
92                             {
93                                 "expr": "sum by(container) (kube_pod_container_resource_requests_memory_bytes{job=\"kube-state-metrics\", namespace=\"$namespace\", pod=\"$pod\", container=\u007e\"$container\"})",
94                                 "format": "time_series",
95                                 "intervalFactor": 2,
96                                 "legendFormat": "Requested: {{`{{ container }}`}}",
97                                 "refId": "B"
98                             },
99                             {
100                                 "expr": "sum by(container) (kube_pod_container_resource_limits_memory_bytes{job=\"kube-state-metrics\", namespace=\"$namespace\", pod=\"$pod\", container=\u007e\"$container\"})",
101                                 "format": "time_series",
102                                 "intervalFactor": 2,
103                                 "legendFormat": "Limit: {{`{{ container }}`}}",
104                                 "refId": "C"
105                             }
106                         ],
107                         "thresholds": [
108
109                         ],
110                         "timeFrom": null,
111                         "timeShift": null,
112                         "title": "Memory Usage",
113                         "tooltip": {
114                             "shared": true,
115                             "sort": 0,
116                             "value_type": "individual"
117                         },
118                         "type": "graph",
119                         "xaxis": {
120                             "buckets": null,
121                             "mode": "time",
122                             "name": null,
123                             "show": true,
124                             "values": [
125
126                             ]
127                         },
128                         "yaxes": [
129                             {
130                                 "format": "bytes",
131                                 "label": null,
132                                 "logBase": 1,
133                                 "max": null,
134                                 "min": 0,
135                                 "show": true
136                             },
137                             {
138                                 "format": "bytes",
139                                 "label": null,
140                                 "logBase": 1,
141                                 "max": null,
142                                 "min": 0,
143                                 "show": true
144                             }
145                         ]
146                     }
147                 ],
148                 "repeat": null,
149                 "repeatIteration": null,
150                 "repeatRowId": null,
151                 "showTitle": false,
152                 "title": "Dashboard Row",
153                 "titleSize": "h6",
154                 "type": "row"
155             },
156             {
157                 "collapse": false,
158                 "collapsed": false,
159                 "panels": [
160                     {
161                         "aliasColors": {
162
163                         },
164                         "bars": false,
165                         "dashLength": 10,
166                         "dashes": false,
167                         "datasource": "$datasource",
168                         "fill": 1,
169                         "gridPos": {
170
171                         },
172                         "id": 3,
173                         "legend": {
174                             "alignAsTable": true,
175                             "avg": true,
176                             "current": true,
177                             "max": false,
178                             "min": false,
179                             "rightSide": true,
180                             "show": true,
181                             "total": false,
182                             "values": false
183                         },
184                         "lines": true,
185                         "linewidth": 1,
186                         "links": [
187
188                         ],
189                         "nullPointMode": "null",
190                         "percentage": false,
191                         "pointradius": 5,
192                         "points": false,
193                         "renderer": "flot",
194                         "repeat": null,
195                         "seriesOverrides": [
196
197                         ],
198                         "spaceLength": 10,
199                         "stack": false,
200                         "steppedLine": false,
201                         "targets": [
202                             {
203                                 "expr": "sum by (container_name) (rate(container_cpu_usage_seconds_total{job=\"kubelet\", namespace=\"$namespace\", image!=\"\",container_name!=\"POD\",pod_name=\"$pod\"}[1m]))",
204                                 "format": "time_series",
205                                 "intervalFactor": 2,
206                                 "legendFormat": "{{`{{ container_name }}`}}",
207                                 "refId": "A"
208                             }
209                         ],
210                         "thresholds": [
211
212                         ],
213                         "timeFrom": null,
214                         "timeShift": null,
215                         "title": "CPU Usage",
216                         "tooltip": {
217                             "shared": true,
218                             "sort": 0,
219                             "value_type": "individual"
220                         },
221                         "type": "graph",
222                         "xaxis": {
223                             "buckets": null,
224                             "mode": "time",
225                             "name": null,
226                             "show": true,
227                             "values": [
228
229                             ]
230                         },
231                         "yaxes": [
232                             {
233                                 "format": "short",
234                                 "label": null,
235                                 "logBase": 1,
236                                 "max": null,
237                                 "min": 0,
238                                 "show": true
239                             },
240                             {
241                                 "format": "short",
242                                 "label": null,
243                                 "logBase": 1,
244                                 "max": null,
245                                 "min": 0,
246                                 "show": true
247                             }
248                         ]
249                     }
250                 ],
251                 "repeat": null,
252                 "repeatIteration": null,
253                 "repeatRowId": null,
254                 "showTitle": false,
255                 "title": "Dashboard Row",
256                 "titleSize": "h6",
257                 "type": "row"
258             },
259             {
260                 "collapse": false,
261                 "collapsed": false,
262                 "panels": [
263                     {
264                         "aliasColors": {
265
266                         },
267                         "bars": false,
268                         "dashLength": 10,
269                         "dashes": false,
270                         "datasource": "$datasource",
271                         "fill": 1,
272                         "gridPos": {
273
274                         },
275                         "id": 4,
276                         "legend": {
277                             "alignAsTable": true,
278                             "avg": true,
279                             "current": true,
280                             "max": false,
281                             "min": false,
282                             "rightSide": true,
283                             "show": true,
284                             "total": false,
285                             "values": false
286                         },
287                         "lines": true,
288                         "linewidth": 1,
289                         "links": [
290
291                         ],
292                         "nullPointMode": "null",
293                         "percentage": false,
294                         "pointradius": 5,
295                         "points": false,
296                         "renderer": "flot",
297                         "repeat": null,
298                         "seriesOverrides": [
299
300                         ],
301                         "spaceLength": 10,
302                         "stack": false,
303                         "steppedLine": false,
304                         "targets": [
305                             {
306                                 "expr": "sort_desc(sum by (pod_name) (rate(container_network_receive_bytes_total{job=\"kubelet\", namespace=\"$namespace\", pod_name=\"$pod\"}[1m])))",
307                                 "format": "time_series",
308                                 "intervalFactor": 2,
309                                 "legendFormat": "{{`{{ pod_name }}`}}",
310                                 "refId": "A"
311                             }
312                         ],
313                         "thresholds": [
314
315                         ],
316                         "timeFrom": null,
317                         "timeShift": null,
318                         "title": "Network I/O",
319                         "tooltip": {
320                             "shared": true,
321                             "sort": 0,
322                             "value_type": "individual"
323                         },
324                         "type": "graph",
325                         "xaxis": {
326                             "buckets": null,
327                             "mode": "time",
328                             "name": null,
329                             "show": true,
330                             "values": [
331
332                             ]
333                         },
334                         "yaxes": [
335                             {
336                                 "format": "bytes",
337                                 "label": null,
338                                 "logBase": 1,
339                                 "max": null,
340                                 "min": 0,
341                                 "show": true
342                             },
343                             {
344                                 "format": "bytes",
345                                 "label": null,
346                                 "logBase": 1,
347                                 "max": null,
348                                 "min": 0,
349                                 "show": true
350                             }
351                         ]
352                     }
353                 ],
354                 "repeat": null,
355                 "repeatIteration": null,
356                 "repeatRowId": null,
357                 "showTitle": false,
358                 "title": "Dashboard Row",
359                 "titleSize": "h6",
360                 "type": "row"
361             }
362         ],
363         "schemaVersion": 14,
364         "style": "dark",
365         "tags": [
366             "kubernetes-mixin"
367         ],
368         "templating": {
369             "list": [
370                 {
371                     "current": {
372                         "text": "Prometheus",
373                         "value": "Prometheus"
374                     },
375                     "hide": 0,
376                     "label": null,
377                     "name": "datasource",
378                     "options": [
379
380                     ],
381                     "query": "prometheus",
382                     "refresh": 1,
383                     "regex": "",
384                     "type": "datasource"
385                 },
386                 {
387                     "allValue": null,
388                     "current": {
389
390                     },
391                     "datasource": "$datasource",
392                     "hide": 0,
393                     "includeAll": false,
394                     "label": "Namespace",
395                     "multi": false,
396                     "name": "namespace",
397                     "options": [
398
399                     ],
400                     "query": "label_values(kube_pod_info, namespace)",
401                     "refresh": 2,
402                     "regex": "",
403                     "sort": 0,
404                     "tagValuesQuery": "",
405                     "tags": [
406
407                     ],
408                     "tagsQuery": "",
409                     "type": "query",
410                     "useTags": false
411                 },
412                 {
413                     "allValue": null,
414                     "current": {
415
416                     },
417                     "datasource": "$datasource",
418                     "hide": 0,
419                     "includeAll": false,
420                     "label": "Pod",
421                     "multi": false,
422                     "name": "pod",
423                     "options": [
424
425                     ],
426                     "query": "label_values(kube_pod_info{namespace=\u007e\"$namespace\"}, pod)",
427                     "refresh": 2,
428                     "regex": "",
429                     "sort": 0,
430                     "tagValuesQuery": "",
431                     "tags": [
432
433                     ],
434                     "tagsQuery": "",
435                     "type": "query",
436                     "useTags": false
437                 },
438                 {
439                     "allValue": null,
440                     "current": {
441
442                     },
443                     "datasource": "$datasource",
444                     "hide": 0,
445                     "includeAll": true,
446                     "label": "Container",
447                     "multi": false,
448                     "name": "container",
449                     "options": [
450
451                     ],
452                     "query": "label_values(kube_pod_container_info{namespace=\"$namespace\", pod=\"$pod\"}, container)",
453                     "refresh": 2,
454                     "regex": "",
455                     "sort": 0,
456                     "tagValuesQuery": "",
457                     "tags": [
458
459                     ],
460                     "tagsQuery": "",
461                     "type": "query",
462                     "useTags": false
463                 }
464             ]
465         },
466         "time": {
467             "from": "now-1h",
468             "to": "now"
469         },
470         "timepicker": {
471             "refresh_intervals": [
472                 "5s",
473                 "10s",
474                 "30s",
475                 "1m",
476                 "5m",
477                 "15m",
478                 "30m",
479                 "1h",
480                 "2h",
481                 "1d"
482             ],
483             "time_options": [
484                 "5m",
485                 "15m",
486                 "1h",
487                 "6h",
488                 "12h",
489                 "24h",
490                 "2d",
491                 "7d",
492                 "30d"
493             ]
494         },
495         "timezone": "",
496         "title": "Kubernetes / Pods",
497         "uid": "ab4f13a9892a76a4d21ce8c2445bf4ea",
498         "version": 0
499     }
500 {{- end }}