apiVersion: v1
data:
  acm-clusters-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": 6,
      "iteration": 1602715833782,
      "links": [],
      "panels": [
        {
          "collapsed": false,
          "datasource": "$datasource",
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 0
          },
          "id": 138,
          "panels": [],
          "title": "Control Plane Health",
          "type": "row"
        },
        {
          "columns": [],
          "datasource": "$datasource",
          "fontSize": "100%",
          "gridPos": {
            "h": 6,
            "w": 12,
            "x": 0,
            "y": 1
          },
          "id": 146,
          "interval": "4m",
          "options": {},
          "pageSize": null,
          "showHeader": true,
          "sort": {
            "col": 1,
            "desc": false
          },
          "styles": [
            {
              "alias": "Time",
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "pattern": "Time",
              "type": "hidden"
            },
            {
              "alias": "Max latency (99th percentile)",
              "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": null,
              "mappingType": 1,
              "pattern": "Value #A",
              "thresholds": [
                "1",
                "2"
              ],
              "type": "number",
              "unit": "s"
            },
            {
              "alias": "API Errors [1h]",
              "colorMode": "value",
              "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": null,
              "mappingType": 1,
              "pattern": "Value #B",
              "thresholds": [
                "1",
                "2"
              ],
              "type": "number",
              "unit": "short"
            },
            {
              "alias": "API servers up",
              "colorMode": "value",
              "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": null,
              "mappingType": 1,
              "pattern": "Value #C",
              "thresholds": [
                "0",
                "1"
              ],
              "type": "number",
              "unit": "percentunit"
            },
            {
              "alias": "Cluster",
              "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,
              "link": true,
              "linkTooltip": "Drill down to cluster",
              "linkUrl": "./d/09ec8aa1e996d6ffcd6817bbaff4db1b/kubernetes-api-server?var-cluster=$__cell_1&var-instance=All",
              "mappingType": 1,
              "pattern": "cluster",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            }
          ],
          "targets": [
            {
              "expr": "max(histogram_quantile(0.99,sum(rate(apiserver_request_duration_seconds_bucket{job=\"apiserver\", verb!=\"WATCH\"}[5m])) by (verb,le,cluster))) by (cluster)",
              "format": "table",
              "instant": true,
              "refId": "A"
            },
            {
              "expr": "(sum(up{job=\"apiserver\"} == 1) by (cluster) / count(up{job=\"apiserver\"}) by (cluster))",
              "format": "table",
              "instant": true,
              "refId": "C"
            },
            {
              "expr": "sum by (cluster)(rate(apiserver_request_total{code=~\"5..\"}[1h]))",
              "format": "table",
              "instant": true,
              "refId": "B"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "API Server",
          "transform": "table",
          "type": "table"
        },
        {
          "collapsed": false,
          "datasource": "$datasource",
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 7
          },
          "id": 140,
          "panels": [],
          "title": "Optimization",
          "type": "row"
        },
        {
          "columns": [],
          "datasource": "$datasource",
          "description": "Highlights % differences between CPU requests commitments vs utilization.  When this difference is large ( >20%), it means that resources are reserved but unused.",
          "fontSize": "100%",
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 0,
            "y": 8
          },
          "id": 143,
          "interval": "4m",
          "options": {},
          "pageSize": null,
          "showHeader": true,
          "sort": {
            "col": 1,
            "desc": false
          },
          "styles": [
            {
              "alias": "Time",
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "link": false,
              "pattern": "Time",
              "type": "hidden"
            },
            {
              "alias": "Requested",
              "colorMode": null,
              "colors": [
                "rgba(50, 172, 45, 0.97)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(245, 54, 54, 0.9)"
              ],
              "decimals": 2,
              "pattern": "Value #A",
              "thresholds": [],
              "type": "number",
              "unit": "percentunit"
            },
            {
              "alias": "Utilized",
              "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 #B",
              "thresholds": [
                ""
              ],
              "type": "number",
              "unit": "percentunit"
            },
            {
              "alias": "Overestimation",
              "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": [
                ".2",
                ".2"
              ],
              "type": "number",
              "unit": "percentunit"
            },
            {
              "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,
              "link": true,
              "linkTooltip": "Drill down to cluster",
              "linkUrl": "./d/8Qvi3edMz/acm-resource-optimization-cluster?var-cluster=$__cell_1",
              "mappingType": 1,
              "pattern": "cluster",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            }
          ],
          "targets": [
            {
              "expr": "(sum(kube_pod_container_resource_requests_cpu_cores) by (cluster) / sum(kube_node_status_allocatable_cpu_cores) by (cluster)) - (1 - avg(rate(node_cpu_seconds_total{mode=\"idle\"}[$__interval])) by (cluster))",
              "format": "table",
              "instant": true,
              "intervalFactor": 1,
              "refId": "C"
            },
            {
              "expr": "sum(kube_pod_container_resource_requests_cpu_cores) by (cluster) / sum(kube_node_status_allocatable_cpu_cores) by (cluster)",
              "format": "table",
              "hide": false,
              "instant": true,
              "intervalFactor": 1,
              "refId": "A"
            },
            {
              "expr": "1 - avg(rate(node_cpu_seconds_total{mode=\"idle\"}[$__interval])) by (cluster)",
              "format": "table",
              "hide": false,
              "instant": true,
              "intervalFactor": 1,
              "refId": "B"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "CPU",
          "transform": "table",
          "type": "table"
        },
        {
          "columns": [],
          "datasource": "$datasource",
          "description": "Highlights % differences between Memory requests commitments vs utilization.  When this difference is large ( >20%), it means that resources are reserved but unused.",
          "fontSize": "100%",
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 12,
            "y": 8
          },
          "id": 144,
          "interval": "4m",
          "options": {},
          "pageSize": null,
          "showHeader": true,
          "sort": {
            "col": 1,
            "desc": false
          },
          "styles": [
            {
              "alias": "Time",
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "link": false,
              "pattern": "Time",
              "type": "hidden"
            },
            {
              "alias": "Requested",
              "colorMode": null,
              "colors": [
                "rgba(50, 172, 45, 0.97)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(245, 54, 54, 0.9)"
              ],
              "decimals": 2,
              "pattern": "Value #A",
              "thresholds": [],
              "type": "number",
              "unit": "percentunit"
            },
            {
              "alias": "Utilized",
              "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 #B",
              "thresholds": [
                ""
              ],
              "type": "number",
              "unit": "percentunit"
            },
            {
              "alias": "Overestimation",
              "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": [
                ".2",
                ".2"
              ],
              "type": "number",
              "unit": "percentunit"
            },
            {
              "alias": "Cluster",
              "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,
              "link": true,
              "linkTooltip": "Drill down to cluster",
              "linkUrl": "./d/8Qvi3edMz/acm-resource-optimization-cluster?var-cluster=$__cell_1",
              "mappingType": 1,
              "pattern": "cluster",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            }
          ],
          "targets": [
            {
              "expr": "(sum(kube_pod_container_resource_requests_memory_bytes) by (cluster) / sum(kube_node_status_allocatable_memory_bytes) by (cluster))\n-\n(1 - sum(:node_memory_MemAvailable_bytes:sum) by (cluster) / sum(kube_node_status_allocatable_memory_bytes) by (cluster))",
              "format": "table",
              "instant": true,
              "intervalFactor": 1,
              "refId": "C"
            },
            {
              "expr": "sum(kube_pod_container_resource_requests_memory_bytes) by (cluster) / sum(kube_node_status_allocatable_memory_bytes) by (cluster)",
              "format": "table",
              "hide": false,
              "instant": true,
              "intervalFactor": 1,
              "refId": "A"
            },
            {
              "expr": "1 - sum(:node_memory_MemAvailable_bytes:sum) by (cluster) / sum(kube_node_status_allocatable_memory_bytes) by (cluster)",
              "format": "table",
              "hide": false,
              "instant": true,
              "intervalFactor": 1,
              "refId": "B"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "Memory",
          "transform": "table",
          "type": "table"
        },
        {
          "collapsed": false,
          "datasource": "$datasource",
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 16
          },
          "id": 34,
          "panels": [],
          "repeat": null,
          "title": "Capacity / Utilization",
          "type": "row"
        },
        {
          "columns": [],
          "datasource": "$datasource",
          "fieldConfig": {
            "defaults": {
              "custom": {
                "align": "center"
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              }
            },
            "overrides": [
              {
                "matcher": {
                  "id": "byName",
                  "options": "Memory"
                },
                "properties": [
                  {
                    "id": "unit",
                    "value": "percentunit"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Usage %"
                },
                "properties": [
                  {
                    "id": "unit",
                    "value": "percentunit"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Cluster"
                },
                "properties": [
                  {
                    "id": "custom.align",
                    "value": null
                  },
                  {
                    "id": "links",
                    "value": [
                      {
                        "targetBlank": true,
                        "title": "Drill down to pods",
                        "url": "d/5d1jNlvGz/kubernetes-compute-resources-cluster?var-cluster=${__data.fields[cluster]}"
                      }
                    ]
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Requests %"
                },
                "properties": [
                  {
                    "id": "unit",
                    "value": "percentunit"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  }
                ]
              }
            ]
          },
          "fontSize": "100%",
          "gridPos": {
            "h": 7,
            "w": 12,
            "x": 0,
            "y": 17
          },
          "id": 47,
          "interval": "4m",
          "options": {
            "showHeader": true,
            "sortBy": [
              {
                "desc": true,
                "displayName": "Cluster"
              }
            ]
          },
          "pageSize": null,
          "pluginVersion": "7.1.3",
          "showHeader": true,
          "sort": {
            "col": 1,
            "desc": false
          },
          "styles": [
            {
              "alias": "Time",
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "pattern": "Time",
              "type": "hidden"
            },
            {
              "alias": "Total Cores",
              "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": null,
              "mappingType": 1,
              "pattern": "Value #F",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            },
            {
              "alias": "Allocatable Cores",
              "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": null,
              "mappingType": 1,
              "pattern": "Value #B",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            },
            {
              "alias": "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": 2,
              "mappingType": 1,
              "pattern": "Value #A",
              "thresholds": [],
              "type": "number",
              "unit": "percentunit"
            },
            {
              "alias": "Utilized",
              "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": "percentunit"
            },
            {
              "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,
              "link": true,
              "linkTooltip": "Drill down to cluster",
              "linkUrl": "./d/8Qvi3edMz/acm-resource-optimization-cluster?var-cluster=$__cell_1",
              "mappingType": 1,
              "pattern": "cluster",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            }
          ],
          "targets": [
            {
              "expr": "sum(cluster:capacity_cpu_cores:sum) by (cluster)",
              "format": "table",
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "refId": "F"
            },
            {
              "expr": "sum(kube_node_status_allocatable_cpu_cores) by (cluster)",
              "format": "table",
              "instant": true,
              "refId": "B"
            },
            {
              "expr": "sum(kube_pod_container_resource_requests_cpu_cores) by (cluster) / sum(kube_node_status_allocatable_cpu_cores) by (cluster)",
              "format": "table",
              "hide": false,
              "instant": true,
              "interval": "",
              "intervalFactor": 1,
              "legendFormat": "",
              "refId": "A"
            },
            {
              "expr": "1 - avg(rate(node_cpu_seconds_total{mode=\"idle\"}[$__interval])) by (cluster)",
              "format": "table",
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "refId": "G"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "CPU",
          "transform": "table",
          "transformations": [
            {
              "id": "seriesToColumns",
              "options": {
                "byField": "cluster"
              }
            },
            {
              "id": "organize",
              "options": {
                "excludeByName": {
                  "Time": true
                },
                "indexByName": {},
                "renameByName": {
                  "Value #A": "Usage %",
                  "Value #C": "Disk",
                  "Value #D": "Memory",
                  "Value #E": "Network",
                  "Value #F": "Total Cores",
                  "Value #G": "Requests %",
                  "cluster": "Cluster"
                }
              }
            }
          ],
          "type": "table"
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "$datasource",
          "fieldConfig": {
            "defaults": {
              "custom": {}
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 7,
            "w": 12,
            "x": 12,
            "y": 17
          },
          "hiddenSeries": false,
          "id": 64,
          "interval": "4m",
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "dataLinks": []
          },
          "percentage": false,
          "pluginVersion": "7.1.3",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "topk(5, (1 - avg(rate(node_cpu_seconds_total{mode=\"idle\"}[$__interval])) by (cluster)))",
              "hide": false,
              "refId": "B"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "Top 5 Utilized Clusters (% CPU usage)",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "percentunit",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "columns": [],
          "datasource": "$datasource",
          "fieldConfig": {
            "defaults": {
              "custom": {
                "align": "center"
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              }
            },
            "overrides": [
              {
                "matcher": {
                  "id": "byName",
                  "options": "Total Memory"
                },
                "properties": [
                  {
                    "id": "unit",
                    "value": "decgbytes"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Usage %"
                },
                "properties": [
                  {
                    "id": "unit",
                    "value": "percentunit"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Cluster"
                },
                "properties": [
                  {
                    "id": "custom.align",
                    "value": null
                  },
                  {
                    "id": "links",
                    "value": [
                      {
                        "targetBlank": true,
                        "title": "Drill down to pods",
                        "url": "d/5d1jNlvGz/kubernetes-compute-resources-cluster?var-cluster=${__data.fields[cluster]}"
                      }
                    ]
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Requests %"
                },
                "properties": [
                  {
                    "id": "unit",
                    "value": "percentunit"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  }
                ]
              }
            ]
          },
          "fontSize": "100%",
          "gridPos": {
            "h": 7,
            "w": 12,
            "x": 0,
            "y": 24
          },
          "id": 60,
          "options": {
            "showHeader": true,
            "sortBy": [
              {
                "desc": true,
                "displayName": "Cluster"
              }
            ]
          },
          "pageSize": null,
          "pluginVersion": "7.1.3",
          "showHeader": true,
          "sort": {
            "col": 1,
            "desc": false
          },
          "styles": [
            {
              "alias": "Time",
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "pattern": "Time",
              "type": "hidden"
            },
            {
              "alias": "Available 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": "bytes"
            },
            {
              "alias": "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": 2,
              "mappingType": 1,
              "pattern": "Value #A",
              "thresholds": [],
              "type": "number",
              "unit": "percentunit"
            },
            {
              "alias": "Utilized",
              "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": "percentunit"
            },
            {
              "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,
              "link": true,
              "linkTooltip": "Drill down to cluster",
              "linkUrl": "./d/8Qvi3edMz/acm-resource-optimization-cluster?var-cluster=$__cell_1",
              "mappingType": 1,
              "pattern": "cluster",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            }
          ],
          "targets": [
            {
              "expr": "sum(cluster:capacity_memory_bytes:sum) by (cluster)",
              "format": "table",
              "hide": false,
              "instant": true,
              "interval": "",
              "intervalFactor": 1,
              "legendFormat": "",
              "refId": "F"
            },
            {
              "expr": "sum(kube_pod_container_resource_requests_memory_bytes) by (cluster) / sum(kube_node_status_allocatable_memory_bytes) by (cluster)",
              "format": "table",
              "hide": false,
              "instant": true,
              "interval": "",
              "intervalFactor": 1,
              "legendFormat": "",
              "refId": "A"
            },
            {
              "expr": "1 - sum(:node_memory_MemAvailable_bytes:sum) by (cluster) / sum(kube_node_status_allocatable_memory_bytes) by (cluster)",
              "format": "table",
              "hide": false,
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "refId": "G"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "Memory",
          "transform": "table",
          "transformations": [
            {
              "id": "seriesToColumns",
              "options": {
                "byField": "cluster"
              }
            },
            {
              "id": "organize",
              "options": {
                "excludeByName": {
                  "Time": true
                },
                "indexByName": {},
                "renameByName": {
                  "Value #A": "Usage %",
                  "Value #C": "Disk",
                  "Value #D": "Memory",
                  "Value #E": "Network",
                  "Value #F": "Total Memory",
                  "Value #G": "Requests %",
                  "cluster": "Cluster"
                }
              }
            }
          ],
          "type": "table"
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "$datasource",
          "fieldConfig": {
            "defaults": {
              "custom": {}
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 7,
            "w": 12,
            "x": 12,
            "y": 24
          },
          "hiddenSeries": false,
          "id": 65,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "dataLinks": []
          },
          "percentage": false,
          "pluginVersion": "7.1.3",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "topk(5, (1 - sum(:node_memory_MemAvailable_bytes:sum) by (cluster) / sum(kube_node_status_allocatable_memory_bytes) by (cluster)))",
              "interval": "",
              "intervalFactor": 1,
              "legendFormat": "{{cluster}}",
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "Top 5 Utilized Clusters (% Memory usage)",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "decimals": null,
              "format": "percentunit",
              "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
          }
        },
        {
          "columns": [],
          "datasource": "$datasource",
          "fieldConfig": {
            "defaults": {
              "custom": {
                "align": "center"
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              }
            },
            "overrides": [
              {
                "matcher": {
                  "id": "byName",
                  "options": "Total Disk"
                },
                "properties": [
                  {
                    "id": "unit",
                    "value": "bytes"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Usage %"
                },
                "properties": [
                  {
                    "id": "unit",
                    "value": "percentunit"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Cluster"
                },
                "properties": [
                  {
                    "id": "custom.align",
                    "value": null
                  },
                  {
                    "id": "links",
                    "value": [
                      {
                        "targetBlank": true,
                        "title": "Drill down to pods",
                        "url": "d/5d1jNlvGz/kubernetes-compute-resources-cluster?var-cluster=${__data.fields[cluster]}"
                      }
                    ]
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Available"
                },
                "properties": [
                  {
                    "id": "unit",
                    "value": "bytes"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  }
                ]
              }
            ]
          },
          "fontSize": "100%",
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 0,
            "y": 31
          },
          "id": 61,
          "options": {
            "showHeader": true,
            "sortBy": [
              {
                "desc": true,
                "displayName": "Cluster"
              }
            ]
          },
          "pageSize": null,
          "pluginVersion": "7.1.3",
          "showHeader": true,
          "sort": {
            "col": 1,
            "desc": false
          },
          "styles": [
            {
              "alias": "Time",
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "pattern": "Time",
              "type": "hidden"
            },
            {
              "alias": "Total Disk",
              "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": "bytes"
            },
            {
              "alias": "Available Disk",
              "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": "bytes"
            },
            {
              "alias": "Usage %",
              "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": "percentunit"
            }
          ],
          "targets": [
            {
              "expr": "sum(node_filesystem_size_bytes) by (cluster)",
              "format": "table",
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "refId": "F"
            },
            {
              "expr": "sum(node_filesystem_avail_bytes) by (cluster)",
              "format": "table",
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "refId": "B"
            },
            {
              "expr": "(sum(node_filesystem_size_bytes) by (cluster) - sum(node_filesystem_avail_bytes) by (cluster)) / sum(node_filesystem_size_bytes) by (cluster)",
              "format": "table",
              "hide": false,
              "instant": true,
              "interval": "",
              "intervalFactor": 1,
              "legendFormat": "",
              "refId": "A"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "Filesystem",
          "transform": "table",
          "transformations": [
            {
              "id": "seriesToColumns",
              "options": {
                "byField": "cluster"
              }
            },
            {
              "id": "organize",
              "options": {
                "excludeByName": {
                  "Time": true
                },
                "indexByName": {},
                "renameByName": {
                  "Value #A": "Usage %",
                  "Value #B": "Available",
                  "Value #C": "Disk",
                  "Value #D": "Memory",
                  "Value #E": "Network",
                  "Value #F": "Total Disk",
                  "Value #G": "Requests %",
                  "cluster": "Cluster"
                }
              }
            }
          ],
          "type": "table"
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "$datasource",
          "fieldConfig": {
            "defaults": {
              "custom": {
                "align": null
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              }
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 12,
            "y": 31
          },
          "hiddenSeries": false,
          "id": 51,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "dataLinks": []
          },
          "percentage": false,
          "pluginVersion": "7.1.3",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "(sum(node_filesystem_size_bytes) by (cluster) - sum(node_filesystem_avail_bytes) by (cluster)) / sum(node_filesystem_size_bytes) by (cluster) * 100",
              "format": "time_series",
              "hide": false,
              "instant": false,
              "interval": "",
              "legendFormat": "{{cluster}}",
              "refId": "B"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "Top 5 Utilized Clusters (Disk)",
          "tooltip": {
            "shared": true,
            "sort": 1,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "decimals": null,
              "format": "percent",
              "label": "",
              "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
          }
        }
      ],
      "refresh": "1m",
      "schemaVersion": 21,
      "style": "light",
      "tags": [
        "ACM"
      ],
      "templating": {
        "list": [
          {
            "current": {
              "text": "Observatorium",
              "value": "Observatorium"
            },
            "hide": 2,
            "includeAll": false,
            "label": null,
            "multi": false,
            "name": "datasource",
            "options": [],
            "query": "prometheus",
            "refresh": 1,
            "regex": "",
            "skipUrlSync": false,
            "type": "datasource"
          },
          {
            "allValue": null,
            "current": {
              "text": "All",
              "value": [
                "$__all"
              ]
            },
            "datasource": "$datasource",
            "definition": "label_values(node_cpu_seconds_total, cluster)",
            "hide": 2,
            "includeAll": true,
            "label": "cluster",
            "multi": true,
            "name": "cluster",
            "options": [],
            "query": "label_values(node_cpu_seconds_total, cluster)",
            "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 - Clusters Overview",
      "uid": "2b679d600f3b9e7676a7c5ac3643d448",
      "version": 3
    }
kind: ConfigMap
metadata:
  name: grafana-dashboard-acm-clusters-overview
  namespace: open-cluster-management-observability
  labels:
    general-folder: "true"
