From 44012fab01c7ec138c2370a64b209c567fcfdf73 Mon Sep 17 00:00:00 2001 From: Vedant Pareek <36420365+dunefro@users.noreply.github.com> Date: Thu, 16 Nov 2023 12:34:41 +0530 Subject: [PATCH] Added default dashboards for grafana (#131) * Added default dashboards for grafana * Updated grafana chart * Added doc and condition in configmap for dashboard.enabled * Added grafana upgrade guide * Updated github CI/CD docs * Modified README --- .github/workflows/docs.yml | 9 +- charts/tfy-grafana/Chart.yaml | 6 +- charts/tfy-grafana/README.md | 73 +- .../dashboards/cluster-overview.json | 3602 +++++++++++++++++ .../dashboards/persistent-volumes.json | 1570 +++++++ charts/tfy-grafana/templates/configmap.yaml | 14 + charts/tfy-grafana/values.yaml | 28 +- 7 files changed, 5254 insertions(+), 48 deletions(-) create mode 100644 charts/tfy-grafana/dashboards/cluster-overview.json create mode 100644 charts/tfy-grafana/dashboards/persistent-volumes.json create mode 100644 charts/tfy-grafana/templates/configmap.yaml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 5090959a..01101c1e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,10 +1,11 @@ name: '[CI/CD] Update README metadata' on: - - pull_request - # paths: - # # - charts/*/values.yaml - # - 'charts/tfy-agent/values.yaml' + pull_request: + branches: + - 'main' + paths: + - 'charts/*' jobs: update-readme-metadata: runs-on: ubuntu-latest diff --git a/charts/tfy-grafana/Chart.yaml b/charts/tfy-grafana/Chart.yaml index 95bec52c..8abe08a0 100644 --- a/charts/tfy-grafana/Chart.yaml +++ b/charts/tfy-grafana/Chart.yaml @@ -1,10 +1,10 @@ apiVersion: v2 name: tfy-grafana description: Truefoundry grafana provisioner -version: 0.1.3 +version: 0.1.4-rc.1 maintainers: - - name: truefoundry +- name: truefoundry dependencies: - name: grafana version: 6.58.7 - repository: "https://grafana.github.io/helm-charts" \ No newline at end of file + repository: "https://grafana.github.io/helm-charts" diff --git a/charts/tfy-grafana/README.md b/charts/tfy-grafana/README.md index 90e50957..d6dc804b 100644 --- a/charts/tfy-grafana/README.md +++ b/charts/tfy-grafana/README.md @@ -1,38 +1,49 @@ # Header subheading +## Upgrade Guide + +### From 1.3 to 1.4 +- Default dashboards are now included with the grafana charts +- You can add the dashboards in the `dashboards/` folder +- Apply a label to the configmap via `.grafana.sidecar.dashboards.label` and `.grafana.sidecar.dashboards.labelValue`. + + ## Parameters ### grafana Configuration for Grafana deployment. -| Name | Description | Value | -| --------------------------------------------------------- | -------------------------------------------------- | -------------------- | -| `grafana.replicas` | StatefulSet configuration for Grafana. | `1` | -| `grafana.useStatefulSet` | Replicas configuration for Grafana. | `true` | -| `grafana.resources.limits.cpu` | CPU limit for Grafana. | `100m` | -| `grafana.resources.limits.memory` | Memory limit for Grafana. | `128Mi` | -| `grafana.resources.requests.cpu` | CPU request for Grafana. | `100m` | -| `grafana.resources.requests.memory` | Memory request for Grafana. | `128Mi` | -| `grafana.adminUser` | Admin user for Grafana. | `""` | -| `grafana.adminPassword` | Admin password for Grafana. | `""` | -| `grafana.initChownData.resources.limits.cpu` | CPU limit for initializing chown data. | `100m` | -| `grafana.initChownData.resources.limits.memory` | Memory limit for initializing chown data. | `128Mi` | -| `grafana.initChownData.resources.requests.cpu` | CPU request for initializing chown data. | `100m` | -| `grafana.initChownData.resources.requests.memory` | Memory request for initializing chown data. | `128Mi` | -| `grafana.sidecar.resources.limits.cpu` | CPU limit for Grafana sidecar. | `100m` | -| `grafana.sidecar.resources.limits.memory` | Memory limit for Grafana sidecar. | `100Mi` | -| `grafana.sidecar.resources.requests.cpu` | CPU request for Grafana sidecar. | `50m` | -| `grafana.sidecar.resources.requests.memory` | Memory request for Grafana sidecar. | `50Mi` | -| `grafana.datasources.datasources.yaml.apiVersion` | API version for the datasource configuration. | `1` | -| `grafana.datasources.datasources.yaml.datasources[0].name`| Name of the first datasource. | `Prometheus` | -| `grafana.datasources.datasources.yaml.datasources[0].type`| Type of the first datasource. | `prometheus` | -| `grafana.datasources.datasources.yaml.datasources[0].url` | URL for the first datasource. | `http://prometheus-kube-prometheus-prometheus.prometheus.svc.cluster.local:9090` | -| `grafana.datasources.datasources.yaml.datasources[0].access` | Access type for the first datasource. | `proxy` | -| `grafana.datasources.datasources.yaml.datasources[0].isDefault` | Specify if the first datasource is the default. | `true` | -| `grafana.datasources.datasources.yaml.datasources[1].name`| Name of the second datasource. | `Loki` | -| `grafana.datasources.datasources.yaml.datasources[1].type`| Type of the second datasource. | `loki` | -| `grafana.datasources.datasources.yaml.datasources[1].url` | URL for the second datasource. | `http://loki.loki.svc.cluster.local:3100` | -| `grafana.datasources.datasources.yaml.datasources[1].access` | Access type for the second datasource. | `proxy` | -| `grafana.datasources.datasources.yaml.datasources[1].isDefault` | Specify if the second datasource is the default.| `false` | -| `grafana.persistence.enabled` | Enable or disable persistence for Grafana. | `true` | -| `grafana.persistence.size` | Size of the persisted storage for Grafana. | `10Gi` | +| Name | Description | Value | +| --------------------------------------------------------------- | -------------------------------------------------- | ---------------------------- | +| `grafana.replicas` | StatefulSet configuration for Grafana. | `1` | +| `grafana.useStatefulSet` | Replicas configuration for Grafana. | `true` | +| `grafana.resources.limits.cpu` | CPU limit for Grafana. | `100m` | +| `grafana.resources.limits.memory` | Memory limit for Grafana. | `128Mi` | +| `grafana.resources.requests.cpu` | CPU request for Grafana. | `100m` | +| `grafana.resources.requests.memory` | Memory request for Grafana. | `128Mi` | +| `grafana.adminUser` | Admin user for Grafana. | `""` | +| `grafana.adminPassword` | Admin password for Grafana. | `""` | +| `grafana.initChownData.resources.limits.cpu` | CPU limit for initializing chown data. | `100m` | +| `grafana.initChownData.resources.limits.memory` | Memory limit for initializing chown data. | `128Mi` | +| `grafana.initChownData.resources.requests.cpu` | CPU request for initializing chown data. | `100m` | +| `grafana.initChownData.resources.requests.memory` | Memory request for initializing chown data. | `128Mi` | +| `grafana.sidecar.resources.limits.cpu` | CPU limit for Grafana sidecar. | `100m` | +| `grafana.sidecar.resources.limits.memory` | Memory limit for Grafana sidecar. | `100Mi` | +| `grafana.sidecar.resources.requests.cpu` | CPU request for Grafana sidecar. | `50m` | +| `grafana.sidecar.resources.requests.memory` | Memory request for Grafana sidecar. | `50Mi` | +| `grafana.sidecar.dashboards.enabled` | Whether to enable/disable dashboards | `false` | +| `grafana.sidecar.dashboards.label` | Label key for grafana dashboard configmap | `truefoundry_truevisibility` | +| `grafana.sidecar.dashboards.labelValue` | Label value for grafana dashboard configmap | `owner` | +| `grafana.datasources.datasources.yaml.apiVersion` | API version for the datasource configuration. | `1` | +| `grafana.datasources.datasources.yaml.datasources[0].name` | Name of the first datasource. | `Prometheus` | +| `grafana.datasources.datasources.yaml.datasources[0].type` | Type of the first datasource. | `prometheus` | +| `grafana.datasources.datasources.yaml.datasources[0].url` | URL for the first datasource. | `http://prometheus-kube-prometheus-prometheus.prometheus.svc.cluster.local:9090` | +| `grafana.datasources.datasources.yaml.datasources[0].access` | Access type for the first datasource. | `proxy` | +| `grafana.datasources.datasources.yaml.datasources[0].isDefault` | Specify if the first datasource is the default. | `true` | +| `grafana.datasources.datasources.yaml.datasources[1].name` | Name of the second datasource. | `Loki` | +| `grafana.datasources.datasources.yaml.datasources[1].type` | Type of the second datasource. | `loki` | +| `grafana.datasources.datasources.yaml.datasources[1].url` | URL for the second datasource. | `http://loki.loki.svc.cluster.local:3100` | +| `grafana.datasources.datasources.yaml.datasources[1].access` | Access type for the second datasource. | `proxy` | +| `grafana.datasources.datasources.yaml.datasources[1].isDefault` | Specify if the second datasource is the default. | `false` | +| `grafana.persistence.enabled` | Enable or disable persistence for Grafana. | `true` | +| `grafana.persistence.size` | Size of the persisted storage for Grafana. | `10Gi` | diff --git a/charts/tfy-grafana/dashboards/cluster-overview.json b/charts/tfy-grafana/dashboards/cluster-overview.json new file mode 100644 index 00000000..227c34a0 --- /dev/null +++ b/charts/tfy-grafana/dashboards/cluster-overview.json @@ -0,0 +1,3602 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "An overview of kubernetes cluster with its CPU/Memory usage and Network/disk usage", + "editable": false, + "fiscalYearStartMonth": 0, + "gnetId": 17287, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "datasource": "PBFA97CFB590B2093", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 23, + "panels": [], + "targets": [ + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "refId": "A" + } + ], + "title": "Headlines", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 0, + "y": 1 + }, + "id": 1, + "interval": "1m", + "links": [], + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.4", + "targets": [ + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "editorMode": "code", + "expr": "cluster:node_cpu:ratio_rate5m{cluster=\"$cluster\"}", + "format": "time_series", + "instant": true, + "intervalFactor": 2, + "refId": "A" + } + ], + "title": "CPU Utilisation", + "type": "stat" + }, + { + "datasource": "PBFA97CFB590B2093", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 4, + "y": 1 + }, + "id": 2, + "interval": "1m", + "links": [], + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.4", + "targets": [ + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "expr": "sum(namespace_cpu:kube_pod_container_resource_requests:sum{cluster=\"$cluster\"}) / sum(kube_node_status_allocatable{job=\"kube-state-metrics\",resource=\"cpu\",cluster=\"$cluster\"})", + "format": "time_series", + "instant": true, + "intervalFactor": 2, + "refId": "A" + } + ], + "title": "CPU Requests Commitment", + "type": "stat" + }, + { + "datasource": "PBFA97CFB590B2093", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 8, + "y": 1 + }, + "id": 3, + "interval": "1m", + "links": [], + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.4", + "targets": [ + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "expr": "sum(namespace_cpu:kube_pod_container_resource_limits:sum{cluster=\"$cluster\"}) / sum(kube_node_status_allocatable{job=\"kube-state-metrics\",resource=\"cpu\",cluster=\"$cluster\"})", + "format": "time_series", + "instant": true, + "intervalFactor": 2, + "refId": "A" + } + ], + "title": "CPU Limits Commitment", + "type": "stat" + }, + { + "datasource": "PBFA97CFB590B2093", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 12, + "y": 1 + }, + "id": 4, + "interval": "1m", + "links": [], + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.4", + "targets": [ + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "expr": "1 - sum(:node_memory_MemAvailable_bytes:sum{cluster=\"$cluster\"}) / sum(node_memory_MemTotal_bytes{job=\"node-exporter\",cluster=\"$cluster\"})", + "format": "time_series", + "instant": true, + "intervalFactor": 2, + "refId": "A" + } + ], + "title": "Memory Utilisation", + "type": "stat" + }, + { + "datasource": "PBFA97CFB590B2093", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 16, + "y": 1 + }, + "id": 5, + "interval": "1m", + "links": [], + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.4", + "targets": [ + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "expr": "sum(namespace_memory:kube_pod_container_resource_requests:sum{cluster=\"$cluster\"}) / sum(kube_node_status_allocatable{job=\"kube-state-metrics\",resource=\"memory\",cluster=\"$cluster\"})", + "format": "time_series", + "instant": true, + "intervalFactor": 2, + "refId": "A" + } + ], + "title": "Memory Requests Commitment", + "type": "stat" + }, + { + "datasource": "PBFA97CFB590B2093", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 20, + "y": 1 + }, + "id": 6, + "interval": "1m", + "links": [], + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.4", + "targets": [ + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "expr": "sum(namespace_memory:kube_pod_container_resource_limits:sum{cluster=\"$cluster\"}) / sum(kube_node_status_allocatable{job=\"kube-state-metrics\",resource=\"memory\",cluster=\"$cluster\"})", + "format": "time_series", + "instant": true, + "intervalFactor": 2, + "refId": "A" + } + ], + "title": "Memory Limits Commitment", + "type": "stat" + }, + { + "collapsed": false, + "datasource": "PBFA97CFB590B2093", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 4 + }, + "id": 24, + "panels": [], + "targets": [ + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "refId": "A" + } + ], + "title": "CPU", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 0, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 5 + }, + "id": 7, + "interval": "1m", + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "10.0.4", + "targets": [ + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "editorMode": "code", + "expr": "sum(rate(container_cpu_usage_seconds_total{job=\"kubelet\",container!=\"\"}[$__rate_interval])) by (namespace)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{namespace}}", + "range": true, + "refId": "A", + "step": 10 + } + ], + "title": "CPU Usage", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": "PBFA97CFB590B2093", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 25, + "panels": [], + "targets": [ + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "refId": "A" + } + ], + "title": "CPU Quota", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "columns": [], + "dashLength": 10, + "dashes": false, + "datasource": "PBFA97CFB590B2093", + "fill": 1, + "fontSize": "100%", + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 13 + }, + "id": 8, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "showHeader": true, + "sort": { + "col": 0, + "desc": true + }, + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "align": "auto", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Pods", + "align": "auto", + "colors": [], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down to pods", + "linkUrl": "/d/a87fb0d919ec0ea5f6543124e16c42a5/kubernetes-compute-resources-namespace-workloads?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1", + "pattern": "Value #A", + "thresholds": [], + "type": "number", + "unit": "short" + }, + { + "alias": "Workloads", + "align": "auto", + "colors": [], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down to workloads", + "linkUrl": "/d/a87fb0d919ec0ea5f6543124e16c42a5/kubernetes-compute-resources-namespace-workloads?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1", + "pattern": "Value #B", + "thresholds": [], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Usage", + "align": "auto", + "colors": [], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests", + "align": "auto", + "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": "short" + }, + { + "alias": "CPU Requests %", + "align": "auto", + "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": "percentunit" + }, + { + "alias": "CPU Limits", + "align": "auto", + "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": "short" + }, + { + "alias": "CPU Limits %", + "align": "auto", + "colors": [], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #G", + "thresholds": [], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Namespace", + "align": "auto", + "colors": [], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down to pods", + "linkUrl": "/d/a87fb0d919ec0ea5f6543124e16c42a5/kubernetes-compute-resources-namespace-workloads?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1", + "pattern": "namespace", + "thresholds": [], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "align": "auto", + "colors": [], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "expr": "sum(kube_pod_owner{job=\"kube-state-metrics\", cluster=\"$cluster\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "expr": "count(avg(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\"}) by (workload, namespace)) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "expr": "sum(namespace_cpu:kube_pod_container_resource_requests:sum{cluster=\"$cluster\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\"}) by (namespace) / sum(namespace_cpu:kube_pod_container_resource_requests:sum{cluster=\"$cluster\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "expr": "sum(namespace_cpu:kube_pod_container_resource_limits:sum{cluster=\"$cluster\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + }, + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\"}) by (namespace) / sum(namespace_cpu:kube_pod_container_resource_limits:sum{cluster=\"$cluster\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "G", + "step": 10 + } + ], + "thresholds": [], + "title": "CPU Quota", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "transform": "table", + "type": "table-old", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "min": 0, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ] + }, + { + "collapsed": false, + "datasource": "PBFA97CFB590B2093", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 20 + }, + "id": 26, + "panels": [], + "targets": [ + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "refId": "A" + } + ], + "title": "Memory", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fill": 10, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 21 + }, + "hiddenSeries": false, + "id": 9, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "editorMode": "code", + "expr": "sum(container_memory_rss{job=\"kubelet\", cluster=\"$cluster\", container!=\"\"}) by (namespace)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{namespace}}", + "range": true, + "refId": "A", + "step": 10 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Memory Usage (w/o cache)", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "logBase": 1, + "min": 0, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "datasource": "PBFA97CFB590B2093", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 28 + }, + "id": 27, + "panels": [], + "targets": [ + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "refId": "A" + } + ], + "title": "Memory Requests", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "columns": [], + "dashLength": 10, + "dashes": false, + "datasource": "PBFA97CFB590B2093", + "fill": 1, + "fontSize": "100%", + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 29 + }, + "id": 10, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "showHeader": true, + "sort": { + "col": 0, + "desc": true + }, + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "align": "auto", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Pods", + "align": "auto", + "colors": [], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down to pods", + "linkUrl": "/d/a87fb0d919ec0ea5f6543124e16c42a5/kubernetes-compute-resources-namespace-workloads?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1", + "pattern": "Value #A", + "thresholds": [], + "type": "number", + "unit": "short" + }, + { + "alias": "Workloads", + "align": "auto", + "colors": [], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down to workloads", + "linkUrl": "/d/a87fb0d919ec0ea5f6543124e16c42a5/kubernetes-compute-resources-namespace-workloads?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1", + "pattern": "Value #B", + "thresholds": [], + "type": "number", + "unit": "short" + }, + { + "alias": "Memory Usage", + "align": "auto", + "colors": [], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests", + "align": "auto", + "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": "bytes" + }, + { + "alias": "Memory Requests %", + "align": "auto", + "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": "percentunit" + }, + { + "alias": "Memory Limits", + "align": "auto", + "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": "bytes" + }, + { + "alias": "Memory Limits %", + "align": "auto", + "colors": [], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #G", + "thresholds": [], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Namespace", + "align": "auto", + "colors": [], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down to pods", + "linkUrl": "/d/a87fb0d919ec0ea5f6543124e16c42a5/kubernetes-compute-resources-namespace-workloads?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1", + "pattern": "namespace", + "thresholds": [], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "align": "auto", + "colors": [], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "expr": "sum(kube_pod_owner{job=\"kube-state-metrics\", cluster=\"$cluster\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "expr": "count(avg(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\"}) by (workload, namespace)) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "expr": "sum(container_memory_rss{job=\"kubelet\", cluster=\"$cluster\", container!=\"\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "expr": "sum(namespace_memory:kube_pod_container_resource_requests:sum{cluster=\"$cluster\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "expr": "sum(container_memory_rss{job=\"kubelet\", cluster=\"$cluster\", container!=\"\"}) by (namespace) / sum(namespace_memory:kube_pod_container_resource_requests:sum{cluster=\"$cluster\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "expr": "sum(namespace_memory:kube_pod_container_resource_limits:sum{cluster=\"$cluster\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + }, + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "expr": "sum(container_memory_rss{job=\"kubelet\", cluster=\"$cluster\", container!=\"\"}) by (namespace) / sum(namespace_memory:kube_pod_container_resource_limits:sum{cluster=\"$cluster\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "G", + "step": 10 + } + ], + "thresholds": [], + "title": "Requests by Namespace", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "transform": "table", + "type": "table-old", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "min": 0, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ] + }, + { + "collapsed": false, + "datasource": "PBFA97CFB590B2093", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 36 + }, + "id": 28, + "panels": [], + "targets": [ + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "refId": "A" + } + ], + "title": "Current Network Usage", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "columns": [], + "dashLength": 10, + "dashes": false, + "datasource": "PBFA97CFB590B2093", + "fill": 1, + "fontSize": "100%", + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 37 + }, + "id": 11, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "showHeader": true, + "sort": { + "col": 0, + "desc": true + }, + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "align": "auto", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Current Receive Bandwidth", + "align": "auto", + "colors": [], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Current Transmit Bandwidth", + "align": "auto", + "colors": [], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Rate of Received Packets", + "align": "auto", + "colors": [], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Transmitted Packets", + "align": "auto", + "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": "pps" + }, + { + "alias": "Rate of Received Packets Dropped", + "align": "auto", + "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": "pps" + }, + { + "alias": "Rate of Transmitted Packets Dropped", + "align": "auto", + "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": "pps" + }, + { + "alias": "Namespace", + "align": "auto", + "colors": [], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTargetBlank": false, + "linkTooltip": "Drill down to pods", + "linkUrl": "/d/a87fb0d919ec0ea5f6543124e16c42a5/kubernetes-compute-resources-namespace-workloads?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1", + "pattern": "namespace", + "thresholds": [], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "align": "auto", + "colors": [], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "exemplar": false, + "expr": "sum(irate(container_network_receive_bytes_total{job=\"kubelet\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "exemplar": false, + "expr": "sum(irate(container_network_transmit_bytes_total{job=\"kubelet\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "exemplar": false, + "expr": "sum(irate(container_network_receive_packets_total{job=\"kubelet\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "exemplar": false, + "expr": "sum(irate(container_network_transmit_packets_total{job=\"kubelet\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "exemplar": false, + "expr": "sum(irate(container_network_receive_packets_dropped_total{job=\"kubelet\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "exemplar": false, + "expr": "sum(irate(container_network_transmit_packets_dropped_total{job=\"kubelet\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + } + ], + "thresholds": [], + "title": "Current Network Usage", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "transform": "table", + "type": "table-old", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "min": 0, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ] + }, + { + "collapsed": false, + "datasource": "PBFA97CFB590B2093", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 44 + }, + "id": 29, + "panels": [], + "targets": [ + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "refId": "A" + } + ], + "title": "Bandwidth by Namespace", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "PBFA97CFB590B2093", + "fill": 10, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 45 + }, + "hiddenSeries": false, + "id": 12, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "expr": "sum(irate(container_network_receive_bytes_total{job=\"kubelet\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{namespace}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Receive Bandwidth", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "Bps", + "logBase": 1, + "min": 0, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "PBFA97CFB590B2093", + "fill": 10, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 45 + }, + "hiddenSeries": false, + "id": 13, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "expr": "sum(irate(container_network_transmit_bytes_total{job=\"kubelet\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{namespace}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Transmit Bandwidth", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "Bps", + "logBase": 1, + "min": 0, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "datasource": "PBFA97CFB590B2093", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 52 + }, + "id": 30, + "panels": [], + "targets": [ + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "refId": "A" + } + ], + "title": "Bandwidth by Node", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "PBFA97CFB590B2093", + "fill": 10, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 53 + }, + "hiddenSeries": false, + "id": 14, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "exemplar": true, + "expr": "avg(irate(container_network_receive_bytes_total{cluster=\"$cluster\"}[$__rate_interval])) by (instance)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{namespace}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Average Node Bytes Bandwidth: Received", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "Bps", + "logBase": 1, + "min": 0, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "PBFA97CFB590B2093", + "fill": 10, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 53 + }, + "hiddenSeries": false, + "id": 15, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "exemplar": true, + "expr": "sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\"}[$__rate_interval])) by (instance)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{namespace}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Average Node Bandwidth: Transmitted", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "Bps", + "logBase": 1, + "min": 0, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "datasource": "PBFA97CFB590B2093", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 60 + }, + "id": 32, + "panels": [], + "targets": [ + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "refId": "A" + } + ], + "title": "Rate of Packets Dropped", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "PBFA97CFB590B2093", + "fill": 10, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 61 + }, + "hiddenSeries": false, + "id": 18, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "expr": "sum(irate(container_network_receive_packets_dropped_total{job=\"kubelet\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{namespace}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Rate of Received Packets Dropped", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "logBase": 1, + "min": 0, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "PBFA97CFB590B2093", + "fill": 10, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 61 + }, + "hiddenSeries": false, + "id": 19, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "expr": "sum(irate(container_network_transmit_packets_dropped_total{job=\"kubelet\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{namespace}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Rate of Transmitted Packets Dropped", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "logBase": 1, + "min": 0, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "datasource": "PBFA97CFB590B2093", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 68 + }, + "id": 33, + "panels": [], + "targets": [ + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "refId": "A" + } + ], + "title": "Storage IO", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "PBFA97CFB590B2093", + "decimals": -1, + "fill": 10, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 69 + }, + "hiddenSeries": false, + "id": 20, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "expr": "ceil(sum by(namespace) (rate(container_fs_reads_total{job=\"kubelet\", container!=\"\", device=~\"(/dev/)?(mmcblk.p.+|.*nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval]) + rate(container_fs_writes_total{job=\"kubelet\", container!=\"\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval])))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{namespace}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "IOPS(Reads+Writes)", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "min": 0, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "PBFA97CFB590B2093", + "fill": 10, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 69 + }, + "hiddenSeries": false, + "id": 21, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "expr": "sum by(namespace) (rate(container_fs_reads_bytes_total{job=\"kubelet\", container!=\"\", device=~\"(/dev/)?(mmcblk.p.+|.*nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{job=\"kubelet\", container!=\"\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{namespace}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "ThroughPut(Read+Write)", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "Bps", + "logBase": 1, + "min": 0, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "datasource": "PBFA97CFB590B2093", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 76 + }, + "id": 34, + "panels": [], + "targets": [ + { + "datasource": { + "0": "P", + "1": "B", + "2": "F", + "3": "A", + "4": "9", + "5": "7", + "6": "C", + "7": "F", + "8": "B", + "9": "5", + "10": "9", + "11": "0", + "12": "B", + "13": "2", + "14": "0", + "15": "9", + "16": "3" + }, + "refId": "A" + } + ], + "title": "Storage IO - Distribution", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "decimals": 2, + "displayName": "", + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "displayName", + "value": "Time" + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #A" + }, + "properties": [ + { + "id": "displayName", + "value": "IOPS(Reads)" + }, + { + "id": "unit", + "value": "short" + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #B" + }, + "properties": [ + { + "id": "displayName", + "value": "IOPS(Writes)" + }, + { + "id": "unit", + "value": "short" + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #C" + }, + "properties": [ + { + "id": "displayName", + "value": "IOPS(Reads + Writes)" + }, + { + "id": "unit", + "value": "short" + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #D" + }, + "properties": [ + { + "id": "displayName", + "value": "Throughput(Read)" + }, + { + "id": "unit", + "value": "Bps" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #E" + }, + "properties": [ + { + "id": "displayName", + "value": "Throughput(Write)" + }, + { + "id": "unit", + "value": "Bps" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #F" + }, + "properties": [ + { + "id": "displayName", + "value": "Throughput(Read + Write)" + }, + { + "id": "unit", + "value": "Bps" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "namespace" + }, + "properties": [ + { + "id": "displayName", + "value": "Namespace" + }, + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "links", + "value": [ + { + "targetBlank": false, + "title": "Drill down to pods", + "url": "/d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell" + } + ] + }, + { + "id": "custom.align" + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 77 + }, + "id": 22, + "interval": "1m", + "links": [], + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "10.0.4", + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum by(namespace) (rate(container_fs_reads_total{job!=\"\", device=~\"(/dev/)?(mmcblk.p.+|.*nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval]))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum by(namespace) (rate(container_fs_writes_total{job!=\"\", device=~\"(/dev/)?(mmcblk.p.+|.*nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval]))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B" + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum by(namespace) (rate(container_fs_reads_total{job!=\"\", device=~\"(/dev/)?(mmcblk.p.+|.*nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval]) + rate(container_fs_writes_total{job!=\"\", device=~\"(/dev/)?(mmcblk.p.+|.*nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval]))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C" + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum by(namespace) (rate(container_fs_reads_bytes_total{job!=\"\", device=~\"(/dev/)?(mmcblk.p.+|.*nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval]))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D" + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum by(namespace) (rate(container_fs_writes_bytes_total{job!=\"\", device=~\"(/dev/)?(mmcblk.p.+|.*nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval]))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E" + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum by(namespace) (rate(container_fs_reads_bytes_total{job!=\"\", device=~\"(/dev/)?(mmcblk.p.+|.*nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{job!=\"\", device=~\"(/dev/)?(mmcblk.p.+|.*nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval]))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F" + } + ], + "title": "Current Storage IO", + "transformations": [ + { + "id": "merge", + "options": { + "reducers": [] + } + } + ], + "type": "table" + } + ], + "refresh": "10s", + "schemaVersion": 38, + "style": "dark", + "tags": [ + "truefoundry", + "kubernetes" + ], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "default", + "value": "default" + }, + "hide": 0, + "includeAll": false, + "label": "Data Source", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "queryValue": "", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": { + "isNone": true, + "selected": false, + "text": "None", + "value": "" + }, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "definition": "", + "hide": 2, + "includeAll": false, + "multi": false, + "name": "cluster", + "options": [], + "query": { + "query": "label_values(up{job=\"kubelet\"}, cluster)", + "refId": "Prometheus-cluster-Variable-Query" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-5m", + "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": "utc", + "title": "Cluster Overview", + "uid": "", + "version": 1, + "weekStart": "" +} diff --git a/charts/tfy-grafana/dashboards/persistent-volumes.json b/charts/tfy-grafana/dashboards/persistent-volumes.json new file mode 100644 index 00000000..aefdb83d --- /dev/null +++ b/charts/tfy-grafana/dashboards/persistent-volumes.json @@ -0,0 +1,1570 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "limit": 100, + "name": "Annotations & Alerts", + "showIn": 0, + "type": "dashboard" + } + ] + }, + "description": "Monitors all persistent volumes that exists within a Kubernetes cluster. Prometheus is used as datasource. ", + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": 13646, + "graphTooltip": 0, + "id": 28, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 26, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "refId": "A" + } + ], + "title": "Alerts", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "noValue": "--", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "light-green", + "value": null + }, + { + "color": "light-green", + "value": -0.0001 + }, + { + "color": "semi-dark-orange", + "value": 0.0001 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 8, + "x": 0, + "y": 1 + }, + "id": 22, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "(\n count (\n (kubelet_volume_stats_available_bytes{namespace=~\"${k8s_namespace}\"})\n and\n (predict_linear(kubelet_volume_stats_available_bytes{namespace=~\"${k8s_namespace}\"}[1d], 2 * 24 * 60 * 60) < 0)\n )\n)\nor\nvector(0)", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "PVCs Full in 2 days - Based on Daily Usage", + "transformations": [ + { + "id": "organize", + "options": {} + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "noValue": "--", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "light-green", + "value": null + }, + { + "color": "light-green", + "value": -0.0001 + }, + { + "color": "semi-dark-orange", + "value": 0.0001 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 8, + "x": 8, + "y": 1 + }, + "id": 28, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "(\n count (\n (kubelet_volume_stats_available_bytes{namespace=~\"${k8s_namespace}\"})\n and\n (predict_linear(kubelet_volume_stats_available_bytes{namespace=~\"${k8s_namespace}\"}[1d], 5 * 24 * 60 * 60) < 0)\n )\n)\nor\nvector(0)", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "PVCs Full in 5 days - Based on Daily Usage", + "transformations": [ + { + "id": "organize", + "options": {} + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "noValue": "--", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "light-green", + "value": null + }, + { + "color": "light-green", + "value": -0.0001 + }, + { + "color": "semi-dark-orange", + "value": 0.0001 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 8, + "x": 16, + "y": 1 + }, + "id": 27, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "(\n count (\n (kubelet_volume_stats_available_bytes{namespace=~\"${k8s_namespace}\"})\n and\n (predict_linear(kubelet_volume_stats_available_bytes{namespace=~\"${k8s_namespace}\"}[1d], 7 * 24 * 60 * 60) < 0)\n )\n)\nor\nvector(0)", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "PVCs Full in 1 Week - Based on Daily Usage", + "transformations": [ + { + "id": "organize", + "options": {} + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "noValue": "--", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "semi-dark-red", + "value": null + }, + { + "color": "light-green", + "value": -0.0001 + }, + { + "color": "semi-dark-red", + "value": 0.0001 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 8, + "x": 0, + "y": 5 + }, + "id": 21, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "count (max by (persistentvolumeclaim,namespace) (kubelet_volume_stats_used_bytes{namespace=~\"${k8s_namespace}\"} ) and (max by (persistentvolumeclaim,namespace) (kubelet_volume_stats_used_bytes{namespace=~\"${k8s_namespace}\"} )) / (max by (persistentvolumeclaim,namespace) (kubelet_volume_stats_capacity_bytes{namespace=~\"${k8s_namespace}\"} )) >= (${warning_threshold} / 100)) or vector (0)", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "PVCs Above Warning Threshold", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "noValue": "--", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "semi-dark-red", + "value": null + }, + { + "color": "light-green", + "value": -0.0001 + }, + { + "color": "semi-dark-red", + "value": 0.0001 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 8, + "x": 8, + "y": 5 + }, + "id": 24, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "count((kube_persistentvolumeclaim_status_phase{namespace=~\"${k8s_namespace}\",phase=\"Pending\"}==1)) or vector(0)", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "PVCs in Pending State", + "transformations": [ + { + "id": "organize", + "options": {} + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "noValue": "--", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "semi-dark-red", + "value": null + }, + { + "color": "light-green", + "value": -0.0001 + }, + { + "color": "semi-dark-red", + "value": 0.0001 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 8, + "x": 16, + "y": 5 + }, + "id": 23, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "count((kube_persistentvolumeclaim_status_phase{namespace=~\"${k8s_namespace}\",phase=\"Lost\"}==1)) or vector(0)", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "PVCs in Lost State", + "transformations": [ + { + "id": "organize", + "options": {} + } + ], + "type": "stat" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 9 + }, + "id": 17, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "refId": "A" + } + ], + "title": "Usage statistics", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "inspect": false + }, + "mappings": [], + "noValue": "--", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "light-green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Used (%)" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "gauge" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "light-green", + "value": null + }, + { + "color": "semi-dark-yellow", + "value": 70 + }, + { + "color": "dark-red", + "value": 80 + } + ] + } + }, + { + "id": "decimals", + "value": 1 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Status" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } + }, + { + "id": "mappings", + "value": [ + { + "options": { + "0": { + "text": "Bound" + }, + "1": { + "text": "Pending" + }, + "2": { + "text": "Lost" + } + }, + "type": "value" + } + ] + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "light-green", + "value": null + }, + { + "color": "light-green", + "value": 0 + }, + { + "color": "semi-dark-orange", + "value": 1 + }, + { + "color": "semi-dark-red", + "value": 2 + } + ] + } + }, + { + "id": "noValue", + "value": "--" + }, + { + "id": "custom.align", + "value": "center" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Namespace" + }, + "properties": [ + { + "id": "custom.width", + "value": 120 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Status" + }, + "properties": [ + { + "id": "custom.width", + "value": 80 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Capacity (GiB)" + }, + "properties": [ + { + "id": "custom.width", + "value": 120 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Used (GiB)" + }, + "properties": [ + { + "id": "custom.width", + "value": 120 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Available (GiB)" + }, + "properties": [ + { + "id": "custom.width", + "value": 120 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "StorageClass" + }, + "properties": [ + { + "id": "custom.width", + "value": 150 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "PersistentVolumeClaim" + }, + "properties": [ + { + "id": "custom.width", + "value": 370 + } + ] + } + ] + }, + "gridPos": { + "h": 12, + "w": 24, + "x": 0, + "y": 10 + }, + "id": 29, + "interval": "", + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "frameIndex": 2, + "showHeader": true, + "sortBy": [ + { + "desc": false, + "displayName": "PersistentVolumeClaim" + } + ] + }, + "pluginVersion": "10.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": " sum by (persistentvolumeclaim,namespace,storageclass,volumename) (kube_persistentvolumeclaim_info{namespace=~\"${k8s_namespace}\"})", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "sum by (persistentvolumeclaim) (kubelet_volume_stats_capacity_bytes{namespace=~\"${k8s_namespace}\"}/1024/1024/1024)", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "sum by (persistentvolumeclaim) (kubelet_volume_stats_used_bytes{namespace=~\"${k8s_namespace}\"}/1024/1024/1024)", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "sum by (persistentvolumeclaim) (kubelet_volume_stats_available_bytes{namespace=~\"${k8s_namespace}\"}/1024/1024/1024)", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "sum(kube_persistentvolumeclaim_status_phase{namespace=~\"${k8s_namespace}\",phase=~\"(Pending|Lost)\"}) by (persistentvolumeclaim) + sum(kube_persistentvolumeclaim_status_phase{namespace=~\"${k8s_namespace}\",phase=~\"(Lost)\"}) by (persistentvolumeclaim)", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "sum by (persistentvolumeclaim) (kubelet_volume_stats_used_bytes{namespace=~\"${k8s_namespace}\"}/kubelet_volume_stats_capacity_bytes{namespace=~\"${k8s_namespace}\"} * 100)", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "F" + } + ], + "title": "Persistent Volume Claim", + "transformations": [ + { + "id": "seriesToColumns", + "options": { + "byField": "persistentvolumeclaim" + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Time 1": true, + "Time 2": true, + "Time 3": true, + "Time 4": true, + "Time 5": true, + "Time 6": true, + "Value #A": true + }, + "indexByName": {}, + "renameByName": { + "Time 1": "", + "Time 2": "", + "Time 3": "", + "Time 4": "", + "Time 5": "", + "Time 6": "", + "Value #A": "", + "Value #B": "Capacity (GiB)", + "Value #C": "Used (GiB)", + "Value #D": "Available (GiB)", + "Value #E": "Status", + "Value #F": "Used (%)", + "namespace": "Namespace", + "persistentvolumeclaim": "PersistentVolumeClaim", + "storageclass": "StorageClass", + "volumename": "PhysicalVolume" + } + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "custom": { + "filterable": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 24, + "x": 0, + "y": 22 + }, + "id": 7, + "options": { + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "Status" + } + ] + }, + "pluginVersion": "7.2.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "kube_storageclass_info", + "format": "table", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Storage Class", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Value": true, + "__name__": true, + "app_kubernetes_io_instance": true, + "app_kubernetes_io_name": true, + "instance": true, + "job": true, + "kubernetes_namespace": true, + "kubernetes_pod_name": true, + "pod_template_hash": true + }, + "indexByName": { + "Time": 1, + "Value": 13, + "__name__": 2, + "app_kubernetes_io_instance": 3, + "app_kubernetes_io_name": 4, + "instance": 5, + "job": 6, + "kubernetes_namespace": 7, + "kubernetes_pod_name": 8, + "pod_template_hash": 9, + "provisioner": 10, + "reclaimPolicy": 11, + "storageclass": 0, + "volumeBindingMode": 12 + }, + "renameByName": { + "provisioner": "Provisioner", + "reclaimPolicy": "ReclaimPolicy", + "storageclass": "StorageClass", + "volumeBindingMode": "VolumeBindingMode" + } + } + }, + { + "id": "groupBy", + "options": { + "fields": { + "Provisioner": { + "aggregations": [], + "operation": "groupby" + }, + "ReclaimPolicy": { + "aggregations": [], + "operation": "groupby" + }, + "StorageClass": { + "aggregations": [], + "operation": "groupby" + }, + "VolumeBindingMode": { + "aggregations": [], + "operation": "groupby" + } + } + } + } + ], + "type": "table" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 27 + }, + "id": 15, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "refId": "A" + } + ], + "title": "Graphical usage data ", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 12, + "w": 24, + "x": 0, + "y": 28 + }, + "hiddenSeries": false, + "id": 9, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.2.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "(max by (persistentvolumeclaim,namespace) (kubelet_volume_stats_used_bytes{namespace=~\"${k8s_namespace}\"}))", + "interval": "", + "legendFormat": "{{namespace}} ({{persistentvolumeclaim}})", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "All Running PVCs Used Bytes", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "logBase": 1, + "show": true + }, + { + "format": "Date & time", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": true, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 40 + }, + "id": 19, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 41 + }, + "hiddenSeries": false, + "id": 11, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.2.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "rate(kubelet_volume_stats_used_bytes{namespace=~\"${k8s_namespace}\"}[1h])", + "instant": false, + "interval": "", + "legendFormat": "{{namespace}} ({{persistentvolumeclaim}})", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Hourly Volume Usage Rate", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "binBps", + "logBase": 1, + "show": true + }, + { + "format": "Date & time", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 48 + }, + "hiddenSeries": false, + "id": 12, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.2.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "rate(kubelet_volume_stats_used_bytes{namespace=~\"${k8s_namespace}\"}[1d])", + "interval": "", + "legendFormat": "{{namespace}} ({{persistentvolumeclaim}})", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Daily Volume Usage Rate", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "binBps", + "logBase": 1, + "show": true + }, + { + "format": "Date & time", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 55 + }, + "hiddenSeries": false, + "id": 13, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.2.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "rate(kubelet_volume_stats_used_bytes{namespace=~\"${k8s_namespace}\"}[1w])", + "instant": false, + "interval": "", + "legendFormat": "{{namespace}} ({{persistentvolumeclaim}})", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Weekly Volume Usage Rate", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "binBps", + "logBase": 1, + "show": true + }, + { + "format": "Date & time", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + ], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "refId": "A" + } + ], + "title": "Usage Rate", + "type": "row" + } + ], + "refresh": "1m", + "schemaVersion": 38, + "style": "dark", + "tags": [ + "truefoundry", + "kubernetes" + ], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "queryValue": "", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "allValue": ".*", + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "definition": "label_values(namespace)", + "hide": 0, + "includeAll": true, + "label": "Namespace", + "multi": true, + "name": "k8s_namespace", + "options": [], + "query": "label_values(namespace)", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": { + "selected": false, + "text": "80", + "value": "80" + }, + "hide": 2, + "label": "PVC % Used Warning Threshold", + "name": "warning_threshold", + "options": [ + { + "selected": true, + "text": "80", + "value": "80" + } + ], + "query": "80", + "skipUrlSync": false, + "type": "textbox" + } + ] + }, + "time": { + "from": "now-24h", + "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": "Persistent Volumes", + "uid": "", + "version": 1, + "weekStart": "" +} \ No newline at end of file diff --git a/charts/tfy-grafana/templates/configmap.yaml b/charts/tfy-grafana/templates/configmap.yaml new file mode 100644 index 00000000..26f02bab --- /dev/null +++ b/charts/tfy-grafana/templates/configmap.yaml @@ -0,0 +1,14 @@ +{{- if .Values.grafana.sidecar.dashboards.enabled }} +{{- range $path, $name := .Files.Glob "dashboards/*" }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: tfy-dashboard-{{ $path | replace "dashboards/" "" | replace ".json" "" }} + labels: + {{ $.Values.grafana.sidecar.dashboards.label }}: {{ $.Values.grafana.sidecar.dashboards.labelValue }} +data: + {{ $path | replace "dashboards/" "" }}: |- + {{ $name | toString | nindent 4 }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/tfy-grafana/values.yaml b/charts/tfy-grafana/values.yaml index efcc0935..939a8209 100644 --- a/charts/tfy-grafana/values.yaml +++ b/charts/tfy-grafana/values.yaml @@ -63,6 +63,13 @@ grafana: requests: cpu: 50m memory: 50Mi + ## @param grafana.sidecar.dashboards.enabled Whether to enable/disable dashboards + ## @param grafana.sidecar.dashboards.label Label key for grafana dashboard configmap + ## @param grafana.sidecar.dashboards.labelValue Label value for grafana dashboard configmap + dashboards: + enabled: false + label: truefoundry_truevisibility + labelValue: owner ## Datasources configuration for Grafana. ## datasources: @@ -81,21 +88,22 @@ grafana: datasources.yaml: apiVersion: 1 datasources: - - name: Prometheus - type: prometheus - url: http://prometheus-kube-prometheus-prometheus.prometheus.svc.cluster.local:9090 - access: proxy - isDefault: true - - name: Loki - type: loki - url: http://loki.loki.svc.cluster.local:3100 - access: proxy + - name: Prometheus + type: prometheus + url: http://prometheus-kube-prometheus-prometheus.prometheus.svc.cluster.local:9090 + access: proxy + isDefault: true + - name: Loki + type: loki + url: http://loki.loki.svc.cluster.local:3100 + access: proxy ## Persistence configuration for Grafana. ## ## @param grafana.persistence.enabled Enable or disable persistence for Grafana. + ## @param grafana.persistence.type Type of the persisted storage for Grafana. ## @param grafana.persistence.size Size of the persisted storage for Grafana. ## persistence: enabled: true type: statefulset - size: 10Gi \ No newline at end of file + size: 10Gi