diff --git a/packages/rancher-monitoring/generated-changes/exclude/Chart.lock b/packages/rancher-monitoring/generated-changes/exclude/Chart.lock index b30d86f47..b6d6f97d9 100644 --- a/packages/rancher-monitoring/generated-changes/exclude/Chart.lock +++ b/packages/rancher-monitoring/generated-changes/exclude/Chart.lock @@ -1,12 +1,12 @@ dependencies: - name: kube-state-metrics - repository: https://kubernetes.github.io/kube-state-metrics - version: 2.13.0 + repository: https://prometheus-community.github.io/helm-charts + version: 3.1.1 - name: prometheus-node-exporter repository: https://prometheus-community.github.io/helm-charts - version: 1.16.2 + version: 1.18.1 - name: grafana repository: https://grafana.github.io/helm-charts - version: 6.6.3 -digest: sha256:52acbef377da70248ae3fa926dc7f6601df9022b1b1e17224a8fe99e6995d3af -generated: "2021-03-19T17:50:36.8566658+01:00" + version: 6.12.0 +digest: sha256:11886645ff1ade77d0fefdca90afba4a92f2b535997280074a59828e8d1dab4e +generated: "2021-06-09T16:56:40.364303181+02:00" diff --git a/packages/rancher-monitoring/generated-changes/exclude/hack/requirements.txt b/packages/rancher-monitoring/generated-changes/exclude/hack/requirements.txt index bc2fde78b..91a83073c 100644 --- a/packages/rancher-monitoring/generated-changes/exclude/hack/requirements.txt +++ b/packages/rancher-monitoring/generated-changes/exclude/hack/requirements.txt @@ -1,2 +1,2 @@ -PyYAML==5.1.2 +PyYAML==5.4 requests==2.22.0 diff --git a/packages/rancher-monitoring/generated-changes/exclude/hack/sync_grafana_dashboards.py b/packages/rancher-monitoring/generated-changes/exclude/hack/sync_grafana_dashboards.py index 6777d8287..860f5a703 100644 --- a/packages/rancher-monitoring/generated-changes/exclude/hack/sync_grafana_dashboards.py +++ b/packages/rancher-monitoring/generated-changes/exclude/hack/sync_grafana_dashboards.py @@ -32,25 +32,11 @@ charts = [ 'min_kubernetes': '1.14.0-0' }, { - 'source': 'https://raw.githubusercontent.com/etcd-io/website/master/content/docs/current/op-guide/grafana.json', + 'source': 'https://raw.githubusercontent.com/etcd-io/website/master/content/en/docs/v3.4/op-guide/grafana.json', 'destination': '../templates/grafana/dashboards-1.14', 'type': 'json', 'min_kubernetes': '1.14.0-0' }, - { - 'source': 'https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/release-0.1/manifests/grafana-dashboardDefinitions.yaml', - 'destination': '../templates/grafana/dashboards', - 'type': 'yaml', - 'min_kubernetes': '1.10.0-0', - 'max_kubernetes': '1.14.0-0' - }, - { - 'source': 'https://raw.githubusercontent.com/etcd-io/website/master/content/docs/current/op-guide/grafana.json', - 'destination': '../templates/grafana/dashboards', - 'type': 'json', - 'min_kubernetes': '1.10.0-0', - 'max_kubernetes': '1.14.0-0' - }, ] # Additional conditions map @@ -74,7 +60,7 @@ Do not change in-place! In order to change this file first read following link: https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack */ -}} {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} -{{- if and (semverCompare ">=%(min_kubernetes)s" $kubeTargetVersion) (semverCompare "<%(max_kubernetes)s" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled%(condition)s }} +{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=%(min_kubernetes)s" $kubeTargetVersion) (semverCompare "<%(max_kubernetes)s" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled%(condition)s }} apiVersion: v1 kind: ConfigMap metadata: diff --git a/packages/rancher-monitoring/generated-changes/exclude/hack/sync_prometheus_rules.py b/packages/rancher-monitoring/generated-changes/exclude/hack/sync_prometheus_rules.py index c35cd0baa..59c711357 100644 --- a/packages/rancher-monitoring/generated-changes/exclude/hack/sync_prometheus_rules.py +++ b/packages/rancher-monitoring/generated-changes/exclude/hack/sync_prometheus_rules.py @@ -30,7 +30,7 @@ charts = [ 'min_kubernetes': '1.14.0-0' }, { - 'source': 'https://raw.githubusercontent.com/etcd-io/website/master/content/docs/v3.4.0/op-guide/etcd3_alert.rules.yml', + 'source': 'https://raw.githubusercontent.com/etcd-io/website/master/content/en/docs/v3.4/op-guide/etcd3_alert.rules.yml', 'destination': '../templates/prometheus/rules-1.14', 'min_kubernetes': '1.14.0-0' }, @@ -41,7 +41,7 @@ charts = [ 'max_kubernetes': '1.14.0-0' }, { - 'source': 'https://raw.githubusercontent.com/etcd-io/website/master/content/docs/v3.4.0/op-guide/etcd3_alert.rules.yml', + 'source': 'https://raw.githubusercontent.com/etcd-io/website/master/content/en/docs/v3.4/op-guide/etcd3_alert.rules.yml', 'destination': '../templates/prometheus/rules', 'min_kubernetes': '1.10.0-0', 'max_kubernetes': '1.14.0-0' diff --git a/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/etcd.yaml b/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/etcd.yaml new file mode 100644 index 000000000..ac54228e9 --- /dev/null +++ b/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/etcd.yaml @@ -0,0 +1,1118 @@ +{{- /* +Generated from 'etcd' from https://raw.githubusercontent.com/etcd-io/website/master/content/docs/current/op-guide/grafana.json +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} +{{- if (include "exporter.kubeEtcd.enabled" .)}} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ .Values.grafana.defaultDashboards.namespace }} + name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "etcd" | trunc 63 | trimSuffix "-" }} + annotations: +{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: "1" + {{- end }} + app: {{ template "kube-prometheus-stack.name" $ }}-grafana +{{ include "kube-prometheus-stack.labels" $ | indent 4 }} +data: + etcd.json: |- + { + "annotations": { + "list": [] + }, + "description": "etcd sample Grafana dashboard with Prometheus", + "editable": true, + "gnetId": null, + "hideControls": false, + "links": [], + "refresh": "10s", + "rows": [ + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "datasource": "$datasource", + "editable": true, + "error": false, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "id": 28, + "interval": null, + "isNew": true, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "targets": [ + { + "expr": "sum(etcd_server_has_leader{job=\"$cluster\"})", + "intervalFactor": 2, + "legendFormat": "", + "metric": "etcd_server_has_leader", + "refId": "A", + "step": 20 + } + ], + "thresholds": "", + "title": "Up", + "type": "singlestat", + "valueFontSize": "200%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "$datasource", + "editable": true, + "error": false, + "fill": 0, + "id": 23, + "isNew": true, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 5, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(grpc_server_started_total{job=\"$cluster\",grpc_type=\"unary\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "RPC Rate", + "metric": "grpc_server_started_total", + "refId": "A", + "step": 2 + }, + { + "expr": "sum(rate(grpc_server_handled_total{job=\"$cluster\",grpc_type=\"unary\",grpc_code!=\"OK\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "RPC Failed Rate", + "metric": "grpc_server_handled_total", + "refId": "B", + "step": 2 + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "RPC Rate", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "$datasource", + "editable": true, + "error": false, + "fill": 0, + "id": 41, + "isNew": true, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 4, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(grpc_server_started_total{job=\"$cluster\",grpc_service=\"etcdserverpb.Watch\",grpc_type=\"bidi_stream\"}) - sum(grpc_server_handled_total{job=\"$cluster\",grpc_service=\"etcdserverpb.Watch\",grpc_type=\"bidi_stream\"})", + "intervalFactor": 2, + "legendFormat": "Watch Streams", + "metric": "grpc_server_handled_total", + "refId": "A", + "step": 4 + }, + { + "expr": "sum(grpc_server_started_total{job=\"$cluster\",grpc_service=\"etcdserverpb.Lease\",grpc_type=\"bidi_stream\"}) - sum(grpc_server_handled_total{job=\"$cluster\",grpc_service=\"etcdserverpb.Lease\",grpc_type=\"bidi_stream\"})", + "intervalFactor": 2, + "legendFormat": "Lease Streams", + "metric": "grpc_server_handled_total", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "Active Streams", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "showTitle": false, + "title": "Row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "$datasource", + "decimals": null, + "editable": true, + "error": false, + "fill": 0, + "grid": {}, + "id": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 4, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "etcd_mvcc_db_total_size_in_bytes{job=\"$cluster\"}", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}} DB Size", + "metric": "", + "refId": "A", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "DB Size", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "$datasource", + "editable": true, + "error": false, + "fill": 0, + "grid": {}, + "id": 3, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 1, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 4, + "stack": false, + "steppedLine": true, + "targets": [ + { + "expr": "histogram_quantile(0.99, sum(rate(etcd_disk_wal_fsync_duration_seconds_bucket{job=\"$cluster\"}[5m])) by (instance, le))", + "hide": false, + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}} WAL fsync", + "metric": "etcd_disk_wal_fsync_duration_seconds_bucket", + "refId": "A", + "step": 4 + }, + { + "expr": "histogram_quantile(0.99, sum(rate(etcd_disk_backend_commit_duration_seconds_bucket{job=\"$cluster\"}[5m])) by (instance, le))", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}} DB fsync", + "metric": "etcd_disk_backend_commit_duration_seconds_bucket", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "Disk Sync Duration", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "$datasource", + "editable": true, + "error": false, + "fill": 0, + "id": 29, + "isNew": true, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 4, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "process_resident_memory_bytes{job=\"$cluster\"}", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}} Resident Memory", + "metric": "process_resident_memory_bytes", + "refId": "A", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "Memory", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "$datasource", + "editable": true, + "error": false, + "fill": 5, + "id": 22, + "isNew": true, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 3, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "rate(etcd_network_client_grpc_received_bytes_total{job=\"$cluster\"}[5m])", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}} Client Traffic In", + "metric": "etcd_network_client_grpc_received_bytes_total", + "refId": "A", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "Client Traffic In", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "$datasource", + "editable": true, + "error": false, + "fill": 5, + "id": 21, + "isNew": true, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 3, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "rate(etcd_network_client_grpc_sent_bytes_total{job=\"$cluster\"}[5m])", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}} Client Traffic Out", + "metric": "etcd_network_client_grpc_sent_bytes_total", + "refId": "A", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "Client Traffic Out", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "$datasource", + "editable": true, + "error": false, + "fill": 0, + "id": 20, + "isNew": true, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 3, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(etcd_network_peer_received_bytes_total{job=\"$cluster\"}[5m])) by (instance)", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}} Peer Traffic In", + "metric": "etcd_network_peer_received_bytes_total", + "refId": "A", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "Peer Traffic In", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "$datasource", + "decimals": null, + "editable": true, + "error": false, + "fill": 0, + "grid": {}, + "id": 16, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 3, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(etcd_network_peer_sent_bytes_total{job=\"$cluster\"}[5m])) by (instance)", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}} Peer Traffic Out", + "metric": "etcd_network_peer_sent_bytes_total", + "refId": "A", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "Peer Traffic Out", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "Bps", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "$datasource", + "editable": true, + "error": false, + "fill": 0, + "id": 40, + "isNew": true, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(etcd_server_proposals_failed_total{job=\"$cluster\"}[5m]))", + "intervalFactor": 2, + "legendFormat": "Proposal Failure Rate", + "metric": "etcd_server_proposals_failed_total", + "refId": "A", + "step": 2 + }, + { + "expr": "sum(etcd_server_proposals_pending{job=\"$cluster\"})", + "intervalFactor": 2, + "legendFormat": "Proposal Pending Total", + "metric": "etcd_server_proposals_pending", + "refId": "B", + "step": 2 + }, + { + "expr": "sum(rate(etcd_server_proposals_committed_total{job=\"$cluster\"}[5m]))", + "intervalFactor": 2, + "legendFormat": "Proposal Commit Rate", + "metric": "etcd_server_proposals_committed_total", + "refId": "C", + "step": 2 + }, + { + "expr": "sum(rate(etcd_server_proposals_applied_total{job=\"$cluster\"}[5m]))", + "intervalFactor": 2, + "legendFormat": "Proposal Apply Rate", + "refId": "D", + "step": 2 + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "Raft Proposals", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "$datasource", + "decimals": 0, + "editable": true, + "error": false, + "fill": 0, + "id": 19, + "isNew": true, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "changes(etcd_server_leader_changes_seen_total{job=\"$cluster\"}[1d])", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}} Total Leader Elections Per Day", + "metric": "etcd_server_leader_changes_seen_total", + "refId": "A", + "step": 2 + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "Total Leader Elections Per Day", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + } + ], + "schemaVersion": 13, + "sharedCrosshair": false, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": "$datasource", + "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, + "includeAll": false, + "label": "cluster", + "multi": false, + "name": "cluster", + "options": [], + "query": "label_values(etcd_server_has_leader, job)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-15m", + "to": "now" + }, + "timepicker": { + "now": true, + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "browser", + "title": "etcd", + "uid": "c2f4e12cdf69feb95caa41a5a1b423d9", + "version": 215 + } +{{- end }} +{{- end }} \ No newline at end of file diff --git a/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/k8s-cluster-rsrc-use.yaml b/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/k8s-cluster-rsrc-use.yaml new file mode 100644 index 000000000..2b8eac4df --- /dev/null +++ b/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/k8s-cluster-rsrc-use.yaml @@ -0,0 +1,959 @@ +{{- /* +Generated from 'k8s-cluster-rsrc-use' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/release-0.1/manifests/grafana-dashboardDefinitions.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ .Values.grafana.defaultDashboards.namespace }} + name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "k8s-cluster-rsrc-use" | trunc 63 | trimSuffix "-" }} + annotations: +{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: "1" + {{- end }} + app: {{ template "kube-prometheus-stack.name" $ }}-grafana +{{ include "kube-prometheus-stack.labels" $ | indent 4 }} +data: + k8s-cluster-rsrc-use.json: |- + { + "annotations": { + "list": [ + + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "links": [ + + ], + "refresh": "10s", + "rows": [ + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "node:cluster_cpu_utilisation:ratio{cluster=\"$cluster\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}node{{`}}`}}", + "legendLink": "./d/4ac4f123aae0ff6dbaf4f4f66120033b/k8s-node-rsrc-use", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Utilisation", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": 1, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 2, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "node:node_cpu_saturation_load1:{cluster=\"$cluster\"} / scalar(sum(min(kube_pod_info{cluster=\"$cluster\"}) by (node)))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}node{{`}}`}}", + "legendLink": "./d/4ac4f123aae0ff6dbaf4f4f66120033b/k8s-node-rsrc-use", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Saturation (Load1)", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": 1, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 3, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "node:cluster_memory_utilisation:ratio{cluster=\"$cluster\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}node{{`}}`}}", + "legendLink": "./d/4ac4f123aae0ff6dbaf4f4f66120033b/k8s-node-rsrc-use", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Utilisation", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": 1, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 4, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "node:node_memory_swap_io_bytes:sum_rate{cluster=\"$cluster\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}node{{`}}`}}", + "legendLink": "./d/4ac4f123aae0ff6dbaf4f4f66120033b/k8s-node-rsrc-use", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Saturation (Swap I/O)", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 5, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "node:node_disk_utilisation:avg_irate{cluster=\"$cluster\"} / scalar(:kube_pod_info_node_count:{cluster=\"$cluster\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}node{{`}}`}}", + "legendLink": "./d/4ac4f123aae0ff6dbaf4f4f66120033b/k8s-node-rsrc-use", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Disk IO Utilisation", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": 1, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 6, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "node:node_disk_saturation:avg_irate{cluster=\"$cluster\"} / scalar(:kube_pod_info_node_count:{cluster=\"$cluster\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}node{{`}}`}}", + "legendLink": "./d/4ac4f123aae0ff6dbaf4f4f66120033b/k8s-node-rsrc-use", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Disk IO Saturation", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": 1, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Disk", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 7, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "node:node_net_utilisation:sum_irate{cluster=\"$cluster\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}node{{`}}`}}", + "legendLink": "./d/4ac4f123aae0ff6dbaf4f4f66120033b/k8s-node-rsrc-use", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Net Utilisation (Transmitted)", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 8, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "node:node_net_saturation:sum_irate{cluster=\"$cluster\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}node{{`}}`}}", + "legendLink": "./d/4ac4f123aae0ff6dbaf4f4f66120033b/k8s-node-rsrc-use", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Net Saturation (Dropped)", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 9, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(max(node_filesystem_size_bytes{fstype=~\"ext[234]|btrfs|xfs|zfs\", cluster=\"$cluster\"} - node_filesystem_avail_bytes{fstype=~\"ext[234]|btrfs|xfs|zfs\", cluster=\"$cluster\"}) by (device,pod,namespace)) by (pod,namespace)\n/ scalar(sum(max(node_filesystem_size_bytes{fstype=~\"ext[234]|btrfs|xfs|zfs\", cluster=\"$cluster\"}) by (device,pod,namespace)))\n* on (namespace, pod) group_left (node) node_namespace_pod:kube_pod_info:{cluster=\"$cluster\"}\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}node{{`}}`}}", + "legendLink": "./d/4ac4f123aae0ff6dbaf4f4f66120033b/k8s-node-rsrc-use", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Disk Capacity", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": 1, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Storage", + "titleSize": "h6" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": "$datasource", + "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, + "includeAll": false, + "label": "cluster", + "multi": false, + "name": "cluster", + "options": [ + + ], + "query": "label_values(:kube_pod_info_node_count:, cluster)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "Kubernetes / USE Method / Cluster", + "uid": "a6e7d1362e1ddbb79db21d5bb40d7137", + "version": 0 + } +{{- end }} \ No newline at end of file diff --git a/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/k8s-node-rsrc-use.yaml b/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/k8s-node-rsrc-use.yaml new file mode 100644 index 000000000..101252086 --- /dev/null +++ b/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/k8s-node-rsrc-use.yaml @@ -0,0 +1,986 @@ +{{- /* +Generated from 'k8s-node-rsrc-use' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/release-0.1/manifests/grafana-dashboardDefinitions.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ .Values.grafana.defaultDashboards.namespace }} + name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "k8s-node-rsrc-use" | trunc 63 | trimSuffix "-" }} + annotations: +{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: "1" + {{- end }} + app: {{ template "kube-prometheus-stack.name" $ }}-grafana +{{ include "kube-prometheus-stack.labels" $ | indent 4 }} +data: + k8s-node-rsrc-use.json: |- + { + "annotations": { + "list": [ + + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "links": [ + + ], + "refresh": "10s", + "rows": [ + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node:node_cpu_utilisation:avg1m{cluster=\"$cluster\", node=\"$node\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Utilisation", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Utilisation", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 2, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node:node_cpu_saturation_load1:{cluster=\"$cluster\", node=\"$node\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Saturation", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Saturation (Load1)", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 3, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node:node_memory_utilisation:{cluster=\"$cluster\", node=\"$node\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Memory", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Utilisation", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 4, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node:node_memory_swap_io_bytes:sum_rate{cluster=\"$cluster\", node=\"$node\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Swap IO", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Saturation (Swap I/O)", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 5, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node:node_disk_utilisation:avg_irate{cluster=\"$cluster\", node=\"$node\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Utilisation", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Disk IO Utilisation", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 6, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node:node_disk_saturation:avg_irate{cluster=\"$cluster\", node=\"$node\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Saturation", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Disk IO Saturation", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Disk", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 7, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node:node_net_utilisation:sum_irate{cluster=\"$cluster\", node=\"$node\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Utilisation", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Net Utilisation (Transmitted)", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 8, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node:node_net_saturation:sum_irate{cluster=\"$cluster\", node=\"$node\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Saturation", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Net Saturation (Dropped)", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Net", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 9, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node:node_filesystem_usage:{cluster=\"$cluster\"}\n* on (namespace, pod) group_left (node) node_namespace_pod:kube_pod_info:{cluster=\"$cluster\", node=\"$node\"}\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}device{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Disk Utilisation", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Disk", + "titleSize": "h6" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": "$datasource", + "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, + "includeAll": false, + "label": "cluster", + "multi": false, + "name": "cluster", + "options": [ + + ], + "query": "label_values(:kube_pod_info_node_count:, cluster)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "node", + "multi": false, + "name": "node", + "options": [ + + ], + "query": "label_values(kube_node_info{cluster=\"$cluster\"}, node)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "Kubernetes / USE Method / Node", + "uid": "4ac4f123aae0ff6dbaf4f4f66120033b", + "version": 0 + } +{{- end }} \ No newline at end of file diff --git a/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/k8s-resources-cluster.yaml b/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/k8s-resources-cluster.yaml new file mode 100644 index 000000000..e068214bc --- /dev/null +++ b/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/k8s-resources-cluster.yaml @@ -0,0 +1,1479 @@ +{{- /* +Generated from 'k8s-resources-cluster' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/release-0.1/manifests/grafana-dashboardDefinitions.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ .Values.grafana.defaultDashboards.namespace }} + name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "k8s-resources-cluster" | trunc 63 | trimSuffix "-" }} + annotations: +{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: "1" + {{- end }} + app: {{ template "kube-prometheus-stack.name" $ }}-grafana +{{ include "kube-prometheus-stack.labels" $ | indent 4 }} +data: + k8s-resources-cluster.json: |- + { + "annotations": { + "list": [ + + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "links": [ + + ], + "refresh": "10s", + "rows": [ + { + "collapse": false, + "height": "100px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "format": "percentunit", + "id": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 2, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "1 - avg(rate(node_cpu_seconds_total{mode=\"idle\", cluster=\"$cluster\"}[1m]))", + "format": "time_series", + "instant": true, + "intervalFactor": 2, + "refId": "A" + } + ], + "thresholds": "70,80", + "timeFrom": null, + "timeShift": null, + "title": "CPU Utilisation", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "singlestat", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "format": "percentunit", + "id": 2, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 2, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\"}) / sum(node:node_num_cpu:sum{cluster=\"$cluster\"})", + "format": "time_series", + "instant": true, + "intervalFactor": 2, + "refId": "A" + } + ], + "thresholds": "70,80", + "timeFrom": null, + "timeShift": null, + "title": "CPU Requests Commitment", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "singlestat", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "format": "percentunit", + "id": 3, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 2, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\"}) / sum(node:node_num_cpu:sum{cluster=\"$cluster\"})", + "format": "time_series", + "instant": true, + "intervalFactor": 2, + "refId": "A" + } + ], + "thresholds": "70,80", + "timeFrom": null, + "timeShift": null, + "title": "CPU Limits Commitment", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "singlestat", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "format": "percentunit", + "id": 4, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 2, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "1 - sum(:node_memory_MemFreeCachedBuffers_bytes:sum{cluster=\"$cluster\"}) / sum(:node_memory_MemTotal_bytes:sum{cluster=\"$cluster\"})", + "format": "time_series", + "instant": true, + "intervalFactor": 2, + "refId": "A" + } + ], + "thresholds": "70,80", + "timeFrom": null, + "timeShift": null, + "title": "Memory Utilisation", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "singlestat", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "format": "percentunit", + "id": 5, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 2, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\"}) / sum(:node_memory_MemTotal_bytes:sum{cluster=\"$cluster\"})", + "format": "time_series", + "instant": true, + "intervalFactor": 2, + "refId": "A" + } + ], + "thresholds": "70,80", + "timeFrom": null, + "timeShift": null, + "title": "Memory Requests Commitment", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "singlestat", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "format": "percentunit", + "id": 6, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 2, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\"}) / sum(:node_memory_MemTotal_bytes:sum{cluster=\"$cluster\"})", + "format": "time_series", + "instant": true, + "intervalFactor": 2, + "refId": "A" + } + ], + "thresholds": "70,80", + "timeFrom": null, + "timeShift": null, + "title": "Memory Limits Commitment", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "singlestat", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Headlines", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 7, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\"}) by (namespace)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}namespace{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 8, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Pods", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "link": true, + "linkTooltip": "Drill down to pods", + "linkUrl": "./d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "Workloads", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "link": true, + "linkTooltip": "Drill down to workloads", + "linkUrl": "./d/a87fb0d919ec0ea5f6543124e16c42a5/k8s-resources-workloads-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Usage", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "CPU Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #G", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Namespace", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTooltip": "Drill down to pods", + "linkUrl": "./d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell", + "pattern": "namespace", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "count(mixin_pod_workload{cluster=\"$cluster\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "count(avg(mixin_pod_workload{cluster=\"$cluster\"}) by (workload, namespace)) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\"}) by (namespace) / sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + }, + { + "expr": "sum(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\"}) by (namespace) / sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "G", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Quota", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU Quota", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 9, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(container_memory_rss{cluster=\"$cluster\", container_name!=\"\"}) by (namespace)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}namespace{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Usage (w/o cache)", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 10, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Pods", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "link": true, + "linkTooltip": "Drill down to pods", + "linkUrl": "./d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "Workloads", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "link": true, + "linkTooltip": "Drill down to workloads", + "linkUrl": "./d/a87fb0d919ec0ea5f6543124e16c42a5/k8s-resources-workloads-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "Memory Usage", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Memory Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #G", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Namespace", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTooltip": "Drill down to pods", + "linkUrl": "./d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell", + "pattern": "namespace", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "count(mixin_pod_workload{cluster=\"$cluster\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "count(avg(mixin_pod_workload{cluster=\"$cluster\"}) by (workload, namespace)) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(container_memory_rss{cluster=\"$cluster\", container_name!=\"\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(container_memory_rss{cluster=\"$cluster\", container_name!=\"\"}) by (namespace) / sum(kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "sum(kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + }, + { + "expr": "sum(container_memory_rss{cluster=\"$cluster\", container_name!=\"\"}) by (namespace) / sum(kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "G", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Requests by Namespace", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory Requests", + "titleSize": "h6" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": "$datasource", + "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, + "includeAll": false, + "label": "cluster", + "multi": false, + "name": "cluster", + "options": [ + + ], + "query": "label_values(:kube_pod_info_node_count:, cluster)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "Kubernetes / Compute Resources / Cluster", + "uid": "efa86fd1d0c121a26444b636a3f509a8", + "version": 0 + } +{{- end }} \ No newline at end of file diff --git a/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/k8s-resources-namespace.yaml b/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/k8s-resources-namespace.yaml new file mode 100644 index 000000000..af3664731 --- /dev/null +++ b/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/k8s-resources-namespace.yaml @@ -0,0 +1,963 @@ +{{- /* +Generated from 'k8s-resources-namespace' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/release-0.1/manifests/grafana-dashboardDefinitions.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ .Values.grafana.defaultDashboards.namespace }} + name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "k8s-resources-namespace" | trunc 63 | trimSuffix "-" }} + annotations: +{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: "1" + {{- end }} + app: {{ template "kube-prometheus-stack.name" $ }}-grafana +{{ include "kube-prometheus-stack.labels" $ | indent 4 }} +data: + k8s-resources-namespace.json: |- + { + "annotations": { + "list": [ + + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "links": [ + + ], + "refresh": "10s", + "rows": [ + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod_name)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}pod_name{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU Usage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 2, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "CPU Usage", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "CPU Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Pod", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTooltip": "Drill down", + "linkUrl": "./d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", + "pattern": "pod", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum(label_replace(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(label_replace(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod) / sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(label_replace(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod) / sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Quota", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU Quota", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 3, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(container_memory_usage_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container_name!=\"\"}) by (pod_name)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}pod_name{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Usage (w/o cache)", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory Usage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 4, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Memory Usage", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Memory Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Memory Usage (RSS)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Usage (Cache)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #G", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Usage (Swap", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #H", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Pod", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTooltip": "Drill down", + "linkUrl": "./d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", + "pattern": "pod", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum(label_replace(container_memory_usage_bytes{cluster=\"$cluster\", namespace=\"$namespace\",container_name!=\"\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(label_replace(container_memory_usage_bytes{cluster=\"$cluster\", namespace=\"$namespace\",container_name!=\"\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod) / sum(kube_pod_container_resource_requests_memory_bytes{namespace=\"$namespace\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(label_replace(container_memory_usage_bytes{cluster=\"$cluster\", namespace=\"$namespace\",container_name!=\"\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod) / sum(kube_pod_container_resource_limits_memory_bytes{namespace=\"$namespace\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "sum(label_replace(container_memory_rss{cluster=\"$cluster\", namespace=\"$namespace\",container_name!=\"\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + }, + { + "expr": "sum(label_replace(container_memory_cache{cluster=\"$cluster\", namespace=\"$namespace\",container_name!=\"\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "G", + "step": 10 + }, + { + "expr": "sum(label_replace(container_memory_swap{cluster=\"$cluster\", namespace=\"$namespace\",container_name!=\"\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "H", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Quota", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory Quota", + "titleSize": "h6" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": "$datasource", + "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, + "includeAll": false, + "label": "cluster", + "multi": false, + "name": "cluster", + "options": [ + + ], + "query": "label_values(:kube_pod_info_node_count:, cluster)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "namespace", + "multi": false, + "name": "namespace", + "options": [ + + ], + "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "Kubernetes / Compute Resources / Namespace (Pods)", + "uid": "85a562078cdf77779eaa1add43ccec1e", + "version": 0 + } +{{- end }} \ No newline at end of file diff --git a/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/k8s-resources-pod.yaml b/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/k8s-resources-pod.yaml new file mode 100644 index 000000000..536a2c704 --- /dev/null +++ b/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/k8s-resources-pod.yaml @@ -0,0 +1,1006 @@ +{{- /* +Generated from 'k8s-resources-pod' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/release-0.1/manifests/grafana-dashboardDefinitions.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ .Values.grafana.defaultDashboards.namespace }} + name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "k8s-resources-pod" | trunc 63 | trimSuffix "-" }} + annotations: +{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: "1" + {{- end }} + app: {{ template "kube-prometheus-stack.name" $ }}-grafana +{{ include "kube-prometheus-stack.labels" $ | indent 4 }} +data: + k8s-resources-pod.json: |- + { + "annotations": { + "list": [ + + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "links": [ + + ], + "refresh": "10s", + "rows": [ + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=\"$namespace\", pod_name=\"$pod\", container_name!=\"POD\", cluster=\"$cluster\"}) by (container_name)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}container_name{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU Usage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 2, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "CPU Usage", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "CPU Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Container", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "container", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum(label_replace(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\", pod_name=\"$pod\", container_name!=\"POD\"}, \"container\", \"$1\", \"container_name\", \"(.*)\")) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(label_replace(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\", pod_name=\"$pod\"}, \"container\", \"$1\", \"container_name\", \"(.*)\")) by (container) / sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(label_replace(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\", pod_name=\"$pod\"}, \"container\", \"$1\", \"container_name\", \"(.*)\")) by (container) / sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Quota", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU Quota", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 3, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(container_memory_rss{cluster=\"$cluster\", namespace=\"$namespace\", pod_name=\"$pod\", container_name!=\"POD\", container_name!=\"\"}) by (container_name)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}container_name{{`}}`}} (RSS)", + "legendLink": null, + "step": 10 + }, + { + "expr": "sum(container_memory_cache{cluster=\"$cluster\", namespace=\"$namespace\", pod_name=\"$pod\", container_name!=\"POD\", container_name!=\"\"}) by (container_name)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}container_name{{`}}`}} (Cache)", + "legendLink": null, + "step": 10 + }, + { + "expr": "sum(container_memory_swap{cluster=\"$cluster\", namespace=\"$namespace\", pod_name=\"$pod\", container_name!=\"POD\", container_name!=\"\"}) by (container_name)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}container_name{{`}}`}} (Swap)", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory Usage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 4, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Memory Usage", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Memory Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Memory Usage (RSS)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Usage (Cache)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #G", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Usage (Swap", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #H", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Container", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "container", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum(label_replace(container_memory_usage_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod_name=\"$pod\", container_name!=\"POD\", container_name!=\"\"}, \"container\", \"$1\", \"container_name\", \"(.*)\")) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(label_replace(container_memory_usage_bytes{cluster=\"$cluster\", 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)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"\"}) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(label_replace(container_memory_usage_bytes{cluster=\"$cluster\", 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)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "sum(label_replace(container_memory_rss{cluster=\"$cluster\", namespace=\"$namespace\", pod_name=\"$pod\", container_name != \"\", container_name != \"POD\"}, \"container\", \"$1\", \"container_name\", \"(.*)\")) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + }, + { + "expr": "sum(label_replace(container_memory_cache{cluster=\"$cluster\", namespace=\"$namespace\", pod_name=\"$pod\", container_name != \"\", container_name != \"POD\"}, \"container\", \"$1\", \"container_name\", \"(.*)\")) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "G", + "step": 10 + }, + { + "expr": "sum(label_replace(container_memory_swap{cluster=\"$cluster\", namespace=\"$namespace\", pod_name=\"$pod\", container_name != \"\", container_name != \"POD\"}, \"container\", \"$1\", \"container_name\", \"(.*)\")) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "H", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Quota", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory Quota", + "titleSize": "h6" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": "$datasource", + "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, + "includeAll": false, + "label": "cluster", + "multi": false, + "name": "cluster", + "options": [ + + ], + "query": "label_values(:kube_pod_info_node_count:, cluster)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "namespace", + "multi": false, + "name": "namespace", + "options": [ + + ], + "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "pod", + "multi": false, + "name": "pod", + "options": [ + + ], + "query": "label_values(kube_pod_info{cluster=\"$cluster\", namespace=\"$namespace\"}, pod)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "Kubernetes / Compute Resources / Pod", + "uid": "6581e46e4e5c7ba40a07646395ef7b23", + "version": 0 + } +{{- end }} \ No newline at end of file diff --git a/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/k8s-resources-workload.yaml b/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/k8s-resources-workload.yaml new file mode 100644 index 000000000..f5844b505 --- /dev/null +++ b/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/k8s-resources-workload.yaml @@ -0,0 +1,936 @@ +{{- /* +Generated from 'k8s-resources-workload' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/release-0.1/manifests/grafana-dashboardDefinitions.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ .Values.grafana.defaultDashboards.namespace }} + name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "k8s-resources-workload" | trunc 63 | trimSuffix "-" }} + annotations: +{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: "1" + {{- end }} + app: {{ template "kube-prometheus-stack.name" $ }}-grafana +{{ include "kube-prometheus-stack.labels" $ | indent 4 }} +data: + k8s-resources-workload.json: |- + { + "annotations": { + "list": [ + + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "links": [ + + ], + "refresh": "10s", + "rows": [ + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(\n label_replace(\n namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"},\n \"pod\", \"$1\", \"pod_name\", \"(.*)\"\n ) * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU Usage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 2, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "CPU Usage", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "CPU Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Pod", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTooltip": "Drill down", + "linkUrl": "./d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", + "pattern": "pod", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum(\n label_replace(\n namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"},\n \"pod\", \"$1\", \"pod_name\", \"(.*)\"\n ) * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(\n kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(\n label_replace(\n namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"},\n \"pod\", \"$1\", \"pod_name\", \"(.*)\"\n ) * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(\n kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(\n label_replace(\n namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"},\n \"pod\", \"$1\", \"pod_name\", \"(.*)\"\n ) * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Quota", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU Quota", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 3, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(\n label_replace(\n container_memory_usage_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container_name!=\"\"},\n \"pod\", \"$1\", \"pod_name\", \"(.*)\"\n ) * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n ) by (pod)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}pod{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory Usage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 4, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Memory Usage", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Memory Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Pod", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTooltip": "Drill down", + "linkUrl": "./d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", + "pattern": "pod", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum(\n label_replace(\n container_memory_usage_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container_name!=\"\"},\n \"pod\", \"$1\", \"pod_name\", \"(.*)\"\n ) * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n ) by (pod)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(\n kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(\n label_replace(\n container_memory_usage_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container_name!=\"\"},\n \"pod\", \"$1\", \"pod_name\", \"(.*)\"\n ) * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n ) by (pod)\n/sum(\n kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(\n kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(\n label_replace(\n container_memory_usage_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container_name!=\"\"},\n \"pod\", \"$1\", \"pod_name\", \"(.*)\"\n ) * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n ) by (pod)\n/sum(\n kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Quota", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory Quota", + "titleSize": "h6" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": "$datasource", + "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, + "includeAll": false, + "label": "cluster", + "multi": false, + "name": "cluster", + "options": [ + + ], + "query": "label_values(:kube_pod_info_node_count:, cluster)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "namespace", + "multi": false, + "name": "namespace", + "options": [ + + ], + "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "workload", + "multi": false, + "name": "workload", + "options": [ + + ], + "query": "label_values(mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}, workload)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "type", + "multi": false, + "name": "type", + "options": [ + + ], + "query": "label_values(mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\"}, workload_type)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "Kubernetes / Compute Resources / Workload", + "uid": "a164a7f0339f99e89cea5cb47e9be617", + "version": 0 + } +{{- end }} \ No newline at end of file diff --git a/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/k8s-resources-workloads-namespace.yaml b/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/k8s-resources-workloads-namespace.yaml new file mode 100644 index 000000000..8a8b5077b --- /dev/null +++ b/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/k8s-resources-workloads-namespace.yaml @@ -0,0 +1,972 @@ +{{- /* +Generated from 'k8s-resources-workloads-namespace' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/release-0.1/manifests/grafana-dashboardDefinitions.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ .Values.grafana.defaultDashboards.namespace }} + name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "k8s-resources-workloads-namespace" | trunc 63 | trimSuffix "-" }} + annotations: +{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: "1" + {{- end }} + app: {{ template "kube-prometheus-stack.name" $ }}-grafana +{{ include "kube-prometheus-stack.labels" $ | indent 4 }} +data: + k8s-resources-workloads-namespace.json: |- + { + "annotations": { + "list": [ + + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "links": [ + + ], + "refresh": "10s", + "rows": [ + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(\n label_replace(\n namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"},\n \"pod\", \"$1\", \"pod_name\", \"(.*)\"\n ) * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}\n) by (workload, workload_type)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}workload{{`}}`}} - {{`{{`}}workload_type{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU Usage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 2, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Running Pods", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Usage", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "CPU Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Workload", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTooltip": "Drill down", + "linkUrl": "./d/a164a7f0339f99e89cea5cb47e9be617/k8s-resources-workload?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-workload=$__cell&var-type=$__cell_2", + "pattern": "workload", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "Workload Type", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "workload_type", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "count(mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}) by (workload, workload_type)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(\n label_replace(\n namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"},\n \"pod\", \"$1\", \"pod_name\", \"(.*)\"\n ) * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}\n) by (workload, workload_type)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(\n kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}\n) by (workload, workload_type)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(\n label_replace(\n namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"},\n \"pod\", \"$1\", \"pod_name\", \"(.*)\"\n ) * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}\n) by (workload, workload_type)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(\n kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}\n) by (workload, workload_type)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "sum(\n label_replace(\n namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"},\n \"pod\", \"$1\", \"pod_name\", \"(.*)\"\n ) * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}\n) by (workload, workload_type)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Quota", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU Quota", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 3, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(\n label_replace(\n container_memory_usage_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container_name!=\"\"},\n \"pod\", \"$1\", \"pod_name\", \"(.*)\"\n ) * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}\n ) by (workload, workload_type)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}workload{{`}}`}} - {{`{{`}}workload_type{{`}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory Usage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 4, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Running Pods", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "Memory Usage", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Memory Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Workload", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTooltip": "Drill down", + "linkUrl": "./d/a164a7f0339f99e89cea5cb47e9be617/k8s-resources-workload?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-workload=$__cell&var-type=$__cell_2", + "pattern": "workload", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "Workload Type", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "workload_type", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "count(mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}) by (workload, workload_type)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(\n label_replace(\n container_memory_usage_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container_name!=\"\"},\n \"pod\", \"$1\", \"pod_name\", \"(.*)\"\n ) * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}\n ) by (workload, workload_type)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(\n kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}\n) by (workload, workload_type)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(\n label_replace(\n container_memory_usage_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container_name!=\"\"},\n \"pod\", \"$1\", \"pod_name\", \"(.*)\"\n ) * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}\n ) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}\n) by (workload, workload_type)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(\n kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}\n) by (workload, workload_type)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "sum(\n label_replace(\n container_memory_usage_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container_name!=\"\"},\n \"pod\", \"$1\", \"pod_name\", \"(.*)\"\n ) * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}\n ) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}\n) by (workload, workload_type)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Quota", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory Quota", + "titleSize": "h6" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": "$datasource", + "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, + "includeAll": false, + "label": "cluster", + "multi": false, + "name": "cluster", + "options": [ + + ], + "query": "label_values(:kube_pod_info_node_count:, cluster)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "namespace", + "multi": false, + "name": "namespace", + "options": [ + + ], + "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "Kubernetes / Compute Resources / Namespace (Workloads)", + "uid": "a87fb0d919ec0ea5f6543124e16c42a5", + "version": 0 + } +{{- end }} \ No newline at end of file diff --git a/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/nodes.yaml b/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/nodes.yaml new file mode 100644 index 000000000..17a97dae1 --- /dev/null +++ b/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/nodes.yaml @@ -0,0 +1,1383 @@ +{{- /* +Generated from 'nodes' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/release-0.1/manifests/grafana-dashboardDefinitions.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ .Values.grafana.defaultDashboards.namespace }} + name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "nodes" | trunc 63 | trimSuffix "-" }} + annotations: +{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: "1" + {{- end }} + app: {{ template "kube-prometheus-stack.name" $ }}-grafana +{{ include "kube-prometheus-stack.labels" $ | indent 4 }} +data: + nodes.json: |- + { + "__inputs": [ + + ], + "__requires": [ + + ], + "annotations": { + "list": [ + + ] + }, + "editable": false, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [ + + ], + "refresh": "", + "rows": [ + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 2, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "max(node_load1{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "load 1m", + "refId": "A" + }, + { + "expr": "max(node_load5{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "load 5m", + "refId": "B" + }, + { + "expr": "max(node_load15{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "load 15m", + "refId": "C" + }, + { + "expr": "count(node_cpu_seconds_total{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\", mode=\"user\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "logical cores", + "refId": "D" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "System load", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 3, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum by (cpu) (irate(node_cpu_seconds_total{cluster=\"$cluster\", job=\"node-exporter\", mode!=\"idle\", instance=\"$instance\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}cpu{{`}}`}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Usage Per Core", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 4, + "legend": { + "alignAsTable": "true", + "avg": "true", + "current": "true", + "max": "false", + "min": "false", + "rightSide": "true", + "show": "true", + "total": "false", + "values": "true" + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 9, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "max (sum by (cpu) (irate(node_cpu_seconds_total{cluster=\"$cluster\", job=\"node-exporter\", mode!=\"idle\", instance=\"$instance\"}[2m])) ) * 100\n", + "format": "time_series", + "intervalFactor": 10, + "legendFormat": "{{`{{`}} cpu {{`}}`}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Utilization", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "percent", + "label": null, + "logBase": 1, + "max": 100, + "min": 0, + "show": true + }, + { + "format": "percent", + "label": null, + "logBase": 1, + "max": 100, + "min": 0, + "show": true + } + ] + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "datasource": "$datasource", + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": true, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 5, + "interval": null, + "links": [ + + ], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "avg(sum by (cpu) (irate(node_cpu_seconds_total{cluster=\"$cluster\", job=\"node-exporter\", mode!=\"idle\", instance=\"$instance\"}[2m]))) * 100\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "80, 90", + "title": "CPU Usage", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 6, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 9, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "max(\n node_memory_MemTotal_bytes{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}\n - node_memory_MemFree_bytes{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}\n - node_memory_Buffers_bytes{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}\n - node_memory_Cached_bytes{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}\n)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "memory used", + "refId": "A" + }, + { + "expr": "max(node_memory_Buffers_bytes{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "memory buffers", + "refId": "B" + }, + { + "expr": "max(node_memory_Cached_bytes{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "memory cached", + "refId": "C" + }, + { + "expr": "max(node_memory_MemFree_bytes{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "memory free", + "refId": "D" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "datasource": "$datasource", + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": true, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 7, + "interval": null, + "links": [ + + ], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "max(\n (\n (\n node_memory_MemTotal_bytes{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}\n - node_memory_MemFree_bytes{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}\n - node_memory_Buffers_bytes{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}\n - node_memory_Cached_bytes{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}\n )\n / node_memory_MemTotal_bytes{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}\n ) * 100)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "80, 90", + "title": "Memory Usage", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 8, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + { + "alias": "read", + "yaxis": 1 + }, + { + "alias": "io time", + "yaxis": 2 + } + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "max(rate(node_disk_read_bytes_total{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}[2m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "read", + "refId": "A" + }, + { + "expr": "max(rate(node_disk_written_bytes_total{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}[2m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "written", + "refId": "B" + }, + { + "expr": "max(rate(node_disk_io_time_seconds_total{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}[2m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "io time", + "refId": "C" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Disk I/O", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "ms", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 9, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "max by (namespace, pod, device) ((node_filesystem_size_bytes{cluster=\"$cluster\", fstype=~\"ext[234]|btrfs|xfs|zfs\", instance=\"$instance\", job=\"node-exporter\"} - node_filesystem_avail_bytes{cluster=\"$cluster\", fstype=~\"ext[234]|btrfs|xfs|zfs\", instance=\"$instance\", job=\"node-exporter\"}) / node_filesystem_size_bytes{cluster=\"$cluster\", fstype=~\"ext[234]|btrfs|xfs|zfs\", instance=\"$instance\", job=\"node-exporter\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "disk used", + "refId": "A" + }, + { + "expr": "max by (namespace, pod, device) (node_filesystem_avail_bytes{cluster=\"$cluster\", fstype=~\"ext[234]|btrfs|xfs|zfs\", instance=\"$instance\", job=\"node-exporter\"} / node_filesystem_size_bytes{cluster=\"$cluster\", fstype=~\"ext[234]|btrfs|xfs|zfs\", instance=\"$instance\", job=\"node-exporter\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "disk free", + "refId": "B" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Disk Space Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 10, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "max(rate(node_network_receive_bytes_total{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\", device!~\"lo\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}device{{`}}`}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Network Received", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 11, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "max(rate(node_network_transmit_bytes_total{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\", device!~\"lo\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}device{{`}}`}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Network Transmitted", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 12, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 9, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "max(\n node_filesystem_files{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}\n - node_filesystem_files_free{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}\n)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "inodes used", + "refId": "A" + }, + { + "expr": "max(node_filesystem_files_free{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "inodes free", + "refId": "B" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Inodes Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "datasource": "$datasource", + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": true, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 13, + "interval": null, + "links": [ + + ], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "max(\n (\n (\n node_filesystem_files{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}\n - node_filesystem_files_free{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}\n )\n / node_filesystem_files{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}\n ) * 100)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "80, 90", + "title": "Inodes Usage", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, + "includeAll": false, + "label": "cluster", + "multi": false, + "name": "cluster", + "options": [ + + ], + "query": "label_values(kube_pod_info, cluster)", + "refresh": 2, + "regex": "", + "sort": 0, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "instance", + "options": [ + + ], + "query": "label_values(node_boot_time_seconds{cluster=\"$cluster\", job=\"node-exporter\"}, instance)", + "refresh": 2, + "regex": "", + "sort": 0, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "Kubernetes / Nodes", + "uid": "fa49a4706d07a042595b664c87fb33ea", + "version": 0 + } +{{- end }} \ No newline at end of file diff --git a/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/persistentvolumesusage.yaml b/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/persistentvolumesusage.yaml new file mode 100644 index 000000000..b0c51cc11 --- /dev/null +++ b/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/persistentvolumesusage.yaml @@ -0,0 +1,573 @@ +{{- /* +Generated from 'persistentvolumesusage' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/release-0.1/manifests/grafana-dashboardDefinitions.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ .Values.grafana.defaultDashboards.namespace }} + name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "persistentvolumesusage" | trunc 63 | trimSuffix "-" }} + annotations: +{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: "1" + {{- end }} + app: {{ template "kube-prometheus-stack.name" $ }}-grafana +{{ include "kube-prometheus-stack.labels" $ | indent 4 }} +data: + persistentvolumesusage.json: |- + { + "__inputs": [ + + ], + "__requires": [ + + ], + "annotations": { + "list": [ + + ] + }, + "editable": false, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [ + + ], + "refresh": "", + "rows": [ + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 2, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 9, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(\n sum without(instance, node) (kubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n -\n sum without(instance, node) (kubelet_volume_stats_available_bytes{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n)\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Used Space", + "refId": "A" + }, + { + "expr": "sum without(instance, node) (kubelet_volume_stats_available_bytes{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Free Space", + "refId": "B" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Volume Space Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "datasource": "$datasource", + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": true, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 3, + "interval": null, + "links": [ + + ], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "(\n kubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"}\n -\n kubelet_volume_stats_available_bytes{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"}\n)\n/\nkubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"}\n* 100\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "80, 90", + "title": "Volume Space Usage", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 4, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 9, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum without(instance, node) (kubelet_volume_stats_inodes_used{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Used inodes", + "refId": "A" + }, + { + "expr": "(\n sum without(instance, node) (kubelet_volume_stats_inodes{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n -\n sum without(instance, node) (kubelet_volume_stats_inodes_used{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n)\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": " Free inodes", + "refId": "B" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Volume inodes Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "none", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "none", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "datasource": "$datasource", + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": true, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 5, + "interval": null, + "links": [ + + ], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "kubelet_volume_stats_inodes_used{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"}\n/\nkubelet_volume_stats_inodes{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"}\n* 100\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "80, 90", + "title": "Volume inodes Usage", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, + "includeAll": false, + "label": "cluster", + "multi": false, + "name": "cluster", + "options": [ + + ], + "query": "label_values(kubelet_volume_stats_capacity_bytes, cluster)", + "refresh": 2, + "regex": "", + "sort": 0, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "Namespace", + "multi": false, + "name": "namespace", + "options": [ + + ], + "query": "label_values(kubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\"}, namespace)", + "refresh": 2, + "regex": "", + "sort": 0, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "PersistentVolumeClaim", + "multi": false, + "name": "volume", + "options": [ + + ], + "query": "label_values(kubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", namespace=\"$namespace\"}, persistentvolumeclaim)", + "refresh": 2, + "regex": "", + "sort": 0, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-7d", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "Kubernetes / Persistent Volumes", + "uid": "919b92a8e8041bd567af9edab12c840c", + "version": 0 + } +{{- end }} \ No newline at end of file diff --git a/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/pods.yaml b/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/pods.yaml new file mode 100644 index 000000000..44c79d870 --- /dev/null +++ b/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/pods.yaml @@ -0,0 +1,680 @@ +{{- /* +Generated from 'pods' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/release-0.1/manifests/grafana-dashboardDefinitions.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + 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 }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: "1" + {{- end }} + app: {{ template "kube-prometheus-stack.name" $ }}-grafana +{{ include "kube-prometheus-stack.labels" $ | indent 4 }} +data: + pods.json: |- + { + "__inputs": [ + + ], + "__requires": [ + + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "$datasource", + "enable": true, + "expr": "time() == BOOL timestamp(rate(kube_pod_container_status_restarts_total{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[2m]) > 0)", + "hide": false, + "iconColor": "rgba(215, 44, 44, 1)", + "name": "Restarts", + "showIn": 0, + "tags": [ + "restart" + ], + "type": "rows" + } + ] + }, + "editable": false, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [ + + ], + "refresh": "", + "rows": [ + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 2, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "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 {{`}}`}}", + "refId": "A" + }, + { + "expr": "sum by(container) (kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\", pod=\"$pod\", container=~\"$container\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Requested: {{`{{`}} container {{`}}`}}", + "refId": "B" + }, + { + "expr": "sum by(container) (kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\", pod=\"$pod\", container=~\"$container\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Limit: {{`{{`}} container {{`}}`}}", + "refId": "C" + }, + { + "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 {{`}}`}}", + "refId": "D" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 3, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "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 {{`}}`}}", + "refId": "A" + }, + { + "expr": "sum by(container) (kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\", pod=\"$pod\", container=~\"$container\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Requested: {{`{{`}} container {{`}}`}}", + "refId": "B" + }, + { + "expr": "sum by(container) (kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\", pod=\"$pod\", container=~\"$container\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Limit: {{`{{`}} container {{`}}`}}", + "refId": "C" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 4, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "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=\"{{ include "exporter.kubelet.jobName" . }}\", cluster=\"$cluster\", namespace=\"$namespace\", pod_name=\"$pod\"}[1m])))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "TX: {{`{{`}} pod_name {{`}}`}}", + "refId": "B" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Network I/O", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 5, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "max by (container) (kube_pod_container_status_restarts_total{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container=~\"$container\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Restarts: {{`{{`}} container {{`}}`}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Total Restarts Per Container", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, + "includeAll": false, + "label": "cluster", + "multi": false, + "name": "cluster", + "options": [ + + ], + "query": "label_values(kube_pod_info, cluster)", + "refresh": 2, + "regex": "", + "sort": 0, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "Namespace", + "multi": false, + "name": "namespace", + "options": [ + + ], + "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)", + "refresh": 2, + "regex": "", + "sort": 0, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "Pod", + "multi": false, + "name": "pod", + "options": [ + + ], + "query": "label_values(kube_pod_info{cluster=\"$cluster\", namespace=~\"$namespace\"}, pod)", + "refresh": 2, + "regex": "", + "sort": 0, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": true, + "label": "Container", + "multi": false, + "name": "container", + "options": [ + + ], + "query": "label_values(kube_pod_container_info{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}, container)", + "refresh": 2, + "regex": "", + "sort": 0, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "Kubernetes / Pods", + "uid": "ab4f13a9892a76a4d21ce8c2445bf4ea", + "version": 0 + } +{{- end }} \ No newline at end of file diff --git a/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/statefulset.yaml b/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/statefulset.yaml new file mode 100644 index 000000000..f6e5918b6 --- /dev/null +++ b/packages/rancher-monitoring/generated-changes/overlay/templates/grafana/dashboards/statefulset.yaml @@ -0,0 +1,926 @@ +{{- /* +Generated from 'statefulset' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/release-0.1/manifests/grafana-dashboardDefinitions.yaml +Do not change in-place! In order to change this file first read following link: +https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack +*/ -}} +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ .Values.grafana.defaultDashboards.namespace }} + name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "statefulset" | trunc 63 | trimSuffix "-" }} + annotations: +{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} + labels: + {{- if $.Values.grafana.sidecar.dashboards.label }} + {{ $.Values.grafana.sidecar.dashboards.label }}: "1" + {{- end }} + app: {{ template "kube-prometheus-stack.name" $ }}-grafana +{{ include "kube-prometheus-stack.labels" $ | indent 4 }} +data: + statefulset.json: |- + { + "__inputs": [ + + ], + "__requires": [ + + ], + "annotations": { + "list": [ + + ] + }, + "editable": false, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [ + + ], + "refresh": "", + "rows": [ + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 2, + "interval": null, + "links": [ + + ], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "cores", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 4, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "lineColor": "rgb(31, 120, 193)", + "show": true + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(rate(container_cpu_usage_seconds_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", cluster=\"$cluster\", namespace=\"$namespace\", pod_name=~\"$statefulset.*\"}[3m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "title": "CPU", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "0", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 3, + "interval": null, + "links": [ + + ], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "GB", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 4, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "lineColor": "rgb(31, 120, 193)", + "show": true + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(container_memory_usage_bytes{job=\"{{ include "exporter.kubelet.jobName" . }}\", cluster=\"$cluster\", namespace=\"$namespace\", pod_name=~\"$statefulset.*\"}) / 1024^3", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "title": "Memory", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "0", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 4, + "interval": null, + "links": [ + + ], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "Bps", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 4, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "lineColor": "rgb(31, 120, 193)", + "show": true + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(rate(container_network_transmit_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", cluster=\"$cluster\", namespace=\"$namespace\", pod_name=~\"$statefulset.*\"}[3m])) + sum(rate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=\"$namespace\",pod_name=~\"$statefulset.*\"}[3m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "title": "Network", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "0", + "value": "null" + } + ], + "valueName": "current" + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "height": "100px", + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 5, + "interval": null, + "links": [ + + ], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "max(kube_statefulset_replicas{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", statefulset=\"$statefulset\"}) without (instance, pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "title": "Desired Replicas", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "0", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 6, + "interval": null, + "links": [ + + ], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "min(kube_statefulset_status_replicas_current{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", statefulset=\"$statefulset\"}) without (instance, pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "title": "Replicas of current version", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "0", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 7, + "interval": null, + "links": [ + + ], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "max(kube_statefulset_status_observed_generation{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", statefulset=\"$statefulset\"}) without (instance, pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "title": "Observed Generation", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "0", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 8, + "interval": null, + "links": [ + + ], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "max(kube_statefulset_metadata_generation{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "title": "Metadata Generation", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "0", + "value": "null" + } + ], + "valueName": "current" + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 9, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "max(kube_statefulset_replicas{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "replicas specified", + "refId": "A" + }, + { + "expr": "max(kube_statefulset_status_replicas{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "replicas created", + "refId": "B" + }, + { + "expr": "min(kube_statefulset_status_replicas_ready{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "ready", + "refId": "C" + }, + { + "expr": "min(kube_statefulset_status_replicas_current{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "replicas of current version", + "refId": "D" + }, + { + "expr": "min(kube_statefulset_status_replicas_updated{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "updated", + "refId": "E" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Replicas", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, + "includeAll": false, + "label": "cluster", + "multi": false, + "name": "cluster", + "options": [ + + ], + "query": "label_values(kube_statefulset_metadata_generation, cluster)", + "refresh": 2, + "regex": "", + "sort": 0, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "Namespace", + "multi": false, + "name": "namespace", + "options": [ + + ], + "query": "label_values(kube_statefulset_metadata_generation{job=\"kube-state-metrics\"}, namespace)", + "refresh": 2, + "regex": "", + "sort": 0, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "Name", + "multi": false, + "name": "statefulset", + "options": [ + + ], + "query": "label_values(kube_statefulset_metadata_generation{job=\"kube-state-metrics\", namespace=\"$namespace\"}, statefulset)", + "refresh": 2, + "regex": "", + "sort": 0, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "Kubernetes / StatefulSets", + "uid": "a31c1f46e6f727cb37c0d731a7245005", + "version": 0 + } +{{- end }} \ No newline at end of file diff --git a/packages/rancher-monitoring/generated-changes/overlay/templates/prometheus/serviceThanosSidecarExternal.yaml b/packages/rancher-monitoring/generated-changes/overlay/templates/prometheus/serviceThanosSidecarExternal.yaml deleted file mode 100644 index 99668f425..000000000 --- a/packages/rancher-monitoring/generated-changes/overlay/templates/prometheus/serviceThanosSidecarExternal.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if and .Values.prometheus.enabled .Values.prometheus.thanosServiceExternal.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "kube-prometheus-stack.fullname" . }}-thanos-external - namespace: {{ template "kube-prometheus-stack.namespace" . }} - labels: -{{ include "kube-prometheus-stack.labels" . | indent 4 }} -{{- if .Values.prometheus.thanosServiceExternal.labels }} -{{ toYaml .Values.prometheus.thanosServiceExternal.labels | indent 4 }} -{{- end }} -{{- if .Values.prometheus.thanosServiceExternal.annotations }} - annotations: -{{ toYaml .Values.prometheus.thanosServiceExternal.annotations | indent 4 }} -{{- end }} -spec: - type: {{ .Values.prometheus.thanosServiceExternal.type }} - ports: - - name: {{ .Values.prometheus.thanosServiceExternal.portName }} - port: {{ .Values.prometheus.thanosServiceExternal.port }} - targetPort: {{ .Values.prometheus.thanosServiceExternal.targetPort }} - {{- if eq .Values.prometheus.thanosServiceExternal.type "NodePort" }} - nodePort: {{ .Values.prometheus.thanosServiceExternal.nodePort }} - {{- end }} - selector: - app.kubernetes.io/name: prometheus - prometheus: {{ template "kube-prometheus-stack.fullname" . }}-prometheus -{{- end }} diff --git a/packages/rancher-monitoring/generated-changes/patch/Chart.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/Chart.yaml.patch index c035e4ffb..9f92e82a2 100644 --- a/packages/rancher-monitoring/generated-changes/patch/Chart.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/Chart.yaml.patch @@ -41,7 +41,7 @@ url: https://github.com/prometheus-operator/kube-prometheus artifacthub.io/operator: "true" -apiVersion: v2 --appVersion: 0.46.0 +-appVersion: 0.48.0 + catalog.cattle.io/certified: rancher + catalog.cattle.io/namespace: cattle-monitoring-system + catalog.cattle.io/release-name: rancher-monitoring @@ -89,4 +89,4 @@ -- https://github.com/prometheus-community/helm-charts -- https://github.com/prometheus-operator/kube-prometheus -type: application --version: 14.5.0 +-version: 16.6.0 diff --git a/packages/rancher-monitoring/generated-changes/patch/README.md.patch b/packages/rancher-monitoring/generated-changes/patch/README.md.patch index b1edf1c8a..aa173fe84 100644 --- a/packages/rancher-monitoring/generated-changes/patch/README.md.patch +++ b/packages/rancher-monitoring/generated-changes/patch/README.md.patch @@ -1,51 +1,6 @@ --- charts-original/README.md +++ charts/README.md -@@ -35,7 +35,7 @@ - - By default this chart installs additional, dependent charts: - --- [kubernetes/kube-state-metrics](https://github.com/kubernetes/kube-state-metrics/tree/master/charts/kube-state-metrics) -+- [prometheus-community/kube-state-metrics](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-state-metrics) - - [prometheus-community/prometheus-node-exporter](https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus-node-exporter) - - [grafana/grafana](https://github.com/grafana/helm-charts/tree/main/charts/grafana) - -@@ -83,6 +83,22 @@ - - A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an incompatible breaking change needing manual actions. - -+### From 15.x to 16.x -+Version 16 upgrades kube-state-metrics to v2.0.0. This includes changed command-line arguments and removed metrics, see this [blog post](https://kubernetes.io/blog/2021/04/13/kube-state-metrics-v-2-0/). This version also removes Grafana dashboards that supported Kubernetes 1.14 or earlier. -+ -+### From 14.x to 15.x -+Version 15 upgrades prometheus-operator from 0.46.x to 0.47.x. Helm does not automatically upgrade or install new CRDs on a chart upgrade, so you have to install the CRDs manually before updating: -+ -+```console -+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.47.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml -+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.47.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml -+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.47.0/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml -+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.47.0/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml -+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.47.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml -+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.47.0/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml -+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.47.0/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml -+``` -+ - ### From 13.x to 14.x - - Version 14 upgrades prometheus-operator from 0.45.x to 0.46.x. Helm does not automatically upgrade or install new CRDs on a chart upgrade, so you have to install the CRDs manually before updating: -@@ -109,6 +125,12 @@ - - ### From 11.x to 12.x - -+Version 12 upgrades prometheus-operator from 0.43.x to 0.44.x. Helm does not automatically upgrade or install new CRDs on a chart upgrade, so you have to install the CRD manually before updating: -+ -+```console -+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/release-0.44/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml -+``` -+ - The chart was migrated to support only helm v3 and later. - - ### From 10.x to 11.x -@@ -171,7 +193,43 @@ +@@ -193,7 +193,43 @@ helm show values prometheus-community/kube-prometheus-stack ``` @@ -90,12 +45,3 @@ ### Multiple releases -@@ -373,7 +431,7 @@ - kind: PersistentVolumeClaim - metadata: - labels: -- app: prometheus -+ app.kubernetes.io/name: prometheus - prometheus: prometheus-migration-prometheus - name: prometheus-prometheus-migration-prometheus-db-prometheus-prometheus-migration-prometheus-0 - namespace: monitoring diff --git a/packages/rancher-monitoring/generated-changes/patch/crds/crd-alertmanagerconfigs.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/crds/crd-alertmanagerconfigs.yaml.patch deleted file mode 100644 index 6c08a07f7..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/crds/crd-alertmanagerconfigs.yaml.patch +++ /dev/null @@ -1,8 +0,0 @@ ---- charts-original/crds/crd-alertmanagerconfigs.yaml -+++ charts/crds/crd-alertmanagerconfigs.yaml -@@ -1,4 +1,4 @@ --# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.46.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml -+# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.48.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml - - --- - apiVersion: apiextensions.k8s.io/v1 diff --git a/packages/rancher-monitoring/generated-changes/patch/crds/crd-alertmanagers.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/crds/crd-alertmanagers.yaml.patch deleted file mode 100644 index e7f53aca1..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/crds/crd-alertmanagers.yaml.patch +++ /dev/null @@ -1,8 +0,0 @@ ---- charts-original/crds/crd-alertmanagers.yaml -+++ charts/crds/crd-alertmanagers.yaml -@@ -1,4 +1,4 @@ --# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.46.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml -+# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.48.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml - - --- - apiVersion: apiextensions.k8s.io/v1 diff --git a/packages/rancher-monitoring/generated-changes/patch/crds/crd-podmonitors.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/crds/crd-podmonitors.yaml.patch deleted file mode 100644 index 7943e1976..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/crds/crd-podmonitors.yaml.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- charts-original/crds/crd-podmonitors.yaml -+++ charts/crds/crd-podmonitors.yaml -@@ -1,4 +1,4 @@ --# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.46.0/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml -+# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.48.0/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml - - --- - apiVersion: apiextensions.k8s.io/v1 -@@ -161,7 +161,7 @@ - description: ProxyURL eg http://proxyserver:2195 Directs scrapes to proxy through this endpoint. - type: string - relabelings: -- description: 'RelabelConfigs to apply to samples before ingestion. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config' -+ description: 'RelabelConfigs to apply to samples before scraping. Prometheus Operator automatically adds relabelings for a few standard Kubernetes fields and replaces original scrape job name with __tmp_prometheus_job_name. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config' - items: - description: 'RelabelConfig allows dynamic rewriting of the label set, being applied to samples before ingestion. It defines ``-section of Prometheus configuration. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs' - properties: diff --git a/packages/rancher-monitoring/generated-changes/patch/crds/crd-probes.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/crds/crd-probes.yaml.patch deleted file mode 100644 index 4a577065b..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/crds/crd-probes.yaml.patch +++ /dev/null @@ -1,164 +0,0 @@ ---- charts-original/crds/crd-probes.yaml -+++ charts/crds/crd-probes.yaml -@@ -1,4 +1,4 @@ --# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.46.0/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml -+# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.48.0/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml - - --- - apiVersion: apiextensions.k8s.io/v1 -@@ -35,6 +35,55 @@ - spec: - description: Specification of desired Ingress selection for target discovery by Prometheus. - properties: -+ basicAuth: -+ description: 'BasicAuth allow an endpoint to authenticate over basic authentication. More info: https://prometheus.io/docs/operating/configuration/#endpoint' -+ properties: -+ password: -+ description: The secret in the service monitor namespace that contains the password for authentication. -+ properties: -+ key: -+ description: The key of the secret to select from. Must be a valid secret key. -+ type: string -+ name: -+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' -+ type: string -+ optional: -+ description: Specify whether the Secret or its key must be defined -+ type: boolean -+ required: -+ - key -+ type: object -+ username: -+ description: The secret in the service monitor namespace that contains the username for authentication. -+ properties: -+ key: -+ description: The key of the secret to select from. Must be a valid secret key. -+ type: string -+ name: -+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' -+ type: string -+ optional: -+ description: Specify whether the Secret or its key must be defined -+ type: boolean -+ required: -+ - key -+ type: object -+ type: object -+ bearerTokenSecret: -+ description: Secret to mount to read bearer token for scraping targets. The secret needs to be in the same namespace as the probe and accessible by the Prometheus Operator. -+ properties: -+ key: -+ description: The key of the secret to select from. Must be a valid secret key. -+ type: string -+ name: -+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' -+ type: string -+ optional: -+ description: Specify whether the Secret or its key must be defined -+ type: boolean -+ required: -+ - key -+ type: object - interval: - description: Interval at which targets are probed using the configured prober. If not specified Prometheus' global scrape interval is used. - type: string -@@ -188,6 +237,99 @@ - type: array - type: object - type: object -+ tlsConfig: -+ description: TLS configuration to use when scraping the endpoint. -+ properties: -+ ca: -+ description: Struct containing the CA cert to use for the targets. -+ properties: -+ configMap: -+ description: ConfigMap containing data to use for the targets. -+ properties: -+ key: -+ description: The key to select. -+ type: string -+ name: -+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' -+ type: string -+ optional: -+ description: Specify whether the ConfigMap or its key must be defined -+ type: boolean -+ required: -+ - key -+ type: object -+ secret: -+ description: Secret containing data to use for the targets. -+ properties: -+ key: -+ description: The key of the secret to select from. Must be a valid secret key. -+ type: string -+ name: -+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' -+ type: string -+ optional: -+ description: Specify whether the Secret or its key must be defined -+ type: boolean -+ required: -+ - key -+ type: object -+ type: object -+ cert: -+ description: Struct containing the client cert file for the targets. -+ properties: -+ configMap: -+ description: ConfigMap containing data to use for the targets. -+ properties: -+ key: -+ description: The key to select. -+ type: string -+ name: -+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' -+ type: string -+ optional: -+ description: Specify whether the ConfigMap or its key must be defined -+ type: boolean -+ required: -+ - key -+ type: object -+ secret: -+ description: Secret containing data to use for the targets. -+ properties: -+ key: -+ description: The key of the secret to select from. Must be a valid secret key. -+ type: string -+ name: -+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' -+ type: string -+ optional: -+ description: Specify whether the Secret or its key must be defined -+ type: boolean -+ required: -+ - key -+ type: object -+ type: object -+ insecureSkipVerify: -+ description: Disable target certificate validation. -+ type: boolean -+ keySecret: -+ description: Secret containing the client key file for the targets. -+ properties: -+ key: -+ description: The key of the secret to select from. Must be a valid secret key. -+ type: string -+ name: -+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' -+ type: string -+ optional: -+ description: Specify whether the Secret or its key must be defined -+ type: boolean -+ required: -+ - key -+ type: object -+ serverName: -+ description: Used to verify the hostname for the targets. -+ type: string -+ type: object - type: object - required: - - spec diff --git a/packages/rancher-monitoring/generated-changes/patch/crds/crd-prometheuses.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/crds/crd-prometheuses.yaml.patch deleted file mode 100644 index 39ca5d021..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/crds/crd-prometheuses.yaml.patch +++ /dev/null @@ -1,55 +0,0 @@ ---- charts-original/crds/crd-prometheuses.yaml -+++ charts/crds/crd-prometheuses.yaml -@@ -1,4 +1,4 @@ --# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.46.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml -+# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.48.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml - - --- - apiVersion: apiextensions.k8s.io/v1 -@@ -1467,6 +1467,11 @@ - enableAdminAPI: - description: 'Enable access to prometheus web admin API. Defaults to the value of `false`. WARNING: Enabling the admin APIs enables mutating endpoints, to delete data, shutdown Prometheus, and more. Enabling this should be done with care and the user is advised to add additional authentication authorization via a proxy to ensure only clients authorized to perform these actions can do so. For more information see https://prometheus.io/docs/prometheus/latest/querying/api/#tsdb-admin-apis' - type: boolean -+ enableFeatures: -+ description: Enable access to Prometheus disabled features. By default, no features are enabled. Enabling disabled features is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice. For more information see https://prometheus.io/docs/prometheus/latest/disabled_features/ -+ items: -+ type: string -+ type: array - enforcedNamespaceLabel: - description: EnforcedNamespaceLabel enforces adding a namespace label of origin for each alert and metric that is user created. The label value will always be the namespace of the object that is being created. - type: string -@@ -2465,7 +2470,7 @@ - type: object - type: object - bearerToken: -- description: bearer token for remote read. -+ description: Bearer token for remote read. - type: string - bearerTokenFile: - description: File to read bearer token for remote read. -@@ -2636,7 +2641,7 @@ - type: object - type: object - bearerToken: -- description: File to read bearer token for remote write. -+ description: Bearer token for remote write. - type: string - bearerTokenFile: - description: File to read bearer token for remote write. -@@ -2646,6 +2651,16 @@ - type: string - description: Custom HTTP headers to be sent along with each remote write request. Be aware that headers that are set by Prometheus itself can't be overwritten. Only valid in Prometheus versions 2.25.0 and newer. - type: object -+ metadataConfig: -+ description: MetadataConfig configures the sending of series metadata to remote storage. -+ properties: -+ send: -+ description: Whether metric metadata is sent to remote storage or not. -+ type: boolean -+ sendInterval: -+ description: How frequently metric metadata is sent to remote storage. -+ type: string -+ type: object - name: - description: The name of the remote write queue, must be unique if specified. The name is used in metrics and logging in order to differentiate queues. Only valid in Prometheus versions 2.15.0 and newer. - type: string diff --git a/packages/rancher-monitoring/generated-changes/patch/crds/crd-prometheusrules.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/crds/crd-prometheusrules.yaml.patch deleted file mode 100644 index 63007dfb6..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/crds/crd-prometheusrules.yaml.patch +++ /dev/null @@ -1,8 +0,0 @@ ---- charts-original/crds/crd-prometheusrules.yaml -+++ charts/crds/crd-prometheusrules.yaml -@@ -1,4 +1,4 @@ --# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.46.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml -+# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.48.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml - - --- - apiVersion: apiextensions.k8s.io/v1 diff --git a/packages/rancher-monitoring/generated-changes/patch/crds/crd-servicemonitors.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/crds/crd-servicemonitors.yaml.patch deleted file mode 100644 index 4a809fd13..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/crds/crd-servicemonitors.yaml.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- charts-original/crds/crd-servicemonitors.yaml -+++ charts/crds/crd-servicemonitors.yaml -@@ -1,4 +1,4 @@ --# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.46.0/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml -+# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.48.0/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml - - --- - apiVersion: apiextensions.k8s.io/v1 -@@ -149,7 +149,7 @@ - description: ProxyURL eg http://proxyserver:2195 Directs scrapes to proxy through this endpoint. - type: string - relabelings: -- description: 'RelabelConfigs to apply to samples before scraping. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config' -+ description: 'RelabelConfigs to apply to samples before scraping. Prometheus Operator automatically adds relabelings for a few standard Kubernetes fields and replaces original scrape job name with __tmp_prometheus_job_name. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config' - items: - description: 'RelabelConfig allows dynamic rewriting of the label set, being applied to samples before ingestion. It defines ``-section of Prometheus configuration. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs' - properties: diff --git a/packages/rancher-monitoring/generated-changes/patch/crds/crd-thanosrulers.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/crds/crd-thanosrulers.yaml.patch deleted file mode 100644 index 2b62d4346..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/crds/crd-thanosrulers.yaml.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- charts-original/crds/crd-thanosrulers.yaml -+++ charts/crds/crd-thanosrulers.yaml -@@ -1,4 +1,4 @@ --# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.46.0/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml -+# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.48.0/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml - - --- - apiVersion: apiextensions.k8s.io/v1 -@@ -3339,4 +3339,4 @@ - kind: "" - plural: "" - conditions: [] -- storedVersions: [] -\ No newline at end of file -+ storedVersions: [] diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/_helpers.tpl.patch b/packages/rancher-monitoring/generated-changes/patch/templates/_helpers.tpl.patch index 455ad98b0..cdf02762b 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/_helpers.tpl.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/_helpers.tpl.patch @@ -131,48 +131,3 @@ {{/* vim: set filetype=mustache: */}} {{/* Expand the name of the chart. This is suffixed with -alertmanager, which means subtract 13 from longest 63 available */}} {{- define "kube-prometheus-stack.name" -}} -@@ -46,6 +173,10 @@ - - {{/* Generate basic labels */}} - {{- define "kube-prometheus-stack.labels" }} -+app.kubernetes.io/managed-by: {{ .Release.Service }} -+app.kubernetes.io/instance: {{ .Release.Name }} -+app.kubernetes.io/version: "{{ .Chart.Version }}" -+app.kubernetes.io/part-of: {{ template "kube-prometheus-stack.name" . }} - chart: {{ template "kube-prometheus-stack.chartref" . }} - release: {{ $.Release.Name | quote }} - heritage: {{ $.Release.Service | quote }} -@@ -90,4 +221,31 @@ - {{- else -}} - {{- .Release.Namespace -}} - {{- end -}} --{{- end -}} -\ No newline at end of file -+{{- end -}} -+ -+{{/* Allow KubeVersion to be overridden. */}} -+{{- define "kube-prometheus-stack.ingress.kubeVersion" -}} -+ {{- default .Capabilities.KubeVersion.Version .Values.kubeVersionOverride -}} -+{{- end -}} -+ -+{{/* Get Ingress API Version */}} -+{{- define "kube-prometheus-stack.ingress.apiVersion" -}} -+ {{- if and (.Capabilities.APIVersions.Has "networking.k8s.io/v1") (semverCompare ">= 1.19.x" (include "kube-prometheus-stack.ingress.kubeVersion" .)) -}} -+ {{- print "networking.k8s.io/v1" -}} -+ {{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}} -+ {{- print "networking.k8s.io/v1beta1" -}} -+ {{- else -}} -+ {{- print "extensions/v1beta1" -}} -+ {{- end -}} -+{{- end -}} -+ -+{{/* Check Ingress stability */}} -+{{- define "kube-prometheus-stack.ingress.isStable" -}} -+ {{- eq (include "kube-prometheus-stack.ingress.apiVersion" .) "networking.k8s.io/v1" -}} -+{{- end -}} -+ -+{{/* Check Ingress supports pathType */}} -+{{/* pathType was added to networking.k8s.io/v1beta1 in Kubernetes 1.18 */}} -+{{- define "kube-prometheus-stack.ingress.supportsPathType" -}} -+ {{- or (eq (include "kube-prometheus-stack.ingress.isStable" .) "true") (and (eq (include "kube-prometheus-stack.ingress.apiVersion" .) "networking.k8s.io/v1beta1") (semverCompare ">= 1.18.x" (include "kube-prometheus-stack.ingress.kubeVersion" .))) -}} -+{{- end -}} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/alertmanager/alertmanager.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/alertmanager/alertmanager.yaml.patch index f2c8f969f..98457ddbe 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/alertmanager/alertmanager.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/alertmanager/alertmanager.yaml.patch @@ -1,13 +1,7 @@ --- charts-original/templates/alertmanager/alertmanager.yaml +++ charts/templates/alertmanager/alertmanager.yaml -@@ -7,9 +7,13 @@ - labels: - app: {{ template "kube-prometheus-stack.name" . }}-alertmanager - {{ include "kube-prometheus-stack.labels" . | indent 4 }} -+{{- if .Values.alertmanager.annotations }} -+ annotations: -+{{ toYaml .Values.alertmanager.annotations | indent 4 }} -+{{- end }} +@@ -13,7 +13,7 @@ + {{- end }} spec: {{- if .Values.alertmanager.alertmanagerSpec.image }} - image: {{ .Values.alertmanager.alertmanagerSpec.image.repository }}:{{ .Values.alertmanager.alertmanagerSpec.image.tag }} @@ -15,7 +9,7 @@ version: {{ .Values.alertmanager.alertmanagerSpec.image.tag }} {{- if .Values.alertmanager.alertmanagerSpec.image.sha }} sha: {{ .Values.alertmanager.alertmanagerSpec.image.sha }} -@@ -22,11 +26,13 @@ +@@ -26,11 +26,13 @@ externalUrl: "{{ tpl .Values.alertmanager.alertmanagerSpec.externalUrl . }}" {{- else if and .Values.alertmanager.ingress.enabled .Values.alertmanager.ingress.hosts }} externalUrl: "http://{{ tpl (index .Values.alertmanager.ingress.hosts 0) . }}{{ .Values.alertmanager.alertmanagerSpec.routePrefix }}" @@ -30,16 +24,7 @@ {{ toYaml .Values.alertmanager.alertmanagerSpec.nodeSelector | indent 4 }} {{- end }} paused: {{ .Values.alertmanager.alertmanagerSpec.paused }} -@@ -87,7 +93,7 @@ - labelSelector: - matchExpressions: - - {key: app, operator: In, values: [alertmanager]} -- - {key: prometheus, operator: In, values: [{{ template "kube-prometheus-stack.fullname" . }}-alertmanager]} -+ - {key: alertmanager, operator: In, values: [{{ template "kube-prometheus-stack.fullname" . }}-alertmanager]} - {{- else if eq .Values.alertmanager.alertmanagerSpec.podAntiAffinity "soft" }} - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: -@@ -100,8 +106,8 @@ +@@ -104,8 +106,8 @@ - {key: prometheus, operator: In, values: [{{ template "kube-prometheus-stack.fullname" . }}-alertmanager]} {{- end }} {{- end }} @@ -49,7 +34,7 @@ {{ toYaml .Values.alertmanager.alertmanagerSpec.tolerations | indent 4 }} {{- end }} {{- if .Values.alertmanager.alertmanagerSpec.topologySpreadConstraints }} -@@ -136,10 +142,10 @@ +@@ -140,10 +142,10 @@ {{ toYaml .Values.alertmanager.alertmanagerSpec.volumeMounts | indent 4 }} {{- end }} portName: {{ .Values.alertmanager.alertmanagerSpec.portName }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/alertmanager/ingress.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/alertmanager/ingress.yaml.patch deleted file mode 100644 index 473c18262..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/alertmanager/ingress.yaml.patch +++ /dev/null @@ -1,69 +0,0 @@ ---- charts-original/templates/alertmanager/ingress.yaml -+++ charts/templates/alertmanager/ingress.yaml -@@ -4,11 +4,9 @@ - {{- $servicePort := .Values.alertmanager.service.port -}} - {{- $routePrefix := list .Values.alertmanager.alertmanagerSpec.routePrefix }} - {{- $paths := .Values.alertmanager.ingress.paths | default $routePrefix -}} --{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }} --apiVersion: networking.k8s.io/v1beta1 --{{ else }} --apiVersion: extensions/v1beta1 --{{ end -}} -+{{- $apiIsStable := eq (include "kube-prometheus-stack.ingress.isStable" .) "true" -}} -+{{- $ingressSupportsPathType := eq (include "kube-prometheus-stack.ingress.supportsPathType" .) "true" -}} -+apiVersion: {{ include "kube-prometheus-stack.ingress.apiVersion" . }} - kind: Ingress - metadata: - name: {{ $serviceName }} -@@ -24,7 +22,7 @@ - {{- end }} - {{ include "kube-prometheus-stack.labels" . | indent 4 }} - spec: -- {{- if or (.Capabilities.APIVersions.Has "networking.k8s.io/v1") (.Capabilities.APIVersions.Has "networking.k8s.io/v1beta1") }} -+ {{- if $apiIsStable }} - {{- if .Values.alertmanager.ingress.ingressClassName }} - ingressClassName: {{ .Values.alertmanager.ingress.ingressClassName }} - {{- end }} -@@ -37,25 +35,39 @@ - paths: - {{- range $p := $paths }} - - path: {{ tpl $p $ }} -- {{- if $pathType }} -+ {{- if and $pathType $ingressSupportsPathType }} - pathType: {{ $pathType }} - {{- end }} - backend: -+ {{- if $apiIsStable }} -+ service: -+ name: {{ $serviceName }} -+ port: -+ number: {{ $servicePort }} -+ {{- else }} - serviceName: {{ $serviceName }} - servicePort: {{ $servicePort }} -- {{- end -}} -+ {{- end }} -+ {{- end -}} - {{- end -}} - {{- else }} - - http: - paths: - {{- range $p := $paths }} - - path: {{ tpl $p $ }} -- {{- if $pathType }} -+ {{- if and $pathType $ingressSupportsPathType }} - pathType: {{ $pathType }} - {{- end }} - backend: -+ {{- if $apiIsStable }} -+ service: -+ name: {{ $serviceName }} -+ port: -+ number: {{ $servicePort }} -+ {{- else }} - serviceName: {{ $serviceName }} - servicePort: {{ $servicePort }} -+ {{- end }} - {{- end -}} - {{- end -}} - {{- if .Values.alertmanager.ingress.tls }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/alertmanager/ingressperreplica.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/alertmanager/ingressperreplica.yaml.patch deleted file mode 100644 index 67049ceb9..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/alertmanager/ingressperreplica.yaml.patch +++ /dev/null @@ -1,61 +0,0 @@ ---- charts-original/templates/alertmanager/ingressperreplica.yaml -+++ charts/templates/alertmanager/ingressperreplica.yaml -@@ -3,6 +3,8 @@ - {{- $count := .Values.alertmanager.alertmanagerSpec.replicas | int -}} - {{- $servicePort := .Values.alertmanager.service.port -}} - {{- $ingressValues := .Values.alertmanager.ingressPerReplica -}} -+{{- $apiIsStable := eq (include "kube-prometheus-stack.ingress.isStable" .) "true" -}} -+{{- $ingressSupportsPathType := eq (include "kube-prometheus-stack.ingress.supportsPathType" .) "true" -}} - apiVersion: v1 - kind: List - metadata: -@@ -11,17 +13,13 @@ - items: - {{ range $i, $e := until $count }} - - kind: Ingress -- {{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }} -- apiVersion: networking.k8s.io/v1beta1 -- {{ else }} -- apiVersion: extensions/v1beta1 -- {{ end -}} -+ apiVersion: {{ include "kube-prometheus-stack.ingress.apiVersion" $ }} - metadata: - name: {{ include "kube-prometheus-stack.fullname" $ }}-alertmanager-{{ $i }} - namespace: {{ template "kube-prometheus-stack.namespace" $ }} - labels: - app: {{ include "kube-prometheus-stack.name" $ }}-alertmanager --{{ include "kube-prometheus-stack.labels" $ | indent 8 }} -+ {{ include "kube-prometheus-stack.labels" $ | indent 8 }} - {{- if $ingressValues.labels }} - {{ toYaml $ingressValues.labels | indent 8 }} - {{- end }} -@@ -30,7 +28,7 @@ - {{ toYaml $ingressValues.annotations | indent 8 }} - {{- end }} - spec: -- {{- if or ($.Capabilities.APIVersions.Has "networking.k8s.io/v1") ($.Capabilities.APIVersions.Has "networking.k8s.io/v1beta1") }} -+ {{- if $apiIsStable }} - {{- if $ingressValues.ingressClassName }} - ingressClassName: {{ $ingressValues.ingressClassName }} - {{- end }} -@@ -41,12 +39,19 @@ - paths: - {{- range $p := $ingressValues.paths }} - - path: {{ tpl $p $ }} -- {{- if $pathType }} -+ {{- if and $pathType $ingressSupportsPathType }} - pathType: {{ $pathType }} - {{- end }} - backend: -+ {{- if $apiIsStable }} -+ service: -+ name: {{ include "kube-prometheus-stack.fullname" $ }}-alertmanager-{{ $i }} -+ port: -+ number: {{ $servicePort }} -+ {{- else }} - serviceName: {{ include "kube-prometheus-stack.fullname" $ }}-alertmanager-{{ $i }} - servicePort: {{ $servicePort }} -+ {{- end }} - {{- end -}} - {{- if or $ingressValues.tlsSecretName $ingressValues.tlsSecretPerReplica.enabled }} - tls: diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/alertmanager/serviceaccount.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/alertmanager/serviceaccount.yaml.patch deleted file mode 100644 index 9efedfeff..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/alertmanager/serviceaccount.yaml.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- charts-original/templates/alertmanager/serviceaccount.yaml -+++ charts/templates/alertmanager/serviceaccount.yaml -@@ -6,11 +6,15 @@ - namespace: {{ template "kube-prometheus-stack.namespace" . }} - labels: - app: {{ template "kube-prometheus-stack.name" . }}-alertmanager -+ app.kubernetes.io/name: {{ template "kube-prometheus-stack.name" . }}-alertmanager -+ app.kubernetes.io/component: alertmanager - {{ include "kube-prometheus-stack.labels" . | indent 4 }} - {{- if .Values.alertmanager.serviceAccount.annotations }} - annotations: - {{ toYaml .Values.alertmanager.serviceAccount.annotations | indent 4 }} - {{- end }} -+{{- if .Values.global.imagePullSecrets }} - imagePullSecrets: - {{ toYaml .Values.global.imagePullSecrets | indent 2 }} - {{- end }} -+{{- end }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/alertmanager/servicemonitor.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/alertmanager/servicemonitor.yaml.patch deleted file mode 100644 index a6ce9ea8a..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/alertmanager/servicemonitor.yaml.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- charts-original/templates/alertmanager/servicemonitor.yaml -+++ charts/templates/alertmanager/servicemonitor.yaml -@@ -21,6 +21,9 @@ - {{- if .Values.alertmanager.serviceMonitor.interval }} - interval: {{ .Values.alertmanager.serviceMonitor.interval }} - {{- end }} -+ {{- if .Values.alertmanager.serviceMonitor.proxyUrl }} -+ proxyUrl: {{ .Values.alertmanager.serviceMonitor.proxyUrl}} -+ {{- end }} - {{- if .Values.alertmanager.serviceMonitor.scheme }} - scheme: {{ .Values.alertmanager.serviceMonitor.scheme }} - {{- end }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/exporters/core-dns/servicemonitor.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/exporters/core-dns/servicemonitor.yaml.patch index d47cebee6..0dfe2b1db 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/exporters/core-dns/servicemonitor.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/exporters/core-dns/servicemonitor.yaml.patch @@ -9,13 +9,3 @@ labels: app: {{ template "kube-prometheus-stack.name" . }}-coredns {{ include "kube-prometheus-stack.labels" . | indent 4 }} -@@ -21,6 +21,9 @@ - {{- if .Values.coreDns.serviceMonitor.interval}} - interval: {{ .Values.coreDns.serviceMonitor.interval }} - {{- end }} -+ {{- if .Values.coreDns.serviceMonitor.proxyUrl }} -+ proxyUrl: {{ .Values.coreDns.serviceMonitor.proxyUrl}} -+ {{- end }} - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token - {{- if .Values.coreDns.serviceMonitor.metricRelabelings }} - metricRelabelings: diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/exporters/kube-api-server/servicemonitor.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/exporters/kube-api-server/servicemonitor.yaml.patch index 191f5c9fd..b7497995e 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/exporters/kube-api-server/servicemonitor.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/exporters/kube-api-server/servicemonitor.yaml.patch @@ -9,24 +9,3 @@ labels: app: {{ template "kube-prometheus-stack.name" . }}-apiserver {{ include "kube-prometheus-stack.labels" . | indent 4 }} -@@ -13,15 +13,18 @@ - {{- if .Values.kubeApiServer.serviceMonitor.interval }} - interval: {{ .Values.kubeApiServer.serviceMonitor.interval }} - {{- end }} -+ {{- if .Values.kubeApiServer.serviceMonitor.proxyUrl }} -+ proxyUrl: {{ .Values.kubeApiServer.serviceMonitor.proxyUrl}} -+ {{- end }} - port: https - scheme: https - {{- if .Values.kubeApiServer.serviceMonitor.metricRelabelings }} - metricRelabelings: - {{ tpl (toYaml .Values.kubeApiServer.serviceMonitor.metricRelabelings | indent 6) . }} - {{- end }} --{{- if .Values.kubeApiServer.relabelings }} -+{{- if .Values.kubeApiServer.serviceMonitor.relabelings }} - relabelings: --{{ toYaml .Values.kubeApiServer.relabelings | indent 6 }} -+{{ toYaml .Values.kubeApiServer.serviceMonitor.relabelings | indent 6 }} - {{- end }} - tlsConfig: - caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/exporters/kube-controller-manager/servicemonitor.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/exporters/kube-controller-manager/servicemonitor.yaml.patch index 4f2fda351..74ed9c2ee 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/exporters/kube-controller-manager/servicemonitor.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/exporters/kube-controller-manager/servicemonitor.yaml.patch @@ -9,13 +9,3 @@ labels: app: {{ template "kube-prometheus-stack.name" . }}-kube-controller-manager {{ include "kube-prometheus-stack.labels" . | indent 4 }} -@@ -22,6 +22,9 @@ - interval: {{ .Values.kubeControllerManager.serviceMonitor.interval }} - {{- end }} - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token -+ {{- if .Values.kubeControllerManager.serviceMonitor.proxyUrl }} -+ proxyUrl: {{ .Values.kubeControllerManager.serviceMonitor.proxyUrl}} -+ {{- end }} - {{- if .Values.kubeControllerManager.serviceMonitor.https }} - scheme: https - tlsConfig: diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/exporters/kube-dns/servicemonitor.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/exporters/kube-dns/servicemonitor.yaml.patch index d876a2ee9..394dbc5a1 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/exporters/kube-dns/servicemonitor.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/exporters/kube-dns/servicemonitor.yaml.patch @@ -9,13 +9,3 @@ labels: app: {{ template "kube-prometheus-stack.name" . }}-kube-dns {{ include "kube-prometheus-stack.labels" . | indent 4 }} -@@ -22,6 +22,9 @@ - interval: {{ .Values.kubeDns.serviceMonitor.interval }} - {{- end }} - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token -+ {{- if .Values.kubeDns.serviceMonitor.proxyUrl }} -+ proxyUrl: {{ .Values.kubeDns.serviceMonitor.proxyUrl}} -+ {{- end }} - {{- if .Values.kubeDns.serviceMonitor.dnsmasqMetricRelabelings }} - metricRelabelings: - {{ tpl (toYaml .Values.kubeDns.serviceMonitor.dnsmasqMetricRelabelings | indent 4) . }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/exporters/kube-etcd/servicemonitor.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/exporters/kube-etcd/servicemonitor.yaml.patch deleted file mode 100644 index 9088433e9..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/exporters/kube-etcd/servicemonitor.yaml.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- charts-original/templates/exporters/kube-etcd/servicemonitor.yaml -+++ charts/templates/exporters/kube-etcd/servicemonitor.yaml -@@ -22,6 +22,9 @@ - interval: {{ .Values.kubeEtcd.serviceMonitor.interval }} - {{- end }} - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token -+ {{- if .Values.kubeEtcd.serviceMonitor.proxyUrl }} -+ proxyUrl: {{ .Values.kubeEtcd.serviceMonitor.proxyUrl}} -+ {{- end }} - {{- if eq .Values.kubeEtcd.serviceMonitor.scheme "https" }} - scheme: https - tlsConfig: diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/exporters/kube-proxy/servicemonitor.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/exporters/kube-proxy/servicemonitor.yaml.patch deleted file mode 100644 index 7d4ab34c5..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/exporters/kube-proxy/servicemonitor.yaml.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- charts-original/templates/exporters/kube-proxy/servicemonitor.yaml -+++ charts/templates/exporters/kube-proxy/servicemonitor.yaml -@@ -22,6 +22,9 @@ - interval: {{ .Values.kubeProxy.serviceMonitor.interval }} - {{- end }} - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token -+ {{- if .Values.kubeProxy.serviceMonitor.proxyUrl }} -+ proxyUrl: {{ .Values.kubeProxy.serviceMonitor.proxyUrl}} -+ {{- end }} - {{- if .Values.kubeProxy.serviceMonitor.https }} - scheme: https - tlsConfig: diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/exporters/kube-scheduler/servicemonitor.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/exporters/kube-scheduler/servicemonitor.yaml.patch deleted file mode 100644 index edefc5779..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/exporters/kube-scheduler/servicemonitor.yaml.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- charts-original/templates/exporters/kube-scheduler/servicemonitor.yaml -+++ charts/templates/exporters/kube-scheduler/servicemonitor.yaml -@@ -22,6 +22,9 @@ - interval: {{ .Values.kubeScheduler.serviceMonitor.interval }} - {{- end }} - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token -+ {{- if .Values.kubeScheduler.serviceMonitor.proxyUrl }} -+ proxyUrl: {{ .Values.kubeScheduler.serviceMonitor.proxyUrl}} -+ {{- end }} - {{- if .Values.kubeScheduler.serviceMonitor.https }} - scheme: https - tlsConfig: diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/exporters/kube-state-metrics/serviceMonitor.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/exporters/kube-state-metrics/serviceMonitor.yaml.patch deleted file mode 100644 index 554040a7d..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/exporters/kube-state-metrics/serviceMonitor.yaml.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- charts-original/templates/exporters/kube-state-metrics/serviceMonitor.yaml -+++ charts/templates/exporters/kube-state-metrics/serviceMonitor.yaml -@@ -14,6 +14,9 @@ - {{- if .Values.kubeStateMetrics.serviceMonitor.interval }} - interval: {{ .Values.kubeStateMetrics.serviceMonitor.interval }} - {{- end }} -+ {{- if .Values.kubeStateMetrics.serviceMonitor.proxyUrl }} -+ proxyUrl: {{ .Values.kubeStateMetrics.serviceMonitor.proxyUrl}} -+ {{- end }} - honorLabels: true - {{- if .Values.kubeStateMetrics.serviceMonitor.metricRelabelings }} - metricRelabelings: -@@ -23,6 +26,11 @@ - relabelings: - {{ toYaml .Values.kubeStateMetrics.serviceMonitor.relabelings | indent 4 }} - {{- end }} -+{{- if .Values.kubeStateMetrics.serviceMonitor.namespaceOverride }} -+ namespaceSelector: -+ matchNames: -+ - {{ .Values.kubeStateMetrics.serviceMonitor.namespaceOverride }} -+{{- end }} - selector: - matchLabels: - {{- if .Values.kubeStateMetrics.serviceMonitor.selectorOverride }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/exporters/kubelet/servicemonitor.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/exporters/kubelet/servicemonitor.yaml.patch index 5691d8d54..29cd80d07 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/exporters/kubelet/servicemonitor.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/exporters/kubelet/servicemonitor.yaml.patch @@ -15,37 +15,7 @@ labels: app: {{ template "kube-prometheus-stack.name" . }}-kubelet {{- include "kube-prometheus-stack.labels" . | indent 4 }} -@@ -15,6 +18,9 @@ - {{- if .Values.kubelet.serviceMonitor.interval }} - interval: {{ .Values.kubelet.serviceMonitor.interval }} - {{- end }} -+ {{- if .Values.kubelet.serviceMonitor.proxyUrl }} -+ proxyUrl: {{ .Values.kubelet.serviceMonitor.proxyUrl }} -+ {{- end }} - tlsConfig: - caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - insecureSkipVerify: true -@@ -35,6 +41,9 @@ - {{- if .Values.kubelet.serviceMonitor.interval }} - interval: {{ .Values.kubelet.serviceMonitor.interval }} - {{- end }} -+ {{- if .Values.kubelet.serviceMonitor.proxyUrl }} -+ proxyUrl: {{ .Values.kubelet.serviceMonitor.proxyUrl }} -+ {{- end }} - {{- if .Values.kubelet.serviceMonitor.scrapeTimeout }} - scrapeTimeout: {{ .Values.kubelet.serviceMonitor.scrapeTimeout }} - {{- end }} -@@ -59,6 +68,9 @@ - {{- if .Values.kubelet.serviceMonitor.interval }} - interval: {{ .Values.kubelet.serviceMonitor.interval }} - {{- end }} -+ {{- if .Values.kubelet.serviceMonitor.proxyUrl }} -+ proxyUrl: {{ .Values.kubelet.serviceMonitor.proxyUrl }} -+ {{- end }} - honorLabels: true - tlsConfig: - caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt -@@ -76,10 +88,13 @@ +@@ -85,7 +88,7 @@ {{- if .Values.kubelet.serviceMonitor.resource }} - port: https-metrics scheme: https @@ -54,33 +24,7 @@ {{- if .Values.kubelet.serviceMonitor.interval }} interval: {{ .Values.kubelet.serviceMonitor.interval }} {{- end }} -+ {{- if .Values.kubelet.serviceMonitor.proxyUrl }} -+ proxyUrl: {{ .Values.kubelet.serviceMonitor.proxyUrl }} -+ {{- end }} - honorLabels: true - tlsConfig: - caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt -@@ -99,6 +114,9 @@ - {{- if .Values.kubelet.serviceMonitor.interval }} - interval: {{ .Values.kubelet.serviceMonitor.interval }} - {{- end }} -+ {{- if .Values.kubelet.serviceMonitor.proxyUrl }} -+ proxyUrl: {{ .Values.kubelet.serviceMonitor.proxyUrl }} -+ {{- end }} - honorLabels: true - {{- if .Values.kubelet.serviceMonitor.metricRelabelings }} - metricRelabelings: -@@ -114,6 +132,9 @@ - {{- if .Values.kubelet.serviceMonitor.interval }} - interval: {{ .Values.kubelet.serviceMonitor.interval }} - {{- end }} -+ {{- if .Values.kubelet.serviceMonitor.proxyUrl }} -+ proxyUrl: {{ .Values.kubelet.serviceMonitor.proxyUrl }} -+ {{- end }} - honorLabels: true - {{- if .Values.kubelet.serviceMonitor.cAdvisorMetricRelabelings }} - metricRelabelings: -@@ -125,10 +146,13 @@ +@@ -143,7 +146,7 @@ {{- end }} {{- if .Values.kubelet.serviceMonitor.resource }} - port: http-metrics @@ -89,16 +33,3 @@ {{- if .Values.kubelet.serviceMonitor.interval }} interval: {{ .Values.kubelet.serviceMonitor.interval }} {{- end }} -+ {{- if .Values.kubelet.serviceMonitor.proxyUrl }} -+ proxyUrl: {{ .Values.kubelet.serviceMonitor.proxyUrl }} -+ {{- end }} - honorLabels: true - {{- if .Values.kubelet.serviceMonitor.resourceMetricRelabelings }} - metricRelabelings: -@@ -147,5 +171,6 @@ - - {{ .Values.kubelet.namespace }} - selector: - matchLabels: -+ app.kubernetes.io/managed-by: prometheus-operator - k8s-app: kubelet - {{- end}} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/exporters/node-exporter/servicemonitor.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/exporters/node-exporter/servicemonitor.yaml.patch index e64a7b5d5..ea2734462 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/exporters/node-exporter/servicemonitor.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/exporters/node-exporter/servicemonitor.yaml.patch @@ -9,23 +9,3 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: -@@ -13,11 +16,19 @@ - matchLabels: - app: prometheus-node-exporter - release: {{ $.Release.Name }} -+ {{- if (index .Values "prometheus-node-exporter" "namespaceOverride") }} -+ namespaceSelector: -+ matchNames: -+ - {{ index .Values "prometheus-node-exporter" "namespaceOverride" }} -+ {{- end }} - endpoints: - - port: metrics - {{- if .Values.nodeExporter.serviceMonitor.interval }} - interval: {{ .Values.nodeExporter.serviceMonitor.interval }} - {{- end }} -+ {{- if .Values.nodeExporter.serviceMonitor.proxyUrl }} -+ proxyUrl: {{ .Values.nodeExporter.serviceMonitor.proxyUrl}} -+ {{- end }} - {{- if .Values.nodeExporter.serviceMonitor.scrapeTimeout }} - scrapeTimeout: {{ .Values.nodeExporter.serviceMonitor.scrapeTimeout }} - {{- end }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/configmap-dashboards.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/configmap-dashboards.yaml.patch index a3a085287..ebe82603c 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/configmap-dashboards.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/configmap-dashboards.yaml.patch @@ -1,13 +1,5 @@ --- charts-original/templates/grafana/configmap-dashboards.yaml +++ charts/templates/grafana/configmap-dashboards.yaml -@@ -1,5 +1,5 @@ --{{- if and .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} --{{- $files := .Files.Glob "dashboards/*.json" }} -+{{- if or (and .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled) .Values.grafana.forceDeployDashboards }} -+{{- $files := .Files.Glob "dashboards-1.14/*.json" }} - {{- if $files }} - apiVersion: v1 - kind: ConfigMapList @@ -10,7 +10,7 @@ kind: ConfigMap metadata: diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/configmaps-datasources.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/configmaps-datasources.yaml.patch index b5a11ad4d..149de4213 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/configmaps-datasources.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/configmaps-datasources.yaml.patch @@ -1,9 +1,6 @@ --- charts-original/templates/grafana/configmaps-datasources.yaml +++ charts/templates/grafana/configmaps-datasources.yaml -@@ -1,9 +1,9 @@ --{{- if and .Values.grafana.enabled .Values.grafana.sidecar.datasources.enabled }} -+{{- if or (and .Values.grafana.enabled .Values.grafana.sidecar.datasources.enabled) .Values.grafana.forceDeployDatasources }} - apiVersion: v1 +@@ -3,7 +3,7 @@ kind: ConfigMap metadata: name: {{ template "kube-prometheus-stack.fullname" . }}-grafana-datasource @@ -12,15 +9,3 @@ {{- if .Values.grafana.sidecar.datasources.annotations }} annotations: {{ toYaml .Values.grafana.sidecar.datasources.annotations | indent 4 }} -@@ -20,7 +20,11 @@ - {{- if .Values.grafana.sidecar.datasources.defaultDatasourceEnabled }} - - name: Prometheus - type: prometheus -+ {{- if .Values.grafana.sidecar.datasources.url }} -+ url: {{ .Values.grafana.sidecar.datasources.url }} -+ {{- else }} - url: http://{{ template "kube-prometheus-stack.fullname" . }}-prometheus:{{ .Values.prometheus.service.port }}/{{ trimPrefix "/" .Values.prometheus.prometheusSpec.routePrefix }} -+ {{- end }} - access: proxy - isDefault: true - jsonData: diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/apiserver.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/apiserver.yaml.patch index 24ab09f49..a0615bd89 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/apiserver.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/apiserver.yaml.patch @@ -1,11 +1,6 @@ --- charts-original/templates/grafana/dashboards-1.14/apiserver.yaml +++ charts/templates/grafana/dashboards-1.14/apiserver.yaml -@@ -4,11 +4,11 @@ - https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} --{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.kubeApiServer.enabled }} -+{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled .Values.kubeApiServer.enabled }} +@@ -8,7 +8,7 @@ apiVersion: v1 kind: ConfigMap metadata: diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/cluster-total.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/cluster-total.yaml.patch index b52edf0d9..c1de54860 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/cluster-total.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/cluster-total.yaml.patch @@ -1,11 +1,6 @@ --- charts-original/templates/grafana/dashboards-1.14/cluster-total.yaml +++ charts/templates/grafana/dashboards-1.14/cluster-total.yaml -@@ -4,11 +4,11 @@ - https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} --{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} -+{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +@@ -8,7 +8,7 @@ apiVersion: v1 kind: ConfigMap metadata: @@ -14,7 +9,7 @@ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "cluster-total" | trunc 63 | trimSuffix "-" }} annotations: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} -@@ -1825,14 +1825,14 @@ +@@ -1825,7 +1825,7 @@ "datasource": "$datasource", "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, "includeAll": false, @@ -23,14 +18,6 @@ "multi": false, "name": "cluster", "options": [ - - ], - "query": "label_values(kube_pod_info, cluster)", -- "refresh": 1, -+ "refresh": 2, - "regex": "", - "sort": 0, - "tagValuesQuery": "", @@ -1879,4 +1879,4 @@ "uid": "ff635a025bcfea7bc3dd4f508990a3e9", "version": 0 diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/controller-manager.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/controller-manager.yaml.patch index 8f661eb12..cf6f2788a 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/controller-manager.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/controller-manager.yaml.patch @@ -4,7 +4,7 @@ https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack */ -}} {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} --{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.kubeControllerManager.enabled }} +-{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled .Values.kubeControllerManager.enabled }} +{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +{{- if (include "exporter.kubeControllerManager.enabled" .)}} apiVersion: v1 @@ -19,7 +19,7 @@ "tableColumn": "", "targets": [ { -- "expr": "sum(up{job=\"kube-controller-manager\"})", +- "expr": "sum(up{cluster=\"$cluster\", job=\"kube-controller-manager\"})", + {{- if .Values.k3sServer.enabled }} + "expr": "sum(up{cluster=\"$cluster\", job=\"{{ include "exporter.kubeControllerManager.jobName" . }}\", metrics_path=\"/metrics\"})", + {{- else }} @@ -32,7 +32,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sum(rate(workqueue_adds_total{job=\"kube-controller-manager\", instance=~\"$instance\"}[5m])) by (instance, name)", +- "expr": "sum(rate(workqueue_adds_total{cluster=\"$cluster\", job=\"kube-controller-manager\", instance=~\"$instance\"}[5m])) by (instance, name)", + "expr": "sum(rate(workqueue_adds_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeControllerManager.jobName" . }}\", instance=~\"$instance\"}[5m])) by (instance, name)", "format": "time_series", "intervalFactor": 2, @@ -41,7 +41,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sum(rate(workqueue_depth{job=\"kube-controller-manager\", instance=~\"$instance\"}[5m])) by (instance, name)", +- "expr": "sum(rate(workqueue_depth{cluster=\"$cluster\", job=\"kube-controller-manager\", instance=~\"$instance\"}[5m])) by (instance, name)", + "expr": "sum(rate(workqueue_depth{cluster=\"$cluster\", job=\"{{ include "exporter.kubeControllerManager.jobName" . }}\", instance=~\"$instance\"}[5m])) by (instance, name)", "format": "time_series", "intervalFactor": 2, @@ -50,7 +50,7 @@ "steppedLine": false, "targets": [ { -- "expr": "histogram_quantile(0.99, sum(rate(workqueue_queue_duration_seconds_bucket{job=\"kube-controller-manager\", instance=~\"$instance\"}[5m])) by (instance, name, le))", +- "expr": "histogram_quantile(0.99, sum(rate(workqueue_queue_duration_seconds_bucket{cluster=\"$cluster\", job=\"kube-controller-manager\", instance=~\"$instance\"}[5m])) by (instance, name, le))", + "expr": "histogram_quantile(0.99, sum(rate(workqueue_queue_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeControllerManager.jobName" . }}\", instance=~\"$instance\"}[5m])) by (instance, name, le))", "format": "time_series", "intervalFactor": 2, @@ -92,7 +92,7 @@ "steppedLine": false, "targets": [ { -- "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{job=\"kube-controller-manager\", instance=~\"$instance\", verb=\"POST\"}[5m])) by (verb, url, le))", +- "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster=\"$cluster\", job=\"kube-controller-manager\", instance=~\"$instance\", verb=\"POST\"}[5m])) by (verb, url, le))", + "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeControllerManager.jobName" . }}\", instance=~\"$instance\", verb=\"POST\"}[5m])) by (verb, url, le))", "format": "time_series", "intervalFactor": 2, @@ -101,7 +101,7 @@ "steppedLine": false, "targets": [ { -- "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{job=\"kube-controller-manager\", instance=~\"$instance\", verb=\"GET\"}[5m])) by (verb, url, le))", +- "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster=\"$cluster\", job=\"kube-controller-manager\", instance=~\"$instance\", verb=\"GET\"}[5m])) by (verb, url, le))", + "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeControllerManager.jobName" . }}\", instance=~\"$instance\", verb=\"GET\"}[5m])) by (verb, url, le))", "format": "time_series", "intervalFactor": 2, @@ -110,7 +110,7 @@ "steppedLine": false, "targets": [ { -- "expr": "process_resident_memory_bytes{job=\"kube-controller-manager\",instance=~\"$instance\"}", +- "expr": "process_resident_memory_bytes{cluster=\"$cluster\", job=\"kube-controller-manager\",instance=~\"$instance\"}", + "expr": "process_resident_memory_bytes{cluster=\"$cluster\", job=\"{{ include "exporter.kubeControllerManager.jobName" . }}\",instance=~\"$instance\"}", "format": "time_series", "intervalFactor": 2, @@ -119,7 +119,7 @@ "steppedLine": false, "targets": [ { -- "expr": "rate(process_cpu_seconds_total{job=\"kube-controller-manager\",instance=~\"$instance\"}[5m])", +- "expr": "rate(process_cpu_seconds_total{cluster=\"$cluster\", job=\"kube-controller-manager\",instance=~\"$instance\"}[5m])", + "expr": "rate(process_cpu_seconds_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeControllerManager.jobName" . }}\",instance=~\"$instance\"}[5m])", "format": "time_series", "intervalFactor": 2, @@ -128,54 +128,21 @@ "steppedLine": false, "targets": [ { -- "expr": "go_goroutines{job=\"kube-controller-manager\",instance=~\"$instance\"}", +- "expr": "go_goroutines{cluster=\"$cluster\", job=\"kube-controller-manager\",instance=~\"$instance\"}", + "expr": "go_goroutines{cluster=\"$cluster\", job=\"{{ include "exporter.kubeControllerManager.jobName" . }}\",instance=~\"$instance\"}", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}}", -@@ -1092,6 +1097,32 @@ - - }, - "datasource": "$datasource", -+ "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, -+ "includeAll": false, -+ "label": "cluster", -+ "multi": false, -+ "name": "cluster", -+ "options": [ -+ -+ ], -+ "query": "label_values(kube_pod_info, cluster)", -+ "refresh": 2, -+ "regex": "", -+ "sort": 1, -+ "tagValuesQuery": "", -+ "tags": [ -+ -+ ], -+ "tagsQuery": "", -+ "type": "query", -+ "useTags": false -+ }, -+ { -+ "allValue": null, -+ "current": { -+ -+ }, -+ "datasource": "$datasource", - "hide": 0, - "includeAll": true, - "label": null, -@@ -1100,7 +1131,7 @@ +@@ -1126,7 +1131,7 @@ "options": [ ], -- "query": "label_values(process_cpu_seconds_total{job=\"kube-controller-manager\"}, instance)", +- "query": "label_values(process_cpu_seconds_total{cluster=\"$cluster\", job=\"kube-controller-manager\"}, instance)", + "query": "label_values(process_cpu_seconds_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeControllerManager.jobName" . }}\"}, instance)", "refresh": 2, "regex": "", "sort": 1, -@@ -1148,4 +1179,5 @@ +@@ -1174,4 +1179,5 @@ "uid": "72e0e05bef5099e5f049b05fdc429ed4", "version": 0 } diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/etcd.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/etcd.yaml.patch index 3690ce03e..346ee9a80 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/etcd.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/etcd.yaml.patch @@ -1,14 +1,10 @@ --- charts-original/templates/grafana/dashboards-1.14/etcd.yaml +++ charts/templates/grafana/dashboards-1.14/etcd.yaml -@@ -1,14 +1,15 @@ - {{- /* --Generated from 'etcd' from https://raw.githubusercontent.com/etcd-io/website/master/content/docs/current/op-guide/grafana.json -+Generated from 'etcd' from https://raw.githubusercontent.com/etcd-io/website/master/content/en/docs/v3.4/op-guide/grafana.json - Do not change in-place! In order to change this file first read following link: +@@ -4,11 +4,12 @@ https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack */ -}} {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} --{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.kubeEtcd.enabled }} +-{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled .Values.kubeEtcd.enabled }} +{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +{{- if (include "exporter.kubeEtcd.enabled" .)}} apiVersion: v1 @@ -19,19 +15,8 @@ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "etcd" | trunc 63 | trimSuffix "-" }} annotations: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} -@@ -28,6 +29,7 @@ - "editable": true, - "gnetId": null, - "hideControls": false, -+ "id": 6, - "links": [], - "refresh": "10s", - "rows": [ -@@ -1110,7 +1112,7 @@ - }, - "timezone": "browser", +@@ -1113,4 +1114,5 @@ "title": "etcd", -- "uid": "c2f4e12cdf69feb95caa41a5a1b423d9", "version": 215 } -{{- end }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-coredns.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-coredns.yaml.patch index 689af3668..4dc8980ed 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-coredns.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-coredns.yaml.patch @@ -1,10 +1,6 @@ --- charts-original/templates/grafana/dashboards-1.14/k8s-coredns.yaml +++ charts/templates/grafana/dashboards-1.14/k8s-coredns.yaml -@@ -1,13 +1,11 @@ - {{- /* Added manually, can be changed in-place. */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} --{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.coreDns.enabled }} -+{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled .Values.coreDns.enabled }} +@@ -4,10 +4,8 @@ apiVersion: v1 kind: ConfigMap metadata: diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-cluster.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-cluster.yaml.patch index 53a7dc9d0..cd4350c7f 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-cluster.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-cluster.yaml.patch @@ -1,11 +1,6 @@ --- charts-original/templates/grafana/dashboards-1.14/k8s-resources-cluster.yaml +++ charts/templates/grafana/dashboards-1.14/k8s-resources-cluster.yaml -@@ -4,11 +4,11 @@ - https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} --{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} -+{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +@@ -8,7 +8,7 @@ apiVersion: v1 kind: ConfigMap metadata: @@ -14,822 +9,7 @@ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "k8s-resources-cluster" | trunc 63 | trimSuffix "-" }} annotations: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} -@@ -163,7 +163,7 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\"}) / sum(kube_node_status_allocatable_cpu_cores{cluster=\"$cluster\"})", -+ "expr": "sum(namespace_cpu:kube_pod_container_resource_requests:sum{cluster=\"$cluster\"}) / sum(kube_node_status_allocatable{resource=\"cpu\",cluster=\"$cluster\"})", - "format": "time_series", - "instant": true, - "intervalFactor": 2, -@@ -247,7 +247,7 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\"}) / sum(kube_node_status_allocatable_cpu_cores{cluster=\"$cluster\"})", -+ "expr": "sum(kube_pod_container_resource_limits{cluster=\"$cluster\", resource=\"cpu\"}) / sum(kube_node_status_allocatable{resource=\"cpu\",cluster=\"$cluster\"})", - "format": "time_series", - "instant": true, - "intervalFactor": 2, -@@ -331,7 +331,7 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "1 - sum(:node_memory_MemAvailable_bytes:sum{cluster=\"$cluster\"}) / sum(kube_node_status_allocatable_memory_bytes{cluster=\"$cluster\"})", -+ "expr": "1 - sum(:node_memory_MemAvailable_bytes:sum{cluster=\"$cluster\"}) / sum(node_memory_MemTotal_bytes{cluster=\"$cluster\"})", - "format": "time_series", - "instant": true, - "intervalFactor": 2, -@@ -415,7 +415,7 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "sum(kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\"}) / sum(kube_node_status_allocatable_memory_bytes{cluster=\"$cluster\"})", -+ "expr": "sum(namespace_memory:kube_pod_container_resource_requests:sum{cluster=\"$cluster\"}) / sum(kube_node_status_allocatable{resource=\"memory\",cluster=\"$cluster\"})", - "format": "time_series", - "instant": true, - "intervalFactor": 2, -@@ -499,7 +499,7 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "sum(kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\"}) / sum(kube_node_status_allocatable_memory_bytes{cluster=\"$cluster\"})", -+ "expr": "sum(kube_pod_container_resource_limits{cluster=\"$cluster\", resource=\"memory\"}) / sum(kube_node_status_allocatable{resource=\"memory\",cluster=\"$cluster\"})", - "format": "time_series", - "instant": true, - "intervalFactor": 2, -@@ -894,7 +894,7 @@ - "step": 10 - }, - { -- "expr": "sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\"}) by (namespace)", -+ "expr": "sum(namespace_cpu:kube_pod_container_resource_requests:sum{cluster=\"$cluster\"}) by (namespace)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -903,7 +903,7 @@ - "step": 10 - }, - { -- "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\"}) by (namespace) / sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\"}) by (namespace)", -+ "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\"}) by (namespace) / sum(kube_pod_container_resource_requests{cluster=\"$cluster\", resource=\"cpu\"}) by (namespace)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -912,7 +912,7 @@ - "step": 10 - }, - { -- "expr": "sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\"}) by (namespace)", -+ "expr": "sum(kube_pod_container_resource_limits{cluster=\"$cluster\", resource=\"cpu\"}) by (namespace)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -921,7 +921,7 @@ - "step": 10 - }, - { -- "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\"}) by (namespace) / sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\"}) by (namespace)", -+ "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\"}) by (namespace) / sum(kube_pod_container_resource_limits{cluster=\"$cluster\", resource=\"cpu\"}) by (namespace)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -1321,7 +1321,7 @@ - "step": 10 - }, - { -- "expr": "sum(kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\"}) by (namespace)", -+ "expr": "sum(kube_pod_container_resource_requests{cluster=\"$cluster\", resource=\"memory\"}) by (namespace)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -1330,7 +1330,7 @@ - "step": 10 - }, - { -- "expr": "sum(container_memory_rss{cluster=\"$cluster\", container!=\"\"}) by (namespace) / sum(kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\"}) by (namespace)", -+ "expr": "sum(container_memory_rss{cluster=\"$cluster\", container!=\"\"}) by (namespace) / sum(kube_pod_container_resource_requests{cluster=\"$cluster\", resource=\"memory\"}) by (namespace)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -1339,7 +1339,7 @@ - "step": 10 - }, - { -- "expr": "sum(kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\"}) by (namespace)", -+ "expr": "sum(kube_pod_container_resource_limits{cluster=\"$cluster\", resource=\"memory\"}) by (namespace)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -1348,7 +1348,7 @@ - "step": 10 - }, - { -- "expr": "sum(container_memory_rss{cluster=\"$cluster\", container!=\"\"}) by (namespace) / sum(kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\"}) by (namespace)", -+ "expr": "sum(container_memory_rss{cluster=\"$cluster\", container!=\"\"}) by (namespace) / sum(kube_pod_container_resource_limits{cluster=\"$cluster\", resource=\"memory\"}) by (namespace)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -1705,7 +1705,7 @@ - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, -- "title": "Network", -+ "title": "Current Network Usage", - "titleSize": "h6" - }, - { -@@ -1745,7 +1745,7 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ -@@ -1797,19 +1797,7 @@ - "show": false - } - ] -- } -- ], -- "repeat": null, -- "repeatIteration": null, -- "repeatRowId": null, -- "showTitle": true, -- "title": "Network", -- "titleSize": "h6" -- }, -- { -- "collapse": false, -- "height": "250px", -- "panels": [ -+ }, - { - "aliasColors": { - -@@ -1843,7 +1831,7 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ -@@ -1901,7 +1889,7 @@ - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, -- "title": "Network", -+ "title": "Bandwidth", - "titleSize": "h6" - }, - { -@@ -1941,7 +1929,7 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ -@@ -1993,19 +1981,7 @@ - "show": false - } - ] -- } -- ], -- "repeat": null, -- "repeatIteration": null, -- "repeatRowId": null, -- "showTitle": true, -- "title": "Network", -- "titleSize": "h6" -- }, -- { -- "collapse": false, -- "height": "250px", -- "panels": [ -+ }, - { - "aliasColors": { - -@@ -2039,7 +2015,7 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ -@@ -2097,7 +2073,7 @@ - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, -- "title": "Network", -+ "title": "Average Container Bandwidth by Namespace", - "titleSize": "h6" - }, - { -@@ -2137,7 +2113,7 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ -@@ -2189,19 +2165,7 @@ - "show": false - } - ] -- } -- ], -- "repeat": null, -- "repeatIteration": null, -- "repeatRowId": null, -- "showTitle": true, -- "title": "Network", -- "titleSize": "h6" -- }, -- { -- "collapse": false, -- "height": "250px", -- "panels": [ -+ }, - { - "aliasColors": { - -@@ -2235,7 +2199,7 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ -@@ -2293,7 +2257,7 @@ - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, -- "title": "Network", -+ "title": "Rate of Packets", - "titleSize": "h6" - }, - { -@@ -2333,7 +2297,7 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ -@@ -2385,13 +2349,99 @@ - "show": false - } - ] -+ }, -+ { -+ "aliasColors": { -+ -+ }, -+ "bars": false, -+ "dashLength": 10, -+ "dashes": false, -+ "datasource": "$datasource", -+ "fill": 10, -+ "id": 19, -+ "legend": { -+ "avg": false, -+ "current": false, -+ "max": false, -+ "min": false, -+ "show": true, -+ "total": false, -+ "values": false -+ }, -+ "lines": true, -+ "linewidth": 0, -+ "links": [ -+ -+ ], -+ "nullPointMode": "null as zero", -+ "percentage": false, -+ "pointradius": 5, -+ "points": false, -+ "renderer": "flot", -+ "seriesOverrides": [ -+ -+ ], -+ "spaceLength": 10, -+ "span": 6, -+ "stack": true, -+ "steppedLine": false, -+ "targets": [ -+ { -+ "expr": "sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", -+ "format": "time_series", -+ "intervalFactor": 2, -+ "legendFormat": "{{`{{`}}namespace{{`}}`}}", -+ "legendLink": null, -+ "step": 10 -+ } -+ ], -+ "thresholds": [ -+ -+ ], -+ "timeFrom": null, -+ "timeShift": null, -+ "title": "Rate of Transmitted Packets Dropped", -+ "tooltip": { -+ "shared": false, -+ "sort": 0, -+ "value_type": "individual" -+ }, -+ "type": "graph", -+ "xaxis": { -+ "buckets": null, -+ "mode": "time", -+ "name": null, -+ "show": true, -+ "values": [ -+ -+ ] -+ }, -+ "yaxes": [ -+ { -+ "format": "Bps", -+ "label": null, -+ "logBase": 1, -+ "max": null, -+ "min": 0, -+ "show": true -+ }, -+ { -+ "format": "short", -+ "label": null, -+ "logBase": 1, -+ "max": null, -+ "min": null, -+ "show": false -+ } -+ ] - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, -- "title": "Network", -+ "title": "Rate of Packets Dropped", - "titleSize": "h6" - }, - { -@@ -2406,8 +2456,9 @@ - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", -+ "decimals": -1, - "fill": 10, -- "id": 19, -+ "id": 20, - "legend": { - "avg": false, - "current": false, -@@ -2431,12 +2482,12 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { -- "expr": "sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", -+ "expr": "ceil(sum by(namespace) (rate(container_fs_reads_total{container!=\"\", cluster=\"$cluster\"}[5m]) + rate(container_fs_writes_total{container!=\"\", cluster=\"$cluster\"}[5m])))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{`{{`}}namespace{{`}}`}}", -@@ -2449,7 +2500,93 @@ - ], - "timeFrom": null, - "timeShift": null, -- "title": "Rate of Transmitted Packets Dropped", -+ "title": "IOPS(Reads+Writes)", -+ "tooltip": { -+ "shared": false, -+ "sort": 0, -+ "value_type": "individual" -+ }, -+ "type": "graph", -+ "xaxis": { -+ "buckets": null, -+ "mode": "time", -+ "name": null, -+ "show": true, -+ "values": [ -+ -+ ] -+ }, -+ "yaxes": [ -+ { -+ "format": "short", -+ "label": null, -+ "logBase": 1, -+ "max": null, -+ "min": 0, -+ "show": true -+ }, -+ { -+ "format": "short", -+ "label": null, -+ "logBase": 1, -+ "max": null, -+ "min": null, -+ "show": false -+ } -+ ] -+ }, -+ { -+ "aliasColors": { -+ -+ }, -+ "bars": false, -+ "dashLength": 10, -+ "dashes": false, -+ "datasource": "$datasource", -+ "fill": 10, -+ "id": 21, -+ "legend": { -+ "avg": false, -+ "current": false, -+ "max": false, -+ "min": false, -+ "show": true, -+ "total": false, -+ "values": false -+ }, -+ "lines": true, -+ "linewidth": 0, -+ "links": [ -+ -+ ], -+ "nullPointMode": "null as zero", -+ "percentage": false, -+ "pointradius": 5, -+ "points": false, -+ "renderer": "flot", -+ "seriesOverrides": [ -+ -+ ], -+ "spaceLength": 10, -+ "span": 6, -+ "stack": true, -+ "steppedLine": false, -+ "targets": [ -+ { -+ "expr": "sum by(namespace) (rate(container_fs_reads_bytes_total{container!=\"\", cluster=\"$cluster\"}[5m]) + rate(container_fs_writes_bytes_total{container!=\"\", cluster=\"$cluster\"}[5m]))", -+ "format": "time_series", -+ "intervalFactor": 2, -+ "legendFormat": "{{`{{`}}namespace{{`}}`}}", -+ "legendLink": null, -+ "step": 10 -+ } -+ ], -+ "thresholds": [ -+ -+ ], -+ "timeFrom": null, -+ "timeShift": null, -+ "title": "ThroughPut(Read+Write)", - "tooltip": { - "shared": false, - "sort": 0, -@@ -2489,7 +2626,312 @@ - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, -- "title": "Network", -+ "title": "Storage IO", -+ "titleSize": "h6" -+ }, -+ { -+ "collapse": false, -+ "height": "250px", -+ "panels": [ -+ { -+ "aliasColors": { -+ -+ }, -+ "bars": false, -+ "dashLength": 10, -+ "dashes": false, -+ "datasource": "$datasource", -+ "fill": 1, -+ "id": 22, -+ "legend": { -+ "avg": false, -+ "current": false, -+ "max": false, -+ "min": false, -+ "show": true, -+ "total": false, -+ "values": false -+ }, -+ "lines": true, -+ "linewidth": 1, -+ "links": [ -+ -+ ], -+ "nullPointMode": "null as zero", -+ "percentage": false, -+ "pointradius": 5, -+ "points": false, -+ "renderer": "flot", -+ "seriesOverrides": [ -+ -+ ], -+ "sort": { -+ "col": 4, -+ "desc": true -+ }, -+ "spaceLength": 10, -+ "span": 12, -+ "stack": false, -+ "steppedLine": false, -+ "styles": [ -+ { -+ "alias": "Time", -+ "dateFormat": "YYYY-MM-DD HH:mm:ss", -+ "pattern": "Time", -+ "type": "hidden" -+ }, -+ { -+ "alias": "IOPS(Reads)", -+ "colorMode": null, -+ "colors": [ -+ -+ ], -+ "dateFormat": "YYYY-MM-DD HH:mm:ss", -+ "decimals": -1, -+ "link": false, -+ "linkTargetBlank": false, -+ "linkTooltip": "Drill down", -+ "linkUrl": "", -+ "pattern": "Value #A", -+ "thresholds": [ -+ -+ ], -+ "type": "number", -+ "unit": "short" -+ }, -+ { -+ "alias": "IOPS(Writes)", -+ "colorMode": null, -+ "colors": [ -+ -+ ], -+ "dateFormat": "YYYY-MM-DD HH:mm:ss", -+ "decimals": -1, -+ "link": false, -+ "linkTargetBlank": false, -+ "linkTooltip": "Drill down", -+ "linkUrl": "", -+ "pattern": "Value #B", -+ "thresholds": [ -+ -+ ], -+ "type": "number", -+ "unit": "short" -+ }, -+ { -+ "alias": "IOPS(Reads + Writes)", -+ "colorMode": null, -+ "colors": [ -+ -+ ], -+ "dateFormat": "YYYY-MM-DD HH:mm:ss", -+ "decimals": -1, -+ "link": false, -+ "linkTargetBlank": false, -+ "linkTooltip": "Drill down", -+ "linkUrl": "", -+ "pattern": "Value #C", -+ "thresholds": [ -+ -+ ], -+ "type": "number", -+ "unit": "short" -+ }, -+ { -+ "alias": "Throughput(Read)", -+ "colorMode": null, -+ "colors": [ -+ -+ ], -+ "dateFormat": "YYYY-MM-DD HH:mm:ss", -+ "decimals": 2, -+ "link": false, -+ "linkTargetBlank": false, -+ "linkTooltip": "Drill down", -+ "linkUrl": "", -+ "pattern": "Value #D", -+ "thresholds": [ -+ -+ ], -+ "type": "number", -+ "unit": "Bps" -+ }, -+ { -+ "alias": "Throughput(Write)", -+ "colorMode": null, -+ "colors": [ -+ -+ ], -+ "dateFormat": "YYYY-MM-DD HH:mm:ss", -+ "decimals": 2, -+ "link": false, -+ "linkTargetBlank": false, -+ "linkTooltip": "Drill down", -+ "linkUrl": "", -+ "pattern": "Value #E", -+ "thresholds": [ -+ -+ ], -+ "type": "number", -+ "unit": "Bps" -+ }, -+ { -+ "alias": "Throughput(Read + Write)", -+ "colorMode": null, -+ "colors": [ -+ -+ ], -+ "dateFormat": "YYYY-MM-DD HH:mm:ss", -+ "decimals": 2, -+ "link": false, -+ "linkTargetBlank": false, -+ "linkTooltip": "Drill down", -+ "linkUrl": "", -+ "pattern": "Value #F", -+ "thresholds": [ -+ -+ ], -+ "type": "number", -+ "unit": "Bps" -+ }, -+ { -+ "alias": "Namespace", -+ "colorMode": null, -+ "colors": [ -+ -+ ], -+ "dateFormat": "YYYY-MM-DD HH:mm:ss", -+ "decimals": 2, -+ "link": true, -+ "linkTargetBlank": false, -+ "linkTooltip": "Drill down to pods", -+ "linkUrl": "./d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell", -+ "pattern": "namespace", -+ "thresholds": [ -+ -+ ], -+ "type": "number", -+ "unit": "short" -+ }, -+ { -+ "alias": "", -+ "colorMode": null, -+ "colors": [ -+ -+ ], -+ "dateFormat": "YYYY-MM-DD HH:mm:ss", -+ "decimals": 2, -+ "pattern": "/.*/", -+ "thresholds": [ -+ -+ ], -+ "type": "string", -+ "unit": "short" -+ } -+ ], -+ "targets": [ -+ { -+ "expr": "sum by(namespace) (rate(container_fs_reads_total{container!=\"\", cluster=\"$cluster\"}[5m]))", -+ "format": "table", -+ "instant": true, -+ "intervalFactor": 2, -+ "legendFormat": "", -+ "refId": "A", -+ "step": 10 -+ }, -+ { -+ "expr": "sum by(namespace) (rate(container_fs_writes_total{container!=\"\", cluster=\"$cluster\"}[5m]))", -+ "format": "table", -+ "instant": true, -+ "intervalFactor": 2, -+ "legendFormat": "", -+ "refId": "B", -+ "step": 10 -+ }, -+ { -+ "expr": "sum by(namespace) (rate(container_fs_reads_total{container!=\"\", cluster=\"$cluster\"}[5m]) + rate(container_fs_writes_total{container!=\"\", cluster=\"$cluster\"}[5m]))", -+ "format": "table", -+ "instant": true, -+ "intervalFactor": 2, -+ "legendFormat": "", -+ "refId": "C", -+ "step": 10 -+ }, -+ { -+ "expr": "sum by(namespace) (rate(container_fs_reads_bytes_total{container!=\"\", cluster=\"$cluster\"}[5m]))", -+ "format": "table", -+ "instant": true, -+ "intervalFactor": 2, -+ "legendFormat": "", -+ "refId": "D", -+ "step": 10 -+ }, -+ { -+ "expr": "sum by(namespace) (rate(container_fs_writes_bytes_total{container!=\"\", cluster=\"$cluster\"}[5m]))", -+ "format": "table", -+ "instant": true, -+ "intervalFactor": 2, -+ "legendFormat": "", -+ "refId": "E", -+ "step": 10 -+ }, -+ { -+ "expr": "sum by(namespace) (rate(container_fs_reads_bytes_total{container!=\"\", cluster=\"$cluster\"}[5m]) + rate(container_fs_writes_bytes_total{container!=\"\", cluster=\"$cluster\"}[5m]))", -+ "format": "table", -+ "instant": true, -+ "intervalFactor": 2, -+ "legendFormat": "", -+ "refId": "F", -+ "step": 10 -+ } -+ ], -+ "thresholds": [ -+ -+ ], -+ "timeFrom": null, -+ "timeShift": null, -+ "title": "Current Storage IO", -+ "tooltip": { -+ "shared": false, -+ "sort": 0, -+ "value_type": "individual" -+ }, -+ "transform": "table", -+ "type": "table", -+ "xaxis": { -+ "buckets": null, -+ "mode": "time", -+ "name": null, -+ "show": true, -+ "values": [ -+ -+ ] -+ }, -+ "yaxes": [ -+ { -+ "format": "short", -+ "label": null, -+ "logBase": 1, -+ "max": null, -+ "min": 0, -+ "show": true -+ }, -+ { -+ "format": "short", -+ "label": null, -+ "logBase": 1, -+ "max": null, -+ "min": null, -+ "show": false -+ } -+ ] -+ } -+ ], -+ "repeat": null, -+ "repeatIteration": null, -+ "repeatRowId": null, -+ "showTitle": true, -+ "title": "Storage IO - Distribution", - "titleSize": "h6" - } - ], -@@ -2579,4 +3021,4 @@ +@@ -3021,4 +3021,4 @@ "uid": "efa86fd1d0c121a26444b636a3f509a8", "version": 0 } diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml.patch index b53b362fd..5175d614a 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml.patch @@ -1,11 +1,6 @@ --- charts-original/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml +++ charts/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml -@@ -4,11 +4,11 @@ - https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} --{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} -+{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +@@ -8,7 +8,7 @@ apiVersion: v1 kind: ConfigMap metadata: @@ -14,836 +9,7 @@ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "k8s-resources-namespace" | trunc 63 | trimSuffix "-" }} annotations: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} -@@ -78,7 +78,7 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}) / sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"})", -+ "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}) / sum(kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"})", - "format": "time_series", - "instant": true, - "intervalFactor": 2, -@@ -162,7 +162,7 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}) / sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"})", -+ "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}) / sum(kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"})", - "format": "time_series", - "instant": true, - "intervalFactor": 2, -@@ -246,7 +246,7 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\", image!=\"\"}) / sum(kube_pod_container_resource_requests_memory_bytes{namespace=\"$namespace\"})", -+ "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\", image!=\"\"}) / sum(kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"})", - "format": "time_series", - "instant": true, - "intervalFactor": 2, -@@ -256,7 +256,7 @@ - "thresholds": "70,80", - "timeFrom": null, - "timeShift": null, -- "title": "Memory Utilization (from requests)", -+ "title": "Memory Utilisation (from requests)", - "tooltip": { - "shared": false, - "sort": 0, -@@ -330,7 +330,7 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\", image!=\"\"}) / sum(kube_pod_container_resource_limits_memory_bytes{namespace=\"$namespace\"})", -+ "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\", image!=\"\"}) / sum(kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"})", - "format": "time_series", - "instant": true, - "intervalFactor": 2, -@@ -422,8 +422,9 @@ - "color": "#F2495C", - "dashes": true, - "fill": 0, -+ "hiddenSeries": true, - "hideTooltip": true, -- "legend": false, -+ "legend": true, - "linewidth": 2, - "stack": false - }, -@@ -432,8 +433,9 @@ - "color": "#FF9830", - "dashes": true, - "fill": 0, -+ "hiddenSeries": true, - "hideTooltip": true, -- "legend": false, -+ "legend": true, - "linewidth": 2, - "stack": false - } -@@ -704,7 +706,7 @@ - "step": 10 - }, - { -- "expr": "sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)", -+ "expr": "sum(kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}) by (pod)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -713,7 +715,7 @@ - "step": 10 - }, - { -- "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod) / sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)", -+ "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod) / sum(kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}) by (pod)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -722,7 +724,7 @@ - "step": 10 - }, - { -- "expr": "sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)", -+ "expr": "sum(kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}) by (pod)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -731,7 +733,7 @@ - "step": 10 - }, - { -- "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod) / sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)", -+ "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod) / sum(kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}) by (pod)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -828,8 +830,9 @@ - "color": "#F2495C", - "dashes": true, - "fill": 0, -+ "hiddenSeries": true, - "hideTooltip": true, -- "legend": false, -+ "legend": true, - "linewidth": 2, - "stack": false - }, -@@ -838,8 +841,9 @@ - "color": "#FF9830", - "dashes": true, - "fill": 0, -+ "hiddenSeries": true, - "hideTooltip": true, -- "legend": false, -+ "legend": true, - "linewidth": 2, - "stack": false - } -@@ -1167,7 +1171,7 @@ - "step": 10 - }, - { -- "expr": "sum(kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)", -+ "expr": "sum(kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}) by (pod)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -1176,7 +1180,7 @@ - "step": 10 - }, - { -- "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\", image!=\"\"}) by (pod) / sum(kube_pod_container_resource_requests_memory_bytes{namespace=\"$namespace\"}) by (pod)", -+ "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\", image!=\"\"}) by (pod) / sum(kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}) by (pod)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -1185,7 +1189,7 @@ - "step": 10 - }, - { -- "expr": "sum(kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)", -+ "expr": "sum(kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}) by (pod)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -1194,7 +1198,7 @@ - "step": 10 - }, - { -- "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\", image!=\"\"}) by (pod) / sum(kube_pod_container_resource_limits_memory_bytes{namespace=\"$namespace\"}) by (pod)", -+ "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\", image!=\"\"}) by (pod) / sum(kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}) by (pod)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -1578,7 +1582,7 @@ - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, -- "title": "Network", -+ "title": "Current Network Usage", - "titleSize": "h6" - }, - { -@@ -1618,7 +1622,7 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ -@@ -1670,19 +1674,7 @@ - "show": false - } - ] -- } -- ], -- "repeat": null, -- "repeatIteration": null, -- "repeatRowId": null, -- "showTitle": true, -- "title": "Network", -- "titleSize": "h6" -- }, -- { -- "collapse": false, -- "height": "250px", -- "panels": [ -+ }, - { - "aliasColors": { - -@@ -1716,7 +1708,7 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ -@@ -1774,7 +1766,7 @@ - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, -- "title": "Network", -+ "title": "Bandwidth", - "titleSize": "h6" - }, - { -@@ -1814,7 +1806,7 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ -@@ -1866,19 +1858,7 @@ - "show": false - } - ] -- } -- ], -- "repeat": null, -- "repeatIteration": null, -- "repeatRowId": null, -- "showTitle": true, -- "title": "Network", -- "titleSize": "h6" -- }, -- { -- "collapse": false, -- "height": "250px", -- "panels": [ -+ }, - { - "aliasColors": { - -@@ -1912,7 +1892,7 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ -@@ -1970,7 +1950,7 @@ - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, -- "title": "Network", -+ "title": "Rate of Packets", - "titleSize": "h6" - }, - { -@@ -2010,7 +1990,7 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ -@@ -2062,13 +2042,99 @@ - "show": false - } - ] -+ }, -+ { -+ "aliasColors": { -+ -+ }, -+ "bars": false, -+ "dashLength": 10, -+ "dashes": false, -+ "datasource": "$datasource", -+ "fill": 10, -+ "id": 15, -+ "legend": { -+ "avg": false, -+ "current": false, -+ "max": false, -+ "min": false, -+ "show": true, -+ "total": false, -+ "values": false -+ }, -+ "lines": true, -+ "linewidth": 0, -+ "links": [ -+ -+ ], -+ "nullPointMode": "null as zero", -+ "percentage": false, -+ "pointradius": 5, -+ "points": false, -+ "renderer": "flot", -+ "seriesOverrides": [ -+ -+ ], -+ "spaceLength": 10, -+ "span": 6, -+ "stack": true, -+ "steppedLine": false, -+ "targets": [ -+ { -+ "expr": "sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", -+ "format": "time_series", -+ "intervalFactor": 2, -+ "legendFormat": "{{`{{`}}pod{{`}}`}}", -+ "legendLink": null, -+ "step": 10 -+ } -+ ], -+ "thresholds": [ -+ -+ ], -+ "timeFrom": null, -+ "timeShift": null, -+ "title": "Rate of Transmitted Packets Dropped", -+ "tooltip": { -+ "shared": false, -+ "sort": 0, -+ "value_type": "individual" -+ }, -+ "type": "graph", -+ "xaxis": { -+ "buckets": null, -+ "mode": "time", -+ "name": null, -+ "show": true, -+ "values": [ -+ -+ ] -+ }, -+ "yaxes": [ -+ { -+ "format": "Bps", -+ "label": null, -+ "logBase": 1, -+ "max": null, -+ "min": 0, -+ "show": true -+ }, -+ { -+ "format": "short", -+ "label": null, -+ "logBase": 1, -+ "max": null, -+ "min": null, -+ "show": false -+ } -+ ] - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, -- "title": "Network", -+ "title": "Rate of Packets Dropped", - "titleSize": "h6" - }, - { -@@ -2083,8 +2149,9 @@ - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", -+ "decimals": -1, - "fill": 10, -- "id": 15, -+ "id": 16, - "legend": { - "avg": false, - "current": false, -@@ -2108,12 +2175,12 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { -- "expr": "sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (pod)", -+ "expr": "ceil(sum by(pod) (rate(container_fs_reads_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m]) + rate(container_fs_writes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m])))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -2126,7 +2193,93 @@ - ], - "timeFrom": null, - "timeShift": null, -- "title": "Rate of Transmitted Packets Dropped", -+ "title": "IOPS(Reads+Writes)", -+ "tooltip": { -+ "shared": false, -+ "sort": 0, -+ "value_type": "individual" -+ }, -+ "type": "graph", -+ "xaxis": { -+ "buckets": null, -+ "mode": "time", -+ "name": null, -+ "show": true, -+ "values": [ -+ -+ ] -+ }, -+ "yaxes": [ -+ { -+ "format": "short", -+ "label": null, -+ "logBase": 1, -+ "max": null, -+ "min": 0, -+ "show": true -+ }, -+ { -+ "format": "short", -+ "label": null, -+ "logBase": 1, -+ "max": null, -+ "min": null, -+ "show": false -+ } -+ ] -+ }, -+ { -+ "aliasColors": { -+ -+ }, -+ "bars": false, -+ "dashLength": 10, -+ "dashes": false, -+ "datasource": "$datasource", -+ "fill": 10, -+ "id": 17, -+ "legend": { -+ "avg": false, -+ "current": false, -+ "max": false, -+ "min": false, -+ "show": true, -+ "total": false, -+ "values": false -+ }, -+ "lines": true, -+ "linewidth": 0, -+ "links": [ -+ -+ ], -+ "nullPointMode": "null as zero", -+ "percentage": false, -+ "pointradius": 5, -+ "points": false, -+ "renderer": "flot", -+ "seriesOverrides": [ -+ -+ ], -+ "spaceLength": 10, -+ "span": 6, -+ "stack": true, -+ "steppedLine": false, -+ "targets": [ -+ { -+ "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m]) + rate(container_fs_writes_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m]))", -+ "format": "time_series", -+ "intervalFactor": 2, -+ "legendFormat": "{{`{{`}}pod{{`}}`}}", -+ "legendLink": null, -+ "step": 10 -+ } -+ ], -+ "thresholds": [ -+ -+ ], -+ "timeFrom": null, -+ "timeShift": null, -+ "title": "ThroughPut(Read+Write)", - "tooltip": { - "shared": false, - "sort": 0, -@@ -2166,7 +2319,312 @@ - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, -- "title": "Network", -+ "title": "Storage IO", -+ "titleSize": "h6" -+ }, -+ { -+ "collapse": false, -+ "height": "250px", -+ "panels": [ -+ { -+ "aliasColors": { -+ -+ }, -+ "bars": false, -+ "dashLength": 10, -+ "dashes": false, -+ "datasource": "$datasource", -+ "fill": 1, -+ "id": 18, -+ "legend": { -+ "avg": false, -+ "current": false, -+ "max": false, -+ "min": false, -+ "show": true, -+ "total": false, -+ "values": false -+ }, -+ "lines": true, -+ "linewidth": 1, -+ "links": [ -+ -+ ], -+ "nullPointMode": "null as zero", -+ "percentage": false, -+ "pointradius": 5, -+ "points": false, -+ "renderer": "flot", -+ "seriesOverrides": [ -+ -+ ], -+ "sort": { -+ "col": 4, -+ "desc": true -+ }, -+ "spaceLength": 10, -+ "span": 12, -+ "stack": false, -+ "steppedLine": false, -+ "styles": [ -+ { -+ "alias": "Time", -+ "dateFormat": "YYYY-MM-DD HH:mm:ss", -+ "pattern": "Time", -+ "type": "hidden" -+ }, -+ { -+ "alias": "IOPS(Reads)", -+ "colorMode": null, -+ "colors": [ -+ -+ ], -+ "dateFormat": "YYYY-MM-DD HH:mm:ss", -+ "decimals": -1, -+ "link": false, -+ "linkTargetBlank": false, -+ "linkTooltip": "Drill down", -+ "linkUrl": "", -+ "pattern": "Value #A", -+ "thresholds": [ -+ -+ ], -+ "type": "number", -+ "unit": "short" -+ }, -+ { -+ "alias": "IOPS(Writes)", -+ "colorMode": null, -+ "colors": [ -+ -+ ], -+ "dateFormat": "YYYY-MM-DD HH:mm:ss", -+ "decimals": -1, -+ "link": false, -+ "linkTargetBlank": false, -+ "linkTooltip": "Drill down", -+ "linkUrl": "", -+ "pattern": "Value #B", -+ "thresholds": [ -+ -+ ], -+ "type": "number", -+ "unit": "short" -+ }, -+ { -+ "alias": "IOPS(Reads + Writes)", -+ "colorMode": null, -+ "colors": [ -+ -+ ], -+ "dateFormat": "YYYY-MM-DD HH:mm:ss", -+ "decimals": -1, -+ "link": false, -+ "linkTargetBlank": false, -+ "linkTooltip": "Drill down", -+ "linkUrl": "", -+ "pattern": "Value #C", -+ "thresholds": [ -+ -+ ], -+ "type": "number", -+ "unit": "short" -+ }, -+ { -+ "alias": "Throughput(Read)", -+ "colorMode": null, -+ "colors": [ -+ -+ ], -+ "dateFormat": "YYYY-MM-DD HH:mm:ss", -+ "decimals": 2, -+ "link": false, -+ "linkTargetBlank": false, -+ "linkTooltip": "Drill down", -+ "linkUrl": "", -+ "pattern": "Value #D", -+ "thresholds": [ -+ -+ ], -+ "type": "number", -+ "unit": "Bps" -+ }, -+ { -+ "alias": "Throughput(Write)", -+ "colorMode": null, -+ "colors": [ -+ -+ ], -+ "dateFormat": "YYYY-MM-DD HH:mm:ss", -+ "decimals": 2, -+ "link": false, -+ "linkTargetBlank": false, -+ "linkTooltip": "Drill down", -+ "linkUrl": "", -+ "pattern": "Value #E", -+ "thresholds": [ -+ -+ ], -+ "type": "number", -+ "unit": "Bps" -+ }, -+ { -+ "alias": "Throughput(Read + Write)", -+ "colorMode": null, -+ "colors": [ -+ -+ ], -+ "dateFormat": "YYYY-MM-DD HH:mm:ss", -+ "decimals": 2, -+ "link": false, -+ "linkTargetBlank": false, -+ "linkTooltip": "Drill down", -+ "linkUrl": "", -+ "pattern": "Value #F", -+ "thresholds": [ -+ -+ ], -+ "type": "number", -+ "unit": "Bps" -+ }, -+ { -+ "alias": "Pod", -+ "colorMode": null, -+ "colors": [ -+ -+ ], -+ "dateFormat": "YYYY-MM-DD HH:mm:ss", -+ "decimals": 2, -+ "link": true, -+ "linkTargetBlank": false, -+ "linkTooltip": "Drill down to pods", -+ "linkUrl": "./d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", -+ "pattern": "pod", -+ "thresholds": [ -+ -+ ], -+ "type": "number", -+ "unit": "short" -+ }, -+ { -+ "alias": "", -+ "colorMode": null, -+ "colors": [ -+ -+ ], -+ "dateFormat": "YYYY-MM-DD HH:mm:ss", -+ "decimals": 2, -+ "pattern": "/.*/", -+ "thresholds": [ -+ -+ ], -+ "type": "string", -+ "unit": "short" -+ } -+ ], -+ "targets": [ -+ { -+ "expr": "sum by(pod) (rate(container_fs_reads_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m]))", -+ "format": "table", -+ "instant": true, -+ "intervalFactor": 2, -+ "legendFormat": "", -+ "refId": "A", -+ "step": 10 -+ }, -+ { -+ "expr": "sum by(pod) (rate(container_fs_writes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m]))", -+ "format": "table", -+ "instant": true, -+ "intervalFactor": 2, -+ "legendFormat": "", -+ "refId": "B", -+ "step": 10 -+ }, -+ { -+ "expr": "sum by(pod) (rate(container_fs_reads_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m]) + rate(container_fs_writes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m]))", -+ "format": "table", -+ "instant": true, -+ "intervalFactor": 2, -+ "legendFormat": "", -+ "refId": "C", -+ "step": 10 -+ }, -+ { -+ "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m]))", -+ "format": "table", -+ "instant": true, -+ "intervalFactor": 2, -+ "legendFormat": "", -+ "refId": "D", -+ "step": 10 -+ }, -+ { -+ "expr": "sum by(pod) (rate(container_fs_writes_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m]))", -+ "format": "table", -+ "instant": true, -+ "intervalFactor": 2, -+ "legendFormat": "", -+ "refId": "E", -+ "step": 10 -+ }, -+ { -+ "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m]) + rate(container_fs_writes_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\"}[5m]))", -+ "format": "table", -+ "instant": true, -+ "intervalFactor": 2, -+ "legendFormat": "", -+ "refId": "F", -+ "step": 10 -+ } -+ ], -+ "thresholds": [ -+ -+ ], -+ "timeFrom": null, -+ "timeShift": null, -+ "title": "Current Storage IO", -+ "tooltip": { -+ "shared": false, -+ "sort": 0, -+ "value_type": "individual" -+ }, -+ "transform": "table", -+ "type": "table", -+ "xaxis": { -+ "buckets": null, -+ "mode": "time", -+ "name": null, -+ "show": true, -+ "values": [ -+ -+ ] -+ }, -+ "yaxes": [ -+ { -+ "format": "short", -+ "label": null, -+ "logBase": 1, -+ "max": null, -+ "min": 0, -+ "show": true -+ }, -+ { -+ "format": "short", -+ "label": null, -+ "logBase": 1, -+ "max": null, -+ "min": null, -+ "show": false -+ } -+ ] -+ } -+ ], -+ "repeat": null, -+ "repeatIteration": null, -+ "repeatRowId": null, -+ "showTitle": true, -+ "title": "Storage IO - Distribution", - "titleSize": "h6" - } - ], -@@ -2209,7 +2667,7 @@ - - ], - "query": "label_values(kube_pod_info, cluster)", -- "refresh": 1, -+ "refresh": 2, - "regex": "", - "sort": 1, - "tagValuesQuery": "", -@@ -2236,7 +2694,7 @@ - - ], - "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)", -- "refresh": 1, -+ "refresh": 2, - "regex": "", - "sort": 1, - "tagValuesQuery": "", -@@ -2283,4 +2741,4 @@ +@@ -2741,4 +2741,4 @@ "uid": "85a562078cdf77779eaa1add43ccec1e", "version": 0 } diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-node.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-node.yaml.patch index 5b3f40e9e..c61c3624f 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-node.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-node.yaml.patch @@ -1,11 +1,6 @@ --- charts-original/templates/grafana/dashboards-1.14/k8s-resources-node.yaml +++ charts/templates/grafana/dashboards-1.14/k8s-resources-node.yaml -@@ -4,11 +4,11 @@ - https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} --{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} -+{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +@@ -8,7 +8,7 @@ apiVersion: v1 kind: ConfigMap metadata: @@ -14,96 +9,6 @@ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "k8s-resources-node" | trunc 63 | trimSuffix "-" }} annotations: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} -@@ -321,7 +321,7 @@ - "step": 10 - }, - { -- "expr": "sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", node=~\"$node\"}) by (pod)", -+ "expr": "sum(kube_pod_container_resource_requests{cluster=\"$cluster\", node=~\"$node\", resource=\"cpu\"}) by (pod)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -330,7 +330,7 @@ - "step": 10 - }, - { -- "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", node=~\"$node\"}) by (pod) / sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", node=~\"$node\"}) by (pod)", -+ "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", node=~\"$node\"}) by (pod) / sum(kube_pod_container_resource_requests{cluster=\"$cluster\", node=~\"$node\", resource=\"cpu\"}) by (pod)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -339,7 +339,7 @@ - "step": 10 - }, - { -- "expr": "sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", node=~\"$node\"}) by (pod)", -+ "expr": "sum(kube_pod_container_resource_limits{cluster=\"$cluster\", node=~\"$node\", resource=\"cpu\"}) by (pod)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -348,7 +348,7 @@ - "step": 10 - }, - { -- "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", node=~\"$node\"}) by (pod) / sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", node=~\"$node\"}) by (pod)", -+ "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", node=~\"$node\"}) by (pod) / sum(kube_pod_container_resource_limits{cluster=\"$cluster\", node=~\"$node\", resource=\"cpu\"}) by (pod)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -749,7 +749,7 @@ - "step": 10 - }, - { -- "expr": "sum(kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\", node=~\"$node\"}) by (pod)", -+ "expr": "sum(kube_pod_container_resource_requests{cluster=\"$cluster\", node=~\"$node\", resource=\"memory\"}) by (pod)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -758,7 +758,7 @@ - "step": 10 - }, - { -- "expr": "sum(node_namespace_pod_container:container_memory_working_set_bytes{cluster=\"$cluster\", node=~\"$node\",container!=\"\"}) by (pod) / sum(kube_pod_container_resource_requests_memory_bytes{node=~\"$node\"}) by (pod)", -+ "expr": "sum(node_namespace_pod_container:container_memory_working_set_bytes{cluster=\"$cluster\", node=~\"$node\",container!=\"\"}) by (pod) / sum(kube_pod_container_resource_requests{cluster=\"$cluster\", node=~\"$node\", resource=\"memory\"}) by (pod)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -767,7 +767,7 @@ - "step": 10 - }, - { -- "expr": "sum(kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\", node=~\"$node\"}) by (pod)", -+ "expr": "sum(kube_pod_container_resource_limits{cluster=\"$cluster\", node=~\"$node\", resource=\"memory\"}) by (pod)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -776,7 +776,7 @@ - "step": 10 - }, - { -- "expr": "sum(node_namespace_pod_container:container_memory_working_set_bytes{cluster=\"$cluster\", node=~\"$node\",container!=\"\"}) by (pod) / sum(kube_pod_container_resource_limits_memory_bytes{node=~\"$node\"}) by (pod)", -+ "expr": "sum(node_namespace_pod_container:container_memory_working_set_bytes{cluster=\"$cluster\", node=~\"$node\",container!=\"\"}) by (pod) / sum(kube_pod_container_resource_limits{cluster=\"$cluster\", node=~\"$node\", resource=\"memory\"}) by (pod)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -901,7 +901,7 @@ - - ], - "query": "label_values(kube_pod_info, cluster)", -- "refresh": 1, -+ "refresh": 2, - "regex": "", - "sort": 1, - "tagValuesQuery": "", -@@ -928,7 +928,7 @@ - - ], - "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, node)", -- "refresh": 1, -+ "refresh": 2, - "regex": "", - "sort": 1, - "tagValuesQuery": "", @@ -975,4 +975,4 @@ "uid": "200ac8fdbfbb74b39aff88118e4d1c2c", "version": 0 diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml.patch index a9cbf09bc..6a7a7351c 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml.patch @@ -1,11 +1,6 @@ --- charts-original/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml +++ charts/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml -@@ -4,11 +4,11 @@ - https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} --{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} -+{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +@@ -8,7 +8,7 @@ apiVersion: v1 kind: ConfigMap metadata: @@ -14,1160 +9,7 @@ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "k8s-resources-pod" | trunc 63 | trimSuffix "-" }} annotations: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} -@@ -94,7 +94,7 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\", cluster=\"$cluster\"}) by (container)", -+ "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{namespace=\"$namespace\", pod=\"$pod\", cluster=\"$cluster\"}) by (container)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{`{{`}}container{{`}}`}}", -@@ -102,7 +102,7 @@ - "step": 10 - }, - { -- "expr": "sum(\n kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"})\n", -+ "expr": "sum(\n kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", resource=\"cpu\"}\n)\n", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "requests", -@@ -110,7 +110,7 @@ - "step": 10 - }, - { -- "expr": "sum(\n kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"})\n", -+ "expr": "sum(\n kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", resource=\"cpu\"}\n)\n", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "limits", -@@ -208,7 +208,7 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "sum(increase(container_cpu_cfs_throttled_periods_total{namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\", container!=\"\", cluster=\"$cluster\"}[5m])) by (container) /sum(increase(container_cpu_cfs_periods_total{namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\", container!=\"\", cluster=\"$cluster\"}[5m])) by (container)", -+ "expr": "sum(increase(container_cpu_cfs_throttled_periods_total{namespace=\"$namespace\", pod=\"$pod\", container!=\"\", cluster=\"$cluster\"}[5m])) by (container) /sum(increase(container_cpu_cfs_periods_total{namespace=\"$namespace\", pod=\"$pod\", container!=\"\", cluster=\"$cluster\"}[5m])) by (container)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{`{{`}}container{{`}}`}}", -@@ -450,7 +450,7 @@ - ], - "targets": [ - { -- "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\"}) by (container)", -+ "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -459,7 +459,7 @@ - "step": 10 - }, - { -- "expr": "sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)", -+ "expr": "sum(kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", resource=\"cpu\"}) by (container)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -468,7 +468,7 @@ - "step": 10 - }, - { -- "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container) / sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)", -+ "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container) / sum(kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", resource=\"cpu\"}) by (container)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -477,7 +477,7 @@ - "step": 10 - }, - { -- "expr": "sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)", -+ "expr": "sum(kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", resource=\"cpu\"}) by (container)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -486,7 +486,7 @@ - "step": 10 - }, - { -- "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container) / sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)", -+ "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container) / sum(kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", resource=\"cpu\"}) by (container)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -584,7 +584,7 @@ - "dashes": true, - "fill": 0, - "hideTooltip": true, -- "legend": false, -+ "legend": true, - "linewidth": 2, - "stack": false - }, -@@ -594,7 +594,7 @@ - "dashes": true, - "fill": 0, - "hideTooltip": true, -- "legend": false, -+ "legend": true, - "linewidth": 2, - "stack": false - } -@@ -605,7 +605,7 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\", container!=\"\", image!=\"\"}) by (container)", -+ "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"\", image!=\"\"}) by (container)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{`{{`}}container{{`}}`}}", -@@ -613,7 +613,7 @@ - "step": 10 - }, - { -- "expr": "sum(\n kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"})\n", -+ "expr": "sum(\n kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", resource=\"memory\"}\n)\n", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "requests", -@@ -621,7 +621,7 @@ - "step": 10 - }, - { -- "expr": "sum(\n kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"})\n", -+ "expr": "sum(\n kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", resource=\"memory\"}\n)\n", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "limits", -@@ -634,7 +634,7 @@ - ], - "timeFrom": null, - "timeShift": null, -- "title": "Memory Usage", -+ "title": "Memory Usage (WSS)", - "tooltip": { - "shared": false, - "sort": 0, -@@ -725,7 +725,7 @@ - "type": "hidden" - }, - { -- "alias": "Memory Usage", -+ "alias": "Memory Usage (WSS)", - "colorMode": null, - "colors": [ - -@@ -913,7 +913,7 @@ - ], - "targets": [ - { -- "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\", container!=\"\", image!=\"\"}) by (container)", -+ "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"\", image!=\"\"}) by (container)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -922,7 +922,7 @@ - "step": 10 - }, - { -- "expr": "sum(kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)", -+ "expr": "sum(kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", resource=\"memory\"}) by (container)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -931,7 +931,7 @@ - "step": 10 - }, - { -- "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", image!=\"\"}) by (container) / sum(kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)", -+ "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", image!=\"\"}) by (container) / sum(kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", resource=\"memory\"}) by (container)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -940,7 +940,7 @@ - "step": 10 - }, - { -- "expr": "sum(kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"\"}) by (container)", -+ "expr": "sum(kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", resource=\"memory\"}) by (container)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -949,7 +949,7 @@ - "step": 10 - }, - { -- "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"\", image!=\"\"}) by (container) / sum(kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)", -+ "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"\", image!=\"\"}) by (container) / sum(kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", resource=\"memory\"}) by (container)", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -1072,12 +1072,12 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { -- "expr": "sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", -+ "expr": "sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1124,19 +1124,7 @@ - "show": false - } - ] -- } -- ], -- "repeat": null, -- "repeatIteration": null, -- "repeatRowId": null, -- "showTitle": true, -- "title": "Network", -- "titleSize": "h6" -- }, -- { -- "collapse": false, -- "height": "250px", -- "panels": [ -+ }, - { - "aliasColors": { - -@@ -1171,12 +1159,12 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { -- "expr": "sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", -+ "expr": "sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1229,7 +1217,7 @@ - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, -- "title": "Network", -+ "title": "Bandwidth", - "titleSize": "h6" - }, - { -@@ -1270,12 +1258,12 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { -- "expr": "sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", -+ "expr": "sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1322,19 +1310,7 @@ - "show": false - } - ] -- } -- ], -- "repeat": null, -- "repeatIteration": null, -- "repeatRowId": null, -- "showTitle": true, -- "title": "Network", -- "titleSize": "h6" -- }, -- { -- "collapse": false, -- "height": "250px", -- "panels": [ -+ }, - { - "aliasColors": { - -@@ -1369,12 +1345,12 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { -- "expr": "sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", -+ "expr": "sum(irate(container_network_transmit_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1427,7 +1403,7 @@ - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, -- "title": "Network", -+ "title": "Rate of Packets", - "titleSize": "h6" - }, - { -@@ -1468,12 +1444,12 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { -- "expr": "sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", -+ "expr": "sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{`{{`}}pod{{`}}`}}", -@@ -1520,13 +1496,100 @@ - "show": false - } - ] -+ }, -+ { -+ "aliasColors": { -+ -+ }, -+ "bars": false, -+ "dashLength": 10, -+ "dashes": false, -+ "datasource": "$datasource", -+ "fill": 10, -+ "id": 11, -+ "interval": "1m", -+ "legend": { -+ "avg": false, -+ "current": false, -+ "max": false, -+ "min": false, -+ "show": true, -+ "total": false, -+ "values": false -+ }, -+ "lines": true, -+ "linewidth": 0, -+ "links": [ -+ -+ ], -+ "nullPointMode": "null as zero", -+ "percentage": false, -+ "pointradius": 5, -+ "points": false, -+ "renderer": "flot", -+ "seriesOverrides": [ -+ -+ ], -+ "spaceLength": 10, -+ "span": 6, -+ "stack": true, -+ "steppedLine": false, -+ "targets": [ -+ { -+ "expr": "sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", -+ "format": "time_series", -+ "intervalFactor": 2, -+ "legendFormat": "{{`{{`}}pod{{`}}`}}", -+ "legendLink": null, -+ "step": 10 -+ } -+ ], -+ "thresholds": [ -+ -+ ], -+ "timeFrom": null, -+ "timeShift": null, -+ "title": "Rate of Transmitted Packets Dropped", -+ "tooltip": { -+ "shared": false, -+ "sort": 0, -+ "value_type": "individual" -+ }, -+ "type": "graph", -+ "xaxis": { -+ "buckets": null, -+ "mode": "time", -+ "name": null, -+ "show": true, -+ "values": [ -+ -+ ] -+ }, -+ "yaxes": [ -+ { -+ "format": "Bps", -+ "label": null, -+ "logBase": 1, -+ "max": null, -+ "min": 0, -+ "show": true -+ }, -+ { -+ "format": "short", -+ "label": null, -+ "logBase": 1, -+ "max": null, -+ "min": null, -+ "show": false -+ } -+ ] - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, -- "title": "Network", -+ "title": "Rate of Packets Dropped", - "titleSize": "h6" - }, - { -@@ -1541,9 +1604,9 @@ - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", -+ "decimals": -1, - "fill": 10, -- "id": 11, -- "interval": "1m", -+ "id": 12, - "legend": { - "avg": false, - "current": false, -@@ -1567,15 +1630,23 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { -- "expr": "sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", -+ "expr": "ceil(sum by(pod) (rate(container_fs_reads_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=~\"$pod\"}[5m])))", - "format": "time_series", - "intervalFactor": 2, -- "legendFormat": "{{`{{`}}pod{{`}}`}}", -+ "legendFormat": "Reads", -+ "legendLink": null, -+ "step": 10 -+ }, -+ { -+ "expr": "ceil(sum by(pod) (rate(container_fs_writes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=~\"$pod\"}[5m])))", -+ "format": "time_series", -+ "intervalFactor": 2, -+ "legendFormat": "Writes", - "legendLink": null, - "step": 10 - } -@@ -1585,7 +1656,101 @@ - ], - "timeFrom": null, - "timeShift": null, -- "title": "Rate of Transmitted Packets Dropped", -+ "title": "IOPS", -+ "tooltip": { -+ "shared": false, -+ "sort": 0, -+ "value_type": "individual" -+ }, -+ "type": "graph", -+ "xaxis": { -+ "buckets": null, -+ "mode": "time", -+ "name": null, -+ "show": true, -+ "values": [ -+ -+ ] -+ }, -+ "yaxes": [ -+ { -+ "format": "short", -+ "label": null, -+ "logBase": 1, -+ "max": null, -+ "min": 0, -+ "show": true -+ }, -+ { -+ "format": "short", -+ "label": null, -+ "logBase": 1, -+ "max": null, -+ "min": null, -+ "show": false -+ } -+ ] -+ }, -+ { -+ "aliasColors": { -+ -+ }, -+ "bars": false, -+ "dashLength": 10, -+ "dashes": false, -+ "datasource": "$datasource", -+ "fill": 10, -+ "id": 13, -+ "legend": { -+ "avg": false, -+ "current": false, -+ "max": false, -+ "min": false, -+ "show": true, -+ "total": false, -+ "values": false -+ }, -+ "lines": true, -+ "linewidth": 0, -+ "links": [ -+ -+ ], -+ "nullPointMode": "null as zero", -+ "percentage": false, -+ "pointradius": 5, -+ "points": false, -+ "renderer": "flot", -+ "seriesOverrides": [ -+ -+ ], -+ "spaceLength": 10, -+ "span": 6, -+ "stack": true, -+ "steppedLine": false, -+ "targets": [ -+ { -+ "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=~\"$pod\"}[5m]))", -+ "format": "time_series", -+ "intervalFactor": 2, -+ "legendFormat": "Reads", -+ "legendLink": null, -+ "step": 10 -+ }, -+ { -+ "expr": "sum by(pod) (rate(container_fs_writes_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=~\"$pod\"}[5m]))", -+ "format": "time_series", -+ "intervalFactor": 2, -+ "legendFormat": "Writes", -+ "legendLink": null, -+ "step": 10 -+ } -+ ], -+ "thresholds": [ -+ -+ ], -+ "timeFrom": null, -+ "timeShift": null, -+ "title": "ThroughPut", - "tooltip": { - "shared": false, - "sort": 0, -@@ -1625,42 +1790,532 @@ - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, -- "title": "Network", -+ "title": "Storage IO - Distribution(Pod - Read & Writes)", - "titleSize": "h6" -- } -- ], -- "schemaVersion": 14, -- "style": "dark", -- "tags": [ -- "kubernetes-mixin" -- ], -- "templating": { -- "list": [ -- { -- "current": { -- "text": "default", -- "value": "default" -- }, -- "hide": 0, -- "label": null, -- "name": "datasource", -- "options": [ -+ }, -+ { -+ "collapse": false, -+ "height": "250px", -+ "panels": [ -+ { -+ "aliasColors": { - -- ], -- "query": "prometheus", -- "refresh": 1, -- "regex": "", -- "type": "datasource" -- }, -- { -- "allValue": null, -- "current": { -- "text": "", -- "value": "" -- }, -- "datasource": "$datasource", -- "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, -- "includeAll": false, -+ }, -+ "bars": false, -+ "dashLength": 10, -+ "dashes": false, -+ "datasource": "$datasource", -+ "decimals": -1, -+ "fill": 10, -+ "id": 14, -+ "legend": { -+ "avg": false, -+ "current": false, -+ "max": false, -+ "min": false, -+ "show": true, -+ "total": false, -+ "values": false -+ }, -+ "lines": true, -+ "linewidth": 0, -+ "links": [ -+ -+ ], -+ "nullPointMode": "null as zero", -+ "percentage": false, -+ "pointradius": 5, -+ "points": false, -+ "renderer": "flot", -+ "seriesOverrides": [ -+ -+ ], -+ "spaceLength": 10, -+ "span": 6, -+ "stack": true, -+ "steppedLine": false, -+ "targets": [ -+ { -+ "expr": "ceil(sum by(container) (rate(container_fs_reads_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]) + rate(container_fs_writes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m])))", -+ "format": "time_series", -+ "intervalFactor": 2, -+ "legendFormat": "{{`{{`}}container{{`}}`}}", -+ "legendLink": null, -+ "step": 10 -+ } -+ ], -+ "thresholds": [ -+ -+ ], -+ "timeFrom": null, -+ "timeShift": null, -+ "title": "IOPS(Reads+Writes)", -+ "tooltip": { -+ "shared": false, -+ "sort": 0, -+ "value_type": "individual" -+ }, -+ "type": "graph", -+ "xaxis": { -+ "buckets": null, -+ "mode": "time", -+ "name": null, -+ "show": true, -+ "values": [ -+ -+ ] -+ }, -+ "yaxes": [ -+ { -+ "format": "short", -+ "label": null, -+ "logBase": 1, -+ "max": null, -+ "min": 0, -+ "show": true -+ }, -+ { -+ "format": "short", -+ "label": null, -+ "logBase": 1, -+ "max": null, -+ "min": null, -+ "show": false -+ } -+ ] -+ }, -+ { -+ "aliasColors": { -+ -+ }, -+ "bars": false, -+ "dashLength": 10, -+ "dashes": false, -+ "datasource": "$datasource", -+ "fill": 10, -+ "id": 15, -+ "legend": { -+ "avg": false, -+ "current": false, -+ "max": false, -+ "min": false, -+ "show": true, -+ "total": false, -+ "values": false -+ }, -+ "lines": true, -+ "linewidth": 0, -+ "links": [ -+ -+ ], -+ "nullPointMode": "null as zero", -+ "percentage": false, -+ "pointradius": 5, -+ "points": false, -+ "renderer": "flot", -+ "seriesOverrides": [ -+ -+ ], -+ "spaceLength": 10, -+ "span": 6, -+ "stack": true, -+ "steppedLine": false, -+ "targets": [ -+ { -+ "expr": "sum by(container) (rate(container_fs_reads_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]) + rate(container_fs_writes_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]))", -+ "format": "time_series", -+ "intervalFactor": 2, -+ "legendFormat": "{{`{{`}}container{{`}}`}}", -+ "legendLink": null, -+ "step": 10 -+ } -+ ], -+ "thresholds": [ -+ -+ ], -+ "timeFrom": null, -+ "timeShift": null, -+ "title": "ThroughPut(Read+Write)", -+ "tooltip": { -+ "shared": false, -+ "sort": 0, -+ "value_type": "individual" -+ }, -+ "type": "graph", -+ "xaxis": { -+ "buckets": null, -+ "mode": "time", -+ "name": null, -+ "show": true, -+ "values": [ -+ -+ ] -+ }, -+ "yaxes": [ -+ { -+ "format": "Bps", -+ "label": null, -+ "logBase": 1, -+ "max": null, -+ "min": 0, -+ "show": true -+ }, -+ { -+ "format": "short", -+ "label": null, -+ "logBase": 1, -+ "max": null, -+ "min": null, -+ "show": false -+ } -+ ] -+ } -+ ], -+ "repeat": null, -+ "repeatIteration": null, -+ "repeatRowId": null, -+ "showTitle": true, -+ "title": "Storage IO - Distribution(Containers)", -+ "titleSize": "h6" -+ }, -+ { -+ "collapse": false, -+ "height": "250px", -+ "panels": [ -+ { -+ "aliasColors": { -+ -+ }, -+ "bars": false, -+ "dashLength": 10, -+ "dashes": false, -+ "datasource": "$datasource", -+ "fill": 1, -+ "id": 16, -+ "legend": { -+ "avg": false, -+ "current": false, -+ "max": false, -+ "min": false, -+ "show": true, -+ "total": false, -+ "values": false -+ }, -+ "lines": true, -+ "linewidth": 1, -+ "links": [ -+ -+ ], -+ "nullPointMode": "null as zero", -+ "percentage": false, -+ "pointradius": 5, -+ "points": false, -+ "renderer": "flot", -+ "seriesOverrides": [ -+ -+ ], -+ "sort": { -+ "col": 4, -+ "desc": true -+ }, -+ "spaceLength": 10, -+ "span": 12, -+ "stack": false, -+ "steppedLine": false, -+ "styles": [ -+ { -+ "alias": "Time", -+ "dateFormat": "YYYY-MM-DD HH:mm:ss", -+ "pattern": "Time", -+ "type": "hidden" -+ }, -+ { -+ "alias": "IOPS(Reads)", -+ "colorMode": null, -+ "colors": [ -+ -+ ], -+ "dateFormat": "YYYY-MM-DD HH:mm:ss", -+ "decimals": -1, -+ "link": false, -+ "linkTargetBlank": false, -+ "linkTooltip": "Drill down", -+ "linkUrl": "", -+ "pattern": "Value #A", -+ "thresholds": [ -+ -+ ], -+ "type": "number", -+ "unit": "short" -+ }, -+ { -+ "alias": "IOPS(Writes)", -+ "colorMode": null, -+ "colors": [ -+ -+ ], -+ "dateFormat": "YYYY-MM-DD HH:mm:ss", -+ "decimals": -1, -+ "link": false, -+ "linkTargetBlank": false, -+ "linkTooltip": "Drill down", -+ "linkUrl": "", -+ "pattern": "Value #B", -+ "thresholds": [ -+ -+ ], -+ "type": "number", -+ "unit": "short" -+ }, -+ { -+ "alias": "IOPS(Reads + Writes)", -+ "colorMode": null, -+ "colors": [ -+ -+ ], -+ "dateFormat": "YYYY-MM-DD HH:mm:ss", -+ "decimals": -1, -+ "link": false, -+ "linkTargetBlank": false, -+ "linkTooltip": "Drill down", -+ "linkUrl": "", -+ "pattern": "Value #C", -+ "thresholds": [ -+ -+ ], -+ "type": "number", -+ "unit": "short" -+ }, -+ { -+ "alias": "Throughput(Read)", -+ "colorMode": null, -+ "colors": [ -+ -+ ], -+ "dateFormat": "YYYY-MM-DD HH:mm:ss", -+ "decimals": 2, -+ "link": false, -+ "linkTargetBlank": false, -+ "linkTooltip": "Drill down", -+ "linkUrl": "", -+ "pattern": "Value #D", -+ "thresholds": [ -+ -+ ], -+ "type": "number", -+ "unit": "Bps" -+ }, -+ { -+ "alias": "Throughput(Write)", -+ "colorMode": null, -+ "colors": [ -+ -+ ], -+ "dateFormat": "YYYY-MM-DD HH:mm:ss", -+ "decimals": 2, -+ "link": false, -+ "linkTargetBlank": false, -+ "linkTooltip": "Drill down", -+ "linkUrl": "", -+ "pattern": "Value #E", -+ "thresholds": [ -+ -+ ], -+ "type": "number", -+ "unit": "Bps" -+ }, -+ { -+ "alias": "Throughput(Read + Write)", -+ "colorMode": null, -+ "colors": [ -+ -+ ], -+ "dateFormat": "YYYY-MM-DD HH:mm:ss", -+ "decimals": 2, -+ "link": false, -+ "linkTargetBlank": false, -+ "linkTooltip": "Drill down", -+ "linkUrl": "", -+ "pattern": "Value #F", -+ "thresholds": [ -+ -+ ], -+ "type": "number", -+ "unit": "Bps" -+ }, -+ { -+ "alias": "Container", -+ "colorMode": null, -+ "colors": [ -+ -+ ], -+ "dateFormat": "YYYY-MM-DD HH:mm:ss", -+ "decimals": 2, -+ "link": false, -+ "linkTargetBlank": false, -+ "linkTooltip": "Drill down", -+ "linkUrl": "", -+ "pattern": "container", -+ "thresholds": [ -+ -+ ], -+ "type": "number", -+ "unit": "short" -+ }, -+ { -+ "alias": "", -+ "colorMode": null, -+ "colors": [ -+ -+ ], -+ "dateFormat": "YYYY-MM-DD HH:mm:ss", -+ "decimals": 2, -+ "pattern": "/.*/", -+ "thresholds": [ -+ -+ ], -+ "type": "string", -+ "unit": "short" -+ } -+ ], -+ "targets": [ -+ { -+ "expr": "sum by(container) (rate(container_fs_reads_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]))", -+ "format": "table", -+ "instant": true, -+ "intervalFactor": 2, -+ "legendFormat": "", -+ "refId": "A", -+ "step": 10 -+ }, -+ { -+ "expr": "sum by(container) (rate(container_fs_writes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]))", -+ "format": "table", -+ "instant": true, -+ "intervalFactor": 2, -+ "legendFormat": "", -+ "refId": "B", -+ "step": 10 -+ }, -+ { -+ "expr": "sum by(container) (rate(container_fs_reads_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]) + rate(container_fs_writes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]))", -+ "format": "table", -+ "instant": true, -+ "intervalFactor": 2, -+ "legendFormat": "", -+ "refId": "C", -+ "step": 10 -+ }, -+ { -+ "expr": "sum by(container) (rate(container_fs_reads_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]))", -+ "format": "table", -+ "instant": true, -+ "intervalFactor": 2, -+ "legendFormat": "", -+ "refId": "D", -+ "step": 10 -+ }, -+ { -+ "expr": "sum by(container) (rate(container_fs_writes_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]))", -+ "format": "table", -+ "instant": true, -+ "intervalFactor": 2, -+ "legendFormat": "", -+ "refId": "E", -+ "step": 10 -+ }, -+ { -+ "expr": "sum by(container) (rate(container_fs_reads_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]) + rate(container_fs_writes_bytes_total{container!=\"\", cluster=\"$cluster\",namespace=~\"$namespace\", pod=\"$pod\"}[5m]))", -+ "format": "table", -+ "instant": true, -+ "intervalFactor": 2, -+ "legendFormat": "", -+ "refId": "F", -+ "step": 10 -+ } -+ ], -+ "thresholds": [ -+ -+ ], -+ "timeFrom": null, -+ "timeShift": null, -+ "title": "Current Storage IO", -+ "tooltip": { -+ "shared": false, -+ "sort": 0, -+ "value_type": "individual" -+ }, -+ "transform": "table", -+ "type": "table", -+ "xaxis": { -+ "buckets": null, -+ "mode": "time", -+ "name": null, -+ "show": true, -+ "values": [ -+ -+ ] -+ }, -+ "yaxes": [ -+ { -+ "format": "short", -+ "label": null, -+ "logBase": 1, -+ "max": null, -+ "min": 0, -+ "show": true -+ }, -+ { -+ "format": "short", -+ "label": null, -+ "logBase": 1, -+ "max": null, -+ "min": null, -+ "show": false -+ } -+ ] -+ } -+ ], -+ "repeat": null, -+ "repeatIteration": null, -+ "repeatRowId": null, -+ "showTitle": true, -+ "title": "Storage IO - Distribution", -+ "titleSize": "h6" -+ } -+ ], -+ "schemaVersion": 14, -+ "style": "dark", -+ "tags": [ -+ "kubernetes-mixin" -+ ], -+ "templating": { -+ "list": [ -+ { -+ "current": { -+ "text": "default", -+ "value": "default" -+ }, -+ "hide": 0, -+ "label": null, -+ "name": "datasource", -+ "options": [ -+ -+ ], -+ "query": "prometheus", -+ "refresh": 1, -+ "regex": "", -+ "type": "datasource" -+ }, -+ { -+ "allValue": null, -+ "current": { -+ "text": "", -+ "value": "" -+ }, -+ "datasource": "$datasource", -+ "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, -+ "includeAll": false, - "label": null, - "multi": false, - "name": "cluster", -@@ -1668,7 +2323,7 @@ - - ], - "query": "label_values(kube_pod_info, cluster)", -- "refresh": 1, -+ "refresh": 2, - "regex": "", - "sort": 1, - "tagValuesQuery": "", -@@ -1695,7 +2350,7 @@ - - ], - "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)", -- "refresh": 1, -+ "refresh": 2, - "regex": "", - "sort": 1, - "tagValuesQuery": "", -@@ -1769,4 +2424,4 @@ +@@ -2424,4 +2424,4 @@ "uid": "6581e46e4e5c7ba40a07646395ef7b23", "version": 0 } diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml.patch index 597bd593d..1e33b2ceb 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml.patch @@ -1,11 +1,6 @@ --- charts-original/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml +++ charts/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml -@@ -4,11 +4,11 @@ - https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} --{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} -+{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +@@ -8,7 +8,7 @@ apiVersion: v1 kind: ConfigMap metadata: @@ -14,316 +9,7 @@ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "k8s-resources-workload" | trunc 63 | trimSuffix "-" }} annotations: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} -@@ -321,7 +321,7 @@ - "step": 10 - }, - { -- "expr": "sum(\n kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", -+ "expr": "sum(\n kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -330,7 +330,7 @@ - "step": 10 - }, - { -- "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", -+ "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -339,7 +339,7 @@ - "step": 10 - }, - { -- "expr": "sum(\n kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", -+ "expr": "sum(\n kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -348,7 +348,7 @@ - "step": 10 - }, - { -- "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", -+ "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -692,7 +692,7 @@ - "step": 10 - }, - { -- "expr": "sum(\n kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", -+ "expr": "sum(\n kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -701,7 +701,7 @@ - "step": 10 - }, - { -- "expr": "sum(\n container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", -+ "expr": "sum(\n container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -710,7 +710,7 @@ - "step": 10 - }, - { -- "expr": "sum(\n kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", -+ "expr": "sum(\n kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -719,7 +719,7 @@ - "step": 10 - }, - { -- "expr": "sum(\n container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", -+ "expr": "sum(\n container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -1076,7 +1076,7 @@ - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, -- "title": "Network", -+ "title": "Current Network Usage", - "titleSize": "h6" - }, - { -@@ -1116,7 +1116,7 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ -@@ -1168,19 +1168,7 @@ - "show": false - } - ] -- } -- ], -- "repeat": null, -- "repeatIteration": null, -- "repeatRowId": null, -- "showTitle": true, -- "title": "Network", -- "titleSize": "h6" -- }, -- { -- "collapse": false, -- "height": "250px", -- "panels": [ -+ }, - { - "aliasColors": { - -@@ -1214,7 +1202,7 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ -@@ -1272,7 +1260,7 @@ - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, -- "title": "Network", -+ "title": "Bandwidth", - "titleSize": "h6" - }, - { -@@ -1312,7 +1300,7 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ -@@ -1364,19 +1352,7 @@ - "show": false - } - ] -- } -- ], -- "repeat": null, -- "repeatIteration": null, -- "repeatRowId": null, -- "showTitle": true, -- "title": "Network", -- "titleSize": "h6" -- }, -- { -- "collapse": false, -- "height": "250px", -- "panels": [ -+ }, - { - "aliasColors": { - -@@ -1410,7 +1386,7 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ -@@ -1468,7 +1444,7 @@ - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, -- "title": "Network", -+ "title": "Average Container Bandwidth by Pod", - "titleSize": "h6" - }, - { -@@ -1508,7 +1484,7 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ -@@ -1560,19 +1536,7 @@ - "show": false - } - ] -- } -- ], -- "repeat": null, -- "repeatIteration": null, -- "repeatRowId": null, -- "showTitle": true, -- "title": "Network", -- "titleSize": "h6" -- }, -- { -- "collapse": false, -- "height": "250px", -- "panels": [ -+ }, - { - "aliasColors": { - -@@ -1606,7 +1570,7 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ -@@ -1664,7 +1628,7 @@ - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, -- "title": "Network", -+ "title": "Rate of Packets", - "titleSize": "h6" - }, - { -@@ -1704,7 +1668,7 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ -@@ -1756,19 +1720,7 @@ - "show": false - } - ] -- } -- ], -- "repeat": null, -- "repeatIteration": null, -- "repeatRowId": null, -- "showTitle": true, -- "title": "Network", -- "titleSize": "h6" -- }, -- { -- "collapse": false, -- "height": "250px", -- "panels": [ -+ }, - { - "aliasColors": { - -@@ -1802,7 +1754,7 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ -@@ -1860,7 +1812,7 @@ - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, -- "title": "Network", -+ "title": "Rate of Packets Dropped", - "titleSize": "h6" - } - ], -@@ -1903,7 +1855,7 @@ - - ], - "query": "label_values(kube_pod_info, cluster)", -- "refresh": 1, -+ "refresh": 2, - "regex": "", - "sort": 1, - "tagValuesQuery": "", -@@ -1930,7 +1882,7 @@ - - ], - "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)", -- "refresh": 1, -+ "refresh": 2, - "regex": "", - "sort": 1, - "tagValuesQuery": "", -@@ -1957,7 +1909,7 @@ - - ], - "query": "label_values(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\"}, workload)", -- "refresh": 1, -+ "refresh": 2, - "regex": "", - "sort": 1, - "tagValuesQuery": "", -@@ -1984,7 +1936,7 @@ - - ], - "query": "label_values(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\"}, workload_type)", -- "refresh": 1, -+ "refresh": 2, - "regex": "", - "sort": 1, - "tagValuesQuery": "", -@@ -2031,4 +1983,4 @@ +@@ -1983,4 +1983,4 @@ "uid": "a164a7f0339f99e89cea5cb47e9be617", "version": 0 } diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml.patch index b8686fd60..a43bf5a77 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml.patch @@ -1,11 +1,6 @@ --- charts-original/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml +++ charts/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml -@@ -4,11 +4,11 @@ - https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} --{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} -+{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +@@ -8,7 +8,7 @@ apiVersion: v1 kind: ConfigMap metadata: @@ -14,405 +9,7 @@ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "k8s-resources-workloads-namespace" | trunc 63 | trimSuffix "-" }} annotations: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} -@@ -74,8 +74,9 @@ - "color": "#F2495C", - "dashes": true, - "fill": 0, -+ "hiddenSeries": true, - "hideTooltip": true, -- "legend": false, -+ "legend": true, - "linewidth": 2, - "stack": false - }, -@@ -84,8 +85,9 @@ - "color": "#FF9830", - "dashes": true, - "fill": 0, -+ "hiddenSeries": true, - "hideTooltip": true, -- "legend": false, -+ "legend": true, - "linewidth": 2, - "stack": false - } -@@ -403,7 +405,7 @@ - "step": 10 - }, - { -- "expr": "sum(\n kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", -+ "expr": "sum(\n kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -412,7 +414,7 @@ - "step": 10 - }, - { -- "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", -+ "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -421,7 +423,7 @@ - "step": 10 - }, - { -- "expr": "sum(\n kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", -+ "expr": "sum(\n kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -430,7 +432,7 @@ - "step": 10 - }, - { -- "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", -+ "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -527,8 +529,9 @@ - "color": "#F2495C", - "dashes": true, - "fill": 0, -+ "hiddenSeries": true, - "hideTooltip": true, -- "legend": false, -+ "legend": true, - "linewidth": 2, - "stack": false - }, -@@ -537,8 +540,9 @@ - "color": "#FF9830", - "dashes": true, - "fill": 0, -+ "hiddenSeries": true, - "hideTooltip": true, -- "legend": false, -+ "legend": true, - "linewidth": 2, - "stack": false - } -@@ -856,7 +860,7 @@ - "step": 10 - }, - { -- "expr": "sum(\n kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", -+ "expr": "sum(\n kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -865,7 +869,7 @@ - "step": 10 - }, - { -- "expr": "sum(\n container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", -+ "expr": "sum(\n container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -874,7 +878,7 @@ - "step": 10 - }, - { -- "expr": "sum(\n kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", -+ "expr": "sum(\n kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -883,7 +887,7 @@ - "step": 10 - }, - { -- "expr": "sum(\n container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", -+ "expr": "sum(\n container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", - "format": "table", - "instant": true, - "intervalFactor": 2, -@@ -1259,7 +1263,7 @@ - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, -- "title": "Network", -+ "title": "Current Network Usage", - "titleSize": "h6" - }, - { -@@ -1299,7 +1303,7 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ -@@ -1351,19 +1355,7 @@ - "show": false - } - ] -- } -- ], -- "repeat": null, -- "repeatIteration": null, -- "repeatRowId": null, -- "showTitle": true, -- "title": "Network", -- "titleSize": "h6" -- }, -- { -- "collapse": false, -- "height": "250px", -- "panels": [ -+ }, - { - "aliasColors": { - -@@ -1397,7 +1389,7 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ -@@ -1455,7 +1447,7 @@ - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, -- "title": "Network", -+ "title": "Bandwidth", - "titleSize": "h6" - }, - { -@@ -1495,7 +1487,7 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ -@@ -1547,19 +1539,7 @@ - "show": false - } - ] -- } -- ], -- "repeat": null, -- "repeatIteration": null, -- "repeatRowId": null, -- "showTitle": true, -- "title": "Network", -- "titleSize": "h6" -- }, -- { -- "collapse": false, -- "height": "250px", -- "panels": [ -+ }, - { - "aliasColors": { - -@@ -1593,7 +1573,7 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ -@@ -1651,7 +1631,7 @@ - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, -- "title": "Network", -+ "title": "Average Container Bandwidth by Workload", - "titleSize": "h6" - }, - { -@@ -1691,7 +1671,7 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ -@@ -1743,19 +1723,7 @@ - "show": false - } - ] -- } -- ], -- "repeat": null, -- "repeatIteration": null, -- "repeatRowId": null, -- "showTitle": true, -- "title": "Network", -- "titleSize": "h6" -- }, -- { -- "collapse": false, -- "height": "250px", -- "panels": [ -+ }, - { - "aliasColors": { - -@@ -1789,7 +1757,7 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ -@@ -1847,7 +1815,7 @@ - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, -- "title": "Network", -+ "title": "Rate of Packets", - "titleSize": "h6" - }, - { -@@ -1887,7 +1855,7 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ -@@ -1939,19 +1907,7 @@ - "show": false - } - ] -- } -- ], -- "repeat": null, -- "repeatIteration": null, -- "repeatRowId": null, -- "showTitle": true, -- "title": "Network", -- "titleSize": "h6" -- }, -- { -- "collapse": false, -- "height": "250px", -- "panels": [ -+ }, - { - "aliasColors": { - -@@ -1985,7 +1941,7 @@ - - ], - "spaceLength": 10, -- "span": 12, -+ "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ -@@ -2043,7 +1999,7 @@ - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, -- "title": "Network", -+ "title": "Rate of Packets Dropped", - "titleSize": "h6" - } - ], -@@ -2072,28 +2028,23 @@ - }, - { - "allValue": null, -- "auto": false, -- "auto_count": 30, -- "auto_min": "10s", - "current": { -- "text": "deployment", -- "value": "deployment" -+ "text": "", -+ "value": "" - }, - "datasource": "$datasource", -- "definition": "label_values(namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\".+\"}, workload_type)", -- "hide": 0, -+ "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, - "includeAll": false, - "label": null, - "multi": false, -- "name": "type", -+ "name": "cluster", - "options": [ - - ], -- "query": "label_values(namespace_workload_pod:kube_pod_owner:relabel{namespace=~\"$namespace\", workload=~\".+\"}, workload_type)", -- "refresh": 1, -+ "query": "label_values(kube_pod_info, cluster)", -+ "refresh": 2, - "regex": "", -- "skipUrlSync": false, -- "sort": 0, -+ "sort": 1, - "tagValuesQuery": "", - "tags": [ - -@@ -2104,23 +2055,28 @@ - }, - { - "allValue": null, -+ "auto": false, -+ "auto_count": 30, -+ "auto_min": "10s", - "current": { -- "text": "", -- "value": "" -+ "text": "deployment", -+ "value": "deployment" - }, - "datasource": "$datasource", -- "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, -+ "definition": "label_values(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\".+\"}, workload_type)", -+ "hide": 0, - "includeAll": false, - "label": null, - "multi": false, -- "name": "cluster", -+ "name": "type", - "options": [ - - ], -- "query": "label_values(kube_pod_info, cluster)", -- "refresh": 1, -+ "query": "label_values(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\".+\"}, workload_type)", -+ "refresh": 2, - "regex": "", -- "sort": 1, -+ "skipUrlSync": false, -+ "sort": 0, - "tagValuesQuery": "", - "tags": [ - -@@ -2145,7 +2101,7 @@ - - ], - "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)", -- "refresh": 1, -+ "refresh": 2, - "regex": "", - "sort": 1, - "tagValuesQuery": "", -@@ -2192,4 +2148,4 @@ +@@ -2148,4 +2148,4 @@ "uid": "a87fb0d919ec0ea5f6543124e16c42a5", "version": 0 } diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/kubelet.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/kubelet.yaml.patch index 5ffca2a75..05c7db52f 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/kubelet.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/kubelet.yaml.patch @@ -4,7 +4,7 @@ https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack */ -}} {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} --{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.kubelet.enabled }} +-{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled .Values.kubelet.enabled }} +{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +{{- if (include "exporter.kubelet.enabled" .) }} apiVersion: v1 @@ -19,20 +19,11 @@ "tableColumn": "", "targets": [ { -- "expr": "sum(up{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\"})", +- "expr": "sum(kubelet_node_name{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\"})", + "expr": "sum(kubelet_node_name{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\"})", "format": "time_series", "intervalFactor": 2, "legendFormat": "", -@@ -115,7 +116,7 @@ - } - ], - "thresholds": "", -- "title": "Up", -+ "title": "Running Kubelets", - "tooltip": { - "shared": false - }, @@ -191,7 +192,7 @@ "tableColumn": "", "targets": [ diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-pod.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-pod.yaml.patch index 463956b42..2ad27f168 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-pod.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-pod.yaml.patch @@ -1,11 +1,6 @@ --- charts-original/templates/grafana/dashboards-1.14/namespace-by-pod.yaml +++ charts/templates/grafana/dashboards-1.14/namespace-by-pod.yaml -@@ -4,11 +4,11 @@ - https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} --{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} -+{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +@@ -8,7 +8,7 @@ apiVersion: v1 kind: ConfigMap metadata: @@ -14,7 +9,7 @@ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "namespace-by-pod" | trunc 63 | trimSuffix "-" }} annotations: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} -@@ -1295,14 +1295,14 @@ +@@ -1295,7 +1295,7 @@ "datasource": "$datasource", "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, "includeAll": false, @@ -23,23 +18,6 @@ "multi": false, "name": "cluster", "options": [ - - ], - "query": "label_values(kube_pod_info, cluster)", -- "refresh": 1, -+ "refresh": 2, - "regex": "", - "sort": 0, - "tagValuesQuery": "", -@@ -1333,7 +1333,7 @@ - - ], - "query": "label_values(container_network_receive_packets_total{cluster=\"$cluster\"}, namespace)", -- "refresh": 1, -+ "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 1, @@ -1461,4 +1461,4 @@ "uid": "8b7a8b326d7a6f1f04244066368c67af", "version": 0 diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-workload.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-workload.yaml.patch index eab6fac83..34b63f126 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-workload.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-workload.yaml.patch @@ -1,11 +1,6 @@ --- charts-original/templates/grafana/dashboards-1.14/namespace-by-workload.yaml +++ charts/templates/grafana/dashboards-1.14/namespace-by-workload.yaml -@@ -4,11 +4,11 @@ - https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} --{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} -+{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +@@ -8,7 +8,7 @@ apiVersion: v1 kind: ConfigMap metadata: @@ -14,7 +9,7 @@ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "namespace-by-workload" | trunc 63 | trimSuffix "-" }} annotations: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} -@@ -1535,14 +1535,14 @@ +@@ -1535,7 +1535,7 @@ "datasource": "$datasource", "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, "includeAll": false, @@ -23,32 +18,6 @@ "multi": false, "name": "cluster", "options": [ - - ], - "query": "label_values(kube_pod_info, cluster)", -- "refresh": 1, -+ "refresh": 2, - "regex": "", - "sort": 0, - "tagValuesQuery": "", -@@ -1573,7 +1573,7 @@ - - ], - "query": "label_values(container_network_receive_packets_total{cluster=\"$cluster\"}, namespace)", -- "refresh": 1, -+ "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 1, -@@ -1605,7 +1605,7 @@ - - ], - "query": "label_values(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\".+\"}, workload_type)", -- "refresh": 1, -+ "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, @@ -1733,4 +1733,4 @@ "uid": "bbb2a765a623ae38130206c7d94a160f", "version": 0 diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/node-cluster-rsrc-use.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/node-cluster-rsrc-use.yaml.patch index 009382f43..240e318f4 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/node-cluster-rsrc-use.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/node-cluster-rsrc-use.yaml.patch @@ -1,11 +1,6 @@ --- charts-original/templates/grafana/dashboards-1.14/node-cluster-rsrc-use.yaml +++ charts/templates/grafana/dashboards-1.14/node-cluster-rsrc-use.yaml -@@ -4,11 +4,11 @@ - https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} --{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.nodeExporter.enabled }} -+{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled .Values.nodeExporter.enabled }} +@@ -8,7 +8,7 @@ apiVersion: v1 kind: ConfigMap metadata: @@ -14,159 +9,6 @@ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "node-cluster-rsrc-use" | trunc 63 | trimSuffix "-" }} annotations: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} -@@ -77,7 +77,7 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "(\n instance:node_cpu_utilisation:rate1m{job=\"node-exporter\"}\n*\n instance:node_num_cpu:sum{job=\"node-exporter\"}\n)\n/ scalar(sum(instance:node_num_cpu:sum{job=\"node-exporter\"}))\n", -+ "expr": "(\n instance:node_cpu_utilisation:rate5m{job=\"node-exporter\"}\n*\n instance:node_num_cpu:sum{job=\"node-exporter\"}\n)\n/ scalar(sum(instance:node_num_cpu:sum{job=\"node-exporter\"}))\n", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{`{{`}}instance{{`}}`}}", -@@ -92,7 +92,7 @@ - "timeShift": null, - "title": "CPU Utilisation", - "tooltip": { -- "shared": true, -+ "shared": false, - "sort": 0, - "value_type": "individual" - }, -@@ -178,7 +178,7 @@ - "timeShift": null, - "title": "CPU Saturation (load1 per CPU)", - "tooltip": { -- "shared": true, -+ "shared": false, - "sort": 0, - "value_type": "individual" - }, -@@ -276,7 +276,7 @@ - "timeShift": null, - "title": "Memory Utilisation", - "tooltip": { -- "shared": true, -+ "shared": false, - "sort": 0, - "value_type": "individual" - }, -@@ -347,7 +347,7 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "instance:node_vmstat_pgmajfault:rate1m{job=\"node-exporter\"}", -+ "expr": "instance:node_vmstat_pgmajfault:rate5m{job=\"node-exporter\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{`{{`}}instance{{`}}`}}", -@@ -362,7 +362,7 @@ - "timeShift": null, - "title": "Memory Saturation (Major Page Faults)", - "tooltip": { -- "shared": true, -+ "shared": false, - "sort": 0, - "value_type": "individual" - }, -@@ -453,7 +453,7 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "instance:node_network_receive_bytes_excluding_lo:rate1m{job=\"node-exporter\"}", -+ "expr": "instance:node_network_receive_bytes_excluding_lo:rate5m{job=\"node-exporter\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{`{{`}}instance{{`}}`}} Receive", -@@ -461,7 +461,7 @@ - "step": 10 - }, - { -- "expr": "instance:node_network_transmit_bytes_excluding_lo:rate1m{job=\"node-exporter\"}", -+ "expr": "instance:node_network_transmit_bytes_excluding_lo:rate5m{job=\"node-exporter\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{`{{`}}instance{{`}}`}} Transmit", -@@ -476,7 +476,7 @@ - "timeShift": null, - "title": "Net Utilisation (Bytes Receive/Transmit)", - "tooltip": { -- "shared": true, -+ "shared": false, - "sort": 0, - "value_type": "individual" - }, -@@ -555,7 +555,7 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "instance:node_network_receive_drop_excluding_lo:rate1m{job=\"node-exporter\"}", -+ "expr": "instance:node_network_receive_drop_excluding_lo:rate5m{job=\"node-exporter\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{`{{`}}instance{{`}}`}} Receive", -@@ -563,7 +563,7 @@ - "step": 10 - }, - { -- "expr": "instance:node_network_transmit_drop_excluding_lo:rate1m{job=\"node-exporter\"}", -+ "expr": "instance:node_network_transmit_drop_excluding_lo:rate5m{job=\"node-exporter\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{`{{`}}instance{{`}}`}} Transmit", -@@ -578,7 +578,7 @@ - "timeShift": null, - "title": "Net Saturation (Drops Receive/Transmit)", - "tooltip": { -- "shared": true, -+ "shared": false, - "sort": 0, - "value_type": "individual" - }, -@@ -661,7 +661,7 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "instance_device:node_disk_io_time_seconds:rate1m{job=\"node-exporter\"}\n/ scalar(count(instance_device:node_disk_io_time_seconds:rate1m{job=\"node-exporter\"}))\n", -+ "expr": "instance_device:node_disk_io_time_seconds:rate5m{job=\"node-exporter\"}\n/ scalar(count(instance_device:node_disk_io_time_seconds:rate5m{job=\"node-exporter\"}))\n", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{`{{`}}instance{{`}}`}} {{`{{`}}device{{`}}`}}", -@@ -676,7 +676,7 @@ - "timeShift": null, - "title": "Disk IO Utilisation", - "tooltip": { -- "shared": true, -+ "shared": false, - "sort": 0, - "value_type": "individual" - }, -@@ -747,7 +747,7 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "instance_device:node_disk_io_time_weighted_seconds:rate1m{job=\"node-exporter\"}\n/ scalar(count(instance_device:node_disk_io_time_weighted_seconds:rate1m{job=\"node-exporter\"}))\n", -+ "expr": "instance_device:node_disk_io_time_weighted_seconds:rate5m{job=\"node-exporter\"}\n/ scalar(count(instance_device:node_disk_io_time_weighted_seconds:rate5m{job=\"node-exporter\"}))\n", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{`{{`}}instance{{`}}`}} {{`{{`}}device{{`}}`}}", -@@ -762,7 +762,7 @@ - "timeShift": null, - "title": "Disk IO Saturation", - "tooltip": { -- "shared": true, -+ "shared": false, - "sort": 0, - "value_type": "individual" - }, -@@ -860,7 +860,7 @@ - "timeShift": null, - "title": "Disk Space Utilisation", - "tooltip": { -- "shared": true, -+ "shared": false, - "sort": 0, - "value_type": "individual" - }, @@ -961,4 +961,4 @@ "uid": "", "version": 0 diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/node-rsrc-use.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/node-rsrc-use.yaml.patch index 0e1162aef..eef69890c 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/node-rsrc-use.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/node-rsrc-use.yaml.patch @@ -1,11 +1,6 @@ --- charts-original/templates/grafana/dashboards-1.14/node-rsrc-use.yaml +++ charts/templates/grafana/dashboards-1.14/node-rsrc-use.yaml -@@ -4,11 +4,11 @@ - https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} --{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.nodeExporter.enabled }} -+{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled .Values.nodeExporter.enabled }} +@@ -8,7 +8,7 @@ apiVersion: v1 kind: ConfigMap metadata: @@ -14,159 +9,6 @@ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "node-rsrc-use" | trunc 63 | trimSuffix "-" }} annotations: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} -@@ -77,7 +77,7 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "instance:node_cpu_utilisation:rate1m{job=\"node-exporter\", instance=\"$instance\"}", -+ "expr": "instance:node_cpu_utilisation:rate5m{job=\"node-exporter\", instance=\"$instance\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Utilisation", -@@ -92,7 +92,7 @@ - "timeShift": null, - "title": "CPU Utilisation", - "tooltip": { -- "shared": true, -+ "shared": false, - "sort": 0, - "value_type": "individual" - }, -@@ -178,7 +178,7 @@ - "timeShift": null, - "title": "CPU Saturation (Load1 per CPU)", - "tooltip": { -- "shared": true, -+ "shared": false, - "sort": 0, - "value_type": "individual" - }, -@@ -276,7 +276,7 @@ - "timeShift": null, - "title": "Memory Utilisation", - "tooltip": { -- "shared": true, -+ "shared": false, - "sort": 0, - "value_type": "individual" - }, -@@ -347,7 +347,7 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "instance:node_vmstat_pgmajfault:rate1m{job=\"node-exporter\", instance=\"$instance\"}", -+ "expr": "instance:node_vmstat_pgmajfault:rate5m{job=\"node-exporter\", instance=\"$instance\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Major page faults", -@@ -362,7 +362,7 @@ - "timeShift": null, - "title": "Memory Saturation (Major Page Faults)", - "tooltip": { -- "shared": true, -+ "shared": false, - "sort": 0, - "value_type": "individual" - }, -@@ -453,7 +453,7 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "instance:node_network_receive_bytes_excluding_lo:rate1m{job=\"node-exporter\", instance=\"$instance\"}", -+ "expr": "instance:node_network_receive_bytes_excluding_lo:rate5m{job=\"node-exporter\", instance=\"$instance\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Receive", -@@ -461,7 +461,7 @@ - "step": 10 - }, - { -- "expr": "instance:node_network_transmit_bytes_excluding_lo:rate1m{job=\"node-exporter\", instance=\"$instance\"}", -+ "expr": "instance:node_network_transmit_bytes_excluding_lo:rate5m{job=\"node-exporter\", instance=\"$instance\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Transmit", -@@ -476,7 +476,7 @@ - "timeShift": null, - "title": "Net Utilisation (Bytes Receive/Transmit)", - "tooltip": { -- "shared": true, -+ "shared": false, - "sort": 0, - "value_type": "individual" - }, -@@ -555,7 +555,7 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "instance:node_network_receive_drop_excluding_lo:rate1m{job=\"node-exporter\", instance=\"$instance\"}", -+ "expr": "instance:node_network_receive_drop_excluding_lo:rate5m{job=\"node-exporter\", instance=\"$instance\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Receive drops", -@@ -563,7 +563,7 @@ - "step": 10 - }, - { -- "expr": "instance:node_network_transmit_drop_excluding_lo:rate1m{job=\"node-exporter\", instance=\"$instance\"}", -+ "expr": "instance:node_network_transmit_drop_excluding_lo:rate5m{job=\"node-exporter\", instance=\"$instance\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Transmit drops", -@@ -578,7 +578,7 @@ - "timeShift": null, - "title": "Net Saturation (Drops Receive/Transmit)", - "tooltip": { -- "shared": true, -+ "shared": false, - "sort": 0, - "value_type": "individual" - }, -@@ -661,7 +661,7 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "instance_device:node_disk_io_time_seconds:rate1m{job=\"node-exporter\", instance=\"$instance\"}", -+ "expr": "instance_device:node_disk_io_time_seconds:rate5m{job=\"node-exporter\", instance=\"$instance\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{`{{`}}device{{`}}`}}", -@@ -676,7 +676,7 @@ - "timeShift": null, - "title": "Disk IO Utilisation", - "tooltip": { -- "shared": true, -+ "shared": false, - "sort": 0, - "value_type": "individual" - }, -@@ -747,7 +747,7 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "instance_device:node_disk_io_time_weighted_seconds:rate1m{job=\"node-exporter\", instance=\"$instance\"}", -+ "expr": "instance_device:node_disk_io_time_weighted_seconds:rate5m{job=\"node-exporter\", instance=\"$instance\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{`{{`}}device{{`}}`}}", -@@ -762,7 +762,7 @@ - "timeShift": null, - "title": "Disk IO Saturation", - "tooltip": { -- "shared": true, -+ "shared": false, - "sort": 0, - "value_type": "individual" - }, -@@ -860,7 +860,7 @@ - "timeShift": null, - "title": "Disk Space Utilisation", - "tooltip": { -- "shared": true, -+ "shared": false, - "sort": 0, - "value_type": "individual" - }, @@ -988,4 +988,4 @@ "uid": "", "version": 0 diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/nodes.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/nodes.yaml.patch index 9aa8e17f8..8500d18fe 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/nodes.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/nodes.yaml.patch @@ -1,11 +1,6 @@ --- charts-original/templates/grafana/dashboards-1.14/nodes.yaml +++ charts/templates/grafana/dashboards-1.14/nodes.yaml -@@ -4,11 +4,11 @@ - https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} --{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} -+{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +@@ -8,7 +8,7 @@ apiVersion: v1 kind: ConfigMap metadata: @@ -14,69 +9,7 @@ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "nodes" | trunc 63 | trimSuffix "-" }} annotations: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} -@@ -92,9 +92,8 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "(\n (1 - rate(node_cpu_seconds_total{job=\"node-exporter\", mode=\"idle\", instance=\"$instance\"}[$__interval]))\n/ ignoring(cpu) group_left\n count without (cpu)( node_cpu_seconds_total{job=\"node-exporter\", mode=\"idle\", instance=\"$instance\"})\n)\n", -+ "expr": "(\n (1 - rate(node_cpu_seconds_total{job=\"node-exporter\", mode=\"idle\", instance=\"$instance\"}[$__rate_interval]))\n/ ignoring(cpu) group_left\n count without (cpu)( node_cpu_seconds_total{job=\"node-exporter\", mode=\"idle\", instance=\"$instance\"})\n)\n", - "format": "time_series", -- "interval": "1m", - "intervalFactor": 5, - "legendFormat": "{{`{{`}}cpu{{`}}`}}", - "refId": "A" -@@ -528,25 +527,22 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "rate(node_disk_read_bytes_total{job=\"node-exporter\", instance=\"$instance\", device=~\"mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\"}[$__interval])", -+ "expr": "rate(node_disk_read_bytes_total{job=\"node-exporter\", instance=\"$instance\", device=~\"mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\"}[$__rate_interval])", - "format": "time_series", -- "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{`{{`}}device{{`}}`}} read", - "refId": "A" - }, - { -- "expr": "rate(node_disk_written_bytes_total{job=\"node-exporter\", instance=\"$instance\", device=~\"mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\"}[$__interval])", -+ "expr": "rate(node_disk_written_bytes_total{job=\"node-exporter\", instance=\"$instance\", device=~\"mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\"}[$__rate_interval])", - "format": "time_series", -- "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{`{{`}}device{{`}}`}} written", - "refId": "B" - }, - { -- "expr": "rate(node_disk_io_time_seconds_total{job=\"node-exporter\", instance=\"$instance\", device=~\"mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\"}[$__interval])", -+ "expr": "rate(node_disk_io_time_seconds_total{job=\"node-exporter\", instance=\"$instance\", device=~\"mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\"}[$__rate_interval])", - "format": "time_series", -- "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{`{{`}}device{{`}}`}} io time", - "refId": "C" -@@ -758,9 +754,8 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "rate(node_network_receive_bytes_total{job=\"node-exporter\", instance=\"$instance\", device!=\"lo\"}[$__interval])", -+ "expr": "rate(node_network_receive_bytes_total{job=\"node-exporter\", instance=\"$instance\", device!=\"lo\"}[$__rate_interval])", - "format": "time_series", -- "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{`{{`}}device{{`}}`}}", - "refId": "A" -@@ -852,9 +847,8 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "rate(node_network_transmit_bytes_total{job=\"node-exporter\", instance=\"$instance\", device!=\"lo\"}[$__interval])", -+ "expr": "rate(node_network_transmit_bytes_total{job=\"node-exporter\", instance=\"$instance\", device!=\"lo\"}[$__rate_interval])", - "format": "time_series", -- "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{`{{`}}device{{`}}`}}", - "refId": "A" -@@ -994,4 +988,4 @@ +@@ -988,4 +988,4 @@ "title": "Nodes", "version": 0 } diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml.patch index e0c878638..9b942cf1c 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml.patch @@ -1,11 +1,6 @@ --- charts-original/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml +++ charts/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml -@@ -4,11 +4,11 @@ - https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} --{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} -+{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +@@ -8,7 +8,7 @@ apiVersion: v1 kind: ConfigMap metadata: @@ -18,7 +13,7 @@ "steppedLine": false, "targets": [ { -- "expr": "(\n sum without(instance, node) (kubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n -\n sum without(instance, node) (kubelet_volume_stats_available_bytes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n)\n", +- "expr": "(\n sum without(instance, node) (topk(1, (kubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})))\n -\n sum without(instance, node) (topk(1, (kubelet_volume_stats_available_bytes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})))\n)\n", + "expr": "(\n sum without(instance, node) (topk(1, (kubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})))\n -\n sum without(instance, node) (topk(1, (kubelet_volume_stats_available_bytes{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})))\n)\n", "format": "time_series", "intervalFactor": 1, @@ -26,7 +21,7 @@ "refId": "A" }, { -- "expr": "sum without(instance, node) (kubelet_volume_stats_available_bytes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n", +- "expr": "sum without(instance, node) (topk(1, (kubelet_volume_stats_available_bytes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})))\n", + "expr": "sum without(instance, node) (topk(1, (kubelet_volume_stats_available_bytes{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})))\n", "format": "time_series", "intervalFactor": 1, @@ -35,7 +30,7 @@ "tableColumn": "", "targets": [ { -- "expr": "max without(instance,node) (\n(\n kubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"}\n -\n kubelet_volume_stats_available_bytes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"}\n)\n/\nkubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"}\n* 100)\n", +- "expr": "max without(instance,node) (\n(\n topk(1, kubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n -\n topk(1, kubelet_volume_stats_available_bytes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n)\n/\ntopk(1, kubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n* 100)\n", + "expr": "max without(instance,node) (\n(\n topk(1, kubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n -\n topk(1, kubelet_volume_stats_available_bytes{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n)\n/\ntopk(1, kubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n* 100)\n", "format": "time_series", "intervalFactor": 2, @@ -44,7 +39,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sum without(instance, node) (kubelet_volume_stats_inodes_used{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n", +- "expr": "sum without(instance, node) (topk(1, (kubelet_volume_stats_inodes_used{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})))\n", + "expr": "sum without(instance, node) (topk(1, (kubelet_volume_stats_inodes_used{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})))\n", "format": "time_series", "intervalFactor": 1, @@ -52,7 +47,7 @@ "refId": "A" }, { -- "expr": "(\n sum without(instance, node) (kubelet_volume_stats_inodes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n -\n sum without(instance, node) (kubelet_volume_stats_inodes_used{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n)\n", +- "expr": "(\n sum without(instance, node) (topk(1, (kubelet_volume_stats_inodes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})))\n -\n sum without(instance, node) (topk(1, (kubelet_volume_stats_inodes_used{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})))\n)\n", + "expr": "(\n sum without(instance, node) (topk(1, (kubelet_volume_stats_inodes{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})))\n -\n sum without(instance, node) (topk(1, (kubelet_volume_stats_inodes_used{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})))\n)\n", "format": "time_series", "intervalFactor": 1, @@ -61,7 +56,7 @@ "tableColumn": "", "targets": [ { -- "expr": "max without(instance,node) (\nkubelet_volume_stats_inodes_used{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"}\n/\nkubelet_volume_stats_inodes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"}\n* 100)\n", +- "expr": "max without(instance,node) (\ntopk(1, kubelet_volume_stats_inodes_used{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n/\ntopk(1, kubelet_volume_stats_inodes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n* 100)\n", + "expr": "max without(instance,node) (\ntopk(1, kubelet_volume_stats_inodes_used{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n/\ntopk(1, kubelet_volume_stats_inodes{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n* 100)\n", "format": "time_series", "intervalFactor": 2, diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/pod-total.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/pod-total.yaml.patch index 8c43c80d5..7e4ae7e9e 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/pod-total.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/pod-total.yaml.patch @@ -1,11 +1,6 @@ --- charts-original/templates/grafana/dashboards-1.14/pod-total.yaml +++ charts/templates/grafana/dashboards-1.14/pod-total.yaml -@@ -4,11 +4,11 @@ - https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} --{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} -+{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +@@ -8,7 +8,7 @@ apiVersion: v1 kind: ConfigMap metadata: @@ -14,7 +9,7 @@ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "pod-total" | trunc 63 | trimSuffix "-" }} annotations: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} -@@ -1027,14 +1027,14 @@ +@@ -1027,7 +1027,7 @@ "datasource": "$datasource", "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, "includeAll": false, @@ -23,32 +18,6 @@ "multi": false, "name": "cluster", "options": [ - - ], - "query": "label_values(kube_pod_info, cluster)", -- "refresh": 1, -+ "refresh": 2, - "regex": "", - "sort": 0, - "tagValuesQuery": "", -@@ -1065,7 +1065,7 @@ - - ], - "query": "label_values(container_network_receive_packets_total{cluster=\"$cluster\"}, namespace)", -- "refresh": 1, -+ "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 1, -@@ -1097,7 +1097,7 @@ - - ], - "query": "label_values(container_network_receive_packets_total{cluster=\"$cluster\",namespace=~\"$namespace\"}, pod)", -- "refresh": 1, -+ "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 1, @@ -1225,4 +1225,4 @@ "uid": "7a18067ce943a40ae25454675c19ff5c", "version": 0 diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/prometheus-remote-write.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/prometheus-remote-write.yaml.patch index da74262f3..0f601b47e 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/prometheus-remote-write.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/prometheus-remote-write.yaml.patch @@ -1,11 +1,6 @@ --- charts-original/templates/grafana/dashboards-1.14/prometheus-remote-write.yaml +++ charts/templates/grafana/dashboards-1.14/prometheus-remote-write.yaml -@@ -4,11 +4,11 @@ - https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} --{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.prometheus.prometheusSpec.remoteWriteDashboards }} -+{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled .Values.prometheus.prometheusSpec.remoteWriteDashboards }} +@@ -8,7 +8,7 @@ apiVersion: v1 kind: ConfigMap metadata: diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/prometheus.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/prometheus.yaml.patch index bb9f1cd13..bec1cc7ef 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/prometheus.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/prometheus.yaml.patch @@ -1,11 +1,6 @@ --- charts-original/templates/grafana/dashboards-1.14/prometheus.yaml +++ charts/templates/grafana/dashboards-1.14/prometheus.yaml -@@ -4,11 +4,11 @@ - https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} --{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} -+{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +@@ -8,7 +8,7 @@ apiVersion: v1 kind: ConfigMap metadata: @@ -14,114 +9,6 @@ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "prometheus" | trunc 63 | trimSuffix "-" }} annotations: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} -@@ -220,7 +220,7 @@ - "timeShift": null, - "title": "Prometheus Stats", - "tooltip": { -- "shared": true, -+ "shared": false, - "sort": 0, - "value_type": "individual" - }, -@@ -319,7 +319,7 @@ - "timeShift": null, - "title": "Target Sync", - "tooltip": { -- "shared": true, -+ "shared": false, - "sort": 0, - "value_type": "individual" - }, -@@ -405,7 +405,7 @@ - "timeShift": null, - "title": "Targets", - "tooltip": { -- "shared": true, -+ "shared": false, - "sort": 0, - "value_type": "individual" - }, -@@ -503,7 +503,7 @@ - "timeShift": null, - "title": "Average Scrape Interval Duration", - "tooltip": { -- "shared": true, -+ "shared": false, - "sort": 0, - "value_type": "individual" - }, -@@ -613,7 +613,7 @@ - "timeShift": null, - "title": "Scrape failures", - "tooltip": { -- "shared": true, -+ "shared": false, - "sort": 0, - "value_type": "individual" - }, -@@ -699,7 +699,7 @@ - "timeShift": null, - "title": "Appended Samples", - "tooltip": { -- "shared": true, -+ "shared": false, - "sort": 0, - "value_type": "individual" - }, -@@ -797,7 +797,7 @@ - "timeShift": null, - "title": "Head Series", - "tooltip": { -- "shared": true, -+ "shared": false, - "sort": 0, - "value_type": "individual" - }, -@@ -883,7 +883,7 @@ - "timeShift": null, - "title": "Head Chunks", - "tooltip": { -- "shared": true, -+ "shared": false, - "sort": 0, - "value_type": "individual" - }, -@@ -981,7 +981,7 @@ - "timeShift": null, - "title": "Query Rate", - "tooltip": { -- "shared": true, -+ "shared": false, - "sort": 0, - "value_type": "individual" - }, -@@ -1067,7 +1067,7 @@ - "timeShift": null, - "title": "Stage Duration", - "tooltip": { -- "shared": true, -+ "shared": false, - "sort": 0, - "value_type": "individual" - }, -@@ -1133,7 +1133,7 @@ - "type": "datasource" - }, - { -- "allValue": null, -+ "allValue": ".+", - "current": { - "selected": true, - "text": "All", -@@ -1161,7 +1161,7 @@ - "useTags": false - }, - { -- "allValue": null, -+ "allValue": ".+", - "current": { - "selected": true, - "text": "All", @@ -1224,4 +1224,4 @@ "uid": "", "version": 0 diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/proxy.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/proxy.yaml.patch index 1ac090ab3..1fccc94d9 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/proxy.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/proxy.yaml.patch @@ -4,7 +4,7 @@ https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack */ -}} {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} --{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.kubeProxy.enabled }} +-{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled .Values.kubeProxy.enabled }} +{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +{{- if (include "exporter.kubeProxy.enabled" .)}} apiVersion: v1 @@ -19,7 +19,7 @@ "tableColumn": "", "targets": [ { -- "expr": "sum(up{job=\"kube-proxy\"})", +- "expr": "sum(up{cluster=\"$cluster\", job=\"kube-proxy\"})", + {{- if .Values.k3sServer.enabled }} + "expr": "sum(up{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\", metrics_path=\"/metrics\"})", + {{- else }} @@ -32,7 +32,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sum(rate(kubeproxy_sync_proxy_rules_duration_seconds_count{job=\"kube-proxy\", instance=~\"$instance\"}[5m]))", +- "expr": "sum(rate(kubeproxy_sync_proxy_rules_duration_seconds_count{cluster=\"$cluster\", job=\"kube-proxy\", instance=~\"$instance\"}[5m]))", + "expr": "sum(rate(kubeproxy_sync_proxy_rules_duration_seconds_count{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\", instance=~\"$instance\"}[5m]))", "format": "time_series", "intervalFactor": 2, @@ -41,7 +41,7 @@ "steppedLine": false, "targets": [ { -- "expr": "histogram_quantile(0.99,rate(kubeproxy_sync_proxy_rules_duration_seconds_bucket{job=\"kube-proxy\", instance=~\"$instance\"}[5m]))", +- "expr": "histogram_quantile(0.99,rate(kubeproxy_sync_proxy_rules_duration_seconds_bucket{cluster=\"$cluster\", job=\"kube-proxy\", instance=~\"$instance\"}[5m]))", + "expr": "histogram_quantile(0.99,rate(kubeproxy_sync_proxy_rules_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\", instance=~\"$instance\"}[5m]))", "format": "time_series", "intervalFactor": 2, @@ -50,7 +50,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sum(rate(kubeproxy_network_programming_duration_seconds_count{job=\"kube-proxy\", instance=~\"$instance\"}[5m]))", +- "expr": "sum(rate(kubeproxy_network_programming_duration_seconds_count{cluster=\"$cluster\", job=\"kube-proxy\", instance=~\"$instance\"}[5m]))", + "expr": "sum(rate(kubeproxy_network_programming_duration_seconds_count{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\", instance=~\"$instance\"}[5m]))", "format": "time_series", "intervalFactor": 2, @@ -59,7 +59,7 @@ "steppedLine": false, "targets": [ { -- "expr": "histogram_quantile(0.99, sum(rate(kubeproxy_network_programming_duration_seconds_bucket{job=\"kube-proxy\", instance=~\"$instance\"}[5m])) by (instance, le))", +- "expr": "histogram_quantile(0.99, sum(rate(kubeproxy_network_programming_duration_seconds_bucket{cluster=\"$cluster\", job=\"kube-proxy\", instance=~\"$instance\"}[5m])) by (instance, le))", + "expr": "histogram_quantile(0.99, sum(rate(kubeproxy_network_programming_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\", instance=~\"$instance\"}[5m])) by (instance, le))", "format": "time_series", "intervalFactor": 2, @@ -68,7 +68,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sum(rate(rest_client_requests_total{job=\"kube-proxy\", instance=~\"$instance\",code=~\"2..\"}[5m]))", +- "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"kube-proxy\", instance=~\"$instance\",code=~\"2..\"}[5m]))", + "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\", instance=~\"$instance\",code=~\"2..\"}[5m]))", "format": "time_series", "intervalFactor": 2, @@ -76,7 +76,7 @@ "refId": "A" }, { -- "expr": "sum(rate(rest_client_requests_total{job=\"kube-proxy\", instance=~\"$instance\",code=~\"3..\"}[5m]))", +- "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"kube-proxy\", instance=~\"$instance\",code=~\"3..\"}[5m]))", + "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\", instance=~\"$instance\",code=~\"3..\"}[5m]))", "format": "time_series", "intervalFactor": 2, @@ -84,7 +84,7 @@ "refId": "B" }, { -- "expr": "sum(rate(rest_client_requests_total{job=\"kube-proxy\", instance=~\"$instance\",code=~\"4..\"}[5m]))", +- "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"kube-proxy\", instance=~\"$instance\",code=~\"4..\"}[5m]))", + "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\", instance=~\"$instance\",code=~\"4..\"}[5m]))", "format": "time_series", "intervalFactor": 2, @@ -92,7 +92,7 @@ "refId": "C" }, { -- "expr": "sum(rate(rest_client_requests_total{job=\"kube-proxy\", instance=~\"$instance\",code=~\"5..\"}[5m]))", +- "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"kube-proxy\", instance=~\"$instance\",code=~\"5..\"}[5m]))", + "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\", instance=~\"$instance\",code=~\"5..\"}[5m]))", "format": "time_series", "intervalFactor": 2, @@ -101,7 +101,7 @@ "steppedLine": false, "targets": [ { -- "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{job=\"kube-proxy\",instance=~\"$instance\",verb=\"POST\"}[5m])) by (verb, url, le))", +- "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster=\"$cluster\", job=\"kube-proxy\",instance=~\"$instance\",verb=\"POST\"}[5m])) by (verb, url, le))", + "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\",instance=~\"$instance\",verb=\"POST\"}[5m])) by (verb, url, le))", "format": "time_series", "intervalFactor": 2, @@ -110,7 +110,7 @@ "steppedLine": false, "targets": [ { -- "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{job=\"kube-proxy\", instance=~\"$instance\", verb=\"GET\"}[5m])) by (verb, url, le))", +- "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster=\"$cluster\", job=\"kube-proxy\", instance=~\"$instance\", verb=\"GET\"}[5m])) by (verb, url, le))", + "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\", instance=~\"$instance\", verb=\"GET\"}[5m])) by (verb, url, le))", "format": "time_series", "intervalFactor": 2, @@ -119,7 +119,7 @@ "steppedLine": false, "targets": [ { -- "expr": "process_resident_memory_bytes{job=\"kube-proxy\",instance=~\"$instance\"}", +- "expr": "process_resident_memory_bytes{cluster=\"$cluster\", job=\"kube-proxy\",instance=~\"$instance\"}", + "expr": "process_resident_memory_bytes{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\",instance=~\"$instance\"}", "format": "time_series", "intervalFactor": 2, @@ -128,7 +128,7 @@ "steppedLine": false, "targets": [ { -- "expr": "rate(process_cpu_seconds_total{job=\"kube-proxy\",instance=~\"$instance\"}[5m])", +- "expr": "rate(process_cpu_seconds_total{cluster=\"$cluster\", job=\"kube-proxy\",instance=~\"$instance\"}[5m])", + "expr": "rate(process_cpu_seconds_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\",instance=~\"$instance\"}[5m])", "format": "time_series", "intervalFactor": 2, @@ -137,54 +137,21 @@ "steppedLine": false, "targets": [ { -- "expr": "go_goroutines{job=\"kube-proxy\",instance=~\"$instance\"}", +- "expr": "go_goroutines{cluster=\"$cluster\", job=\"kube-proxy\",instance=~\"$instance\"}", + "expr": "go_goroutines{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\",instance=~\"$instance\"}", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}}", -@@ -1172,6 +1177,32 @@ - - }, - "datasource": "$datasource", -+ "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, -+ "includeAll": false, -+ "label": "cluster", -+ "multi": false, -+ "name": "cluster", -+ "options": [ -+ -+ ], -+ "query": "label_values(kube_pod_info, cluster)", -+ "refresh": 2, -+ "regex": "", -+ "sort": 1, -+ "tagValuesQuery": "", -+ "tags": [ -+ -+ ], -+ "tagsQuery": "", -+ "type": "query", -+ "useTags": false -+ }, -+ { -+ "allValue": null, -+ "current": { -+ -+ }, -+ "datasource": "$datasource", - "hide": 0, - "includeAll": true, - "label": null, -@@ -1180,7 +1211,7 @@ +@@ -1206,7 +1211,7 @@ "options": [ ], -- "query": "label_values(kubeproxy_network_programming_duration_seconds_bucket{job=\"kube-proxy\"}, instance)", +- "query": "label_values(kubeproxy_network_programming_duration_seconds_bucket{cluster=\"$cluster\", job=\"kube-proxy\"}, instance)", + "query": "label_values(kubeproxy_network_programming_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeProxy.jobName" . }}\"}, instance)", "refresh": 2, "regex": "", "sort": 1, -@@ -1228,4 +1259,4 @@ +@@ -1254,4 +1259,4 @@ "uid": "632e265de029684c40b21cb76bca4f94", "version": 0 } diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/scheduler.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/scheduler.yaml.patch index fdbd4c03f..5c425f5d1 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/scheduler.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/scheduler.yaml.patch @@ -4,7 +4,7 @@ https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack */ -}} {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} --{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.kubeScheduler.enabled }} +-{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled .Values.kubeScheduler.enabled }} +{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +{{- if (include "exporter.kubeScheduler.enabled" .)}} apiVersion: v1 @@ -19,7 +19,7 @@ "tableColumn": "", "targets": [ { -- "expr": "sum(up{job=\"kube-scheduler\"})", +- "expr": "sum(up{cluster=\"$cluster\", job=\"kube-scheduler\"})", + {{- if .Values.k3sServer.enabled }} + "expr": "sum(up{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", metrics_path=\"/metrics\"})", + {{- else }} @@ -32,7 +32,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sum(rate(scheduler_e2e_scheduling_duration_seconds_count{job=\"kube-scheduler\", instance=~\"$instance\"}[5m])) by (instance)", +- "expr": "sum(rate(scheduler_e2e_scheduling_duration_seconds_count{cluster=\"$cluster\", job=\"kube-scheduler\", instance=~\"$instance\"}[5m])) by (instance)", + "expr": "sum(rate(scheduler_e2e_scheduling_duration_seconds_count{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\"}[5m])) by (instance)", "format": "time_series", "intervalFactor": 2, @@ -40,7 +40,7 @@ "refId": "A" }, { -- "expr": "sum(rate(scheduler_binding_duration_seconds_count{job=\"kube-scheduler\", instance=~\"$instance\"}[5m])) by (instance)", +- "expr": "sum(rate(scheduler_binding_duration_seconds_count{cluster=\"$cluster\", job=\"kube-scheduler\", instance=~\"$instance\"}[5m])) by (instance)", + "expr": "sum(rate(scheduler_binding_duration_seconds_count{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\"}[5m])) by (instance)", "format": "time_series", "intervalFactor": 2, @@ -48,7 +48,7 @@ "refId": "B" }, { -- "expr": "sum(rate(scheduler_scheduling_algorithm_duration_seconds_count{job=\"kube-scheduler\", instance=~\"$instance\"}[5m])) by (instance)", +- "expr": "sum(rate(scheduler_scheduling_algorithm_duration_seconds_count{cluster=\"$cluster\", job=\"kube-scheduler\", instance=~\"$instance\"}[5m])) by (instance)", + "expr": "sum(rate(scheduler_scheduling_algorithm_duration_seconds_count{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\"}[5m])) by (instance)", "format": "time_series", "intervalFactor": 2, @@ -56,7 +56,7 @@ "refId": "C" }, { -- "expr": "sum(rate(scheduler_volume_scheduling_duration_seconds_count{job=\"kube-scheduler\", instance=~\"$instance\"}[5m])) by (instance)", +- "expr": "sum(rate(scheduler_volume_scheduling_duration_seconds_count{cluster=\"$cluster\", job=\"kube-scheduler\", instance=~\"$instance\"}[5m])) by (instance)", + "expr": "sum(rate(scheduler_volume_scheduling_duration_seconds_count{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\"}[5m])) by (instance)", "format": "time_series", "intervalFactor": 2, @@ -65,7 +65,7 @@ "steppedLine": false, "targets": [ { -- "expr": "histogram_quantile(0.99, sum(rate(scheduler_e2e_scheduling_duration_seconds_bucket{job=\"kube-scheduler\",instance=~\"$instance\"}[5m])) by (instance, le))", +- "expr": "histogram_quantile(0.99, sum(rate(scheduler_e2e_scheduling_duration_seconds_bucket{cluster=\"$cluster\", job=\"kube-scheduler\",instance=~\"$instance\"}[5m])) by (instance, le))", + "expr": "histogram_quantile(0.99, sum(rate(scheduler_e2e_scheduling_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\",instance=~\"$instance\"}[5m])) by (instance, le))", "format": "time_series", "intervalFactor": 2, @@ -73,7 +73,7 @@ "refId": "A" }, { -- "expr": "histogram_quantile(0.99, sum(rate(scheduler_binding_duration_seconds_bucket{job=\"kube-scheduler\",instance=~\"$instance\"}[5m])) by (instance, le))", +- "expr": "histogram_quantile(0.99, sum(rate(scheduler_binding_duration_seconds_bucket{cluster=\"$cluster\", job=\"kube-scheduler\",instance=~\"$instance\"}[5m])) by (instance, le))", + "expr": "histogram_quantile(0.99, sum(rate(scheduler_binding_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\",instance=~\"$instance\"}[5m])) by (instance, le))", "format": "time_series", "intervalFactor": 2, @@ -81,7 +81,7 @@ "refId": "B" }, { -- "expr": "histogram_quantile(0.99, sum(rate(scheduler_scheduling_algorithm_duration_seconds_bucket{job=\"kube-scheduler\",instance=~\"$instance\"}[5m])) by (instance, le))", +- "expr": "histogram_quantile(0.99, sum(rate(scheduler_scheduling_algorithm_duration_seconds_bucket{cluster=\"$cluster\", job=\"kube-scheduler\",instance=~\"$instance\"}[5m])) by (instance, le))", + "expr": "histogram_quantile(0.99, sum(rate(scheduler_scheduling_algorithm_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\",instance=~\"$instance\"}[5m])) by (instance, le))", "format": "time_series", "intervalFactor": 2, @@ -89,7 +89,7 @@ "refId": "C" }, { -- "expr": "histogram_quantile(0.99, sum(rate(scheduler_volume_scheduling_duration_seconds_bucket{job=\"kube-scheduler\",instance=~\"$instance\"}[5m])) by (instance, le))", +- "expr": "histogram_quantile(0.99, sum(rate(scheduler_volume_scheduling_duration_seconds_bucket{cluster=\"$cluster\", job=\"kube-scheduler\",instance=~\"$instance\"}[5m])) by (instance, le))", + "expr": "histogram_quantile(0.99, sum(rate(scheduler_volume_scheduling_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\",instance=~\"$instance\"}[5m])) by (instance, le))", "format": "time_series", "intervalFactor": 2, @@ -98,7 +98,7 @@ "steppedLine": false, "targets": [ { -- "expr": "sum(rate(rest_client_requests_total{job=\"kube-scheduler\", instance=~\"$instance\",code=~\"2..\"}[5m]))", +- "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"kube-scheduler\", instance=~\"$instance\",code=~\"2..\"}[5m]))", + "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\",code=~\"2..\"}[5m]))", "format": "time_series", "intervalFactor": 2, @@ -106,7 +106,7 @@ "refId": "A" }, { -- "expr": "sum(rate(rest_client_requests_total{job=\"kube-scheduler\", instance=~\"$instance\",code=~\"3..\"}[5m]))", +- "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"kube-scheduler\", instance=~\"$instance\",code=~\"3..\"}[5m]))", + "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\",code=~\"3..\"}[5m]))", "format": "time_series", "intervalFactor": 2, @@ -114,7 +114,7 @@ "refId": "B" }, { -- "expr": "sum(rate(rest_client_requests_total{job=\"kube-scheduler\", instance=~\"$instance\",code=~\"4..\"}[5m]))", +- "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"kube-scheduler\", instance=~\"$instance\",code=~\"4..\"}[5m]))", + "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\",code=~\"4..\"}[5m]))", "format": "time_series", "intervalFactor": 2, @@ -122,7 +122,7 @@ "refId": "C" }, { -- "expr": "sum(rate(rest_client_requests_total{job=\"kube-scheduler\", instance=~\"$instance\",code=~\"5..\"}[5m]))", +- "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"kube-scheduler\", instance=~\"$instance\",code=~\"5..\"}[5m]))", + "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\",code=~\"5..\"}[5m]))", "format": "time_series", "intervalFactor": 2, @@ -131,7 +131,7 @@ "steppedLine": false, "targets": [ { -- "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{job=\"kube-scheduler\", instance=~\"$instance\", verb=\"POST\"}[5m])) by (verb, url, le))", +- "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster=\"$cluster\", job=\"kube-scheduler\", instance=~\"$instance\", verb=\"POST\"}[5m])) by (verb, url, le))", + "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\", verb=\"POST\"}[5m])) by (verb, url, le))", "format": "time_series", "intervalFactor": 2, @@ -140,7 +140,7 @@ "steppedLine": false, "targets": [ { -- "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{job=\"kube-scheduler\", instance=~\"$instance\", verb=\"GET\"}[5m])) by (verb, url, le))", +- "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster=\"$cluster\", job=\"kube-scheduler\", instance=~\"$instance\", verb=\"GET\"}[5m])) by (verb, url, le))", + "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\", verb=\"GET\"}[5m])) by (verb, url, le))", "format": "time_series", "intervalFactor": 2, @@ -149,7 +149,7 @@ "steppedLine": false, "targets": [ { -- "expr": "process_resident_memory_bytes{job=\"kube-scheduler\", instance=~\"$instance\"}", +- "expr": "process_resident_memory_bytes{cluster=\"$cluster\", job=\"kube-scheduler\", instance=~\"$instance\"}", + "expr": "process_resident_memory_bytes{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\"}", "format": "time_series", "intervalFactor": 2, @@ -158,7 +158,7 @@ "steppedLine": false, "targets": [ { -- "expr": "rate(process_cpu_seconds_total{job=\"kube-scheduler\", instance=~\"$instance\"}[5m])", +- "expr": "rate(process_cpu_seconds_total{cluster=\"$cluster\", job=\"kube-scheduler\", instance=~\"$instance\"}[5m])", + "expr": "rate(process_cpu_seconds_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\", instance=~\"$instance\"}[5m])", "format": "time_series", "intervalFactor": 2, @@ -167,54 +167,21 @@ "steppedLine": false, "targets": [ { -- "expr": "go_goroutines{job=\"kube-scheduler\",instance=~\"$instance\"}", +- "expr": "go_goroutines{cluster=\"$cluster\", job=\"kube-scheduler\",instance=~\"$instance\"}", + "expr": "go_goroutines{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\",instance=~\"$instance\"}", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}}", -@@ -1015,6 +1020,32 @@ - - }, - "datasource": "$datasource", -+ "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, -+ "includeAll": false, -+ "label": "cluster", -+ "multi": false, -+ "name": "cluster", -+ "options": [ -+ -+ ], -+ "query": "label_values(kube_pod_info, cluster)", -+ "refresh": 2, -+ "regex": "", -+ "sort": 1, -+ "tagValuesQuery": "", -+ "tags": [ -+ -+ ], -+ "tagsQuery": "", -+ "type": "query", -+ "useTags": false -+ }, -+ { -+ "allValue": null, -+ "current": { -+ -+ }, -+ "datasource": "$datasource", - "hide": 0, - "includeAll": true, - "label": null, -@@ -1023,7 +1054,7 @@ +@@ -1049,7 +1054,7 @@ "options": [ ], -- "query": "label_values(process_cpu_seconds_total{job=\"kube-scheduler\"}, instance)", +- "query": "label_values(process_cpu_seconds_total{cluster=\"$cluster\", job=\"kube-scheduler\"}, instance)", + "query": "label_values(process_cpu_seconds_total{cluster=\"$cluster\", job=\"{{ include "exporter.kubeScheduler.jobName" . }}\"}, instance)", "refresh": 2, "regex": "", "sort": 1, -@@ -1071,4 +1102,5 @@ +@@ -1097,4 +1102,5 @@ "uid": "2e6b6a3b4bddf1427b3a55aa1311c656", "version": 0 } diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/statefulset.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/statefulset.yaml.patch index 3b030ac94..5d3adedf8 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/statefulset.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/statefulset.yaml.patch @@ -1,11 +1,6 @@ --- charts-original/templates/grafana/dashboards-1.14/statefulset.yaml +++ charts/templates/grafana/dashboards-1.14/statefulset.yaml -@@ -4,11 +4,11 @@ - https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} --{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} -+{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +@@ -8,7 +8,7 @@ apiVersion: v1 kind: ConfigMap metadata: @@ -41,10 +36,3 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "", -@@ -925,4 +925,4 @@ - "uid": "a31c1f46e6f727cb37c0d731a7245005", - "version": 0 - } --{{- end }} -\ No newline at end of file -+{{- end }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/workload-total.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/workload-total.yaml.patch index ae47fe663..87ad827e6 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/workload-total.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/workload-total.yaml.patch @@ -1,11 +1,6 @@ --- charts-original/templates/grafana/dashboards-1.14/workload-total.yaml +++ charts/templates/grafana/dashboards-1.14/workload-total.yaml -@@ -4,11 +4,11 @@ - https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} --{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} -+{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled }} +@@ -8,7 +8,7 @@ apiVersion: v1 kind: ConfigMap metadata: @@ -14,7 +9,7 @@ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "workload-total" | trunc 63 | trimSuffix "-" }} annotations: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} -@@ -1205,14 +1205,14 @@ +@@ -1205,7 +1205,7 @@ "datasource": "$datasource", "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, "includeAll": false, @@ -23,41 +18,6 @@ "multi": false, "name": "cluster", "options": [ - - ], - "query": "label_values(kube_pod_info, cluster)", -- "refresh": 1, -+ "refresh": 2, - "regex": "", - "sort": 0, - "tagValuesQuery": "", -@@ -1243,7 +1243,7 @@ - - ], - "query": "label_values(container_network_receive_packets_total{cluster=\"$cluster\"}, namespace)", -- "refresh": 1, -+ "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 1, -@@ -1275,7 +1275,7 @@ - - ], - "query": "label_values(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\"}, workload)", -- "refresh": 1, -+ "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 1, -@@ -1307,7 +1307,7 @@ - - ], - "query": "label_values(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\"$workload\"}, workload_type)", -- "refresh": 1, -+ "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, @@ -1435,4 +1435,4 @@ "uid": "728bf77cc1166d2f3133bf25846876cc", "version": 0 diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/etcd.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/etcd.yaml.patch deleted file mode 100644 index 59cd599f5..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/etcd.yaml.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- charts-original/templates/grafana/dashboards/etcd.yaml -+++ charts/templates/grafana/dashboards/etcd.yaml -@@ -4,11 +4,12 @@ - https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack - */ -}} - {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} --{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.kubeEtcd.enabled }} -+{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} -+{{- if (include "exporter.kubeEtcd.enabled" .)}} - 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" $) "etcd" | trunc 63 | trimSuffix "-" }} - annotations: - {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} -@@ -1113,4 +1114,5 @@ - "uid": "c2f4e12cdf69feb95caa41a5a1b423d9", - "version": 215 - } -+{{- end }} - {{- end }} -\ No newline at end of file diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/k8s-cluster-rsrc-use.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/k8s-cluster-rsrc-use.yaml.patch deleted file mode 100644 index 0fac01559..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/k8s-cluster-rsrc-use.yaml.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- charts-original/templates/grafana/dashboards/k8s-cluster-rsrc-use.yaml -+++ charts/templates/grafana/dashboards/k8s-cluster-rsrc-use.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" $) "k8s-cluster-rsrc-use" | trunc 63 | trimSuffix "-" }} - annotations: - {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/k8s-node-rsrc-use.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/k8s-node-rsrc-use.yaml.patch deleted file mode 100644 index 3c714730d..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/k8s-node-rsrc-use.yaml.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- charts-original/templates/grafana/dashboards/k8s-node-rsrc-use.yaml -+++ charts/templates/grafana/dashboards/k8s-node-rsrc-use.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" $) "k8s-node-rsrc-use" | trunc 63 | trimSuffix "-" }} - annotations: - {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/k8s-resources-cluster.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/k8s-resources-cluster.yaml.patch deleted file mode 100644 index 183b03b68..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/k8s-resources-cluster.yaml.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- charts-original/templates/grafana/dashboards/k8s-resources-cluster.yaml -+++ charts/templates/grafana/dashboards/k8s-resources-cluster.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" $) "k8s-resources-cluster" | trunc 63 | trimSuffix "-" }} - annotations: - {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/k8s-resources-namespace.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/k8s-resources-namespace.yaml.patch deleted file mode 100644 index d5f97650d..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/k8s-resources-namespace.yaml.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- charts-original/templates/grafana/dashboards/k8s-resources-namespace.yaml -+++ charts/templates/grafana/dashboards/k8s-resources-namespace.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" $) "k8s-resources-namespace" | trunc 63 | trimSuffix "-" }} - annotations: - {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/k8s-resources-pod.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/k8s-resources-pod.yaml.patch deleted file mode 100644 index 2de572036..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/k8s-resources-pod.yaml.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- charts-original/templates/grafana/dashboards/k8s-resources-pod.yaml -+++ charts/templates/grafana/dashboards/k8s-resources-pod.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" $) "k8s-resources-pod" | trunc 63 | trimSuffix "-" }} - annotations: - {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/k8s-resources-workload.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/k8s-resources-workload.yaml.patch deleted file mode 100644 index 61304b64d..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/k8s-resources-workload.yaml.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- charts-original/templates/grafana/dashboards/k8s-resources-workload.yaml -+++ charts/templates/grafana/dashboards/k8s-resources-workload.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" $) "k8s-resources-workload" | trunc 63 | trimSuffix "-" }} - annotations: - {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/k8s-resources-workloads-namespace.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/k8s-resources-workloads-namespace.yaml.patch deleted file mode 100644 index 8e0cb55d6..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/k8s-resources-workloads-namespace.yaml.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- charts-original/templates/grafana/dashboards/k8s-resources-workloads-namespace.yaml -+++ charts/templates/grafana/dashboards/k8s-resources-workloads-namespace.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" $) "k8s-resources-workloads-namespace" | trunc 63 | trimSuffix "-" }} - annotations: - {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/nodes.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/nodes.yaml.patch deleted file mode 100644 index 6c711730a..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/nodes.yaml.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- charts-original/templates/grafana/dashboards/nodes.yaml -+++ charts/templates/grafana/dashboards/nodes.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" $) "nodes" | trunc 63 | trimSuffix "-" }} - annotations: - {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/persistentvolumesusage.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/persistentvolumesusage.yaml.patch deleted file mode 100644 index 98c1a5590..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/persistentvolumesusage.yaml.patch +++ /dev/null @@ -1,81 +0,0 @@ ---- charts-original/templates/grafana/dashboards/persistentvolumesusage.yaml -+++ charts/templates/grafana/dashboards/persistentvolumesusage.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" $) "persistentvolumesusage" | trunc 63 | trimSuffix "-" }} - annotations: - {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} -@@ -90,14 +90,14 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "(\n sum without(instance, node) (kubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n -\n sum without(instance, node) (kubelet_volume_stats_available_bytes{cluster=\"$cluster\", job=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n)\n", -+ "expr": "(\n sum without(instance, node) (kubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n -\n sum without(instance, node) (kubelet_volume_stats_available_bytes{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n)\n", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Used Space", - "refId": "A" - }, - { -- "expr": "sum without(instance, node) (kubelet_volume_stats_available_bytes{cluster=\"$cluster\", job=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n", -+ "expr": "sum without(instance, node) (kubelet_volume_stats_available_bytes{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Free Space", -@@ -205,7 +205,7 @@ - "tableColumn": "", - "targets": [ - { -- "expr": "(\n kubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"}\n -\n kubelet_volume_stats_available_bytes{cluster=\"$cluster\", job=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"}\n)\n/\nkubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"}\n* 100\n", -+ "expr": "(\n kubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"}\n -\n kubelet_volume_stats_available_bytes{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"}\n)\n/\nkubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"}\n* 100\n", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "", -@@ -285,14 +285,14 @@ - "steppedLine": false, - "targets": [ - { -- "expr": "sum without(instance, node) (kubelet_volume_stats_inodes_used{cluster=\"$cluster\", job=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n", -+ "expr": "sum without(instance, node) (kubelet_volume_stats_inodes_used{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Used inodes", - "refId": "A" - }, - { -- "expr": "(\n sum without(instance, node) (kubelet_volume_stats_inodes{cluster=\"$cluster\", job=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n -\n sum without(instance, node) (kubelet_volume_stats_inodes_used{cluster=\"$cluster\", job=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n)\n", -+ "expr": "(\n sum without(instance, node) (kubelet_volume_stats_inodes{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n -\n sum without(instance, node) (kubelet_volume_stats_inodes_used{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n)\n", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": " Free inodes", -@@ -400,7 +400,7 @@ - "tableColumn": "", - "targets": [ - { -- "expr": "kubelet_volume_stats_inodes_used{cluster=\"$cluster\", job=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"}\n/\nkubelet_volume_stats_inodes{cluster=\"$cluster\", job=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"}\n* 100\n", -+ "expr": "kubelet_volume_stats_inodes_used{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"}\n/\nkubelet_volume_stats_inodes{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"}\n* 100\n", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "", -@@ -496,7 +496,7 @@ - "options": [ - - ], -- "query": "label_values(kubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"kubelet\"}, namespace)", -+ "query": "label_values(kubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\"}, namespace)", - "refresh": 2, - "regex": "", - "sort": 0, -@@ -522,7 +522,7 @@ - "options": [ - - ], -- "query": "label_values(kubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"kubelet\", namespace=\"$namespace\"}, persistentvolumeclaim)", -+ "query": "label_values(kubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"{{ include "exporter.kubelet.jobName" . }}\", namespace=\"$namespace\"}, persistentvolumeclaim)", - "refresh": 2, - "regex": "", - "sort": 0, diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/pods.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/pods.yaml.patch deleted file mode 100644 index b18823175..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/pods.yaml.patch +++ /dev/null @@ -1,55 +0,0 @@ ---- 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 {{`}}`}}", diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/statefulset.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/statefulset.yaml.patch deleted file mode 100644 index b584811ed..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards/statefulset.yaml.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- charts-original/templates/grafana/dashboards/statefulset.yaml -+++ charts/templates/grafana/dashboards/statefulset.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" $) "statefulset" | trunc 63 | trimSuffix "-" }} - annotations: - {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} -@@ -106,7 +106,7 @@ - "tableColumn": "", - "targets": [ - { -- "expr": "sum(rate(container_cpu_usage_seconds_total{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\", pod_name=~\"$statefulset.*\"}[3m]))", -+ "expr": "sum(rate(container_cpu_usage_seconds_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", cluster=\"$cluster\", namespace=\"$namespace\", pod_name=~\"$statefulset.*\"}[3m]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "", -@@ -189,7 +189,7 @@ - "tableColumn": "", - "targets": [ - { -- "expr": "sum(container_memory_usage_bytes{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\", pod_name=~\"$statefulset.*\"}) / 1024^3", -+ "expr": "sum(container_memory_usage_bytes{job=\"{{ include "exporter.kubelet.jobName" . }}\", cluster=\"$cluster\", namespace=\"$namespace\", pod_name=~\"$statefulset.*\"}) / 1024^3", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "", -@@ -272,7 +272,7 @@ - "tableColumn": "", - "targets": [ - { -- "expr": "sum(rate(container_network_transmit_bytes_total{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\", pod_name=~\"$statefulset.*\"}[3m])) + sum(rate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=\"$namespace\",pod_name=~\"$statefulset.*\"}[3m]))", -+ "expr": "sum(rate(container_network_transmit_bytes_total{job=\"{{ include "exporter.kubelet.jobName" . }}\", cluster=\"$cluster\", namespace=\"$namespace\", pod_name=~\"$statefulset.*\"}[3m])) + sum(rate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=\"$namespace\",pod_name=~\"$statefulset.*\"}[3m]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "", diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus-operator/admission-webhooks/job-patch/job-createSecret.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus-operator/admission-webhooks/job-patch/job-createSecret.yaml.patch index 17c5228a1..fc7d98bcf 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus-operator/admission-webhooks/job-patch/job-createSecret.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus-operator/admission-webhooks/job-patch/job-createSecret.yaml.patch @@ -12,7 +12,7 @@ {{- end }} imagePullPolicy: {{ .Values.prometheusOperator.admissionWebhooks.patch.image.pullPolicy }} args: -@@ -46,20 +46,20 @@ +@@ -46,16 +46,16 @@ {{ toYaml .Values.prometheusOperator.admissionWebhooks.patch.resources | indent 12 }} restartPolicy: OnFailure serviceAccountName: {{ template "kube-prometheus-stack.fullname" . }}-admission @@ -33,11 +33,4 @@ +{{- with .Values.prometheusOperator.admissionWebhooks.patch.tolerations }} {{ toYaml . | indent 8 }} {{- end }} -+{{- if .Values.prometheusOperator.admissionWebhooks.patch.securityContext }} - securityContext: -- runAsGroup: 2000 -- runAsNonRoot: true -- runAsUser: 2000 -+{{ toYaml .Values.prometheusOperator.admissionWebhooks.patch.securityContext | indent 8 }} -+{{- end }} - {{- end }} + {{- if .Values.prometheusOperator.admissionWebhooks.patch.securityContext }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus-operator/admission-webhooks/job-patch/job-patchWebhook.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus-operator/admission-webhooks/job-patch/job-patchWebhook.yaml.patch index c71e8800d..268aa50d4 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus-operator/admission-webhooks/job-patch/job-patchWebhook.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus-operator/admission-webhooks/job-patch/job-patchWebhook.yaml.patch @@ -12,7 +12,7 @@ {{- end }} imagePullPolicy: {{ .Values.prometheusOperator.admissionWebhooks.patch.image.pullPolicy }} args: -@@ -47,20 +47,20 @@ +@@ -47,16 +47,16 @@ {{ toYaml .Values.prometheusOperator.admissionWebhooks.patch.resources | indent 12 }} restartPolicy: OnFailure serviceAccountName: {{ template "kube-prometheus-stack.fullname" . }}-admission @@ -33,11 +33,4 @@ +{{- with .Values.prometheusOperator.admissionWebhooks.patch.tolerations }} {{ toYaml . | indent 8 }} {{- end }} -+{{- if .Values.prometheusOperator.admissionWebhooks.patch.securityContext }} - securityContext: -- runAsGroup: 2000 -- runAsNonRoot: true -- runAsUser: 2000 -+{{ toYaml .Values.prometheusOperator.admissionWebhooks.patch.securityContext | indent 8 }} -+{{- end }} - {{- end }} + {{- if .Values.prometheusOperator.admissionWebhooks.patch.securityContext }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus-operator/admission-webhooks/job-patch/serviceaccount.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus-operator/admission-webhooks/job-patch/serviceaccount.yaml.patch deleted file mode 100644 index efdba9fba..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus-operator/admission-webhooks/job-patch/serviceaccount.yaml.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- charts-original/templates/prometheus-operator/admission-webhooks/job-patch/serviceaccount.yaml -+++ charts/templates/prometheus-operator/admission-webhooks/job-patch/serviceaccount.yaml -@@ -10,6 +10,8 @@ - labels: - app: {{ template "kube-prometheus-stack.name" $ }}-admission - {{- include "kube-prometheus-stack.labels" $ | indent 4 }} -+{{- if .Values.global.imagePullSecrets }} - imagePullSecrets: - {{ toYaml .Values.global.imagePullSecrets | indent 2 }} - {{- end }} -+{{- end }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus-operator/admission-webhooks/mutatingWebhookConfiguration.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus-operator/admission-webhooks/mutatingWebhookConfiguration.yaml.patch deleted file mode 100644 index 868573f79..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus-operator/admission-webhooks/mutatingWebhookConfiguration.yaml.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- charts-original/templates/prometheus-operator/admission-webhooks/mutatingWebhookConfiguration.yaml -+++ charts/templates/prometheus-operator/admission-webhooks/mutatingWebhookConfiguration.yaml -@@ -5,8 +5,8 @@ - name: {{ template "kube-prometheus-stack.fullname" . }}-admission - {{- if .Values.prometheusOperator.admissionWebhooks.certManager.enabled }} - annotations: -- certmanager.k8s.io/inject-ca-from: {{ printf "%s/%s-root-cert" .Release.Namespace (include "kube-prometheus-stack.fullname" .) | quote }} -- cert-manager.io/inject-ca-from: {{ printf "%s/%s-root-cert" .Release.Namespace (include "kube-prometheus-stack.fullname" .) | quote }} -+ certmanager.k8s.io/inject-ca-from: {{ printf "%s/%s-admission" .Release.Namespace (include "kube-prometheus-stack.fullname" .) | quote }} -+ cert-manager.io/inject-ca-from: {{ printf "%s/%s-admission" .Release.Namespace (include "kube-prometheus-stack.fullname" .) | quote }} - {{- end }} - labels: - app: {{ template "kube-prometheus-stack.name" $ }}-admission diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus-operator/admission-webhooks/validatingWebhookConfiguration.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus-operator/admission-webhooks/validatingWebhookConfiguration.yaml.patch deleted file mode 100644 index 44ead64b6..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus-operator/admission-webhooks/validatingWebhookConfiguration.yaml.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- charts-original/templates/prometheus-operator/admission-webhooks/validatingWebhookConfiguration.yaml -+++ charts/templates/prometheus-operator/admission-webhooks/validatingWebhookConfiguration.yaml -@@ -5,8 +5,8 @@ - name: {{ template "kube-prometheus-stack.fullname" . }}-admission - {{- if .Values.prometheusOperator.admissionWebhooks.certManager.enabled }} - annotations: -- certmanager.k8s.io/inject-ca-from: {{ printf "%s/%s-root-cert" .Release.Namespace (include "kube-prometheus-stack.fullname" .) | quote }} -- cert-manager.io/inject-ca-from: {{ printf "%s/%s-root-cert" .Release.Namespace (include "kube-prometheus-stack.fullname" .) | quote }} -+ certmanager.k8s.io/inject-ca-from: {{ printf "%s/%s-admission" .Release.Namespace (include "kube-prometheus-stack.fullname" .) | quote }} -+ cert-manager.io/inject-ca-from: {{ printf "%s/%s-admission" .Release.Namespace (include "kube-prometheus-stack.fullname" .) | quote }} - {{- end }} - labels: - app: {{ template "kube-prometheus-stack.name" $ }}-admission diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus-operator/certmanager.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus-operator/certmanager.yaml.patch deleted file mode 100644 index 3d78d9378..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus-operator/certmanager.yaml.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- charts-original/templates/prometheus-operator/certmanager.yaml -+++ charts/templates/prometheus-operator/certmanager.yaml -@@ -18,7 +18,7 @@ - namespace: {{ template "kube-prometheus-stack.namespace" . }} - spec: - secretName: {{ template "kube-prometheus-stack.fullname" . }}-root-cert -- duration: 43800h # 5y -+ duration: 43800h0m0s # 5y - issuerRef: - name: {{ template "kube-prometheus-stack.fullname" . }}-self-signed-issuer - commonName: "ca.webhook.kube-prometheus-stack" -@@ -43,7 +43,7 @@ - namespace: {{ template "kube-prometheus-stack.namespace" . }} - spec: - secretName: {{ template "kube-prometheus-stack.fullname" . }}-admission -- duration: 8760h # 1y -+ duration: 8760h0m0s # 1y - issuerRef: - {{- if .Values.prometheusOperator.admissionWebhooks.certManager.issuerRef }} - {{- toYaml .Values.prometheusOperator.admissionWebhooks.certManager.issuerRef | nindent 4 }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus-operator/serviceaccount.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus-operator/serviceaccount.yaml.patch deleted file mode 100644 index b581fb665..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus-operator/serviceaccount.yaml.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- charts-original/templates/prometheus-operator/serviceaccount.yaml -+++ charts/templates/prometheus-operator/serviceaccount.yaml -@@ -6,7 +6,11 @@ - namespace: {{ template "kube-prometheus-stack.namespace" . }} - labels: - app: {{ template "kube-prometheus-stack.name" . }}-operator -+ app.kubernetes.io/name: {{ template "kube-prometheus-stack.name" . }}-prometheus-operator -+ app.kubernetes.io/component: prometheus-operator - {{ include "kube-prometheus-stack.labels" . | indent 4 }} -+{{- if .Values.global.imagePullSecrets }} - imagePullSecrets: - {{ toYaml .Values.global.imagePullSecrets | indent 2 }} - {{- end }} -+{{- end }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/_rules.tpl.patch b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/_rules.tpl.patch deleted file mode 100644 index 8c0a99dc7..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/_rules.tpl.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- charts-original/templates/prometheus/_rules.tpl -+++ charts/templates/prometheus/_rules.tpl -@@ -35,4 +35,4 @@ - - "prometheus" - - "kubernetes-apps" - - "etcd" --{{- end }} -+{{- end }} -\ No newline at end of file diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/additionalPrometheusRules.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/additionalPrometheusRules.yaml.patch deleted file mode 100644 index ed6dee4e2..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/additionalPrometheusRules.yaml.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- charts-original/templates/prometheus/additionalPrometheusRules.yaml -+++ charts/templates/prometheus/additionalPrometheusRules.yaml -@@ -1,6 +1,9 @@ - {{- if or .Values.additionalPrometheusRules .Values.additionalPrometheusRulesMap}} - apiVersion: v1 - kind: List -+metadata: -+ name: {{ include "kube-prometheus-stack.fullname" $ }}-additional-prometheus-rules -+ namespace: {{ template "kube-prometheus-stack.namespace" . }} - items: - {{- if .Values.additionalPrometheusRulesMap }} - {{- range $prometheusRuleName, $prometheusRule := .Values.additionalPrometheusRulesMap }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/ingress.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/ingress.yaml.patch deleted file mode 100644 index 2cda530b9..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/ingress.yaml.patch +++ /dev/null @@ -1,78 +0,0 @@ ---- charts-original/templates/prometheus/ingress.yaml -+++ charts/templates/prometheus/ingress.yaml -@@ -1,14 +1,12 @@ --{{- if and .Values.prometheus.enabled .Values.prometheus.ingress.enabled }} --{{- $pathType := .Values.prometheus.ingress.pathType | default "" }} --{{- $serviceName := printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "prometheus" }} --{{- $servicePort := .Values.prometheus.service.port -}} --{{- $routePrefix := list .Values.prometheus.prometheusSpec.routePrefix }} --{{- $paths := .Values.prometheus.ingress.paths | default $routePrefix -}} --{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }} --apiVersion: networking.k8s.io/v1beta1 --{{ else }} --apiVersion: extensions/v1beta1 --{{ end -}} -+{{- if and .Values.prometheus.enabled .Values.prometheus.ingress.enabled -}} -+ {{- $pathType := .Values.prometheus.ingress.pathType | default "" -}} -+ {{- $serviceName := printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "prometheus" -}} -+ {{- $servicePort := .Values.prometheus.service.port -}} -+ {{- $routePrefix := list .Values.prometheus.prometheusSpec.routePrefix -}} -+ {{- $paths := .Values.prometheus.ingress.paths | default $routePrefix -}} -+ {{- $apiIsStable := eq (include "kube-prometheus-stack.ingress.isStable" .) "true" -}} -+ {{- $ingressSupportsPathType := eq (include "kube-prometheus-stack.ingress.supportsPathType" .) "true" -}} -+apiVersion: {{ include "kube-prometheus-stack.ingress.apiVersion" . }} - kind: Ingress - metadata: - {{- if .Values.prometheus.ingress.annotations }} -@@ -24,7 +22,7 @@ - {{ toYaml .Values.prometheus.ingress.labels | indent 4 }} - {{- end }} - spec: -- {{- if or (.Capabilities.APIVersions.Has "networking.k8s.io/v1") (.Capabilities.APIVersions.Has "networking.k8s.io/v1beta1") }} -+ {{- if $apiIsStable }} - {{- if .Values.prometheus.ingress.ingressClassName }} - ingressClassName: {{ .Values.prometheus.ingress.ingressClassName }} - {{- end }} -@@ -37,25 +35,39 @@ - paths: - {{- range $p := $paths }} - - path: {{ tpl $p $ }} -- {{- if $pathType }} -+ {{- if and $pathType $ingressSupportsPathType }} - pathType: {{ $pathType }} - {{- end }} - backend: -+ {{- if $apiIsStable }} -+ service: -+ name: {{ $serviceName }} -+ port: -+ number: {{ $servicePort }} -+ {{- else }} - serviceName: {{ $serviceName }} - servicePort: {{ $servicePort }} -- {{- end -}} -+ {{- end }} -+ {{- end -}} - {{- end -}} - {{- else }} - - http: - paths: - {{- range $p := $paths }} - - path: {{ tpl $p $ }} -- {{- if $pathType }} -+ {{- if and $pathType $ingressSupportsPathType }} - pathType: {{ $pathType }} - {{- end }} - backend: -+ {{- if $apiIsStable }} -+ service: -+ name: {{ $serviceName }} -+ port: -+ number: {{ $servicePort }} -+ {{- else }} - serviceName: {{ $serviceName }} - servicePort: {{ $servicePort }} -+ {{- end }} - {{- end -}} - {{- end -}} - {{- if .Values.prometheus.ingress.tls }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/ingressThanosSidecar.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/ingressThanosSidecar.yaml.patch deleted file mode 100644 index 94f762291..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/ingressThanosSidecar.yaml.patch +++ /dev/null @@ -1,69 +0,0 @@ ---- charts-original/templates/prometheus/ingressThanosSidecar.yaml -+++ charts/templates/prometheus/ingressThanosSidecar.yaml -@@ -4,11 +4,9 @@ - {{- $thanosPort := .Values.prometheus.thanosIngress.servicePort -}} - {{- $routePrefix := list .Values.prometheus.prometheusSpec.routePrefix }} - {{- $paths := .Values.prometheus.thanosIngress.paths | default $routePrefix -}} --{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }} --apiVersion: networking.k8s.io/v1beta1 --{{ else }} --apiVersion: extensions/v1beta1 --{{ end -}} -+{{- $apiIsStable := eq (include "kube-prometheus-stack.ingress.isStable" .) "true" -}} -+{{- $ingressSupportsPathType := eq (include "kube-prometheus-stack.ingress.supportsPathType" .) "true" -}} -+apiVersion: {{ include "kube-prometheus-stack.ingress.apiVersion" . }} - kind: Ingress - metadata: - {{- if .Values.prometheus.thanosIngress.annotations }} -@@ -23,7 +21,7 @@ - {{ toYaml .Values.prometheus.thanosIngress.labels | indent 4 }} - {{- end }} - spec: -- {{- if or (.Capabilities.APIVersions.Has "networking.k8s.io/v1") (.Capabilities.APIVersions.Has "networking.k8s.io/v1beta1") }} -+ {{- if $apiIsStable }} - {{- if .Values.prometheus.thanosIngress.ingressClassName }} - ingressClassName: {{ .Values.prometheus.thanosIngress.ingressClassName }} - {{- end }} -@@ -36,25 +34,39 @@ - paths: - {{- range $p := $paths }} - - path: {{ tpl $p $ }} -- {{- if $pathType }} -+ {{- if and $pathType $ingressSupportsPathType }} - pathType: {{ $pathType }} - {{- end }} - backend: -+ {{- if $apiIsStable }} -+ service: -+ name: {{ $serviceName }} -+ port: -+ number: {{ $thanosPort }} -+ {{- else }} - serviceName: {{ $serviceName }} - servicePort: {{ $thanosPort }} -- {{- end -}} -+ {{- end }} -+ {{- end -}} - {{- end -}} - {{- else }} - - http: - paths: - {{- range $p := $paths }} - - path: {{ tpl $p $ }} -- {{- if $pathType }} -+ {{- if and $pathType $ingressSupportsPathType }} - pathType: {{ $pathType }} - {{- end }} - backend: -+ {{- if $apiIsStable }} -+ service: -+ name: {{ $serviceName }} -+ port: -+ number: {{ $thanosPort }} -+ {{- else }} - serviceName: {{ $serviceName }} - servicePort: {{ $thanosPort }} -+ {{- end }} - {{- end -}} - {{- end -}} - {{- if .Values.prometheus.thanosIngress.tls }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/ingressperreplica.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/ingressperreplica.yaml.patch deleted file mode 100644 index 67002aeb4..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/ingressperreplica.yaml.patch +++ /dev/null @@ -1,61 +0,0 @@ ---- charts-original/templates/prometheus/ingressperreplica.yaml -+++ charts/templates/prometheus/ingressperreplica.yaml -@@ -3,6 +3,8 @@ - {{- $count := .Values.prometheus.prometheusSpec.replicas | int -}} - {{- $servicePort := .Values.prometheus.servicePerReplica.port -}} - {{- $ingressValues := .Values.prometheus.ingressPerReplica -}} -+{{- $apiIsStable := eq (include "kube-prometheus-stack.ingress.isStable" .) "true" -}} -+{{- $ingressSupportsPathType := eq (include "kube-prometheus-stack.ingress.supportsPathType" .) "true" -}} - apiVersion: v1 - kind: List - metadata: -@@ -11,17 +13,13 @@ - items: - {{ range $i, $e := until $count }} - - kind: Ingress -- {{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }} -- apiVersion: networking.k8s.io/v1beta1 -- {{ else }} -- apiVersion: extensions/v1beta1 -- {{ end -}} -+ apiVersion: {{ include "kube-prometheus-stack.ingress.apiVersion" $ }} - metadata: - name: {{ include "kube-prometheus-stack.fullname" $ }}-prometheus-{{ $i }} - namespace: {{ template "kube-prometheus-stack.namespace" $ }} - labels: - app: {{ include "kube-prometheus-stack.name" $ }}-prometheus --{{ include "kube-prometheus-stack.labels" $ | indent 8 }} -+ {{ include "kube-prometheus-stack.labels" $ | indent 8 }} - {{- if $ingressValues.labels }} - {{ toYaml $ingressValues.labels | indent 8 }} - {{- end }} -@@ -30,7 +28,7 @@ - {{ toYaml $ingressValues.annotations | indent 8 }} - {{- end }} - spec: -- {{- if or ($.Capabilities.APIVersions.Has "networking.k8s.io/v1") ($.Capabilities.APIVersions.Has "networking.k8s.io/v1beta1") }} -+ {{- if $apiIsStable }} - {{- if $ingressValues.ingressClassName }} - ingressClassName: {{ $ingressValues.ingressClassName }} - {{- end }} -@@ -41,12 +39,19 @@ - paths: - {{- range $p := $ingressValues.paths }} - - path: {{ tpl $p $ }} -- {{- if $pathType }} -+ {{- if and $pathType $ingressSupportsPathType }} - pathType: {{ $pathType }} - {{- end }} - backend: -+ {{- if $apiIsStable }} -+ service: -+ name: {{ include "kube-prometheus-stack.fullname" $ }}-prometheus-{{ $i }} -+ port: -+ number: {{ $servicePort }} -+ {{- else }} - serviceName: {{ include "kube-prometheus-stack.fullname" $ }}-prometheus-{{ $i }} - servicePort: {{ $servicePort }} -+ {{- end }} - {{- end -}} - {{- if or $ingressValues.tlsSecretName $ingressValues.tlsSecretPerReplica.enabled }} - tls: diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/podDisruptionBudget.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/podDisruptionBudget.yaml.patch deleted file mode 100644 index a7411a665..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/podDisruptionBudget.yaml.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- charts-original/templates/prometheus/podDisruptionBudget.yaml -+++ charts/templates/prometheus/podDisruptionBudget.yaml -@@ -16,6 +16,6 @@ - {{- end }} - selector: - matchLabels: -- app: prometheus -+ app.kubernetes.io/name: prometheus - prometheus: {{ template "kube-prometheus-stack.fullname" . }}-prometheus - {{- end }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/prometheus.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/prometheus.yaml.patch index 98cccc1df..def004c4d 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/prometheus.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/prometheus.yaml.patch @@ -27,62 +27,7 @@ {{ toYaml .Values.prometheus.prometheusSpec.nodeSelector | indent 4 }} {{- end }} paused: {{ .Values.prometheus.prometheusSpec.paused }} -@@ -70,6 +75,12 @@ - logFormat: {{ .Values.prometheus.prometheusSpec.logFormat }} - listenLocal: {{ .Values.prometheus.prometheusSpec.listenLocal }} - enableAdminAPI: {{ .Values.prometheus.prometheusSpec.enableAdminAPI }} -+{{- if .Values.prometheus.prometheusSpec.enableFeatures }} -+ enableFeatures: -+{{- range $enableFeatures := .Values.prometheus.prometheusSpec.enableFeatures }} -+ - {{ tpl $enableFeatures $ }} -+{{- end }} -+{{- end }} - {{- if .Values.prometheus.prometheusSpec.scrapeInterval }} - scrapeInterval: {{ .Values.prometheus.prometheusSpec.scrapeInterval }} - {{- end }} -@@ -150,13 +161,23 @@ - {{ else }} - probeNamespaceSelector: {} - {{- end }} --{{- if .Values.prometheus.prometheusSpec.remoteRead }} -+{{- if (or .Values.prometheus.prometheusSpec.remoteRead .Values.prometheus.prometheusSpec.additionalRemoteRead) }} - remoteRead: --{{ toYaml .Values.prometheus.prometheusSpec.remoteRead | indent 4 }} -+{{- if .Values.prometheus.prometheusSpec.remoteRead }} -+{{ tpl (toYaml .Values.prometheus.prometheusSpec.remoteRead | indent 4) . }} - {{- end }} --{{- if .Values.prometheus.prometheusSpec.remoteWrite }} -+{{- if .Values.prometheus.prometheusSpec.additionalRemoteRead }} -+{{ toYaml .Values.prometheus.prometheusSpec.additionalRemoteRead | indent 4 }} -+{{- end }} -+{{- end }} -+{{- if (or .Values.prometheus.prometheusSpec.remoteWrite .Values.prometheus.prometheusSpec.additionalRemoteWrite) }} - remoteWrite: --{{ toYaml .Values.prometheus.prometheusSpec.remoteWrite | indent 4 }} -+{{- if .Values.prometheus.prometheusSpec.remoteWrite }} -+{{ tpl (toYaml .Values.prometheus.prometheusSpec.remoteWrite | indent 4) . }} -+{{- end }} -+{{- if .Values.prometheus.prometheusSpec.additionalRemoteWrite }} -+{{ toYaml .Values.prometheus.prometheusSpec.additionalRemoteWrite | indent 4 }} -+{{- end }} - {{- end }} - {{- if .Values.prometheus.prometheusSpec.securityContext }} - securityContext: -@@ -202,7 +223,7 @@ - - topologyKey: {{ .Values.prometheus.prometheusSpec.podAntiAffinityTopologyKey }} - labelSelector: - matchExpressions: -- - {key: app, operator: In, values: [prometheus]} -+ - {key: app.kubernetes.io/name, operator: In, values: [prometheus]} - - {key: prometheus, operator: In, values: [{{ template "kube-prometheus-stack.fullname" . }}-prometheus]} - {{- else if eq .Values.prometheus.prometheusSpec.podAntiAffinity "soft" }} - podAntiAffinity: -@@ -212,12 +233,12 @@ - topologyKey: {{ .Values.prometheus.prometheusSpec.podAntiAffinityTopologyKey }} - labelSelector: - matchExpressions: -- - {key: app, operator: In, values: [prometheus]} -+ - {key: app.kubernetes.io/name, operator: In, values: [prometheus]} +@@ -232,8 +237,8 @@ - {key: prometheus, operator: In, values: [{{ template "kube-prometheus-stack.fullname" . }}-prometheus]} {{- end }} {{- end }} @@ -92,7 +37,7 @@ {{ toYaml .Values.prometheus.prometheusSpec.tolerations | indent 4 }} {{- end }} {{- if .Values.prometheus.prometheusSpec.topologySpreadConstraints }} -@@ -250,7 +271,7 @@ +@@ -266,7 +271,7 @@ {{- end }} {{- if .Values.prometheus.prometheusSpec.containers }} containers: @@ -101,7 +46,7 @@ {{- end }} {{- if .Values.prometheus.prometheusSpec.initContainers }} initContainers: -@@ -266,6 +287,7 @@ +@@ -282,6 +287,7 @@ {{- if .Values.prometheus.prometheusSpec.disableCompaction }} disableCompaction: {{ .Values.prometheus.prometheusSpec.disableCompaction }} {{- end }} @@ -109,7 +54,7 @@ portName: {{ .Values.prometheus.prometheusSpec.portName }} {{- end }} {{- if .Values.prometheus.prometheusSpec.volumes }} -@@ -310,3 +332,4 @@ +@@ -326,3 +332,4 @@ {{- if .Values.prometheus.prometheusSpec.allowOverlappingBlocks }} allowOverlappingBlocks: {{ .Values.prometheus.prometheusSpec.allowOverlappingBlocks }} {{- end }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/etcd.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/etcd.yaml.patch index 336be873b..1ace708ae 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/etcd.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/etcd.yaml.patch @@ -1,10 +1,6 @@ --- charts-original/templates/prometheus/rules-1.14/etcd.yaml +++ charts/templates/prometheus/rules-1.14/etcd.yaml -@@ -1,10 +1,11 @@ - {{- /* --Generated from 'etcd' group from https://raw.githubusercontent.com/etcd-io/website/master/content/docs/v3.4.0/op-guide/etcd3_alert.rules.yml -+Generated from 'etcd' group from https://raw.githubusercontent.com/etcd-io/website/master/content/en/docs/v3.4/op-guide/etcd3_alert.rules.yml - Do not change in-place! In order to change this file first read following link: +@@ -4,7 +4,8 @@ https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack */ -}} {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/k8s.rules.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/k8s.rules.yaml.patch index 47c26435d..fa81d2ae6 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/k8s.rules.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/k8s.rules.yaml.patch @@ -1,10 +1,10 @@ --- charts-original/templates/prometheus/rules-1.14/k8s.rules.yaml +++ charts/templates/prometheus/rules-1.14/k8s.rules.yaml -@@ -26,57 +26,57 @@ +@@ -26,31 +26,31 @@ rules: - expr: |- sum by (cluster, namespace, pod, container) ( -- rate(container_cpu_usage_seconds_total{job="kubelet", metrics_path="/metrics/cadvisor", image!="", container!="POD"}[5m]) +- rate(container_cpu_usage_seconds_total{job="kubelet", metrics_path="/metrics/cadvisor", image!=""}[5m]) + rate(container_cpu_usage_seconds_total{job="{{ include "exporter.kubelet.jobName" . }}", metrics_path="/metrics/cadvisor", image!=""}[5m]) ) * on (cluster, namespace, pod) group_left(node) topk by (cluster, namespace, pod) ( 1, max by(cluster, namespace, pod, node) (kube_pod_info{node!=""}) @@ -37,42 +37,3 @@ * on (namespace, pod) group_left(node) topk by(namespace, pod) (1, max by(namespace, pod, node) (kube_pod_info{node!=""}) ) - record: node_namespace_pod_container:container_memory_swap - - expr: |- -- sum by (namespace) ( -- sum by (namespace, pod) ( -- max by (namespace, pod, container) ( -- kube_pod_container_resource_requests_memory_bytes{job="kube-state-metrics"} -- ) * on(namespace, pod) group_left() max by (namespace, pod) ( -- kube_pod_status_phase{phase=~"Pending|Running"} == 1 -+ sum by (namespace, cluster) ( -+ sum by (namespace, pod, cluster) ( -+ max by (namespace, pod, container, cluster) ( -+ kube_pod_container_resource_requests{resource="memory",job="kube-state-metrics"} -+ ) * on(namespace, pod, cluster) group_left() max by (namespace, pod) ( -+ kube_pod_status_phase{phase=~"Pending|Running"} == 1 - ) - ) - ) -- record: namespace:kube_pod_container_resource_requests_memory_bytes:sum -+ record: namespace_memory:kube_pod_container_resource_requests:sum - - expr: |- -- sum by (namespace) ( -- sum by (namespace, pod) ( -- max by (namespace, pod, container) ( -- kube_pod_container_resource_requests_cpu_cores{job="kube-state-metrics"} -- ) * on(namespace, pod) group_left() max by (namespace, pod) ( -+ sum by (namespace, cluster) ( -+ sum by (namespace, pod, cluster) ( -+ max by (namespace, pod, container, cluster) ( -+ kube_pod_container_resource_requests{resource="cpu",job="kube-state-metrics"} -+ ) * on(namespace, pod, cluster) group_left() max by (namespace, pod) ( - kube_pod_status_phase{phase=~"Pending|Running"} == 1 - ) - ) - ) -- record: namespace:kube_pod_container_resource_requests_cpu_cores:sum -+ record: namespace_cpu:kube_pod_container_resource_requests:sum - - expr: |- - max by (cluster, namespace, workload, pod) ( - label_replace( diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-apps.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-apps.yaml.patch deleted file mode 100644 index bad08b2af..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-apps.yaml.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- charts-original/templates/prometheus/rules-1.14/kubernetes-apps.yaml -+++ charts/templates/prometheus/rules-1.14/kubernetes-apps.yaml -@@ -82,7 +82,7 @@ - != - kube_deployment_status_replicas_available{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} - ) and ( -- changes(kube_deployment_status_replicas_updated{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}[5m]) -+ changes(kube_deployment_status_replicas_updated{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}[10m]) - == - 0 - ) -@@ -103,7 +103,7 @@ - != - kube_statefulset_status_replicas{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} - ) and ( -- changes(kube_statefulset_status_replicas_updated{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}[5m]) -+ changes(kube_statefulset_status_replicas_updated{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}[10m]) - == - 0 - ) -@@ -273,7 +273,7 @@ - < - kube_hpa_spec_max_replicas{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}) - and -- changes(kube_hpa_status_current_replicas[15m]) == 0 -+ changes(kube_hpa_status_current_replicas{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}[15m]) == 0 - for: 15m - labels: - severity: warning diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-resources.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-resources.yaml.patch deleted file mode 100644 index b5c90bdec..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-resources.yaml.patch +++ /dev/null @@ -1,53 +0,0 @@ ---- charts-original/templates/prometheus/rules-1.14/kubernetes-resources.yaml -+++ charts/templates/prometheus/rules-1.14/kubernetes-resources.yaml -@@ -30,11 +30,11 @@ - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubecpuovercommit - summary: Cluster has overcommitted CPU resource requests. - expr: |- -- sum(namespace:kube_pod_container_resource_requests_cpu_cores:sum{}) -+ sum(namespace_cpu:kube_pod_container_resource_requests:sum{}) - / -- sum(kube_node_status_allocatable_cpu_cores) -+ sum(kube_node_status_allocatable{resource="cpu"}) - > -- (count(kube_node_status_allocatable_cpu_cores)-1) / count(kube_node_status_allocatable_cpu_cores) -+ ((count(kube_node_status_allocatable{resource="cpu"}) > 1) - 1) / count(kube_node_status_allocatable{resource="cpu"}) - for: 5m - labels: - severity: warning -@@ -47,13 +47,13 @@ - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubememoryovercommit - summary: Cluster has overcommitted memory resource requests. - expr: |- -- sum(namespace:kube_pod_container_resource_requests_memory_bytes:sum{}) -+ sum(namespace_memory:kube_pod_container_resource_requests:sum{}) - / -- sum(kube_node_status_allocatable_memory_bytes) -+ sum(kube_node_status_allocatable{resource="memory"}) - > -- (count(kube_node_status_allocatable_memory_bytes)-1) -+ ((count(kube_node_status_allocatable{resource="memory"}) > 1) - 1) - / -- count(kube_node_status_allocatable_memory_bytes) -+ count(kube_node_status_allocatable{resource="memory"}) - for: 5m - labels: - severity: warning -@@ -68,7 +68,7 @@ - expr: |- - sum(kube_resourcequota{job="kube-state-metrics", type="hard", resource="cpu"}) - / -- sum(kube_node_status_allocatable_cpu_cores) -+ sum(kube_node_status_allocatable{resource="cpu"}) - > 1.5 - for: 5m - labels: -@@ -84,7 +84,7 @@ - expr: |- - sum(kube_resourcequota{job="kube-state-metrics", type="hard", resource="memory"}) - / -- sum(kube_node_status_allocatable_memory_bytes{job="kube-state-metrics"}) -+ sum(kube_node_status_allocatable{resource="memory",job="kube-state-metrics"}) - > 1.5 - for: 5m - labels: diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-system-apiserver.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-system-apiserver.yaml.patch deleted file mode 100644 index 0b01d6216..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-system-apiserver.yaml.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- charts-original/templates/prometheus/rules-1.14/kubernetes-system-apiserver.yaml -+++ charts/templates/prometheus/rules-1.14/kubernetes-system-apiserver.yaml -@@ -51,7 +51,7 @@ - description: An aggregated API {{`{{`}} $labels.name {{`}}`}}/{{`{{`}} $labels.namespace {{`}}`}} has reported errors. It has appeared unavailable {{`{{`}} $value | humanize {{`}}`}} times averaged over the past 10m. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-aggregatedapierrors - summary: An aggregated API has reported errors. -- expr: sum by(name, namespace)(increase(aggregator_unavailable_apiservice_count[10m])) > 4 -+ expr: sum by(name, namespace)(increase(aggregator_unavailable_apiservice_total[10m])) > 4 - labels: - severity: warning - {{- if .Values.defaultRules.additionalRuleLabels }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-system-kubelet.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-system-kubelet.yaml.patch index c940aa3f7..a7c18d80c 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-system-kubelet.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-system-kubelet.yaml.patch @@ -1,14 +1,5 @@ --- charts-original/templates/prometheus/rules-1.14/kubernetes-system-kubelet.yaml +++ charts/templates/prometheus/rules-1.14/kubernetes-system-kubelet.yaml -@@ -59,7 +59,7 @@ - ) - / - max by(node) ( -- kube_node_status_capacity_pods{job="kube-state-metrics"} != 1 -+ kube_node_status_capacity{job="kube-state-metrics",resource="pods"} != 1 - ) > 0.95 - for: 15m - labels: @@ -96,7 +96,7 @@ description: Kubelet Pod startup 99th percentile latency is {{`{{`}} $value {{`}}`}} seconds on node {{`{{`}} $labels.node {{`}}`}}. runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeletpodstartuplatencyhigh diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-system.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-system.yaml.patch deleted file mode 100644 index e90ffc33e..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-system.yaml.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- charts-original/templates/prometheus/rules-1.14/kubernetes-system.yaml -+++ charts/templates/prometheus/rules-1.14/kubernetes-system.yaml -@@ -29,7 +29,7 @@ - description: There are {{`{{`}} $value {{`}}`}} different semantic versions of Kubernetes components running. - runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeversionmismatch - summary: Different semantic versions of Kubernetes components running. -- expr: count(count by (gitVersion) (label_replace(kubernetes_build_info{job!~"kube-dns|coredns"},"gitVersion","$1","gitVersion","(v[0-9]*.[0-9]*).*"))) > 1 -+ expr: count(count by (git_version) (label_replace(kubernetes_build_info{job!~"kube-dns|coredns"},"git_version","$1","git_version","(v[0-9]*.[0-9]*).*"))) > 1 - for: 15m - labels: - severity: warning diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/node.rules.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/node.rules.yaml.patch deleted file mode 100644 index d287a5855..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/node.rules.yaml.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- charts-original/templates/prometheus/rules-1.14/node.rules.yaml -+++ charts/templates/prometheus/rules-1.14/node.rules.yaml -@@ -34,7 +34,7 @@ - count by (cluster, node) (sum by (node, cpu) ( - node_cpu_seconds_total{job="node-exporter"} - * on (namespace, pod) group_left(node) -- node_namespace_pod:kube_pod_info: -+ topk by(namespace, pod) (1, node_namespace_pod:kube_pod_info:) - )) - record: node:node_num_cpu:sum - - expr: |- diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules/etcd.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules/etcd.yaml.patch index 31e92de09..3cd666753 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules/etcd.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules/etcd.yaml.patch @@ -1,10 +1,6 @@ --- charts-original/templates/prometheus/rules/etcd.yaml +++ charts/templates/prometheus/rules/etcd.yaml -@@ -1,10 +1,11 @@ - {{- /* --Generated from 'etcd' group from https://raw.githubusercontent.com/etcd-io/website/master/content/docs/v3.4.0/op-guide/etcd3_alert.rules.yml -+Generated from 'etcd' group from https://raw.githubusercontent.com/etcd-io/website/master/content/en/docs/v3.4/op-guide/etcd3_alert.rules.yml - Do not change in-place! In order to change this file first read following link: +@@ -4,7 +4,8 @@ https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack */ -}} {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/service.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/service.yaml.patch deleted file mode 100644 index baa5ce832..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/service.yaml.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- charts-original/templates/prometheus/service.yaml -+++ charts/templates/prometheus/service.yaml -@@ -51,7 +51,7 @@ - {{ toYaml .Values.prometheus.service.additionalPorts | indent 2 }} - {{- end }} - selector: -- app: prometheus -+ app.kubernetes.io/name: prometheus - prometheus: {{ template "kube-prometheus-stack.fullname" . }}-prometheus - {{- if .Values.prometheus.service.sessionAffinity }} - sessionAffinity: {{ .Values.prometheus.service.sessionAffinity }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/serviceThanosSidecar.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/serviceThanosSidecar.yaml.patch deleted file mode 100644 index c8e3e3e4e..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/serviceThanosSidecar.yaml.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- charts-original/templates/prometheus/serviceThanosSidecar.yaml -+++ charts/templates/prometheus/serviceThanosSidecar.yaml -@@ -25,6 +25,6 @@ - nodePort: {{ .Values.prometheus.thanosService.nodePort }} - {{- end }} - selector: -- app: prometheus -+ app.kubernetes.io/name: prometheus - prometheus: {{ template "kube-prometheus-stack.fullname" . }}-prometheus - {{- end }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/serviceaccount.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/serviceaccount.yaml.patch deleted file mode 100644 index 180488b0b..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/serviceaccount.yaml.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- charts-original/templates/prometheus/serviceaccount.yaml -+++ charts/templates/prometheus/serviceaccount.yaml -@@ -6,11 +6,15 @@ - namespace: {{ template "kube-prometheus-stack.namespace" . }} - labels: - app: {{ template "kube-prometheus-stack.name" . }}-prometheus -+ app.kubernetes.io/name: {{ template "kube-prometheus-stack.name" . }}-prometheus -+ app.kubernetes.io/component: prometheus - {{ include "kube-prometheus-stack.labels" . | indent 4 }} - {{- if .Values.prometheus.serviceAccount.annotations }} - annotations: - {{ toYaml .Values.prometheus.serviceAccount.annotations | indent 4 }} - {{- end }} -+{{- if .Values.global.imagePullSecrets }} - imagePullSecrets: - {{ toYaml .Values.global.imagePullSecrets | indent 2 }} - {{- end }} -+{{- end }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/serviceperreplica.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/serviceperreplica.yaml.patch deleted file mode 100644 index 78489c954..000000000 --- a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/serviceperreplica.yaml.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- charts-original/templates/prometheus/serviceperreplica.yaml -+++ charts/templates/prometheus/serviceperreplica.yaml -@@ -38,7 +38,7 @@ - port: {{ $serviceValues.port }} - targetPort: {{ $serviceValues.targetPort }} - selector: -- app: prometheus -+ app.kubernetes.io/name: prometheus - prometheus: {{ include "kube-prometheus-stack.fullname" $ }}-prometheus - statefulset.kubernetes.io/pod-name: prometheus-{{ include "kube-prometheus-stack.fullname" $ }}-prometheus-{{ $i }} - type: "{{ $serviceValues.type }}" diff --git a/packages/rancher-monitoring/generated-changes/patch/values.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/values.yaml.patch index dd960375e..48c678c73 100644 --- a/packages/rancher-monitoring/generated-changes/patch/values.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/values.yaml.patch @@ -1,6 +1,6 @@ --- charts-original/values.yaml +++ charts/values.yaml -@@ -2,18 +2,432 @@ +@@ -2,13 +2,423 @@ # This is a YAML-formatted file. # Declare variables to be passed into your templates. @@ -426,16 +426,7 @@ ## Provide a k8s version to auto dashboard import script example: kubeTargetVersionOverride: 1.16.6 ## - kubeTargetVersionOverride: "" - -+## Allow kubeVersion to be overridden while creating the ingress -+## -+kubeVersionOverride: "" -+ - ## Provide a name to substitute for the full names of resources - ## - fullnameOverride: "" -@@ -89,8 +503,32 @@ +@@ -93,8 +503,32 @@ ## global: @@ -468,18 +459,7 @@ pspEnabled: true pspAnnotations: {} ## Specify pod annotations -@@ -117,6 +555,10 @@ - ## - enabled: true - -+ ## Annotations for Alertmanager -+ ## -+ annotations: {} -+ - ## Api that prometheus will use to communicate with alertmanager. Possible values are v1, v2 - ## - apiVersion: v2 -@@ -143,6 +585,22 @@ +@@ -151,6 +585,22 @@ ## ref: https://prometheus.io/docs/alerting/configuration/#configuration-file ## https://prometheus.io/webtools/alerting/routing-tree-editor/ ## @@ -502,7 +482,7 @@ config: global: resolve_timeout: 5m -@@ -179,25 +637,76 @@ +@@ -187,25 +637,76 @@ ## ref: https://prometheus.io/docs/alerting/notifications/ ## https://prometheus.io/docs/alerting/notification_examples/ ## @@ -521,7 +501,7 @@ - # *Graph:* <{{ .GeneratorURL }}|:chart_with_upwards_trend:> - # *Runbook:* <{{ .Annotations.runbook }}|:spiral_note_pad:> - # *Details:* -- # {{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}` +- # {{ range .Labels.SortedPairs }} - *{{ .Name }}:* `{{ .Value }}` - # {{ end }} - # {{ end }} - # {{ end }} @@ -598,7 +578,7 @@ ingress: enabled: false -@@ -235,6 +744,25 @@ +@@ -243,6 +744,25 @@ ## Configuration for Alertmanager secret ## secret: @@ -624,18 +604,7 @@ annotations: {} ## Configuration for creating an Ingress that will map to each Alertmanager replica service -@@ -345,6 +873,10 @@ - interval: "" - selfMonitor: true - -+ ## proxyUrl: URL of a proxy that should be used for scraping. -+ ## -+ proxyUrl: "" -+ - ## scheme: HTTP scheme to use for scraping. Can be used with `tlsConfig` for example if using istio mTLS. - scheme: "" - -@@ -352,7 +884,7 @@ +@@ -364,7 +884,7 @@ ## Of type: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#tlsconfig tlsConfig: {} @@ -644,27 +613,16 @@ ## metric relabel configs to apply to samples before ingestion. ## -@@ -375,7 +907,7 @@ - ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#alertmanagerspec - ## - alertmanagerSpec: -- ## Standard object’s metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata -+ ## Standard object's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata - ## Metadata Labels and Annotations gets propagated to the Alertmanager pods. - ## - podMetadata: {} -@@ -383,8 +915,8 @@ +@@ -395,7 +915,7 @@ ## Image of Alertmanager ## image: - repository: quay.io/prometheus/alertmanager -- tag: v0.21.0 + repository: rancher/mirrored-prometheus-alertmanager -+ tag: v0.22.2 + tag: v0.22.2 sha: "" - ## If true then the user will be responsible to provide a secret with alertmanager configuration -@@ -495,9 +1027,13 @@ +@@ -507,9 +1027,13 @@ ## Define resources requests and limits for single Pods. ## ref: https://kubernetes.io/docs/user-guide/compute-resources/ ## @@ -681,7 +639,7 @@ ## Pod anti-affinity can prevent the scheduler from placing Prometheus replicas on the same node. ## The default value "soft" means that the scheduler should *prefer* to not schedule two replica pods onto the same node but no guarantee is provided. -@@ -601,10 +1137,54 @@ +@@ -613,6 +1137,30 @@ enabled: true namespaceOverride: "" @@ -709,15 +667,10 @@ + deploymentStrategy: + type: Recreate + -+ ## ForceDeployDatasources Create datasource configmap even if grafana deployment has been disabled -+ ## -+ forceDeployDatasources: false -+ -+ ## ForceDeployDashboard Create dashboard configmap even if grafana deployment has been disabled -+ ## -+ forceDeployDashboards: false -+ - ## Deploy default dashboards. + ## ForceDeployDatasources Create datasource configmap even if grafana deployment has been disabled + ## + forceDeployDatasources: false +@@ -625,6 +1173,18 @@ ## defaultDashboardsEnabled: true @@ -736,7 +689,7 @@ adminPassword: prom-operator ingress: -@@ -644,6 +1224,7 @@ +@@ -664,6 +1224,7 @@ dashboards: enabled: true label: grafana_dashboard @@ -744,18 +697,7 @@ ## Annotations for Grafana dashboard configmaps ## -@@ -653,6 +1234,10 @@ - enabled: true - defaultDatasourceEnabled: true - -+ ## URL of prometheus datasource -+ ## -+ # url: http://prometheus-stack-prometheus:9090/ -+ - # If not defined, will use prometheus.prometheusSpec.scrapeInterval or its default - # defaultDatasourceScrapeInterval: 15s - -@@ -692,7 +1277,60 @@ +@@ -716,7 +1277,60 @@ ## Passed to grafana subchart and used by servicemonitor below ## service: @@ -817,7 +759,7 @@ ## If true, create a serviceMonitor for grafana ## -@@ -722,6 +1360,14 @@ +@@ -746,6 +1360,14 @@ # targetLabel: nodename # replacement: $1 # action: replace @@ -832,62 +774,7 @@ ## Component scraping the kube api server ## -@@ -730,23 +1376,14 @@ - tlsConfig: - serverName: kubernetes - insecureSkipVerify: false -- -- ## If your API endpoint address is not reachable (as in AKS) you can replace it with the kubernetes service -- ## -- relabelings: [] -- # - sourceLabels: -- # - __meta_kubernetes_namespace -- # - __meta_kubernetes_service_name -- # - __meta_kubernetes_endpoint_port_name -- # action: keep -- # regex: default;kubernetes;https -- # - targetLabel: __address__ -- # replacement: kubernetes.default.svc:443 -- - serviceMonitor: - ## Scrape interval. If not set, the Prometheus default scrape interval is used. - ## - interval: "" -+ ## proxyUrl: URL of a proxy that should be used for scraping. -+ ## -+ proxyUrl: "" -+ - jobLabel: component - selector: - matchLabels: -@@ -759,6 +1396,15 @@ - # - action: keep - # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' - # sourceLabels: [__name__] -+ relabelings: [] -+ # - sourceLabels: -+ # - __meta_kubernetes_namespace -+ # - __meta_kubernetes_service_name -+ # - __meta_kubernetes_endpoint_port_name -+ # action: keep -+ # regex: default;kubernetes;https -+ # - targetLabel: __address__ -+ # replacement: kubernetes.default.svc:443 - - ## Component scraping the kubelet and kubelet-hosted cAdvisor - ## -@@ -771,6 +1417,10 @@ - ## - interval: "" - -+ ## proxyUrl: URL of a proxy that should be used for scraping. -+ ## -+ proxyUrl: "" -+ - ## Enable scraping the kubelet over https. For requirements to enable this see - ## https://github.com/prometheus-operator/prometheus-operator/issues/926 - ## -@@ -879,7 +1529,7 @@ +@@ -907,7 +1529,7 @@ ## Component scraping the kube controller manager ## kubeControllerManager: @@ -896,40 +783,7 @@ ## If your kube controller manager is not deployed as a pod, specify IPs it can be found on ## -@@ -903,6 +1553,10 @@ - ## - interval: "" - -+ ## proxyUrl: URL of a proxy that should be used for scraping. -+ ## -+ proxyUrl: "" -+ - ## Enable scraping kube-controller-manager over https. - ## Requires proper certs (not self-signed) and delegated authentication/authorization checks - ## -@@ -945,6 +1599,10 @@ - ## - interval: "" - -+ ## proxyUrl: URL of a proxy that should be used for scraping. -+ ## -+ proxyUrl: "" -+ - ## metric relabel configs to apply to samples before ingestion. - ## - metricRelabelings: [] -@@ -980,6 +1638,10 @@ - ## - interval: "" - -+ ## proxyUrl: URL of a proxy that should be used for scraping. -+ ## -+ proxyUrl: "" -+ - ## metric relabel configs to apply to samples before ingestion. - ## - metricRelabelings: [] -@@ -1014,7 +1676,7 @@ +@@ -1054,7 +1676,7 @@ ## Component scraping etcd ## kubeEtcd: @@ -938,17 +792,7 @@ ## If your etcd is not deployed as a pod, specify IPs it can be found on ## -@@ -1048,6 +1710,9 @@ - ## Scrape interval. If not set, the Prometheus default scrape interval is used. - ## - interval: "" -+ ## proxyUrl: URL of a proxy that should be used for scraping. -+ ## -+ proxyUrl: "" - scheme: http - insecureSkipVerify: false - serverName: "" -@@ -1076,7 +1741,7 @@ +@@ -1119,7 +1741,7 @@ ## Component scraping kube scheduler ## kubeScheduler: @@ -957,17 +801,7 @@ ## If your kube scheduler is not deployed as a pod, specify IPs it can be found on ## -@@ -1099,6 +1764,9 @@ - ## Scrape interval. If not set, the Prometheus default scrape interval is used. - ## - interval: "" -+ ## proxyUrl: URL of a proxy that should be used for scraping. -+ ## -+ proxyUrl: "" - ## Enable scraping kube-scheduler over https. - ## Requires proper certs (not self-signed) and delegated authentication/authorization checks - ## -@@ -1131,7 +1799,7 @@ +@@ -1177,7 +1799,7 @@ ## Component scraping kube proxy ## kubeProxy: @@ -976,34 +810,7 @@ ## If your kube proxy is not deployed as a pod, specify IPs it can be found on ## -@@ -1153,6 +1821,10 @@ - ## - interval: "" - -+ ## proxyUrl: URL of a proxy that should be used for scraping. -+ ## -+ proxyUrl: "" -+ - ## Enable scraping kube-proxy over https. - ## Requires proper certs (not self-signed) and delegated authentication/authorization checks - ## -@@ -1181,9 +1853,15 @@ - ## Scrape interval. If not set, the Prometheus default scrape interval is used. - ## - interval: "" -+ ## proxyUrl: URL of a proxy that should be used for scraping. -+ ## -+ proxyUrl: "" - ## Override serviceMonitor selector - ## - selectorOverride: {} -+ ## Override namespace selector -+ ## -+ namespaceOverride: "" - - ## metric relabel configs to apply to samples before ingestion. - ## -@@ -1210,6 +1888,13 @@ +@@ -1266,6 +1888,13 @@ create: true podSecurityPolicy: enabled: true @@ -1017,18 +824,7 @@ ## Deploy node exporter as a daemonset to all nodes ## -@@ -1225,6 +1910,10 @@ - ## - interval: "" - -+ ## proxyUrl: URL of a proxy that should be used for scraping. -+ ## -+ proxyUrl: "" -+ - ## How long until a scrape request times out. If not set, the Prometheus default scape timeout is used. - ## - scrapeTimeout: "" -@@ -1259,6 +1948,16 @@ +@@ -1319,6 +1948,16 @@ extraArgs: - --collector.filesystem.ignored-mount-points=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/.+)($|/) - --collector.filesystem.ignored-fs-types=^(autofs|binfmt_misc|bpf|cgroup2?|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|iso9660|mqueue|nsfs|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|selinuxfs|squashfs|sysfs|tracefs)$ @@ -1045,7 +841,7 @@ ## Manages Prometheus and Alertmanager components ## -@@ -1271,8 +1970,8 @@ +@@ -1331,8 +1970,8 @@ enabled: true # Value must match version names from https://golang.org/pkg/crypto/tls/#pkg-constants tlsMinVersion: VersionTLS13 @@ -1056,35 +852,16 @@ ## Admission webhook support for PrometheusRules resources added in Prometheus Operator 0.30 can be enabled to prevent incorrectly formatted ## rules from making their way into prometheus and potentially preventing the container from starting -@@ -1289,8 +1988,8 @@ +@@ -1349,7 +1988,7 @@ patch: enabled: true image: - repository: jettech/kube-webhook-certgen -- tag: v1.5.0 + repository: rancher/mirrored-jettech-kube-webhook-certgen -+ tag: v1.5.2 + tag: v1.5.2 sha: "" pullPolicy: IfNotPresent - resources: {} -@@ -1301,6 +2000,16 @@ - nodeSelector: {} - affinity: {} - tolerations: [] -+ -+ ## SecurityContext holds pod-level security attributes and common container settings. -+ ## This defaults to non root user with uid 2000 and gid 2000. *v1.PodSecurityContext false -+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ -+ ## -+ securityContext: -+ runAsGroup: 2000 -+ runAsNonRoot: true -+ runAsUser: 2000 -+ - # Use certmanager to generate webhook certs - certManager: - enabled: false -@@ -1428,13 +2137,13 @@ +@@ -1498,13 +2137,13 @@ ## Resource limits & requests ## @@ -1105,62 +882,25 @@ # Required for use in managed kubernetes clusters (such as AWS EKS) with custom CNI (such as calico), # because control-plane managed by AWS cannot communicate with pods' IP CIDR and admission webhooks are not working -@@ -1487,8 +2196,8 @@ +@@ -1557,7 +2196,7 @@ ## Prometheus-operator image ## image: - repository: quay.io/prometheus-operator/prometheus-operator -- tag: v0.46.0 + repository: rancher/mirrored-prometheus-operator-prometheus-operator -+ tag: v0.48.0 + tag: v0.48.0 sha: "" pullPolicy: IfNotPresent - -@@ -1503,8 +2212,8 @@ +@@ -1573,7 +2212,7 @@ ## Prometheus-config-reloader image to use for config and rule reloading ## prometheusConfigReloaderImage: - repository: quay.io/prometheus-operator/prometheus-config-reloader -- tag: v0.46.0 + repository: rancher/mirrored-prometheus-operator-prometheus-config-reloader -+ tag: v0.48.0 + tag: v0.48.0 sha: "" - ## Set the prometheus config reloader side-car CPU limit -@@ -1535,6 +2244,7 @@ - serviceAccount: - create: true - name: "" -+ annotations: {} - - # Service for thanos service discovery on sidecar - # Enable this can make Thanos Query can use -@@ -1558,6 +2268,24 @@ - ## - nodePort: 30901 - -+ # Service for external access to sidecar -+ # Enabling this creates a service to expose thanos-sidecar outside the cluster. -+ thanosServiceExternal: -+ enabled: false -+ annotations: {} -+ labels: {} -+ portName: grpc -+ port: 10901 -+ targetPort: "grpc" -+ -+ ## Service type -+ ## -+ type: LoadBalancer -+ -+ ## Port to expose on each node -+ ## -+ nodePort: 30901 -+ - ## Configuration for Prometheus service - ## - service: -@@ -1570,7 +2298,7 @@ +@@ -1659,7 +2298,7 @@ port: 9090 ## To be used with a proxy extraContainer port @@ -1169,26 +909,16 @@ ## List of IP addresses at which the Prometheus server service is available ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips -@@ -1819,11 +2547,16 @@ - ## - enableAdminAPI: false - -+ # EnableFeatures API enables access to Prometheus disabled features. -+ # ref: https://prometheus.io/docs/prometheus/latest/disabled_features/ -+ enableFeatures: [] -+ # - exemplar-storage -+ +@@ -1916,7 +2555,7 @@ ## Image of Prometheus. ## image: - repository: quay.io/prometheus/prometheus -- tag: v2.24.0 + repository: rancher/mirrored-prometheus-prometheus -+ tag: v2.27.1 + tag: v2.27.1 sha: "" - ## Tolerations for use with node taints -@@ -1885,6 +2618,11 @@ +@@ -1979,6 +2618,11 @@ ## externalUrl: "" @@ -1200,7 +930,7 @@ ## Define which Nodes the Pods are scheduled on. ## ref: https://kubernetes.io/docs/user-guide/node-selection/ ## -@@ -1917,7 +2655,7 @@ +@@ -2011,7 +2655,7 @@ ## prometheus resource to be created with selectors based on values in the helm deployment, ## which will also match the PrometheusRule resources created ## @@ -1209,7 +939,7 @@ ## PrometheusRules to be selected for target discovery. ## If {}, select all PrometheusRules -@@ -1942,7 +2680,7 @@ +@@ -2036,7 +2680,7 @@ ## prometheus resource to be created with selectors based on values in the helm deployment, ## which will also match the servicemonitors created ## @@ -1218,7 +948,7 @@ ## ServiceMonitors to be selected for target discovery. ## If {}, select all ServiceMonitors -@@ -1965,7 +2703,7 @@ +@@ -2059,7 +2703,7 @@ ## prometheus resource to be created with selectors based on values in the helm deployment, ## which will also match the podmonitors created ## @@ -1227,31 +957,7 @@ ## PodMonitors to be selected for target discovery. ## If {}, select all PodMonitors -@@ -2044,7 +2782,7 @@ - ## - routePrefix: / - -- ## Standard object’s metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata -+ ## Standard object's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata - ## Metadata Labels and Annotations gets propagated to the prometheus pods. - ## - podMetadata: {} -@@ -2081,20 +2819,28 @@ - ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#remotereadspec - remoteRead: [] - # - url: http://remote1/read -+ ## additionalRemoteRead is appended to remoteRead -+ additionalRemoteRead: [] - - ## The remote_write spec configuration for Prometheus. - ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#remotewritespec - remoteWrite: [] - # - url: http://remote1/push -+ ## additionalRemoteWrite is appended to remoteWrite -+ additionalRemoteWrite: [] - - ## Enable/Disable Grafana dashboards provisioning for prometheus remote write feature - remoteWriteDashboards: false +@@ -2190,9 +2834,13 @@ ## Resource limits & requests ## @@ -1268,7 +974,7 @@ ## Prometheus StorageSpec for persistent data ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/user-guides/storage.md -@@ -2117,7 +2863,13 @@ +@@ -2215,7 +2863,13 @@ # medium: Memory # Additional volumes on the output StatefulSet definition. @@ -1283,7 +989,7 @@ # Additional VolumeMounts on the output StatefulSet definition. volumeMounts: [] -@@ -2224,9 +2976,34 @@ +@@ -2322,9 +2976,34 @@ ## thanos: {} @@ -1319,7 +1025,7 @@ ## InitContainers allows injecting additional initContainers. This is meant to allow doing some changes ## (permissions, dir tree) on mounted volumes before starting prometheus -@@ -2234,7 +3011,7 @@ +@@ -2332,7 +3011,7 @@ ## PortName to use for Prometheus. ## diff --git a/packages/rancher-monitoring/package.yaml b/packages/rancher-monitoring/package.yaml index c35618f8a..59a93ece0 100644 --- a/packages/rancher-monitoring/package.yaml +++ b/packages/rancher-monitoring/package.yaml @@ -1,6 +1,6 @@ url: https://github.com/prometheus-community/helm-charts.git subdirectory: charts/kube-prometheus-stack -commit: 3ca6ba66032a1efce0500f9ad6f83351ad0604b8 +commit: ba91bdb2d79ca4419cf72078f5f4bfcc426d4599 version: 100.0.0 additionalCharts: - workingDir: charts-crd