apiVersion: v1
data:
  acm-optimization-overview.json: |-
    {
      "annotations": {
        "list": [
          {
            "builtIn": 1,
            "datasource": "-- Grafana --",
            "enable": true,
            "hide": true,
            "iconColor": "rgba(0, 211, 255, 1)",
            "name": "Annotations & Alerts",
            "type": "dashboard"
          }
        ]
      },
      "editable": true,
      "gnetId": null,
      "graphTooltip": 0,
      "id": 2,
      "iteration": 1621618422811,
      "links": [],
      "panels": [
        {
          "collapsed": false,
          "datasource": "$datasource",
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 0
          },
          "id": 2,
          "panels": [],
          "title": "CPU",
          "type": "row"
        },
        {
          "cacheTimeout": null,
          "datasource": "$datasource",
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "custom": {},
              "mappings": [
                {
                  "id": 0,
                  "op": "=",
                  "text": "N/A",
                  "type": 1,
                  "value": "null"
                }
              ],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "#299c46",
                    "value": null
                  },
                  {
                    "color": "#F2495C",
                    "value": 0.2
                  },
                  {
                    "color": "#F2495C"
                  }
                ]
              },
              "unit": "percentunit"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 4,
            "w": 4,
            "x": 0,
            "y": 1
          },
          "id": 8,
          "interval": "4m",
          "links": [],
          "maxDataPoints": 100,
          "options": {
            "colorMode": "value",
            "graphMode": "none",
            "justifyMode": "auto",
            "orientation": "horizontal",
            "reduceOptions": {
              "calcs": [
                "mean"
              ],
              "fields": "",
              "values": false
            },
            "text": {},
            "textMode": "auto"
          },
          "pluginVersion": "7.4.2",
          "targets": [
            {
              "expr": "(sum(kube_pod_container_resource_requests{cluster=\"$cluster\", resource=\"cpu\"}) / sum(kube_node_status_allocatable{cluster=\"$cluster\", resource=\"cpu\"})) - (1 - avg(rate(node_cpu_seconds_total{mode=\"idle\",cluster=\"$cluster\"}[$__interval])))",
              "format": "time_series",
              "instant": true,
              "interval": "",
              "intervalFactor": 1,
              "legendFormat": "",
              "refId": "A"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "Overestimation",
          "type": "stat"
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "$datasource",
          "fieldConfig": {
            "defaults": {
              "custom": {},
              "links": []
            },
            "overrides": []
          },
          "fill": 8,
          "fillGradient": 0,
          "gridPos": {
            "h": 12,
            "w": 20,
            "x": 4,
            "y": 1
          },
          "hiddenSeries": false,
          "id": 16,
          "interval": "",
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 0,
          "nullPointMode": "null as zero",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "7.4.2",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": true,
          "steppedLine": false,
          "targets": [
            {
              "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\"}) by (namespace)",
              "interval": "",
              "legendFormat": "{{namespace}}",
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "CPU Usage",
          "tooltip": {
            "shared": false,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "cacheTimeout": null,
          "datasource": "$datasource",
          "fieldConfig": {
            "defaults": {
              "color": {
                "fixedColor": "rgb(255, 255, 255)",
                "mode": "fixed"
              },
              "custom": {},
              "mappings": [
                {
                  "id": 0,
                  "op": "=",
                  "text": "N/A",
                  "type": 1,
                  "value": "null"
                }
              ],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              },
              "unit": "percentunit"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 4,
            "w": 4,
            "x": 0,
            "y": 5
          },
          "id": 6,
          "interval": null,
          "links": [],
          "maxDataPoints": 100,
          "options": {
            "colorMode": "value",
            "graphMode": "none",
            "justifyMode": "auto",
            "orientation": "horizontal",
            "reduceOptions": {
              "calcs": [
                "mean"
              ],
              "fields": "",
              "values": false
            },
            "text": {},
            "textMode": "auto"
          },
          "pluginVersion": "7.4.2",
          "targets": [
            {
              "expr": "sum(kube_pod_container_resource_requests{cluster=\"$cluster\", resource=\"cpu\"}) / sum(kube_node_status_allocatable{cluster=\"$cluster\", resource=\"cpu\"})",
              "format": "time_series",
              "instant": true,
              "interval": "",
              "intervalFactor": 1,
              "legendFormat": "",
              "refId": "A"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "CPU Requests Commitment",
          "type": "stat"
        },
        {
          "cacheTimeout": null,
          "datasource": "$datasource",
          "fieldConfig": {
            "defaults": {
              "color": {
                "fixedColor": "rgb(255, 255, 255)",
                "mode": "fixed"
              },
              "custom": {},
              "mappings": [
                {
                  "id": 0,
                  "op": "=",
                  "text": "N/A",
                  "type": 1,
                  "value": "null"
                }
              ],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              },
              "unit": "percentunit"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 4,
            "w": 4,
            "x": 0,
            "y": 9
          },
          "id": 4,
          "interval": "4m",
          "links": [],
          "maxDataPoints": 100,
          "options": {
            "colorMode": "value",
            "graphMode": "none",
            "justifyMode": "auto",
            "orientation": "horizontal",
            "reduceOptions": {
              "calcs": [
                "mean"
              ],
              "fields": "",
              "values": false
            },
            "text": {},
            "textMode": "auto"
          },
          "pluginVersion": "7.4.2",
          "targets": [
            {
              "expr": "1 - avg(rate(node_cpu_seconds_total{mode=\"idle\", cluster=\"$cluster\"}[$__interval]))",
              "format": "time_series",
              "instant": true,
              "intervalFactor": 1,
              "refId": "A"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "CPU Utilisation",
          "type": "stat"
        },
        {
          "datasource": "$datasource",
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "custom": {
                "align": null,
                "filterable": false
              },
              "mappings": [],
              "noValue": "-",
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              }
            },
            "overrides": [
              {
                "matcher": {
                  "id": "byName",
                  "options": "Value #A"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "Pods"
                  },
                  {
                    "id": "unit",
                    "value": "short"
                  },
                  {
                    "id": "links",
                    "value": [
                      {
                        "targetBlank": false,
                        "title": "Drill down to pods",
                        "url": "./d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=${__data.fields.namespace}"
                      }
                    ]
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "namespace"
                },
                "properties": [
                  {
                    "id": "unit",
                    "value": "short"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  },
                  {
                    "id": "links",
                    "value": [
                      {
                        "targetBlank": false,
                        "title": "Drill down to pods",
                        "url": "/d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=${__data.fields.namespace}"
                      }
                    ]
                  },
                  {
                    "id": "custom.align",
                    "value": null
                  },
                  {
                    "id": "displayName",
                    "value": "Namespace"
                  },
                  {
                    "id": "custom.width",
                    "value": 350
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Value #C"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "CPU Usage"
                  },
                  {
                    "id": "unit",
                    "value": "short"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Value #D"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "CPU Requests"
                  },
                  {
                    "id": "unit",
                    "value": "short"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Value #E"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "CPU Requests %"
                  },
                  {
                    "id": "unit",
                    "value": "percentunit"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Value #B"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "Pods"
                  },
                  {
                    "id": "links",
                    "value": [
                      {
                        "targetBlank": false,
                        "title": "Drill down to pods",
                        "url": "./d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=${__data.fields.namespace}"
                      }
                    ]
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  }
                ]
              }
            ]
          },
          "gridPos": {
            "h": 9,
            "w": 24,
            "x": 0,
            "y": 13
          },
          "id": 26,
          "interval": "4m",
          "links": [],
          "options": {
            "showHeader": true
          },
          "pluginVersion": "7.4.2",
          "targets": [
            {
              "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\"}) by (namespace) / sum(kube_pod_container_resource_requests{cluster=\"$cluster\", resource=\"cpu\"}) by (namespace)",
              "format": "table",
              "instant": true,
              "interval": "",
              "intervalFactor": 1,
              "legendFormat": "",
              "refId": "E",
              "step": 10
            },
            {
              "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\"}) by (namespace)",
              "format": "table",
              "instant": true,
              "intervalFactor": 1,
              "legendFormat": "",
              "refId": "C",
              "step": 10
            },
            {
              "expr": "sum(kube_pod_container_resource_requests{cluster=\"$cluster\", resource=\"cpu\"}) by (namespace)",
              "format": "table",
              "instant": true,
              "interval": "",
              "intervalFactor": 1,
              "legendFormat": "",
              "refId": "D",
              "step": 10
            },
            {
              "expr": "sum(kube_pod_owner{cluster=\"$cluster\"}) by (namespace)",
              "format": "table",
              "hide": false,
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "refId": "B"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "CPU Quota",
          "transformations": [
            {
              "id": "filterFieldsByName",
              "options": {
                "include": {
                  "names": [
                    "namespace",
                    "Value #E",
                    "Value #C",
                    "Value #D",
                    "Value #B"
                  ]
                }
              }
            },
            {
              "id": "seriesToColumns",
              "options": {
                "byField": "namespace"
              }
            }
          ],
          "type": "table"
        },
        {
          "collapsed": false,
          "datasource": "$datasource",
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 22
          },
          "id": 18,
          "panels": [],
          "title": "Memory",
          "type": "row"
        },
        {
          "cacheTimeout": null,
          "datasource": "$datasource",
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "custom": {},
              "mappings": [
                {
                  "id": 0,
                  "op": "=",
                  "text": "N/A",
                  "type": 1,
                  "value": "null"
                }
              ],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "#299c46",
                    "value": null
                  },
                  {
                    "color": "#F2495C",
                    "value": 0.2
                  },
                  {
                    "color": "#F2495C"
                  }
                ]
              },
              "unit": "percentunit"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 4,
            "w": 4,
            "x": 0,
            "y": 23
          },
          "id": 14,
          "interval": "4m",
          "links": [],
          "maxDataPoints": 100,
          "options": {
            "colorMode": "value",
            "graphMode": "none",
            "justifyMode": "auto",
            "orientation": "horizontal",
            "reduceOptions": {
              "calcs": [
                "mean"
              ],
              "fields": "",
              "values": false
            },
            "text": {},
            "textMode": "auto"
          },
          "pluginVersion": "7.4.2",
          "targets": [
            {
              "expr": "(sum(kube_pod_container_resource_requests{cluster=\"$cluster\", resource=\"memory\"})/ sum(kube_node_status_allocatable{cluster=\"$cluster\", resource=\"memory\"}))\n-\n(1 - sum(:node_memory_MemAvailable_bytes:sum{cluster=\"$cluster\"})/ sum(kube_node_status_allocatable{cluster=\"$cluster\", resource=\"memory\"}))",
              "format": "time_series",
              "instant": true,
              "interval": "",
              "intervalFactor": 1,
              "legendFormat": "",
              "refId": "A"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "Overestimation",
          "type": "stat"
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "$datasource",
          "fieldConfig": {
            "defaults": {
              "custom": {},
              "links": []
            },
            "overrides": []
          },
          "fill": 8,
          "fillGradient": 0,
          "gridPos": {
            "h": 12,
            "w": 20,
            "x": 4,
            "y": 23
          },
          "hiddenSeries": false,
          "id": 22,
          "interval": "",
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 0,
          "links": [],
          "nullPointMode": "null as zero",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "7.4.2",
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": true,
          "steppedLine": false,
          "targets": [
            {
              "expr": "sum(container_memory_rss{cluster=\"$cluster\", container!=\"\"}) by (namespace)",
              "format": "time_series",
              "interval": "",
              "intervalFactor": 2,
              "legendFormat": "{{namespace}}",
              "legendLink": null,
              "refId": "A",
              "step": 10
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "Memory Usage (w/o cache)",
          "tooltip": {
            "shared": false,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "bytes",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": 0,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "cacheTimeout": null,
          "datasource": "$datasource",
          "fieldConfig": {
            "defaults": {
              "color": {
                "fixedColor": "rgb(255, 255, 255)",
                "mode": "fixed"
              },
              "custom": {},
              "mappings": [
                {
                  "id": 0,
                  "op": "=",
                  "text": "N/A",
                  "type": 1,
                  "value": "null"
                }
              ],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              },
              "unit": "percentunit"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 4,
            "w": 4,
            "x": 0,
            "y": 27
          },
          "id": 12,
          "interval": null,
          "links": [],
          "maxDataPoints": 100,
          "options": {
            "colorMode": "value",
            "graphMode": "none",
            "justifyMode": "auto",
            "orientation": "horizontal",
            "reduceOptions": {
              "calcs": [
                "mean"
              ],
              "fields": "",
              "values": false
            },
            "text": {},
            "textMode": "auto"
          },
          "pluginVersion": "7.4.2",
          "targets": [
            {
              "expr": "sum(kube_pod_container_resource_requests{cluster=\"$cluster\", resource=\"memory\"}) / sum(kube_node_status_allocatable{cluster=\"$cluster\", resource=\"memory\"})",
              "format": "time_series",
              "instant": true,
              "interval": "",
              "intervalFactor": 2,
              "legendFormat": "",
              "refId": "A"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "Memory Requests Commitment",
          "type": "stat"
        },
        {
          "cacheTimeout": null,
          "datasource": "$datasource",
          "fieldConfig": {
            "defaults": {
              "color": {
                "fixedColor": "rgb(255, 255, 255)",
                "mode": "fixed"
              },
              "custom": {},
              "mappings": [
                {
                  "id": 0,
                  "op": "=",
                  "text": "N/A",
                  "type": 1,
                  "value": "null"
                }
              ],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              },
              "unit": "percentunit"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 4,
            "w": 4,
            "x": 0,
            "y": 31
          },
          "id": 10,
          "interval": "4m",
          "links": [],
          "maxDataPoints": 100,
          "options": {
            "colorMode": "value",
            "graphMode": "none",
            "justifyMode": "auto",
            "orientation": "horizontal",
            "reduceOptions": {
              "calcs": [
                "mean"
              ],
              "fields": "",
              "values": false
            },
            "text": {},
            "textMode": "auto"
          },
          "pluginVersion": "7.4.2",
          "targets": [
            {
              "expr": "1 - sum(:node_memory_MemAvailable_bytes:sum{cluster=\"$cluster\"}) / sum(kube_node_status_allocatable{cluster=\"$cluster\", resource=\"memory\"})",
              "format": "time_series",
              "hide": false,
              "instant": true,
              "interval": "",
              "intervalFactor": 1,
              "legendFormat": "",
              "refId": "A"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "Memory Utilisation",
          "type": "stat"
        },
        {
          "datasource": "$datasource",
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "custom": {
                "align": null,
                "filterable": false
              },
              "mappings": [],
              "noValue": "-",
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              }
            },
            "overrides": [
              {
                "matcher": {
                  "id": "byName",
                  "options": "Value #C"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "Memory Usage"
                  },
                  {
                    "id": "unit",
                    "value": "bytes"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Value #D"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "Memory Requests"
                  },
                  {
                    "id": "unit",
                    "value": "bytes"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Value #E"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "Memory Requests %"
                  },
                  {
                    "id": "unit",
                    "value": "percentunit"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Value #A"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "Pods"
                  },
                  {
                    "id": "unit",
                    "value": "short"
                  },
                  {
                    "id": "links",
                    "value": [
                      {
                        "targetBlank": false,
                        "title": "Drill down to pods",
                        "url": "./d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=${__data.fields.namespace}"
                      }
                    ]
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "namespace"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "Namespace"
                  },
                  {
                    "id": "unit",
                    "value": "short"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  },
                  {
                    "id": "links",
                    "value": [
                      {
                        "targetBlank": false,
                        "title": "Drill down to pods",
                        "url": "./d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=${__data.fields.namespace}"
                      }
                    ]
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  },
                  {
                    "id": "custom.width",
                    "value": 350
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Value #B"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "Pods"
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  },
                  {
                    "id": "links",
                    "value": [
                      {
                        "title": "Drill down to pods",
                        "url": "./d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=${__data.fields.namespace}"
                      }
                    ]
                  }
                ]
              }
            ]
          },
          "gridPos": {
            "h": 11,
            "w": 24,
            "x": 0,
            "y": 35
          },
          "id": 28,
          "interval": "4m",
          "links": [],
          "options": {
            "showHeader": true
          },
          "pluginVersion": "7.4.2",
          "targets": [
            {
              "expr": "sum(container_memory_rss{cluster=\"$cluster\", container!=\"\"}) by (namespace) / sum(kube_pod_container_resource_requests{cluster=\"$cluster\", resource=\"memory\"}) by (namespace)",
              "format": "table",
              "instant": true,
              "interval": "",
              "intervalFactor": 2,
              "legendFormat": "",
              "refId": "E",
              "step": 10
            },
            {
              "expr": "sum(container_memory_rss{cluster=\"$cluster\", container!=\"\"}) by (namespace)",
              "format": "table",
              "instant": true,
              "intervalFactor": 2,
              "legendFormat": "",
              "refId": "C",
              "step": 10
            },
            {
              "expr": "sum(kube_pod_container_resource_requests{cluster=\"$cluster\", resource=\"memory\"}) by (namespace)",
              "format": "table",
              "instant": true,
              "interval": "",
              "intervalFactor": 2,
              "legendFormat": "",
              "refId": "D",
              "step": 10
            },
            {
              "expr": "sum(kube_pod_owner{cluster=\"$cluster\"}) by (namespace)",
              "format": "table",
              "hide": false,
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "refId": "B"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "Requests by Namespace",
          "transformations": [
            {
              "id": "seriesToColumns",
              "options": {
                "byField": "namespace"
              }
            },
            {
              "id": "filterFieldsByName",
              "options": {
                "include": {
                  "names": [
                    "namespace",
                    "Value #E",
                    "Value #C",
                    "Value #D",
                    "Value #B"
                  ]
                }
              }
            }
          ],
          "type": "table"
        },
        {
          "collapsed": false,
          "datasource": null,
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 46
          },
          "id": 30,
          "panels": [],
          "title": "Networking",
          "type": "row"
        },
        {
          "datasource": "$datasource",
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "custom": {
                "align": null,
                "filterable": false
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              }
            },
            "overrides": [
              {
                "matcher": {
                  "id": "byName",
                  "options": "Value #A"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "Current Bandwidth Received"
                  },
                  {
                    "id": "unit",
                    "value": "Bps"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Value #B"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "Current Bandwidth Transmitted"
                  },
                  {
                    "id": "unit",
                    "value": "Bps"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Value #G"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "Rate of Received Packets Dropped"
                  },
                  {
                    "id": "unit",
                    "value": "pps"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Value #H"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "Rate of Transmitted Packets Dropped"
                  },
                  {
                    "id": "unit",
                    "value": "pps"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "namespace"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "Namespace"
                  },
                  {
                    "id": "unit",
                    "value": "short"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  },
                  {
                    "id": "links",
                    "value": [
                      {
                        "targetBlank": false,
                        "title": "Drill down to pods",
                        "url": "d/8b7a8b326d7a6f1f04244066368c67af/kubernetes-networking-namespace-pods?orgId=1&refresh=1m&var-namespace=${__data.fields.namespace}"
                      }
                    ]
                  },
                  {
                    "id": "custom.align",
                    "value": null
                  },
                  {
                    "id": "custom.width",
                    "value": 300
                  }
                ]
              }
            ]
          },
          "gridPos": {
            "h": 9,
            "w": 24,
            "x": 0,
            "y": 47
          },
          "id": 34,
          "minSpan": 24,
          "options": {
            "showHeader": true,
            "sortBy": []
          },
          "pluginVersion": "7.4.2",
          "targets": [
            {
              "expr": "sum(instance:node_network_receive_bytes_excluding_lo:rate1m{cluster=\"$cluster\"}) by (instance)",
              "format": "table",
              "instant": true,
              "interval": "",
              "intervalFactor": 2,
              "legendFormat": "",
              "refId": "A",
              "step": 10
            },
            {
              "expr": "sum(instance:node_network_transmit_bytes_excluding_lo:rate1m{cluster=\"$cluster\"}) by (instance)",
              "format": "table",
              "instant": true,
              "interval": "",
              "intervalFactor": 2,
              "legendFormat": "",
              "refId": "B",
              "step": 10
            },
            {
              "expr": "sum(instance:node_network_receive_drop_excluding_lo:rate1m{cluster=\"$cluster\"}) by (instance)",
              "format": "table",
              "instant": true,
              "interval": "",
              "intervalFactor": 2,
              "legendFormat": "",
              "refId": "G",
              "step": 10
            },
            {
              "expr": "sum(instance:node_network_transmit_drop_excluding_lo:rate1m{cluster=\"$cluster\"}) by (instance)",
              "format": "table",
              "instant": true,
              "interval": "",
              "intervalFactor": 2,
              "legendFormat": "",
              "refId": "H",
              "step": 10
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "Current Status",
          "transformations": [
            {
              "id": "merge",
              "options": {
                "reducers": []
              }
            },
            {
              "id": "filterFieldsByName",
              "options": {
                "include": {
                  "names": [
                    "Value #A",
                    "Value #B",
                    "Value #C",
                    "Value #D",
                    "Value #G",
                    "Value #H",
                    "instance"
                  ]
                }
              }
            }
          ],
          "type": "table"
        }
      ],
      "refresh": "1m",
      "schemaVersion": 27,
      "style": "dark",
      "tags": [
        "ACM"
      ],
      "templating": {
        "list": [
          {
            "current": {
              "selected": false,
              "text": "",
              "value": ""
            },
            "description": null,
            "error": null,
            "hide": 2,
            "includeAll": false,
            "label": null,
            "multi": false,
            "name": "datasource",
            "options": [],
            "query": "prometheus",
            "queryValue": "",
            "refresh": 1,
            "regex": "",
            "skipUrlSync": false,
            "type": "datasource"
          },
          {
            "allValue": null,
            "current": {
              "selected": false,
              "text": "",
              "value": ""
            },
            "datasource": "$datasource",
            "definition": "label_values(node_cpu_seconds_total,cluster)",
            "description": null,
            "error": null,
            "hide": 0,
            "includeAll": false,
            "label": "Cluster",
            "multi": false,
            "name": "cluster",
            "options": [],
            "query": {
              "query": "label_values(node_cpu_seconds_total,cluster)",
              "refId": "Observatorium-cluster-Variable-Query"
            },
            "refresh": 1,
            "regex": "",
            "skipUrlSync": false,
            "sort": 1,
            "tagValuesQuery": "",
            "tags": [],
            "tagsQuery": "",
            "type": "query",
            "useTags": false
          }
        ]
      },
      "time": {
        "from": "now-3h",
        "to": "now"
      },
      "timepicker": {
        "refresh_intervals": [
          "1m",
          "5m",
          "15m",
          "30m",
          "1h",
          "2h",
          "1d"
        ]
      },
      "timezone": "browser",
      "title": "ACM - Resource Optimization / Cluster",
      "uid": "8Qvi3edMz",
      "version": 3
    }
kind: ConfigMap
metadata:
  name: grafana-dashboard-acm-optimization-overview
  namespace: open-cluster-management-observability
  labels:
    general-folder: "true"
