mirror of https://git.rancher.io/charts
56 lines
4.5 KiB
Diff
56 lines
4.5 KiB
Diff
--- charts-original/templates/grafana/dashboards/pods.yaml
|
|
+++ charts/templates/grafana/dashboards/pods.yaml
|
|
@@ -8,7 +8,7 @@
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
- namespace: {{ template "kube-prometheus-stack.namespace" . }}
|
|
+ namespace: {{ .Values.grafana.defaultDashboards.namespace }}
|
|
name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "pods" | trunc 63 | trimSuffix "-" }}
|
|
annotations:
|
|
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
|
|
@@ -103,7 +103,7 @@
|
|
"steppedLine": false,
|
|
"targets": [
|
|
{
|
|
- "expr": "sum by(container_name) (container_memory_usage_bytes{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\", pod_name=\"$pod\", container_name=~\"$container\", container_name!=\"POD\"})",
|
|
+ "expr": "sum by(container_name) (container_memory_usage_bytes{job=\"{{ include "exporter.kubelet.jobName" . }}\", cluster=\"$cluster\", namespace=\"$namespace\", pod_name=\"$pod\", container_name=~\"$container\", container_name!=\"POD\"})",
|
|
"format": "time_series",
|
|
"intervalFactor": 2,
|
|
"legendFormat": "Current: {{`{{`}} container_name {{`}}`}}",
|
|
@@ -124,7 +124,7 @@
|
|
"refId": "C"
|
|
},
|
|
{
|
|
- "expr": "sum by(container_name) (container_memory_cache{job=\"kubelet\", namespace=\"$namespace\", pod_name=~\"$pod\", container_name=~\"$container\", container_name!=\"POD\"})",
|
|
+ "expr": "sum by(container_name) (container_memory_cache{job=\"{{ include "exporter.kubelet.jobName" . }}\", namespace=\"$namespace\", pod_name=~\"$pod\", container_name=~\"$container\", container_name!=\"POD\"})",
|
|
"format": "time_series",
|
|
"intervalFactor": 2,
|
|
"legendFormat": "Cache: {{`{{`}} container_name {{`}}`}}",
|
|
@@ -228,7 +228,7 @@
|
|
"steppedLine": false,
|
|
"targets": [
|
|
{
|
|
- "expr": "sum by (container_name) (rate(container_cpu_usage_seconds_total{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\", image!=\"\", pod_name=\"$pod\", container_name=~\"$container\", container_name!=\"POD\"}[1m]))",
|
|
+ "expr": "sum by (container_name) (rate(container_cpu_usage_seconds_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", cluster=\"$cluster\", namespace=\"$namespace\", image!=\"\", pod_name=\"$pod\", container_name=~\"$container\", container_name!=\"POD\"}[1m]))",
|
|
"format": "time_series",
|
|
"intervalFactor": 2,
|
|
"legendFormat": "Current: {{`{{`}} container_name {{`}}`}}",
|
|
@@ -346,14 +346,14 @@
|
|
"steppedLine": false,
|
|
"targets": [
|
|
{
|
|
- "expr": "sort_desc(sum by (pod_name) (rate(container_network_receive_bytes_total{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\", pod_name=\"$pod\"}[1m])))",
|
|
+ "expr": "sort_desc(sum by (pod_name) (rate(container_network_receive_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", cluster=\"$cluster\", namespace=\"$namespace\", pod_name=\"$pod\"}[1m])))",
|
|
"format": "time_series",
|
|
"intervalFactor": 2,
|
|
"legendFormat": "RX: {{`{{`}} pod_name {{`}}`}}",
|
|
"refId": "A"
|
|
},
|
|
{
|
|
- "expr": "sort_desc(sum by (pod_name) (rate(container_network_transmit_bytes_total{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\", pod_name=\"$pod\"}[1m])))",
|
|
+ "expr": "sort_desc(sum by (pod_name) (rate(container_network_transmit_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", cluster=\"$cluster\", namespace=\"$namespace\", pod_name=\"$pod\"}[1m])))",
|
|
"format": "time_series",
|
|
"intervalFactor": 2,
|
|
"legendFormat": "TX: {{`{{`}} pod_name {{`}}`}}",
|