1 # Generated from 'k8s-resources-pod' 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 }}
8 name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-pod" | trunc 63 | trimSuffix "-" }}
10 {{- if $.Values.grafana.sidecar.dashboards.label }}
11 {{ $.Values.grafana.sidecar.dashboards.label }}: "1"
13 app: {{ template "prometheus-operator.name" $ }}-grafana
14 {{ include "prometheus-operator.labels" $ | indent 4 }}
16 k8s-resources-pod.json: |-
26 "hideControls": false,
43 "datasource": "$datasource",
60 "nullPointMode": "null as zero",
74 "expr": "sum(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=\"$namespace\", pod_name=\"$pod\", container_name!=\"POD\"}) by (container_name)",
75 "format": "time_series",
77 "legendFormat": "{{`{{container_name}}`}}",
91 "value_type": "individual"
124 "repeatIteration": null,
127 "title": "CPU Usage",
141 "datasource": "$datasource",
158 "nullPointMode": "null as zero",
169 "steppedLine": false,
173 "dateFormat": "YYYY-MM-DD HH:mm:ss",
178 "alias": "CPU Usage",
183 "dateFormat": "YYYY-MM-DD HH:mm:ss",
186 "linkTooltip": "Drill down",
188 "pattern": "Value #A",
196 "alias": "CPU Requests",
201 "dateFormat": "YYYY-MM-DD HH:mm:ss",
204 "linkTooltip": "Drill down",
206 "pattern": "Value #B",
214 "alias": "CPU Requests %",
219 "dateFormat": "YYYY-MM-DD HH:mm:ss",
222 "linkTooltip": "Drill down",
224 "pattern": "Value #C",
229 "unit": "percentunit"
232 "alias": "CPU Limits",
237 "dateFormat": "YYYY-MM-DD HH:mm:ss",
240 "linkTooltip": "Drill down",
242 "pattern": "Value #D",
250 "alias": "CPU Limits %",
255 "dateFormat": "YYYY-MM-DD HH:mm:ss",
258 "linkTooltip": "Drill down",
260 "pattern": "Value #E",
265 "unit": "percentunit"
268 "alias": "Container",
273 "dateFormat": "YYYY-MM-DD HH:mm:ss",
276 "linkTooltip": "Drill down",
278 "pattern": "container",
291 "dateFormat": "YYYY-MM-DD HH:mm:ss",
303 "expr": "sum(label_replace(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=\"$namespace\", pod_name=\"$pod\", container_name!=\"POD\"}, \"container\", \"$1\", \"container_name\", \"(.*)\")) by (container)",
312 "expr": "sum(kube_pod_container_resource_requests_cpu_cores{namespace=\"$namespace\", pod=\"$pod\"}) by (container)",
321 "expr": "sum(label_replace(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=\"$namespace\", pod_name=\"$pod\"}, \"container\", \"$1\", \"container_name\", \"(.*)\")) by (container) / sum(kube_pod_container_resource_requests_cpu_cores{namespace=\"$namespace\", pod=\"$pod\"}) by (container)",
330 "expr": "sum(kube_pod_container_resource_limits_cpu_cores{namespace=\"$namespace\", pod=\"$pod\"}) by (container)",
339 "expr": "sum(label_replace(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=\"$namespace\", pod_name=\"$pod\"}, \"container\", \"$1\", \"container_name\", \"(.*)\")) by (container) / sum(kube_pod_container_resource_limits_cpu_cores{namespace=\"$namespace\", pod=\"$pod\"}) by (container)",
353 "title": "CPU Quota",
357 "value_type": "individual"
359 "transform": "table",
391 "repeatIteration": null,
394 "title": "CPU Quota",
408 "datasource": "$datasource",
425 "nullPointMode": "null as zero",
436 "steppedLine": false,
439 "expr": "sum(container_memory_usage_bytes{namespace=\"$namespace\", pod_name=\"$pod\", container_name!=\"POD\", container_name!=\"\"}) by (container_name)",
440 "format": "time_series",
442 "legendFormat": "{{`{{container_name}}`}}",
452 "title": "Memory Usage",
456 "value_type": "individual"
489 "repeatIteration": null,
492 "title": "Memory Usage",
506 "datasource": "$datasource",
523 "nullPointMode": "null as zero",
534 "steppedLine": false,
538 "dateFormat": "YYYY-MM-DD HH:mm:ss",
543 "alias": "Memory Usage",
548 "dateFormat": "YYYY-MM-DD HH:mm:ss",
551 "linkTooltip": "Drill down",
553 "pattern": "Value #A",
561 "alias": "Memory Requests",
566 "dateFormat": "YYYY-MM-DD HH:mm:ss",
569 "linkTooltip": "Drill down",
571 "pattern": "Value #B",
579 "alias": "Memory Requests %",
584 "dateFormat": "YYYY-MM-DD HH:mm:ss",
587 "linkTooltip": "Drill down",
589 "pattern": "Value #C",
594 "unit": "percentunit"
597 "alias": "Memory Limits",
602 "dateFormat": "YYYY-MM-DD HH:mm:ss",
605 "linkTooltip": "Drill down",
607 "pattern": "Value #D",
615 "alias": "Memory Limits %",
620 "dateFormat": "YYYY-MM-DD HH:mm:ss",
623 "linkTooltip": "Drill down",
625 "pattern": "Value #E",
630 "unit": "percentunit"
633 "alias": "Container",
638 "dateFormat": "YYYY-MM-DD HH:mm:ss",
641 "linkTooltip": "Drill down",
643 "pattern": "container",
656 "dateFormat": "YYYY-MM-DD HH:mm:ss",
668 "expr": "sum(label_replace(container_memory_usage_bytes{namespace=\"$namespace\", pod_name=\"$pod\", container_name!=\"POD\", container_name!=\"\"}, \"container\", \"$1\", \"container_name\", \"(.*)\")) by (container)",
677 "expr": "sum(kube_pod_container_resource_requests_memory_bytes{namespace=\"$namespace\", pod=\"$pod\"}) by (container)",
686 "expr": "sum(label_replace(container_memory_usage_bytes{namespace=\"$namespace\", pod_name=\"$pod\"}, \"container\", \"$1\", \"container_name\", \"(.*)\")) by (container) / sum(kube_pod_container_resource_requests_memory_bytes{namespace=\"$namespace\", pod=\"$pod\"}) by (container)",
695 "expr": "sum(kube_pod_container_resource_limits_memory_bytes{namespace=\"$namespace\", pod=\"$pod\", container!=\"\"}) by (container)",
704 "expr": "sum(label_replace(container_memory_usage_bytes{namespace=\"$namespace\", pod_name=\"$pod\", container_name!=\"\"}, \"container\", \"$1\", \"container_name\", \"(.*)\")) by (container) / sum(kube_pod_container_resource_limits_memory_bytes{namespace=\"$namespace\", pod=\"$pod\"}) by (container)",
718 "title": "Memory Quota",
722 "value_type": "individual"
724 "transform": "table",
756 "repeatIteration": null,
759 "title": "Memory Quota",
772 "text": "Prometheus",
773 "value": "Prometheus"
777 "name": "datasource",
781 "query": "prometheus",
792 "datasource": "$datasource",
795 "label": "namespace",
801 "query": "label_values(kube_pod_info, namespace)",
805 "tagValuesQuery": "",
819 "datasource": "$datasource",
828 "query": "label_values(kube_pod_info{namespace=\"$namespace\"}, pod)",
832 "tagValuesQuery": "",
847 "refresh_intervals": [
872 "title": "Kubernetes / Compute Resources / Pod",
873 "uid": "6581e46e4e5c7ba40a07646395ef7b23",