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": 1,
      "iteration": 1626109404690,
      "links": [],
      "panels": [
        {
          "collapsed": false,
          "datasource": "$datasource",
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 0
          },
          "id": 138,
          "panels": [],
          "title": "Control Plane Health",
          "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": "Max latency (99th percentile)"
                  },
                  {
                    "id": "unit",
                    "value": "s"
                  },
                  {
                    "id": "custom.displayMode",
                    "value": "color-background"
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  },
                  {
                    "id": "thresholds",
                    "value": {
                      "mode": "absolute",
                      "steps": [
                        {
                          "color": "rgba(50, 172, 45, 0.97)",
                          "value": null
                        },
                        {
                          "color": "rgba(237, 129, 40, 0.89)",
                          "value": 1
                        },
                        {
                          "color": "rgba(245, 54, 54, 0.9)",
                          "value": 2
                        }
                      ]
                    }
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Value #B"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "API Errors [1h]"
                  },
                  {
                    "id": "unit",
                    "value": "short"
                  },
                  {
                    "id": "custom.displayMode",
                    "value": "color-text"
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  },
                  {
                    "id": "thresholds",
                    "value": {
                      "mode": "absolute",
                      "steps": [
                        {
                          "color": "rgba(50, 172, 45, 0.97)",
                          "value": null
                        },
                        {
                          "color": "rgba(237, 129, 40, 0.89)",
                          "value": 1
                        },
                        {
                          "color": "rgba(245, 54, 54, 0.9)",
                          "value": 2
                        }
                      ]
                    }
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Value #C"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "API servers up"
                  },
                  {
                    "id": "unit",
                    "value": "percentunit"
                  },
                  {
                    "id": "custom.displayMode",
                    "value": "color-text"
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  },
                  {
                    "id": "thresholds",
                    "value": {
                      "mode": "absolute",
                      "steps": [
                        {
                          "color": "rgba(245, 54, 54, 0.9)",
                          "value": null
                        },
                        {
                          "color": "rgba(237, 129, 40, 0.89)",
                          "value": 0
                        },
                        {
                          "color": "rgba(50, 172, 45, 0.97)",
                          "value": 1
                        }
                      ]
                    }
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "cluster"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "Cluster"
                  },
                  {
                    "id": "unit",
                    "value": "short"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  },
                  {
                    "id": "links",
                    "value": [
                      {
                        "targetBlank": false,
                        "title": "Drill down to cluster",
                        "url": "/d/09ec8aa1e996d6ffcd6817bbaff4db1b/kubernetes-api-server?var-cluster=${__data.fields.cluster}&var-instance=All"
                      }
                    ]
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  }
                ]
              }
            ]
          },
          "gridPos": {
            "h": 7,
            "w": 12,
            "x": 0,
            "y": 1
          },
          "id": 146,
          "interval": "4m",
          "options": {
            "showHeader": true
          },
          "pluginVersion": "7.3.10",
          "targets": [
            {
              "expr": "max(apiserver_request_duration_seconds:histogram_quantile_99) 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)(sum:apiserver_request_total:1h{code=~\"5..\"})",
              "format": "table",
              "instant": true,
              "refId": "B"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "API Server",
          "transformations": [
            {
              "id": "merge",
              "options": {
                "reducers": []
              }
            },
            {
              "id": "filterFieldsByName",
              "options": {
                "include": {
                  "names": [
                    "cluster",
                    "Value #A",
                    "Value #C",
                    "Value #B"
                  ]
                }
              }
            }
          ],
          "type": "table"
        },
        {
          "datasource": null,
          "description": "Leader election changes per cluster over the time range selected for dashboard.",
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "custom": {
                "align": null,
                "filterable": false
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": []
              }
            },
            "overrides": [
              {
                "matcher": {
                  "id": "byName",
                  "options": "cluster"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "Cluster"
                  },
                  {
                    "id": "links",
                    "value": [
                      {
                        "title": "Drill down to cluster",
                        "url": "/d/N8BxQ2jMz/kubernetes-etcd-cluster?var-cluster=${__data.fields.cluster}"
                      }
                    ]
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Value #A"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "Leader Election Changes"
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  },
                  {
                    "id": "thresholds",
                    "value": {
                      "mode": "absolute",
                      "steps": [
                        {
                          "color": "green",
                          "value": null
                        },
                        {
                          "color": "yellow",
                          "value": 1
                        },
                        {
                          "color": "red",
                          "value": 2
                        }
                      ]
                    }
                  },
                  {
                    "id": "custom.displayMode",
                    "value": "color-text"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Value #B"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "DB Size"
                  },
                  {
                    "id": "unit",
                    "value": "bytes"
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Value #C"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "Has a Leader"
                  },
                  {
                    "id": "mappings",
                    "value": [
                      {
                        "from": "",
                        "id": 1,
                        "text": "Yes",
                        "to": "",
                        "type": 1,
                        "value": "1"
                      },
                      {
                        "from": "",
                        "id": 2,
                        "text": "No",
                        "to": "",
                        "type": 1,
                        "value": "0"
                      }
                    ]
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  }
                ]
              }
            ]
          },
          "gridPos": {
            "h": 7,
            "w": 12,
            "x": 12,
            "y": 1
          },
          "id": 150,
          "interval": "1m",
          "options": {
            "frameIndex": 2,
            "showHeader": true,
            "sortBy": []
          },
          "pluginVersion": "7.3.10",
          "targets": [
            {
              "expr": "sum(changes(etcd_server_leader_changes_seen_total{job=\"etcd\"}[$__range])) by (cluster)",
              "format": "table",
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "refId": "A"
            },
            {
              "expr": "max(etcd_debugging_mvcc_db_total_size_in_bytes{job=\"etcd\"}) by (cluster)",
              "format": "table",
              "hide": false,
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "refId": "B"
            },
            {
              "expr": "max(etcd_server_has_leader{job=\"etcd\"}) by (cluster)",
              "format": "table",
              "hide": false,
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "refId": "C"
            }
          ],
          "title": "etcd",
          "transformations": [
            {
              "id": "filterFieldsByName",
              "options": {
                "include": {
                  "names": [
                    "cluster",
                    "Value #B",
                    "Value #A",
                    "Value #C"
                  ]
                }
              }
            },
            {
              "id": "merge",
              "options": {}
            },
            {
              "id": "organize",
              "options": {
                "excludeByName": {},
                "indexByName": {
                  "Value #A": 2,
                  "Value #B": 3,
                  "Value #C": 1,
                  "cluster": 0
                },
                "renameByName": {}
              }
            }
          ],
          "type": "table"
        },
        {
          "collapsed": false,
          "datasource": "$datasource",
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 8
          },
          "id": 140,
          "panels": [],
          "title": "Optimization",
          "type": "row"
        },
        {
          "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.",
          "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": "Requested"
                  },
                  {
                    "id": "unit",
                    "value": "percentunit"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Value #B"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "Utilized"
                  },
                  {
                    "id": "unit",
                    "value": "percentunit"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  },
                  {
                    "id": "thresholds",
                    "value": {
                      "mode": "absolute",
                      "steps": [
                        {
                          "color": "rgba(50, 172, 45, 0.97)",
                          "value": null
                        },
                        {
                          "color": "rgba(237, 129, 40, 0.89)",
                          "value": null
                        }
                      ]
                    }
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Value #C"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "Overestimation"
                  },
                  {
                    "id": "unit",
                    "value": "percentunit"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  },
                  {
                    "id": "custom.displayMode",
                    "value": "color-background"
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  },
                  {
                    "id": "thresholds",
                    "value": {
                      "mode": "absolute",
                      "steps": [
                        {
                          "color": "green",
                          "value": null
                        },
                        {
                          "color": "red",
                          "value": 0.2
                        }
                      ]
                    }
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "cluster"
                },
                "properties": [
                  {
                    "id": "unit",
                    "value": "short"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  },
                  {
                    "id": "links",
                    "value": [
                      {
                        "targetBlank": false,
                        "title": "Drill down to cluster",
                        "url": "/d/8Qvi3edMz/acm-resource-optimization-cluster?var-cluster=${__data.fields.cluster}"
                      }
                    ]
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  },
                  {
                    "id": "displayName",
                    "value": "Cluster"
                  }
                ]
              }
            ]
          },
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 0,
            "y": 9
          },
          "id": 151,
          "interval": "4m",
          "options": {
            "showHeader": true
          },
          "pluginVersion": "7.3.10",
          "targets": [
            {
              "expr": "(sum(cluster:kube_pod_container_resource_requests:cpu:sum) by (cluster) / sum(kube_node_status_allocatable{resource=\"cpu\"}) by (cluster)) - (1 - avg(rate(node_cpu_seconds_total{mode=\"idle\"}[$__interval])) by (cluster))",
              "format": "table",
              "hide": false,
              "instant": true,
              "interval": "",
              "intervalFactor": 1,
              "legendFormat": "",
              "refId": "C"
            },
            {
              "expr": "sum(cluster:kube_pod_container_resource_requests:cpu:sum) by (cluster) / sum(kube_node_status_allocatable{resource=\"cpu\"}) 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",
              "hide": false,
              "instant": true,
              "interval": "",
              "intervalFactor": 1,
              "legendFormat": "",
              "refId": "B"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "CPU",
          "transformations": [
            {
              "id": "merge",
              "options": {
                "reducers": []
              }
            },
            {
              "id": "filterFieldsByName",
              "options": {
                "include": {
                  "names": [
                    "cluster",
                    "Value #C",
                    "Value #A",
                    "Value #B"
                  ]
                }
              }
            }
          ],
          "type": "table"
        },
        {
          "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.",
          "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": "Requested"
                  },
                  {
                    "id": "unit",
                    "value": "percentunit"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Value #B"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "Utilized"
                  },
                  {
                    "id": "unit",
                    "value": "percentunit"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  },
                  {
                    "id": "thresholds",
                    "value": {
                      "mode": "absolute",
                      "steps": [
                        {
                          "color": "rgba(50, 172, 45, 0.97)",
                          "value": null
                        },
                        {
                          "color": "rgba(237, 129, 40, 0.89)",
                          "value": null
                        }
                      ]
                    }
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Value #C"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "Overestimation"
                  },
                  {
                    "id": "unit",
                    "value": "percentunit"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  },
                  {
                    "id": "custom.displayMode",
                    "value": "color-background"
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  },
                  {
                    "id": "thresholds",
                    "value": {
                      "mode": "absolute",
                      "steps": [
                        {
                          "color": "green",
                          "value": null
                        },
                        {
                          "color": "red",
                          "value": 0.2
                        }
                      ]
                    }
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "cluster"
                },
                "properties": [
                  {
                    "id": "unit",
                    "value": "short"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  },
                  {
                    "id": "links",
                    "value": [
                      {
                        "targetBlank": false,
                        "title": "Drill down to cluster",
                        "url": "/d/8Qvi3edMz/acm-resource-optimization-cluster?var-cluster=${__data.fields.cluster}"
                      }
                    ]
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  },
                  {
                    "id": "displayName",
                    "value": "Cluster"
                  }
                ]
              }
            ]
          },
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 12,
            "y": 9
          },
          "id": 153,
          "interval": "4m",
          "options": {
            "showHeader": true
          },
          "pluginVersion": "7.3.10",
          "targets": [
            {
              "expr": "(sum(cluster:kube_pod_container_resource_requests:memory:sum) by (cluster) / sum(kube_node_status_allocatable{resource=\"memory\"}) by (cluster)) - (1 - sum(:node_memory_MemAvailable_bytes:sum) by (cluster) / sum(kube_node_status_allocatable{resource=\"memory\"}) by (cluster))",
              "format": "table",
              "hide": false,
              "instant": true,
              "interval": "",
              "intervalFactor": 1,
              "legendFormat": "",
              "refId": "C"
            },
            {
              "expr": "sum(cluster:kube_pod_container_resource_requests:memory:sum) by (cluster) / sum(kube_node_status_allocatable{resource=\"memory\"}) 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{resource=\"memory\"}) by (cluster)",
              "format": "table",
              "hide": false,
              "instant": true,
              "interval": "",
              "intervalFactor": 1,
              "legendFormat": "",
              "refId": "B"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "Memory",
          "transformations": [
            {
              "id": "merge",
              "options": {
                "reducers": []
              }
            },
            {
              "id": "filterFieldsByName",
              "options": {
                "include": {
                  "names": [
                    "cluster",
                    "Value #C",
                    "Value #A",
                    "Value #B"
                  ]
                }
              }
            }
          ],
          "type": "table"
        },
        {
          "collapsed": false,
          "datasource": "$datasource",
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 17
          },
          "id": 34,
          "panels": [],
          "repeat": null,
          "title": "Capacity / Utilization",
          "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 #F"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "Total Cores"
                  },
                  {
                    "id": "unit",
                    "value": "short"
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Value #B"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "Allocatable Cores"
                  },
                  {
                    "id": "unit",
                    "value": "short"
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Value #A"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "Requested"
                  },
                  {
                    "id": "unit",
                    "value": "percentunit"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Value #G"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "Utilized"
                  },
                  {
                    "id": "unit",
                    "value": "percentunit"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "cluster"
                },
                "properties": [
                  {
                    "id": "unit",
                    "value": "short"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  },
                  {
                    "id": "links",
                    "value": [
                      {
                        "targetBlank": false,
                        "title": "Drill down to cluster",
                        "url": "/d/8Qvi3edMz/acm-resource-optimization-cluster?var-cluster=${__data.fields.cluster}"
                      }
                    ]
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  },
                  {
                    "id": "displayName",
                    "value": "Cluster"
                  }
                ]
              }
            ]
          },
          "gridPos": {
            "h": 7,
            "w": 12,
            "x": 0,
            "y": 18
          },
          "id": 47,
          "interval": "4m",
          "options": {
            "showHeader": true
          },
          "pluginVersion": "7.3.10",
          "targets": [
            {
              "expr": "sum(machine_cpu_cores) by (cluster)",
              "format": "table",
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "refId": "F"
            },
            {
              "expr": "sum(kube_node_status_allocatable{resource=\"cpu\"}) by (cluster)",
              "format": "table",
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "refId": "B"
            },
            {
              "expr": "sum(cluster:kube_pod_container_resource_requests:cpu:sum) by (cluster) / sum(kube_node_status_allocatable{resource=\"cpu\"}) 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",
          "transformations": [
            {
              "id": "seriesToColumns",
              "options": {
                "byField": "cluster"
              }
            },
            {
              "id": "organize",
              "options": {
                "excludeByName": {
                  "Time": true,
                  "Time 1": false
                },
                "indexByName": {},
                "renameByName": {
                  "Value #A": "Usage %",
                  "Value #C": "Disk",
                  "Value #D": "Memory",
                  "Value #E": "Network",
                  "Value #F": "Total Cores",
                  "Value #G": "Requests %",
                  "cluster": "Cluster"
                }
              }
            },
            {
              "id": "merge",
              "options": {
                "reducers": []
              }
            },
            {
              "id": "filterFieldsByName",
              "options": {
                "include": {
                  "names": [
                    "cluster",
                    "Value #F",
                    "Value #B",
                    "Value #A",
                    "Value #G"
                  ]
                }
              }
            }
          ],
          "type": "table"
        },
        {
          "aliasColors": {},
          "bars": true,
          "dashLength": 10,
          "dashes": false,
          "datasource": "$datasource",
          "fieldConfig": {
            "defaults": {
              "custom": {},
              "links": []
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 7,
            "w": 12,
            "x": 12,
            "y": 18
          },
          "hiddenSeries": false,
          "id": 64,
          "interval": "4m",
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": false,
          "linewidth": 1,
          "nullPointMode": "null as zero",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "7.3.10",
          "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,
              "interval": "",
              "intervalFactor": 1,
              "legendFormat": "{{cluster}}",
              "refId": "B"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "Top 5 Utilized Clusters (% CPU usage)",
          "tooltip": {
            "shared": false,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "percentunit",
              "label": null,
              "logBase": 1,
              "max": "1",
              "min": "0",
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": 1
          }
        },
        {
          "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 #F"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "Available Memory"
                  },
                  {
                    "id": "unit",
                    "value": "bytes"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Value #A"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "Requested"
                  },
                  {
                    "id": "unit",
                    "value": "percentunit"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Value #G"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "Utilized"
                  },
                  {
                    "id": "unit",
                    "value": "percentunit"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "cluster"
                },
                "properties": [
                  {
                    "id": "unit",
                    "value": "short"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  },
                  {
                    "id": "links",
                    "value": [
                      {
                        "targetBlank": false,
                        "title": "Drill down to cluster",
                        "url": "/d/8Qvi3edMz/acm-resource-optimization-cluster?var-cluster=${__data.fields.cluster}"
                      }
                    ]
                  },
                  {
                    "id": "custom.align",
                    "value": "left"
                  },
                  {
                    "id": "displayName",
                    "value": "Cluster"
                  }
                ]
              }
            ]
          },
          "gridPos": {
            "h": 7,
            "w": 12,
            "x": 0,
            "y": 25
          },
          "id": 60,
          "options": {
            "showHeader": true
          },
          "pluginVersion": "7.3.10",
          "targets": [
            {
              "expr": "sum(machine_memory_bytes) by (cluster)",
              "format": "table",
              "hide": false,
              "instant": true,
              "interval": "",
              "intervalFactor": 1,
              "legendFormat": "",
              "refId": "F"
            },
            {
              "expr": "sum(cluster:kube_pod_container_resource_requests:memory:sum) by (cluster) / sum(kube_node_status_allocatable{resource=\"memory\"}) 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{resource=\"memory\"}) by (cluster)",
              "format": "table",
              "hide": false,
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "refId": "G"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "Memory",
          "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"
                }
              }
            },
            {
              "id": "merge",
              "options": {
                "reducers": []
              }
            },
            {
              "id": "filterFieldsByName",
              "options": {
                "include": {
                  "names": [
                    "cluster",
                    "Value #F",
                    "Value #A",
                    "Value #G"
                  ]
                }
              }
            }
          ],
          "type": "table"
        },
        {
          "aliasColors": {},
          "bars": true,
          "dashLength": 10,
          "dashes": false,
          "datasource": "$datasource",
          "fieldConfig": {
            "defaults": {
              "custom": {},
              "links": []
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 7,
            "w": 12,
            "x": 12,
            "y": 25
          },
          "hiddenSeries": false,
          "id": 65,
          "interval": "4m",
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": false,
          "linewidth": 1,
          "nullPointMode": "null as zero",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "7.3.10",
          "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{resource=\"memory\"}) by (cluster)))",
              "format": "time_series",
              "instant": false,
              "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": "1",
              "min": "0",
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "datasource": null,
          "description": "",
          "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": "cluster"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "Cluster"
                  },
                  {
                    "id": "links",
                    "value": [
                      {
                        "title": "Drill down to cluster",
                        "url": "/d/ff635a025bcfea7bc3dd4f508990a3e9/kubernetes-networking-cluster?var-cluster=${__data.fields.cluster}﻿"
                      }
                    ]
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Value #D"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "Rate of Transmitted Packets Dropped"
                  },
                  {
                    "id": "unit",
                    "value": "pps"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Value #C"
                },
                "properties": [
                  {
                    "id": "displayName",
                    "value": "Rate of Received Packets Dropped"
                  },
                  {
                    "id": "unit",
                    "value": "pps"
                  }
                ]
              }
            ]
          },
          "gridPos": {
            "h": 8,
            "w": 24,
            "x": 0,
            "y": 32
          },
          "id": 148,
          "options": {
            "showHeader": true,
            "sortBy": [
              {
                "desc": true,
                "displayName": "Current Bandwidth Received"
              }
            ]
          },
          "pluginVersion": "7.3.10",
          "targets": [
            {
              "expr": "sum(instance:node_network_receive_bytes_excluding_lo:rate1m{job=\"node-exporter\"}) by (cluster)",
              "format": "table",
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "refId": "A"
            },
            {
              "expr": "sum(instance:node_network_transmit_bytes_excluding_lo:rate1m{job=\"node-exporter\"}) by (cluster)",
              "format": "table",
              "hide": false,
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "refId": "B"
            },
            {
              "expr": "sum(instance:node_network_receive_drop_excluding_lo:rate1m{job=\"node-exporter\"}) by (cluster)",
              "format": "table",
              "hide": false,
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "refId": "C"
            },
            {
              "expr": "sum(instance:node_network_transmit_drop_excluding_lo:rate1m{job=\"node-exporter\"}) by (cluster)",
              "format": "table",
              "hide": false,
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "refId": "D"
            }
          ],
          "title": "Bandwidth Utilization",
          "transformations": [
            {
              "id": "filterFieldsByName",
              "options": {
                "include": {
                  "names": [
                    "cluster",
                    "Value #A",
                    "Value #B",
                    "Value #C",
                    "Value #D"
                  ]
                }
              }
            },
            {
              "id": "merge",
              "options": {}
            },
            {
              "id": "sortBy",
              "options": {
                "fields": {},
                "sort": [
                  {
                    "field": "Value #A"
                  }
                ]
              }
            }
          ],
          "type": "table"
        }
      ],
      "refresh": "5m",
      "schemaVersion": 26,
      "style": "light",
      "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",
            "refresh": 2,
            "regex": "",
            "skipUrlSync": false,
            "type": "datasource"
          }
        ]
      },
      "time": {
        "from": "now-3h",
        "to": "now"
      },
      "timepicker": {
        "refresh_intervals": [
          "1m",
          "5m",
          "10m",
          "15m",
          "30m",
          "1h",
          "2h",
          "1d"
        ]
      },
      "timezone": "browser",
      "title": "ACM - Clusters Overview",
      "uid": "2b679d600f3b9e7676a7c5ac3643d448",
      "version": 5
    }
kind: ConfigMap
metadata:
  name: grafana-dashboard-acm-clusters-overview
  namespace: open-cluster-management-observability
  labels:
    general-folder: 'true'
