Grafana dashboard: Used | Wasted Resources
Description: Dashboard to show the resource requests vs allocatable in the cluster

This dashboard will show you:

- Cluster Overview
   - Allocatable vs Requested vs Usage Memory and CPU
- Namespace Overview
  - Allocatable vs Requested vs Usage Memory and CPU
  - Memory/CPU Request vs Memory/CPU Limit vs Memory/CPU live of all namespace pods. 
- App Overview
  - Allocatable vs Requested vs Usage Memory and CPU by APP
  - Allocatable vs Requested vs Usage Memory and CPU by pod.
- Node Overview
  - Allocatable vs Usage Memory and CPU of all Nodes.
  - Allocatable vs Usage Memory and CPU of a single Node.

To use this app you must have configured in your cluster:

- Kubernetes (v1.14.1)
- Prometheus (v2.12.0)
- Kube State Metrics (v1.8.0)
- Metrics Server Exporter (v0.0.4) https://github.com/grupozap/metrics-server-exporter

Your Prometheus scrap config for `kube-state-metrics` and `metrics-server-exporter` should be like this:
(in my example, this scraps all services from cluster with prometheus label `scrap: true`)
```
- job_name: 'kubernetes-service-endpoints'
  kubernetes_sd_configs:
  - role: endpoints
  relabel_configs:
  - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape]
    action: keep
    regex: true
  - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme]
    action: replace
    target_label: __scheme__
    regex: (https?)
  - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
    action: replace
    target_label: __metrics_path__
    regex: (.+)
  - source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port]
    action: replace
    target_label: __address__
    regex: ([^:]+)(?::\d+)?;(\d+)
    replacement: $1:$2
  - action: labelmap
    regex: __meta_kubernetes_service_label_(.+)
  - source_labels: [__meta_kubernetes_namespace]
    action: replace
    target_label: kubernetes_namespace
  - source_labels: [__meta_kubernetes_service_name]
    action: replace
    target_label: kubernetes_name
  - source_labels: [__meta_kubernetes_pod_name]
    action: replace
    target_label: kubernetes_pod_name
  - source_labels: [__meta_kubernetes_pod_name]
    action: replace
    target_label: pod
```

{
  "__inputs": [
    {
      "name": "DS_PROMETHEUS",
      "label": "prometheus",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    },
    {
      "name": "DS_THANOS",
      "label": "thanos",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__requires": [
    {
      "type": "panel",
      "id": "bargauge",
      "name": "Bar Gauge",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "6.3.4"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "singlestat",
      "name": "Singlestat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "description": "Dashboard to show the resource requests vs allocatable in the cluster",
  "editable": true,
  "gnetId": 10214,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1569958404375,
  "links": [],
  "panels": [
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 31,
      "panels": [],
      "title": "Cluster Wide",
      "type": "row"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS}",
      "description": "This represents the total [memory resource requests](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-memory) in the cluster.\nFor comparison the total [allocatable memory](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/node-allocatable.md) is also shown.",
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 10,
        "w": 7,
        "x": 0,
        "y": 1
      },
      "id": 3,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "min(sum(kube_node_status_allocatable{resource=\"memory\"} / 1024 ) by (instance))",
          "format": "time_series",
          "hide": false,
          "intervalFactor": 2,
          "legendFormat": "Allocatable Memory",
          "refId": "A",
          "step": 10
        },
        {
          "expr": "sum(\nsum(kube_pod_container_resource_requests{resource=\"memory\"} / 1024 ) by (exported_pod)\n * on (exported_pod) group_left()  (sum(kube_pod_status_phase{phase=\"Running\"}) by (exported_pod) == 1)\n )",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "Requested Memory",
          "refId": "C"
        },
        {
          "expr": "min(sum(kube_node_status_capacity_memory_bytes / 1024 ) by (instance))",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "Total Memory",
          "refId": "B"
        },
        {
          "expr": "sum(kube_metrics_server_pods_mem)",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "Used Memory",
          "refId": "D"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Memory",
      "tooltip": {
        "shared": true,
        "sort": 2,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "kbytes",
          "label": "Memory",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "rgba(50, 172, 45, 0.97)",
        "rgba(237, 129, 40, 0.89)",
        "rgba(245, 54, 54, 0.9)"
      ],
      "datasource": "${DS_PROMETHEUS}",
      "decimals": null,
      "format": "percent",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": true,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 10,
        "w": 5,
        "x": 7,
        "y": 1
      },
      "id": 4,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "options": {},
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": true
      },
      "tableColumn": "",
      "targets": [
        {
          "expr": "sum(\nsum(kube_pod_container_resource_requests{resource=\"memory\"}) by (exported_pod)\n * on (exported_pod) group_left()  (sum(kube_pod_status_phase{phase=\"Running\"}) by (exported_pod) == 1)\n ) / min(sum(kube_node_status_allocatable{resource=\"memory\"}) by (instance)) * 100",
          "format": "time_series",
          "intervalFactor": 2,
          "legendFormat": "",
          "refId": "A",
          "step": 240
        }
      ],
      "thresholds": "80, 90",
      "title": "Memory",
      "transparent": true,
      "type": "singlestat",
      "valueFontSize": "100%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "#299c46",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "datasource": "${DS_PROMETHEUS}",
      "format": "decbytes",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 5,
        "w": 4,
        "x": 12,
        "y": 1
      },
      "id": 20,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "options": {},
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": true
      },
      "tableColumn": "",
      "targets": [
        {
          "expr": "sum(kube_node_status_allocatable{resource=\"memory\"})",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "thresholds": "",
      "title": "Allocatable Memory",
      "transparent": true,
      "type": "singlestat",
      "valueFontSize": "150%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "#299c46",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "datasource": "${DS_PROMETHEUS}",
      "format": "kbytes",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 10,
        "w": 4,
        "x": 16,
        "y": 1
      },
      "id": 21,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "options": {},
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": true
      },
      "tableColumn": "",
      "targets": [
        {
          "expr": "sum(kube_metrics_server_pods_mem)",
          "format": "time_series",
          "intervalFactor": 1,
          "refId": "A"
        }
      ],
      "thresholds": "",
      "title": "Used Memory",
      "transparent": true,
      "type": "singlestat",
      "valueFontSize": "150%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "gridPos": {
        "h": 30,
        "w": 2,
        "x": 20,
        "y": 1
      },
      "id": 55,
      "links": [],
      "options": {
        "displayMode": "gradient",
        "fieldOptions": {
          "calcs": [
            "last"
          ],
          "defaults": {
            "mappings": [],
            "max": 100,
            "min": 0,
            "thresholds": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 30
              },
              {
                "color": "red",
                "value": 50
              }
            ],
            "unit": "percent"
          },
          "override": {},
          "values": false
        },
        "orientation": "vertical"
      },
      "pluginVersion": "6.3.4",
      "targets": [
        {
          "expr": "((100 * \n(sum(label_replace(sum(kube_metrics_server_pods_cpu) / 1000000000 , \"exported_pod\", \"$1\", \"pod_name\", \"(.*)\")))\n/ \nsum(\nsum(kube_pod_container_resource_requests{resource=\"cpu\"}) by (exported_pod)\n * on (exported_pod) group_left()  (sum(kube_pod_status_phase{phase=\"Running\"}) by (exported_pod) == 1)\n )\n- 100) * -1)",
          "format": "time_series",
          "intervalFactor": 1,
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Wasted CPU %",
      "transparent": true,
      "type": "bargauge"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "gridPos": {
        "h": 30,
        "w": 2,
        "x": 22,
        "y": 1
      },
      "id": 56,
      "links": [],
      "options": {
        "displayMode": "gradient",
        "fieldOptions": {
          "calcs": [
            "last"
          ],
          "defaults": {
            "mappings": [],
            "max": 100,
            "min": 0,
            "thresholds": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 30
              },
              {
                "color": "red",
                "value": 50
              }
            ],
            "unit": "percent"
          },
          "override": {},
          "values": false
        },
        "orientation": "vertical"
      },
      "pluginVersion": "6.3.4",
      "targets": [
        {
          "expr": "((100 * \n(sum(label_replace(sum(kube_metrics_server_pods_mem) * 1024 , \"exported_pod\", \"$1\", \"pod_name\", \"(.*)\")))\n/\nsum(\nsum(kube_pod_container_resource_requests{unit=\"byte\"}) by (exported_pod)\n * on (exported_pod) group_left()  (sum(kube_pod_status_phase{phase=\"Running\"}) by (exported_pod) == 1)\n )\n- 100) * -1)",
          "format": "time_series",
          "intervalFactor": 1,
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Wasted Ram %",
      "transparent": true,
      "type": "bargauge"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "#299c46",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "datasource": "${DS_PROMETHEUS}",
      "format": "decbytes",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 5,
        "w": 4,
        "x": 12,
        "y": 6
      },
      "id": 51,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "options": {},
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": true
      },
      "tableColumn": "",
      "targets": [
        {
          "expr": "sum(\nsum(kube_pod_container_resource_requests{resource=\"memory\"}) by (exported_pod)\n * on (exported_pod) group_left()  (sum(kube_pod_status_phase{phase=\"Running\"}) by (exported_pod) == 1)\n )",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "thresholds": "",
      "title": "Requested Memory",
      "transparent": true,
      "type": "singlestat",
      "valueFontSize": "150%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS}",
      "description": "This represents the total [CPU resource requests](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-cpu) in the cluster.\nFor comparison the total [allocatable CPU cores](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/node-allocatable.md) is also shown.",
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 10,
        "w": 7,
        "x": 0,
        "y": 11
      },
      "id": 1,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "min(sum(kube_node_status_allocatable_cpu_cores) by (instance))",
          "format": "time_series",
          "hide": false,
          "intervalFactor": 2,
          "legendFormat": "Allocatable CPU Cores",
          "refId": "A",
          "step": 10
        },
        {
          "expr": "max(sum(kube_pod_container_resource_requests_cpu_cores) by (instance))",
          "format": "time_series",
          "hide": true,
          "intervalFactor": 2,
          "legendFormat": "Requested CPU Cores",
          "refId": "B",
          "step": 10
        },
        {
          "expr": "sum(\nsum(kube_pod_container_resource_requests{resource=\"cpu\"}) by (exported_pod)\n * on (exported_pod) group_left()  (sum(kube_pod_status_phase{phase=\"Running\"}) by (exported_pod) == 1)\n )",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "Requested CPU Cores",
          "refId": "C"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "CPU Cores",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "label": "CPU Cores",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "rgba(50, 172, 45, 0.97)",
        "rgba(237, 129, 40, 0.89)",
        "rgba(245, 54, 54, 0.9)"
      ],
      "datasource": "${DS_PROMETHEUS}",
      "decimals": null,
      "format": "percent",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": true,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 10,
        "w": 5,
        "x": 7,
        "y": 11
      },
      "id": 2,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "options": {},
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": true
      },
      "tableColumn": "",
      "targets": [
        {
          "expr": "sum(\nsum(kube_pod_container_resource_requests{resource=\"cpu\"}) by (exported_pod)\n * on (exported_pod) group_left()  (sum(kube_pod_status_phase{phase=\"Running\"}) by (exported_pod) == 1)\n )\n / min(sum(kube_node_status_allocatable_cpu_cores) by (instance)) * 100",
          "format": "time_series",
          "intervalFactor": 2,
          "legendFormat": "",
          "refId": "A",
          "step": 240
        }
      ],
      "thresholds": "80, 90",
      "title": "CPU Cores",
      "transparent": true,
      "type": "singlestat",
      "valueFontSize": "100%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "avg"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "#299c46",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "datasource": "${DS_PROMETHEUS}",
      "decimals": null,
      "format": "none",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 5,
        "w": 4,
        "x": 12,
        "y": 11
      },
      "id": 12,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "options": {},
      "postfix": "   cores",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": true
      },
      "tableColumn": "",
      "targets": [
        {
          "expr": "sum(kube_node_status_allocatable_cpu_cores)",
          "format": "time_series",
          "hide": false,
          "intervalFactor": 1,
          "refId": "A"
        },
        {
          "expr": "sum(kube_metrics_server_nodes_cpu) / 100000000",
          "format": "time_series",
          "hide": true,
          "intervalFactor": 1,
          "refId": "B"
        }
      ],
      "thresholds": "",
      "title": "Allocatable CPU Cores",
      "transparent": true,
      "type": "singlestat",
      "valueFontSize": "150%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "#299c46",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "datasource": "${DS_PROMETHEUS}",
      "decimals": null,
      "format": "none",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 10,
        "w": 4,
        "x": 16,
        "y": 11
      },
      "id": 14,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "options": {},
      "postfix": "   cores",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": true
      },
      "tableColumn": "",
      "targets": [
        {
          "expr": "sum(kube_metrics_server_pods_cpu) / 1000000000",
          "format": "time_series",
          "intervalFactor": 1,
          "refId": "A"
        }
      ],
      "thresholds": "",
      "title": "Used CPU Cores",
      "transparent": true,
      "type": "singlestat",
      "valueFontSize": "150%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "#299c46",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "datasource": "${DS_PROMETHEUS}",
      "decimals": null,
      "format": "none",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 5,
        "w": 4,
        "x": 12,
        "y": 16
      },
      "id": 50,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "options": {},
      "postfix": "   cores",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": true
      },
      "tableColumn": "",
      "targets": [
        {
          "expr": "sum(\nsum(kube_pod_container_resource_requests{resource=\"cpu\"}) by (exported_pod)\n * on (exported_pod) group_left()  (sum(kube_pod_status_phase{phase=\"Running\"}) by (exported_pod) == 1)\n )",
          "format": "time_series",
          "hide": false,
          "intervalFactor": 1,
          "refId": "A"
        },
        {
          "expr": "sum(kube_metrics_server_nodes_cpu) / 100000000",
          "format": "time_series",
          "hide": true,
          "intervalFactor": 1,
          "refId": "B"
        }
      ],
      "thresholds": "",
      "title": "Requested CPU Cores",
      "transparent": true,
      "type": "singlestat",
      "valueFontSize": "150%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "gridPos": {
        "h": 10,
        "w": 20,
        "x": 0,
        "y": 21
      },
      "id": 53,
      "links": [],
      "options": {
        "displayMode": "gradient",
        "fieldOptions": {
          "calcs": [
            "last"
          ],
          "defaults": {
            "mappings": [],
            "max": 100,
            "min": 0,
            "thresholds": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 30
              },
              {
                "color": "red",
                "value": 50
              }
            ],
            "title": "",
            "unit": "percent"
          },
          "override": {},
          "values": false
        },
        "orientation": "vertical"
      },
      "pluginVersion": "6.3.4",
      "targets": [
        {
          "expr": "((100 * (sum(label_replace(sum(kube_metrics_server_pods_mem) by (pod_namespace), \"namespace\", \"$1\", \"pod_namespace\", \"(.*)\")) by (namespace) * 1024)/ sum(sum(kube_pod_container_resource_requests{resource=\"memory\"}) by (namespace, exported_pod)* on (namespace, exported_pod) group_left()  (sum(kube_pod_status_phase{phase=\"Running\"}) by (namespace, exported_pod) == 1)) by (namespace)- 100) * -1) > 0",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "{{namespace}}",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Wasted Memory by Namespace %",
      "transparent": true,
      "type": "bargauge"
    },
    {
      "columns": [],
      "datasource": "${DS_PROMETHEUS}",
      "fontSize": "150%",
      "gridPos": {
        "h": 17,
        "w": 24,
        "x": 0,
        "y": 31
      },
      "id": 49,
      "links": [],
      "options": {},
      "pageSize": null,
      "scroll": true,
      "showHeader": true,
      "sort": {
        "col": 7,
        "desc": true
      },
      "styles": [
        {
          "alias": "Time",
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "pattern": "Time",
          "type": "hidden"
        },
        {
          "alias": "Namespace",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "namespace",
          "thresholds": [],
          "type": "string",
          "unit": "deckbytes"
        },
        {
          "alias": "Requested Memory",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "Value #A",
          "thresholds": [],
          "type": "number",
          "unit": "decbytes"
        },
        {
          "alias": "Limit Memory",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "Value #B",
          "thresholds": [],
          "type": "number",
          "unit": "decbytes"
        },
        {
          "alias": "",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "pod_namespace",
          "thresholds": [],
          "type": "hidden",
          "unit": "short"
        },
        {
          "alias": "Live Memory",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "Value #C",
          "thresholds": [],
          "type": "number",
          "unit": "deckbytes"
        },
        {
          "alias": "Wasted Memory",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "Value #D",
          "thresholds": [],
          "type": "number",
          "unit": "decbytes"
        },
        {
          "alias": "Wasted Memory %",
          "colorMode": "cell",
          "colors": [
            "rgba(50, 172, 45, 0.97)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(245, 54, 54, 0.9)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "Value #E",
          "thresholds": [
            "30",
            "50"
          ],
          "type": "number",
          "unit": "percent"
        },
        {
          "alias": "Wasted Memory % AVG",
          "colorMode": "cell",
          "colors": [
            "rgba(50, 172, 45, 0.97)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(245, 54, 54, 0.9)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "Value #F",
          "thresholds": [
            "30",
            "50"
          ],
          "type": "number",
          "unit": "percent"
        },
        {
          "alias": "Requested CPU",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "Value #G",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        },
        {
          "alias": "Limit CPU",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "Value #H",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        },
        {
          "alias": "Live CPU",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "Value #I",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        },
        {
          "alias": "Wasted CPU",
          "colorMode": null,
          "colors": [
            "rgba(50, 172, 45, 0.97)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(245, 54, 54, 0.9)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "Value #J",
          "thresholds": [
            "30",
            "50"
          ],
          "type": "number",
          "unit": "short"
        },
        {
          "alias": "Wasted CPU %",
          "colorMode": "cell",
          "colors": [
            "rgba(50, 172, 45, 0.97)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(245, 54, 54, 0.9)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "Value #K",
          "thresholds": [
            "30",
            "50"
          ],
          "type": "number",
          "unit": "percent"
        },
        {
          "alias": "Wasted CPU % AVG",
          "colorMode": "cell",
          "colors": [
            "rgba(50, 172, 45, 0.97)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(245, 54, 54, 0.9)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "Value #L",
          "thresholds": [
            "30",
            "50"
          ],
          "type": "number",
          "unit": "short"
        },
        {
          "alias": "",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "decimals": 2,
          "pattern": "/.*/",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        }
      ],
      "targets": [
        {
          "expr": "sum(\nsum(kube_pod_container_resource_requests{namespace=~\".*\", resource=\"memory\"}) by (namespace, exported_pod)\n * on (namespace, exported_pod) group_left()  (sum(kube_pod_status_phase{phase=\"Running\", namespace=~\".*\"}) by (namespace, exported_pod) == 1)\n ) by (namespace)",
          "format": "table",
          "instant": true,
          "intervalFactor": 1,
          "legendFormat": "Requested Memory",
          "refId": "A"
        },
        {
          "expr": "sum(\nsum(kube_pod_container_resource_limits{namespace=~\".*\", resource=\"memory\"}) by (namespace, exported_pod)\n * on (namespace, exported_pod) group_left()  (sum(kube_pod_status_phase{phase=\"Running\", namespace=~\".*\"}) by (namespace, exported_pod) == 1)\n ) by (namespace)",
          "format": "table",
          "instant": true,
          "intervalFactor": 1,
          "legendFormat": "Limit Memory",
          "refId": "B"
        },
        {
          "expr": "label_replace(sum(kube_metrics_server_pods_mem) by (pod_namespace), \"namespace\", \"$1\", \"pod_namespace\", \"(.*)\")",
          "format": "table",
          "instant": true,
          "intervalFactor": 1,
          "legendFormat": "Used Memory",
          "refId": "C"
        },
        {
          "expr": "(sum(sum(kube_pod_container_resource_requests{resource=\"memory\"}) by (namespace, exported_pod)* on (namespace, exported_pod) group_left()  (sum(kube_pod_status_phase{phase=\"Running\"}) by (namespace, exported_pod) == 1)) by (namespace))\n-\n(sum(label_replace(sum(kube_metrics_server_pods_mem) by (pod_namespace), \"namespace\", \"$1\", \"pod_namespace\", \"(.*)\")) by (namespace) * 1024)",
          "format": "table",
          "hide": false,
          "instant": true,
          "intervalFactor": 1,
          "legendFormat": "Wasted Memory",
          "refId": "D"
        },
        {
          "expr": "((100 * \n(sum(label_replace(sum(kube_metrics_server_pods_mem) by (pod_namespace), \"namespace\", \"$1\", \"pod_namespace\", \"(.*)\")) by (namespace) * 1024)\n/ \nsum(sum(kube_pod_container_resource_requests{resource=\"memory\"}) by (namespace, exported_pod)* on (namespace, exported_pod) group_left()  (sum(kube_pod_status_phase{phase=\"Running\"}) by (namespace, exported_pod) == 1)) by (namespace)\n- 100) * -1)",
          "format": "table",
          "hide": false,
          "instant": true,
          "intervalFactor": 1,
          "legendFormat": "Wasted Memory %",
          "refId": "E"
        },
        {
          "expr": "((100 * \n(sum(label_replace(sum(avg_over_time(kube_metrics_server_pods_mem[5d])) by (pod_namespace), \"namespace\", \"$1\", \"pod_namespace\", \"(.*)\")) by (namespace) * 1024)\n/ \nsum(sum(kube_pod_container_resource_requests{resource=\"memory\"}) by (namespace, exported_pod)* on (namespace, exported_pod) group_left()  (sum(kube_pod_status_phase{phase=\"Running\"}) by (namespace, exported_pod) == 1)) by (namespace)\n- 100) * -1)",
          "format": "table",
          "hide": true,
          "instant": true,
          "intervalFactor": 1,
          "legendFormat": "Wasted Memory % AVG",
          "refId": "F"
        },
        {
          "expr": "sum(\nsum(kube_pod_container_resource_requests{namespace=~\".*\", resource=\"cpu\"}) by (namespace, exported_pod)\n * on (namespace, exported_pod) group_left()  (sum(kube_pod_status_phase{phase=\"Running\", namespace=~\".*\"}) by (namespace, exported_pod) == 1)\n ) by (namespace)",
          "format": "table",
          "hide": false,
          "instant": true,
          "intervalFactor": 1,
          "legendFormat": "Requested CPU",
          "refId": "G"
        },
        {
          "expr": "sum(\nsum(kube_pod_container_resource_limits{namespace=~\".*\", resource=\"cpu\"}) by (namespace, exported_pod)\n * on (namespace, exported_pod) group_left()  (sum(kube_pod_status_phase{phase=\"Running\"}) by (namespace, exported_pod) == 1)\n ) by (namespace)",
          "format": "table",
          "instant": true,
          "intervalFactor": 1,
          "legendFormat": "Limit CPU",
          "refId": "H"
        },
        {
          "expr": "label_replace(sum(kube_metrics_server_pods_cpu) by (pod_namespace) / 1000000000 , \"namespace\", \"$1\", \"pod_namespace\", \"(.*)\")",
          "format": "table",
          "hide": false,
          "instant": true,
          "intervalFactor": 1,
          "legendFormat": "Used CPU",
          "refId": "I"
        },
        {
          "expr": "(sum(sum(kube_pod_container_resource_requests{resource=\"cpu\"}) by (namespace, exported_pod)* on (namespace, exported_pod) group_left()  (sum(kube_pod_status_phase{phase=\"Running\"}) by (namespace, exported_pod) == 1)) by (namespace))\n-\n(sum(label_replace(sum(kube_metrics_server_pods_cpu) by (pod_namespace) / 1000000000 , \"namespace\", \"$1\", \"pod_namespace\", \"(.*)\")) by (namespace))",
          "format": "table",
          "instant": true,
          "intervalFactor": 1,
          "legendFormat": "Wasted CPU",
          "refId": "J"
        },
        {
          "expr": "((100 * \n(sum(label_replace(sum(kube_metrics_server_pods_cpu) by (pod_namespace) / 1000000000 , \"namespace\", \"$1\", \"pod_namespace\", \"(.*)\")) by (namespace))\n/ \nsum(sum(kube_pod_container_resource_requests{resource=\"cpu\"}) by (namespace, exported_pod)* on (namespace, exported_pod) group_left()  (sum(kube_pod_status_phase{phase=\"Running\"}) by (namespace, exported_pod) == 1)) by (namespace)\n- 100) * -1)",
          "format": "table",
          "instant": true,
          "intervalFactor": 1,
          "legendFormat": "Wasted CPU %",
          "refId": "K"
        },
        {
          "expr": "((100 * \n(sum(label_replace(sum(avg_over_time(kube_metrics_server_pods_cpu[1d])) by (pod_namespace) / 1000000000, \"namespace\", \"$1\", \"pod_namespace\", \"(.*)\")) by (namespace))\n/ \nsum(sum(kube_pod_container_resource_requests{resource=\"cpu\"}) by (namespace, exported_pod)* on (namespace, exported_pod) group_left()  (sum(kube_pod_status_phase{phase=\"Running\"}) by (namespace, exported_pod) == 1)) by (namespace)\n- 100) * -1) > 0\n",
          "format": "table",
          "hide": true,
          "instant": true,
          "intervalFactor": 1,
          "legendFormat": "Wasted CPU % AVG",
          "refId": "L"
        }
      ],
      "title": "Requests/Limit/Usage by Namespace",
      "transform": "table",
      "type": "table"
    },
    {
      "collapsed": true,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 48
      },
      "id": 18,
      "panels": [
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_PROMETHEUS}",
          "description": "This represents the total [memory resource requests](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-memory) in the cluster.\nFor comparison the total [allocatable memory](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/node-allocatable.md) is also shown.",
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 9,
            "w": 12,
            "x": 0,
            "y": 49
          },
          "id": 19,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "options": {
            "dataLinks": []
          },
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "min(sum(kube_node_status_allocatable_memory_bytes) by (instance))",
              "format": "time_series",
              "hide": true,
              "intervalFactor": 2,
              "legendFormat": "Allocatable Memory",
              "refId": "A",
              "step": 10
            },
            {
              "expr": "max(sum(kube_pod_container_resource_requests_memory_bytes) by (instance))",
              "format": "time_series",
              "hide": true,
              "intervalFactor": 2,
              "legendFormat": "Requested Memory",
              "refId": "B",
              "step": 10
            },
            {
              "expr": "sum(\nsum(kube_pod_container_resource_requests{namespace=\"$namespace\", resource=\"memory\"}) by (exported_pod)\n * on (exported_pod) group_left()  (sum(kube_pod_status_phase{phase=\"Running\", namespace=\"$namespace\"}) by (exported_pod) == 1)\n ) / 1000",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "Requested Memory",
              "refId": "C"
            },
            {
              "expr": "sum(\nsum(kube_pod_container_resource_limits{namespace=\"$namespace\", resource=\"memory\"}) by (exported_pod)\n * on (exported_pod) group_left()  (sum(kube_pod_status_phase{phase=\"Running\", namespace=\"$namespace\"}) by (exported_pod) == 1)\n ) / 1000",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "Limit Memory",
              "refId": "D"
            },
            {
              "expr": "sum(kube_metrics_server_pods_mem{pod_namespace=\"$namespace\"})",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "Used Memory",
              "refId": "E"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "Memory",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "kbytes",
              "label": "Memory",
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "cacheTimeout": null,
          "colorBackground": false,
          "colorValue": false,
          "colors": [
            "#299c46",
            "rgba(237, 129, 40, 0.89)",
            "#d44a3a"
          ],
          "datasource": "${DS_THANOS}",
          "format": "decbytes",
          "gauge": {
            "maxValue": 100,
            "minValue": 0,
            "show": false,
            "thresholdLabels": false,
            "thresholdMarkers": true
          },
          "gridPos": {
            "h": 9,
            "w": 4,
            "x": 12,
            "y": 49
          },
          "id": 9,
          "interval": null,
          "links": [],
          "mappingType": 1,
          "mappingTypes": [
            {
              "name": "value to text",
              "value": 1
            },
            {
              "name": "range to text",
              "value": 2
            }
          ],
          "maxDataPoints": 100,
          "nullPointMode": "connected",
          "nullText": null,
          "options": {},
          "postfix": "",
          "postfixFontSize": "50%",
          "prefix": "",
          "prefixFontSize": "50%",
          "rangeMaps": [
            {
              "from": "null",
              "text": "N/A",
              "to": "null"
            }
          ],
          "sparkline": {
            "fillColor": "rgba(31, 118, 189, 0.18)",
            "full": false,
            "lineColor": "rgb(31, 120, 193)",
            "show": true
          },
          "tableColumn": "",
          "targets": [
            {
              "expr": "sum(kube_pod_container_resource_requests{namespace=\"$namespace\", resource=\"memory\"})",
              "format": "time_series",
              "hide": true,
              "intervalFactor": 1,
              "refId": "A"
            },
            {
              "expr": "sum(\nsum(kube_pod_container_resource_requests{namespace=\"$namespace\", resource=\"memory\"}) by (exported_pod)\n * on (exported_pod) group_left()  (sum(kube_pod_status_phase{phase=\"Running\", namespace=\"$namespace\"}) by (exported_pod) == 1)\n )",
              "format": "time_series",
              "hide": false,
              "intervalFactor": 1,
              "refId": "B"
            }
          ],
          "thresholds": "",
          "title": "Allocatable Memory",
          "type": "singlestat",
          "valueFontSize": "150%",
          "valueMaps": [
            {
              "op": "=",
              "text": "N/A",
              "value": "null"
            }
          ],
          "valueName": "current"
        },
        {
          "cacheTimeout": null,
          "colorBackground": false,
          "colorValue": false,
          "colors": [
            "#299c46",
            "rgba(237, 129, 40, 0.89)",
            "#d44a3a"
          ],
          "datasource": "${DS_THANOS}",
          "format": "decbytes",
          "gauge": {
            "maxValue": 100,
            "minValue": 0,
            "show": false,
            "thresholdLabels": false,
            "thresholdMarkers": true
          },
          "gridPos": {
            "h": 9,
            "w": 4,
            "x": 16,
            "y": 49
          },
          "id": 22,
          "interval": null,
          "links": [],
          "mappingType": 1,
          "mappingTypes": [
            {
              "name": "value to text",
              "value": 1
            },
            {
              "name": "range to text",
              "value": 2
            }
          ],
          "maxDataPoints": 100,
          "nullPointMode": "connected",
          "nullText": null,
          "options": {},
          "postfix": "",
          "postfixFontSize": "50%",
          "prefix": "",
          "prefixFontSize": "50%",
          "rangeMaps": [
            {
              "from": "null",
              "text": "N/A",
              "to": "null"
            }
          ],
          "sparkline": {
            "fillColor": "rgba(31, 118, 189, 0.18)",
            "full": false,
            "lineColor": "rgb(31, 120, 193)",
            "show": true
          },
          "tableColumn": "",
          "targets": [
            {
              "expr": "sum(kube_pod_container_resource_limits{namespace=\"$namespace\", resource=\"memory\"})",
              "format": "time_series",
              "hide": true,
              "intervalFactor": 1,
              "refId": "A"
            },
            {
              "expr": "sum(\nsum(kube_pod_container_resource_limits{namespace=\"$namespace\", resource=\"memory\"}) by (exported_pod)\n * on (exported_pod) group_left()  (sum(kube_pod_status_phase{phase=\"Running\", namespace=\"$namespace\"}) by (exported_pod) == 1)\n )",
              "format": "time_series",
              "intervalFactor": 1,
              "refId": "B"
            }
          ],
          "thresholds": "",
          "title": "Limit Memory",
          "type": "singlestat",
          "valueFontSize": "150%",
          "valueMaps": [
            {
              "op": "=",
              "text": "N/A",
              "value": "null"
            }
          ],
          "valueName": "current"
        },
        {
          "cacheTimeout": null,
          "colorBackground": false,
          "colorValue": false,
          "colors": [
            "#299c46",
            "rgba(237, 129, 40, 0.89)",
            "#d44a3a"
          ],
          "datasource": "${DS_THANOS}",
          "format": "kbytes",
          "gauge": {
            "maxValue": 100,
            "minValue": 0,
            "show": false,
            "thresholdLabels": false,
            "thresholdMarkers": true
          },
          "gridPos": {
            "h": 9,
            "w": 4,
            "x": 20,
            "y": 49
          },
          "id": 13,
          "interval": null,
          "links": [],
          "mappingType": 1,
          "mappingTypes": [
            {
              "name": "value to text",
              "value": 1
            },
            {
              "name": "range to text",
              "value": 2
            }
          ],
          "maxDataPoints": 100,
          "nullPointMode": "connected",
          "nullText": null,
          "options": {},
          "postfix": "",
          "postfixFontSize": "50%",
          "prefix": "",
          "prefixFontSize": "50%",
          "rangeMaps": [
            {
              "from": "null",
              "text": "N/A",
              "to": "null"
            }
          ],
          "sparkline": {
            "fillColor": "rgba(31, 118, 189, 0.18)",
            "full": false,
            "lineColor": "rgb(31, 120, 193)",
            "show": true
          },
          "tableColumn": "",
          "targets": [
            {
              "expr": "sum(kube_metrics_server_pods_mem{pod_namespace=\"$namespace\"})",
              "format": "time_series",
              "intervalFactor": 1,
              "refId": "A"
            }
          ],
          "thresholds": "",
          "title": "Used Memory",
          "type": "singlestat",
          "valueFontSize": "150%",
          "valueMaps": [
            {
              "op": "=",
              "text": "N/A",
              "value": "null"
            }
          ],
          "valueName": "current"
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_PROMETHEUS}",
          "description": "This represents the total [CPU resource requests](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-cpu) in the cluster.\nFor comparison the total [allocatable CPU cores](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/node-allocatable.md) is also shown.",
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 9,
            "w": 12,
            "x": 0,
            "y": 58
          },
          "id": 23,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "options": {
            "dataLinks": []
          },
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "sum(kube_pod_container_resource_requests{resource=\"cpu\", namespace=\"$namespace\"})",
              "format": "time_series",
              "hide": true,
              "intervalFactor": 1,
              "legendFormat": "Requested CPU",
              "refId": "C"
            },
            {
              "expr": "sum(kube_pod_container_resource_limits{resource=\"cpu\", namespace=\"$namespace\"})",
              "format": "time_series",
              "hide": true,
              "intervalFactor": 1,
              "legendFormat": "Limit CPU",
              "refId": "D"
            },
            {
              "expr": "sum(kube_metrics_server_pods_cpu{pod_namespace=\"$namespace\"}) / 1000000000",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "Used CPU",
              "refId": "E"
            },
            {
              "expr": "sum(\nsum(kube_pod_container_resource_requests{namespace=\"$namespace\", resource=\"cpu\"}) by (exported_pod)\n * on (exported_pod) group_left()  (sum(kube_pod_status_phase{phase=\"Running\", namespace=\"$namespace\"}) by (exported_pod) == 1)\n )",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "Requested CPU",
              "refId": "A"
            },
            {
              "expr": "sum(\nsum(kube_pod_container_resource_limits{namespace=\"$namespace\", resource=\"cpu\"}) by (exported_pod)\n * on (exported_pod) group_left()  (sum(kube_pod_status_phase{phase=\"Running\", namespace=\"$namespace\"}) by (exported_pod) == 1)\n )",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "Limit CPU",
              "refId": "B"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "CPU Cores",
          "tooltip": {
            "shared": true,
            "sort": 2,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "short",
              "label": "CPU Cores",
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "cacheTimeout": null,
          "colorBackground": false,
          "colorValue": false,
          "colors": [
            "#299c46",
            "rgba(237, 129, 40, 0.89)",
            "#d44a3a"
          ],
          "datasource": "${DS_PROMETHEUS}",
          "decimals": null,
          "format": "none",
          "gauge": {
            "maxValue": 100,
            "minValue": 0,
            "show": false,
            "thresholdLabels": false,
            "thresholdMarkers": true
          },
          "gridPos": {
            "h": 9,
            "w": 4,
            "x": 12,
            "y": 58
          },
          "id": 24,
          "interval": null,
          "links": [],
          "mappingType": 1,
          "mappingTypes": [
            {
              "name": "value to text",
              "value": 1
            },
            {
              "name": "range to text",
              "value": 2
            }
          ],
          "maxDataPoints": 100,
          "nullPointMode": "connected",
          "nullText": null,
          "options": {},
          "postfix": "   cores",
          "postfixFontSize": "50%",
          "prefix": "",
          "prefixFontSize": "50%",
          "rangeMaps": [
            {
              "from": "null",
              "text": "N/A",
              "to": "null"
            }
          ],
          "sparkline": {
            "fillColor": "rgba(31, 118, 189, 0.18)",
            "full": false,
            "lineColor": "rgb(31, 120, 193)",
            "show": true
          },
          "tableColumn": "",
          "targets": [
            {
              "expr": "sum(kube_pod_container_resource_requests{resource=\"cpu\", namespace=\"$namespace\"})",
              "format": "time_series",
              "hide": true,
              "intervalFactor": 1,
              "refId": "A"
            },
            {
              "expr": "sum(\nsum(kube_pod_container_resource_requests{namespace=\"$namespace\", resource=\"cpu\"}) by (exported_pod)\n * on (exported_pod) group_left()  (sum(kube_pod_status_phase{phase=\"Running\", namespace=\"$namespace\"}) by (exported_pod) == 1)\n )",
              "format": "time_series",
              "hide": false,
              "intervalFactor": 1,
              "refId": "B"
            }
          ],
          "thresholds": "",
          "title": "Allocatable CPU Cores",
          "type": "singlestat",
          "valueFontSize": "150%",
          "valueMaps": [
            {
              "op": "=",
              "text": "N/A",
              "value": "null"
            }
          ],
          "valueName": "current"
        },
        {
          "cacheTimeout": null,
          "colorBackground": false,
          "colorValue": false,
          "colors": [
            "#299c46",
            "rgba(237, 129, 40, 0.89)",
            "#d44a3a"
          ],
          "datasource": "${DS_PROMETHEUS}",
          "decimals": null,
          "format": "none",
          "gauge": {
            "maxValue": 100,
            "minValue": 0,
            "show": false,
            "thresholdLabels": false,
            "thresholdMarkers": true
          },
          "gridPos": {
            "h": 9,
            "w": 4,
            "x": 16,
            "y": 58
          },
          "id": 26,
          "interval": null,
          "links": [],
          "mappingType": 1,
          "mappingTypes": [
            {
              "name": "value to text",
              "value": 1
            },
            {
              "name": "range to text",
              "value": 2
            }
          ],
          "maxDataPoints": 100,
          "nullPointMode": "connected",
          "nullText": null,
          "options": {},
          "postfix": "   cores",
          "postfixFontSize": "50%",
          "prefix": "",
          "prefixFontSize": "50%",
          "rangeMaps": [
            {
              "from": "null",
              "text": "N/A",
              "to": "null"
            }
          ],
          "sparkline": {
            "fillColor": "rgba(31, 118, 189, 0.18)",
            "full": false,
            "lineColor": "rgb(31, 120, 193)",
            "show": true
          },
          "tableColumn": "",
          "targets": [
            {
              "expr": "sum(kube_pod_container_resource_limits{resource=\"cpu\", namespace=\"$namespace\"})",
              "format": "time_series",
              "hide": true,
              "intervalFactor": 1,
              "refId": "A"
            },
            {
              "expr": "sum(kube_metrics_server_nodes_cpu) / 100000000",
              "format": "time_series",
              "hide": true,
              "intervalFactor": 1,
              "refId": "B"
            },
            {
              "expr": "sum(\nsum(kube_pod_container_resource_limits{namespace=\"$namespace\", resource=\"cpu\"}) by (exported_pod)\n * on (exported_pod) group_left()  (sum(kube_pod_status_phase{phase=\"Running\", namespace=\"$namespace\"}) by (exported_pod) == 1)\n )",
              "format": "time_series",
              "hide": false,
              "intervalFactor": 1,
              "refId": "C"
            }
          ],
          "thresholds": "",
          "title": "Limit CPU Cores",
          "type": "singlestat",
          "valueFontSize": "150%",
          "valueMaps": [
            {
              "op": "=",
              "text": "N/A",
              "value": "null"
            }
          ],
          "valueName": "current"
        },
        {
          "cacheTimeout": null,
          "colorBackground": false,
          "colorValue": false,
          "colors": [
            "#299c46",
            "rgba(237, 129, 40, 0.89)",
            "#d44a3a"
          ],
          "datasource": "${DS_PROMETHEUS}",
          "decimals": null,
          "format": "none",
          "gauge": {
            "maxValue": 100,
            "minValue": 0,
            "show": false,
            "thresholdLabels": false,
            "thresholdMarkers": true
          },
          "gridPos": {
            "h": 9,
            "w": 4,
            "x": 20,
            "y": 58
          },
          "id": 25,
          "interval": null,
          "links": [],
          "mappingType": 1,
          "mappingTypes": [
            {
              "name": "value to text",
              "value": 1
            },
            {
              "name": "range to text",
              "value": 2
            }
          ],
          "maxDataPoints": 100,
          "nullPointMode": "connected",
          "nullText": null,
          "options": {},
          "postfix": "   cores",
          "postfixFontSize": "50%",
          "prefix": "",
          "prefixFontSize": "50%",
          "rangeMaps": [
            {
              "from": "null",
              "text": "N/A",
              "to": "null"
            }
          ],
          "sparkline": {
            "fillColor": "rgba(31, 118, 189, 0.18)",
            "full": false,
            "lineColor": "rgb(31, 120, 193)",
            "show": true
          },
          "tableColumn": "",
          "targets": [
            {
              "expr": "sum(kube_metrics_server_pods_cpu{pod_namespace=\"$namespace\"}) / 1000000000",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "",
              "refId": "A"
            }
          ],
          "thresholds": "",
          "title": "Used CPU Cores",
          "type": "singlestat",
          "valueFontSize": "150%",
          "valueMaps": [
            {
              "op": "=",
              "text": "N/A",
              "value": "null"
            }
          ],
          "valueName": "current"
        },
        {
          "columns": [],
          "datasource": "${DS_PROMETHEUS}",
          "fontSize": "100%",
          "gridPos": {
            "h": 14,
            "w": 12,
            "x": 0,
            "y": 67
          },
          "id": 28,
          "links": [],
          "options": {},
          "pageSize": null,
          "scroll": true,
          "showHeader": true,
          "sort": {
            "col": 5,
            "desc": false
          },
          "styles": [
            {
              "alias": "Time",
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "pattern": "Time",
              "type": "hidden"
            },
            {
              "alias": "Memory Requested",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 0,
              "mappingType": 1,
              "pattern": "Value #A",
              "thresholds": [],
              "type": "number",
              "unit": "decbytes"
            },
            {
              "alias": "Memory Limits",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 0,
              "mappingType": 1,
              "pattern": "Value #B",
              "thresholds": [],
              "type": "number",
              "unit": "decbytes"
            },
            {
              "alias": "Pod Name",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "mappingType": 1,
              "pattern": "exported_pod",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            },
            {
              "alias": "",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "mappingType": 1,
              "pattern": "pod_name",
              "thresholds": [],
              "type": "hidden",
              "unit": "short"
            },
            {
              "alias": "Live Memory",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "mappingType": 1,
              "pattern": "Value #D",
              "thresholds": [],
              "type": "number",
              "unit": "deckbytes"
            },
            {
              "alias": "Wasted Memory %",
              "colorMode": "cell",
              "colors": [
                "rgba(50, 172, 45, 0.97)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(245, 54, 54, 0.9)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "mappingType": 1,
              "pattern": "Value #C",
              "thresholds": [
                "30",
                "50"
              ],
              "type": "number",
              "unit": "percent"
            },
            {
              "alias": "",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "decimals": 2,
              "pattern": "/.*/",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            }
          ],
          "targets": [
            {
              "expr": "sum(kube_pod_container_resource_requests{namespace=\"$namespace\", resource=\"memory\"}) by (exported_pod)",
              "format": "table",
              "hide": false,
              "instant": true,
              "intervalFactor": 1,
              "legendFormat": "",
              "refId": "A"
            },
            {
              "expr": "sum(kube_pod_container_resource_limits{namespace=\"$namespace\", resource=\"memory\"})  by (exported_pod)",
              "format": "table",
              "hide": false,
              "instant": true,
              "intervalFactor": 1,
              "refId": "B"
            },
            {
              "expr": "label_replace(sum(kube_metrics_server_pods_mem{pod_namespace=~\"$namespace\"}) by (pod_name), \"exported_pod\", \"$1\", \"pod_name\", \"(.*)\")",
              "format": "table",
              "hide": false,
              "instant": true,
              "intervalFactor": 1,
              "refId": "D"
            },
            {
              "expr": "((100 * \n(sum(label_replace(sum(kube_metrics_server_pods_mem{pod_namespace=~\"$namespace\"}) by (pod_name), \"exported_pod\", \"$1\", \"pod_name\", \"(.*)\")) by (exported_pod) * 1024)\n/ \nsum(sum(kube_pod_container_resource_requests{resource=\"memory\", namespace=~\"$namespace\"}) by (exported_pod)* on (exported_pod) group_left()  (sum(kube_pod_status_phase{phase=\"Running\"}) by (exported_pod) == 1)) by (exported_pod)\n- 100) * -1)",
              "format": "table",
              "instant": true,
              "intervalFactor": 1,
              "legendFormat": "Wasted Live %",
              "refId": "C"
            }
          ],
          "title": "Memory Request/Limit by Pod",
          "transform": "table",
          "type": "table"
        },
        {
          "columns": [],
          "datasource": "${DS_PROMETHEUS}",
          "fontSize": "100%",
          "gridPos": {
            "h": 14,
            "w": 12,
            "x": 12,
            "y": 67
          },
          "id": 29,
          "links": [],
          "options": {},
          "pageSize": null,
          "scroll": true,
          "showHeader": true,
          "sort": {
            "col": 6,
            "desc": false
          },
          "styles": [
            {
              "alias": "Time",
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "pattern": "Time",
              "type": "hidden"
            },
            {
              "alias": "CPU Requested",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 3,
              "mappingType": 1,
              "pattern": "Value #A",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            },
            {
              "alias": "CPU Limits",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 3,
              "mappingType": 1,
              "pattern": "Value #B",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            },
            {
              "alias": "Pod",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "mappingType": 1,
              "pattern": "exported_pod",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            },
            {
              "alias": "",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "mappingType": 1,
              "pattern": "pod_name",
              "thresholds": [],
              "type": "hidden",
              "unit": "short"
            },
            {
              "alias": "Live CPU",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 3,
              "mappingType": 1,
              "pattern": "Value #C",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            },
            {
              "alias": "Wasted CPU %",
              "colorMode": "cell",
              "colors": [
                "rgba(50, 172, 45, 0.97)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(245, 54, 54, 0.9)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "mappingType": 1,
              "pattern": "Value #D",
              "thresholds": [
                "30",
                "50"
              ],
              "type": "number",
              "unit": "percent"
            },
            {
              "alias": "",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "decimals": 2,
              "pattern": "/.*/",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            }
          ],
          "targets": [
            {
              "expr": "sum(kube_pod_container_resource_requests{resource=\"cpu\", namespace=~\"$namespace\"}) by (exported_pod)* on (exported_pod) group_left()  (sum(kube_pod_status_phase{phase=\"Running\"}) by (exported_pod) == 1)",
              "format": "table",
              "hide": false,
              "instant": true,
              "intervalFactor": 1,
              "legendFormat": "",
              "refId": "A"
            },
            {
              "expr": "sum(kube_pod_container_resource_limits{resource=\"cpu\", namespace=~\"$namespace\"}) by (exported_pod)* on (exported_pod) group_left()  (sum(kube_pod_status_phase{phase=\"Running\"}) by (exported_pod) == 1)",
              "format": "table",
              "hide": false,
              "instant": true,
              "intervalFactor": 1,
              "refId": "B"
            },
            {
              "expr": "label_replace(sum(kube_metrics_server_pods_cpu{pod_namespace=~\"$namespace\"}) by (pod_name) / 1000000000 , \"exported_pod\", \"$1\", \"pod_name\", \"(.*)\") ",
              "format": "table",
              "instant": true,
              "intervalFactor": 1,
              "refId": "C"
            },
            {
              "expr": "((100 * \n(sum(label_replace(sum(kube_metrics_server_pods_cpu{pod_namespace=~\"$namespace\"}) by (pod_name), \"exported_pod\", \"$1\", \"pod_name\", \"(.*)\")) by (exported_pod) / 1000000000)\n/ \nsum(sum(kube_pod_container_resource_requests{resource=\"cpu\", namespace=~\"$namespace\"}) by (exported_pod)* on (exported_pod) group_left()  (sum(kube_pod_status_phase{phase=\"Running\"}) by (exported_pod) == 1)) by (exported_pod)\n- 100) * -1)",
              "format": "table",
              "instant": true,
              "intervalFactor": 1,
              "legendFormat": "Wasted CPU %",
              "refId": "D"
            }
          ],
          "title": "CPU Request/Limit by Pod",
          "transform": "table",
          "type": "table"
        }
      ],
      "title": "Resource by Namespace",
      "type": "row"
    },
    {
      "collapsed": true,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 49
      },
      "id": 37,
      "panels": [
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_PROMETHEUS}",
          "description": "This represents the total [memory resource requests](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-memory) in the cluster.\nFor comparison the total [allocatable memory](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/node-allocatable.md) is also shown.",
          "fill": 1,
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 0,
            "y": 3
          },
          "id": 38,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": false,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "options": {},
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "min(sum(kube_node_status_allocatable_memory_bytes) by (instance))",
              "format": "time_series",
              "hide": true,
              "intervalFactor": 2,
              "legendFormat": "Allocatable Memory",
              "refId": "A",
              "step": 10
            },
            {
              "expr": "max(sum(kube_pod_container_resource_requests_memory_bytes) by (instance))",
              "format": "time_series",
              "hide": true,
              "intervalFactor": 2,
              "legendFormat": "Requested Memory",
              "refId": "B",
              "step": 10
            },
            {
              "expr": "sum(kube_pod_container_resource_requests{namespace=\"$namespace\", resource=\"memory\",exported_pod=~\"($app)-[0-9a-fA-F].*\"})/ 1024",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "Requested Memory $app",
              "refId": "C"
            },
            {
              "expr": "sum(kube_pod_container_resource_limits{namespace=\"$namespace\", resource=\"memory\", exported_pod=~\"$app.*\"}) / 1024",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "Limit Memory $app",
              "refId": "D"
            },
            {
              "expr": "sum(kube_metrics_server_pods_mem{pod_namespace=\"$namespace\", pod_name=~\"$app.*\"})",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "Used Memory $app",
              "refId": "E"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "Memory by app",
          "tooltip": {
            "shared": true,
            "sort": 2,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "kbytes",
              "label": "Memory",
              "logBase": 1,
              "max": null,
              "min": "0",
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_PROMETHEUS}",
          "description": "This represents the total [CPU resource requests](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-cpu) in the cluster.\nFor comparison the total [allocatable CPU cores](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/node-allocatable.md) is also shown.",
          "fill": 1,
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 12,
            "y": 3
          },
          "id": 39,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": false,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "options": {},
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "sum(kube_pod_container_resource_requests{resource=\"cpu\", namespace=\"$namespace\",exported_pod=~\"($app)-[0-9a-fA-F].*\"})",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "Requested CPU $app",
              "refId": "C"
            },
            {
              "expr": "sum(kube_pod_container_resource_limits{resource=\"cpu\", namespace=\"$namespace\",exported_pod=~\"($app)-[0-9a-fA-F].*\"})",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "Limit CPU $app",
              "refId": "D"
            },
            {
              "expr": "sum(kube_metrics_server_pods_cpu{pod_namespace=\"$namespace\", pod_name=~\"($app)-[0-9a-fA-F].*\"}) / 1000000000",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "Used CPU $app",
              "refId": "E"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "CPU Cores by app",
          "tooltip": {
            "shared": true,
            "sort": 2,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "short",
              "label": "CPU Cores",
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_PROMETHEUS}",
          "description": "This represents the total [memory resource requests](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-memory) in the cluster.\nFor comparison the total [allocatable memory](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/node-allocatable.md) is also shown.",
          "fill": 1,
          "gridPos": {
            "h": 9,
            "w": 12,
            "x": 0,
            "y": 11
          },
          "id": 34,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": false,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "options": {},
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "min(sum(kube_node_status_allocatable_memory_bytes) by (instance))",
              "format": "time_series",
              "hide": true,
              "intervalFactor": 2,
              "legendFormat": "Allocatable Memory",
              "refId": "A",
              "step": 10
            },
            {
              "expr": "max(sum(kube_pod_container_resource_requests_memory_bytes) by (instance))",
              "format": "time_series",
              "hide": true,
              "intervalFactor": 2,
              "legendFormat": "Requested Memory",
              "refId": "B",
              "step": 10
            },
            {
              "expr": "sum(kube_pod_container_resource_requests{namespace=\"$namespace\", resource=\"memory\",exported_pod=~\"($app)-[0-9a-fA-F].*\"}) by (exported_pod) / 1024",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "Requested Memory {{exported_pod}}",
              "refId": "C"
            },
            {
              "expr": "sum(kube_pod_container_resource_limits{namespace=\"$namespace\", resource=\"memory\", exported_pod=~\"($app)-[0-9a-fA-F].*\"})  by (exported_pod) / 1024",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "Limit Memory {{exported_pod}}",
              "refId": "D"
            },
            {
              "expr": "sum(kube_metrics_server_pods_mem{pod_namespace=\"$namespace\", pod_name=~\"($app)-[0-9a-fA-F].*\"})  by (pod_name)",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "Used Memory {{pod_name}}",
              "refId": "E"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "Memory by pod",
          "tooltip": {
            "shared": true,
            "sort": 2,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "kbytes",
              "label": "Memory",
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_PROMETHEUS}",
          "description": "This represents the total [CPU resource requests](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-cpu) in the cluster.\nFor comparison the total [allocatable CPU cores](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/node-allocatable.md) is also shown.",
          "fill": 1,
          "gridPos": {
            "h": 9,
            "w": 12,
            "x": 12,
            "y": 11
          },
          "id": 35,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": false,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "options": {},
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "sum(kube_pod_container_resource_requests{resource=\"cpu\", namespace=\"$namespace\",exported_pod=~\"($app)-[0-9a-fA-F].*\"}) by (exported_pod)",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "Requested CPU {{exported_pod}}",
              "refId": "C"
            },
            {
              "expr": "sum(kube_pod_container_resource_limits{resource=\"cpu\", namespace=\"$namespace\",exported_pod=~\"($app)-[0-9a-fA-F].*\"}) by (exported_pod)",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "Limit CPU {{exported_pod}}",
              "refId": "D"
            },
            {
              "expr": "sum(kube_metrics_server_pods_cpu{pod_namespace=\"$namespace\", pod_name=~\"($app)-[0-9a-fA-F].*\"}) by (pod_name) / 1000000000",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "Used CPU {{pod_name}}",
              "refId": "E"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "CPU Cores by pod",
          "tooltip": {
            "shared": true,
            "sort": 2,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "short",
              "label": "CPU Cores",
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "columns": [],
          "datasource": "${DS_PROMETHEUS}",
          "fontSize": "100%",
          "gridPos": {
            "h": 16,
            "w": 12,
            "x": 0,
            "y": 20
          },
          "id": 43,
          "links": [],
          "options": {},
          "pageSize": null,
          "scroll": true,
          "showHeader": true,
          "sort": {
            "col": 5,
            "desc": false
          },
          "styles": [
            {
              "alias": "Time",
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "pattern": "Time",
              "type": "hidden"
            },
            {
              "alias": "Memory Requested",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 0,
              "mappingType": 1,
              "pattern": "Value #A",
              "thresholds": [],
              "type": "number",
              "unit": "decbytes"
            },
            {
              "alias": "Memory Limits",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 0,
              "mappingType": 1,
              "pattern": "Value #B",
              "thresholds": [],
              "type": "number",
              "unit": "decbytes"
            },
            {
              "alias": "Pod Name",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "mappingType": 1,
              "pattern": "exported_pod",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            },
            {
              "alias": "",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "mappingType": 1,
              "pattern": "pod_name",
              "thresholds": [],
              "type": "hidden",
              "unit": "short"
            },
            {
              "alias": "Live Memory",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "mappingType": 1,
              "pattern": "Value #D",
              "thresholds": [],
              "type": "number",
              "unit": "kbytes"
            },
            {
              "alias": "1 Day Avg Memory",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "mappingType": 1,
              "pattern": "Value #C",
              "thresholds": [],
              "type": "number",
              "unit": "kbytes"
            },
            {
              "alias": "2 Days Avg Memory",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "mappingType": 1,
              "pattern": "Value #E",
              "thresholds": [],
              "type": "number",
              "unit": "kbytes"
            },
            {
              "alias": "2 days Max Memory",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "mappingType": 1,
              "pattern": "Value #F",
              "thresholds": [],
              "type": "number",
              "unit": "kbytes"
            },
            {
              "alias": "",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "decimals": 2,
              "pattern": "/.*/",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            }
          ],
          "targets": [
            {
              "expr": "sum(kube_pod_container_resource_requests{namespace=\"$namespace\", resource=\"memory\",exported_pod=~\"($app)-[0-9a-fA-F].*\"}) by (exported_pod)",
              "format": "table",
              "hide": false,
              "instant": true,
              "intervalFactor": 1,
              "legendFormat": "",
              "refId": "A"
            },
            {
              "expr": "sum(kube_pod_container_resource_limits{namespace=\"$namespace\", resource=\"memory\",exported_pod=~\"($app)-[0-9a-fA-F].*\"})  by (exported_pod)",
              "format": "table",
              "hide": false,
              "instant": true,
              "intervalFactor": 1,
              "refId": "B"
            },
            {
              "expr": "label_replace(sum(kube_metrics_server_pods_mem{pod_namespace=~\"$namespace\",pod_name=~\"($app)-[0-9a-fA-F].*\"}) by (pod_name), \"exported_pod\", \"$1\", \"pod_name\", \"(.*)\")",
              "format": "table",
              "hide": false,
              "instant": true,
              "intervalFactor": 1,
              "refId": "D"
            },
            {
              "expr": "label_replace(sum(avg_over_time(kube_metrics_server_pods_mem{pod_namespace=~\"$namespace\",pod_name=~\"($app)-[0-9a-fA-F].*\"}[1d])) by (pod_name), \"exported_pod\", \"$1\", \"pod_name\", \"(.*)\")",
              "format": "table",
              "instant": true,
              "intervalFactor": 1,
              "refId": "C"
            },
            {
              "expr": "label_replace(sum(avg_over_time(kube_metrics_server_pods_mem{pod_namespace=~\"$namespace\",pod_name=~\"($app)-[0-9a-fA-F].*\"}[2d])) by (pod_name), \"exported_pod\", \"$1\", \"pod_name\", \"(.*)\")",
              "format": "table",
              "instant": true,
              "intervalFactor": 1,
              "refId": "E"
            },
            {
              "expr": "label_replace(sum(max_over_time(kube_metrics_server_pods_mem{pod_namespace=~\"$namespace\",pod_name=~\"($app)-[0-9a-fA-F].*\"}[2d])) by (pod_name), \"exported_pod\", \"$1\", \"pod_name\", \"(.*)\")",
              "format": "table",
              "instant": true,
              "intervalFactor": 1,
              "refId": "F"
            }
          ],
          "title": "Memory Request/Limit by Pod",
          "transform": "table",
          "type": "table"
        },
        {
          "columns": [],
          "datasource": "${DS_PROMETHEUS}",
          "fontSize": "100%",
          "gridPos": {
            "h": 16,
            "w": 12,
            "x": 12,
            "y": 20
          },
          "id": 44,
          "links": [],
          "options": {},
          "pageSize": null,
          "scroll": true,
          "showHeader": true,
          "sort": {
            "col": 5,
            "desc": false
          },
          "styles": [
            {
              "alias": "Time",
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "pattern": "Time",
              "type": "hidden"
            },
            {
              "alias": "CPU Requested",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 0,
              "mappingType": 1,
              "pattern": "Value #A",
              "thresholds": [],
              "type": "string",
              "unit": "short"
            },
            {
              "alias": "CPU Limits",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 0,
              "mappingType": 1,
              "pattern": "Value #B",
              "thresholds": [],
              "type": "string",
              "unit": "short"
            },
            {
              "alias": "Pod",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "mappingType": 1,
              "pattern": "exported_pod",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            },
            {
              "alias": "",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "mappingType": 1,
              "pattern": "pod_name",
              "thresholds": [],
              "type": "hidden",
              "unit": "short"
            },
            {
              "alias": "Live CPU",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "mappingType": 1,
              "pattern": "Value #C",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            },
            {
              "alias": "1 Day Avg CPU",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "mappingType": 1,
              "pattern": "Value #D",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            },
            {
              "alias": "2  Days Avg CPU",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "mappingType": 1,
              "pattern": "Value #E",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            },
            {
              "alias": "2 days Max CPU",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "mappingType": 1,
              "pattern": "Value #F",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            },
            {
              "alias": "",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "decimals": 2,
              "pattern": "/.*/",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            }
          ],
          "targets": [
            {
              "expr": "sum(kube_pod_container_resource_requests{resource=\"cpu\", namespace=\"$namespace\",exported_pod=~\"($app)-[0-9a-fA-F].*\"}) by (exported_pod)",
              "format": "table",
              "hide": false,
              "instant": true,
              "intervalFactor": 1,
              "legendFormat": "",
              "refId": "A"
            },
            {
              "expr": "sum(kube_pod_container_resource_limits{resource=\"cpu\", namespace=\"$namespace\",exported_pod=~\"($app)-[0-9a-fA-F].*\"}) by (exported_pod)",
              "format": "table",
              "hide": false,
              "instant": true,
              "intervalFactor": 1,
              "refId": "B"
            },
            {
              "expr": "label_replace(sum(kube_metrics_server_pods_cpu{pod_namespace=~\"$namespace\",pod_name=~\"($app)-[0-9a-fA-F].*\"}) by (pod_name) / 1000000000 , \"exported_pod\", \"$1\", \"pod_name\", \"(.*)\") ",
              "format": "table",
              "instant": true,
              "intervalFactor": 1,
              "refId": "C"
            },
            {
              "expr": "label_replace(sum(avg_over_time(kube_metrics_server_pods_cpu{pod_namespace=~\"$namespace\",pod_name=~\"($app)-[0-9a-fA-F].*\"}[1d])) by (pod_name) / 1000000000, \"exported_pod\", \"$1\", \"pod_name\", \"(.*)\")",
              "format": "table",
              "instant": true,
              "intervalFactor": 1,
              "refId": "D"
            },
            {
              "expr": "label_replace(sum(avg_over_time(kube_metrics_server_pods_cpu{pod_namespace=~\"$namespace\",pod_name=~\"($app)-[0-9a-fA-F].*\"}[2d])) by (pod_name) / 1000000000, \"exported_pod\", \"$1\", \"pod_name\", \"(.*)\")",
              "format": "table",
              "instant": true,
              "intervalFactor": 1,
              "refId": "E"
            },
            {
              "expr": "label_replace(sum(max_over_time(kube_metrics_server_pods_cpu{pod_namespace=~\"$namespace\",pod_name=~\"($app)-[0-9a-fA-F].*\"}[2d])) by (pod_name) / 1000000000, \"exported_pod\", \"$1\", \"pod_name\", \"(.*)\")",
              "format": "table",
              "instant": true,
              "intervalFactor": 1,
              "refId": "F"
            }
          ],
          "title": "CPU Request/Limit by Pod",
          "transform": "table",
          "type": "table"
        }
      ],
      "title": "Resource by app",
      "type": "row"
    },
    {
      "collapsed": true,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 50
      },
      "id": 42,
      "panels": [
        {
          "columns": [],
          "datasource": "${DS_PROMETHEUS}",
          "fontSize": "100%",
          "gridPos": {
            "h": 11,
            "w": 12,
            "x": 0,
            "y": 4
          },
          "id": 46,
          "links": [],
          "options": {},
          "pageSize": null,
          "scroll": true,
          "showHeader": true,
          "sort": {
            "col": null,
            "desc": false
          },
          "styles": [
            {
              "alias": "Time",
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "pattern": "Time",
              "type": "hidden"
            },
            {
              "alias": "Node",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "mappingType": 1,
              "pattern": "node",
              "sanitize": false,
              "thresholds": [],
              "type": "string",
              "unit": "short"
            },
            {
              "alias": "Allocatable Memory",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "mappingType": 1,
              "pattern": "Value #A",
              "thresholds": [],
              "type": "number",
              "unit": "decbytes"
            },
            {
              "alias": "Live Memory",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "mappingType": 1,
              "pattern": "Value #B",
              "thresholds": [],
              "type": "number",
              "unit": "kbytes"
            },
            {
              "alias": "",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "mappingType": 1,
              "pattern": "exported_instance",
              "thresholds": [],
              "type": "hidden",
              "unit": "short"
            },
            {
              "alias": "",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "decimals": 2,
              "pattern": "/.*/",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            }
          ],
          "targets": [
            {
              "expr": "sum(kube_node_status_allocatable{resource=\"memory\"}) by (node)",
              "format": "table",
              "instant": true,
              "intervalFactor": 1,
              "refId": "A"
            },
            {
              "expr": "label_replace(sum(kube_metrics_server_nodes_mem) by (exported_instance), \"node\", \"$1\", \"exported_instance\", \"(.*)\") ",
              "format": "table",
              "instant": true,
              "intervalFactor": 1,
              "refId": "B"
            }
          ],
          "title": "Nodes Allocatable vs Usage",
          "transform": "table",
          "type": "table"
        },
        {
          "columns": [],
          "datasource": "${DS_PROMETHEUS}",
          "fontSize": "100%",
          "gridPos": {
            "h": 11,
            "w": 12,
            "x": 12,
            "y": 4
          },
          "id": 47,
          "links": [],
          "options": {},
          "pageSize": null,
          "scroll": true,
          "showHeader": true,
          "sort": {
            "col": 4,
            "desc": true
          },
          "styles": [
            {
              "alias": "Time",
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "pattern": "Time",
              "type": "hidden"
            },
            {
              "alias": "Node",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "mappingType": 1,
              "pattern": "node",
              "sanitize": false,
              "thresholds": [],
              "type": "string",
              "unit": "short"
            },
            {
              "alias": "Allocatable CPU",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "mappingType": 1,
              "pattern": "Value #A",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            },
            {
              "alias": "Live CPU",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "mappingType": 1,
              "pattern": "Value #B",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            },
            {
              "alias": "",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "mappingType": 1,
              "pattern": "exported_instance",
              "thresholds": [],
              "type": "hidden",
              "unit": "short"
            },
            {
              "alias": "",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "decimals": 2,
              "pattern": "/.*/",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            }
          ],
          "targets": [
            {
              "expr": "sum(kube_node_status_allocatable{resource=\"cpu\"}) by (node)",
              "format": "table",
              "instant": true,
              "intervalFactor": 1,
              "refId": "A"
            },
            {
              "expr": "label_replace(sum(kube_metrics_server_nodes_cpu) by (exported_instance) / 1000000000 , \"node\", \"$1\", \"exported_instance\", \"(.*)\") ",
              "format": "table",
              "instant": true,
              "intervalFactor": 1,
              "refId": "B"
            }
          ],
          "title": "CPU Allocatable vs Usage",
          "transform": "table",
          "type": "table"
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_PROMETHEUS}",
          "decimals": 1,
          "description": "",
          "fill": 1,
          "gridPos": {
            "h": 10,
            "w": 24,
            "x": 0,
            "y": 15
          },
          "id": 40,
          "legend": {
            "alignAsTable": true,
            "avg": false,
            "current": true,
            "max": false,
            "min": false,
            "rightSide": true,
            "show": true,
            "sort": "current",
            "sortDesc": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "options": {},
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [
            {
              "alias": "CPU Allocatable: ip-10-164-25-139.ec2.internal",
              "yaxis": 2
            },
            {
              "alias": "CPU Utilization: ip-10-164-25-139.ec2.internal",
              "yaxis": 2
            }
          ],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "sum(kube_node_status_allocatable{resource=\"memory\", node=~\"$instance\"}) by (node)",
              "format": "time_series",
              "hide": false,
              "intervalFactor": 2,
              "legendFormat": "Memory Allocatable: {{node}}",
              "refId": "A",
              "step": 10
            },
            {
              "expr": "sum(kube_metrics_server_nodes_mem{exported_instance=~\"$instance\"}) by (exported_instance) * 1024",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "Memory Utilization: {{exported_instance}}",
              "refId": "B"
            },
            {
              "expr": "sum(kube_node_status_allocatable{resource=\"cpu\", node=~\"$instance\"}) by (node)",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "CPU Allocatable: {{node}}",
              "refId": "C"
            },
            {
              "expr": "sum(kube_metrics_server_nodes_cpu{exported_instance=~\"$instance\"}) by (exported_instance) / 1000000000 ",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "CPU Utilization: {{exported_instance}}",
              "refId": "D"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "CPU / Memory Allocatable vs Utilization",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "decimals": null,
              "format": "decbytes",
              "label": "Memory",
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "decimals": 1,
              "format": "short",
              "label": "CPU",
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        }
      ],
      "title": "Resource by Node",
      "type": "row"
    }
  ],
  "refresh": "30s",
  "schemaVersion": 19,
  "style": "dark",
  "tags": [
    "kubernetes",
    "k8s",
    "prometheus"
  ],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS}",
        "definition": "label_values(kube_namespace_labels, namespace)",
        "hide": 0,
        "includeAll": false,
        "label": "namespace",
        "multi": false,
        "name": "namespace",
        "options": [],
        "query": "label_values(kube_namespace_labels, namespace)",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 2,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS}",
        "definition": "label_values(kube_pod_labels{namespace=\"$namespace\"}, label_app)",
        "hide": 0,
        "includeAll": false,
        "label": "app",
        "multi": false,
        "name": "app",
        "options": [],
        "query": "label_values(kube_pod_labels{namespace=\"$namespace\"}, label_app)",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS}",
        "definition": "label_values(kube_node_info, node)",
        "hide": 0,
        "includeAll": false,
        "label": "instance",
        "multi": true,
        "name": "instance",
        "options": [],
        "query": "label_values(kube_node_info, node)",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-1h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "browser",
  "title": "Used | Wasted Resources",
  "uid": "12141241231232",
  "version": 1
}