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