{
   "editable": false,
   "panels": [
      {
         "datasource": {
            "type": "datasource",
            "uid": "-- Mixed --"
         },
         "fieldConfig": {
            "defaults": {
               "unit": "none"
            }
         },
         "gridPos": {
            "h": 3,
            "w": 4,
            "x": 0,
            "y": 0
         },
         "id": 1,
         "interval": "1m",
         "options": {
            "colorMode": "none"
         },
         "pluginVersion": "v11.4.0",
         "targets": [
            {
               "datasource": {
                  "type": "prometheus",
                  "uid": "${datasource}"
               },
               "expr": "1 - avg(rate(windows_cpu_time_total{cluster=\"$cluster\", job=\"kubernetes-windows-exporter\", mode=\"idle\"}[$__rate_interval]))",
               "instant": true
            }
         ],
         "title": "CPU Utilisation",
         "type": "stat"
      },
      {
         "datasource": {
            "type": "datasource",
            "uid": "-- Mixed --"
         },
         "fieldConfig": {
            "defaults": {
               "unit": "percentunit"
            }
         },
         "gridPos": {
            "h": 3,
            "w": 4,
            "x": 4,
            "y": 0
         },
         "id": 2,
         "interval": "1m",
         "options": {
            "colorMode": "none"
         },
         "pluginVersion": "v11.4.0",
         "targets": [
            {
               "datasource": {
                  "type": "prometheus",
                  "uid": "${datasource}"
               },
               "expr": "sum(kube_pod_windows_container_resource_cpu_cores_request{cluster=\"$cluster\"}) / sum(node:windows_node_num_cpu:sum{cluster=\"$cluster\"})",
               "instant": true
            }
         ],
         "title": "CPU Requests Commitment",
         "type": "stat"
      },
      {
         "datasource": {
            "type": "datasource",
            "uid": "-- Mixed --"
         },
         "fieldConfig": {
            "defaults": {
               "unit": "percentunit"
            }
         },
         "gridPos": {
            "h": 3,
            "w": 4,
            "x": 8,
            "y": 0
         },
         "id": 3,
         "interval": "1m",
         "options": {
            "colorMode": "none"
         },
         "pluginVersion": "v11.4.0",
         "targets": [
            {
               "datasource": {
                  "type": "prometheus",
                  "uid": "${datasource}"
               },
               "expr": "sum(kube_pod_windows_container_resource_cpu_cores_limit{cluster=\"$cluster\"}) / sum(node:windows_node_num_cpu:sum{cluster=\"$cluster\"})",
               "instant": true
            }
         ],
         "title": "CPU Limits Commitment",
         "type": "stat"
      },
      {
         "datasource": {
            "type": "datasource",
            "uid": "-- Mixed --"
         },
         "fieldConfig": {
            "defaults": {
               "unit": "percentunit"
            }
         },
         "gridPos": {
            "h": 3,
            "w": 4,
            "x": 12,
            "y": 0
         },
         "id": 4,
         "interval": "1m",
         "options": {
            "colorMode": "none"
         },
         "pluginVersion": "v11.4.0",
         "targets": [
            {
               "datasource": {
                  "type": "prometheus",
                  "uid": "${datasource}"
               },
               "expr": "1 - sum(:windows_node_memory_MemFreeCached_bytes:sum{cluster=\"$cluster\"}) / sum(:windows_node_memory_MemTotal_bytes:sum{cluster=\"$cluster\"})",
               "instant": true
            }
         ],
         "title": "Memory Utilisation",
         "type": "stat"
      },
      {
         "datasource": {
            "type": "datasource",
            "uid": "-- Mixed --"
         },
         "fieldConfig": {
            "defaults": {
               "unit": "percentunit"
            }
         },
         "gridPos": {
            "h": 3,
            "w": 4,
            "x": 16,
            "y": 0
         },
         "id": 5,
         "interval": "1m",
         "options": {
            "colorMode": "none"
         },
         "pluginVersion": "v11.4.0",
         "targets": [
            {
               "datasource": {
                  "type": "prometheus",
                  "uid": "${datasource}"
               },
               "expr": "sum(kube_pod_windows_container_resource_memory_request{cluster=\"$cluster\"}) / sum(:windows_node_memory_MemTotal_bytes:sum{cluster=\"$cluster\"})",
               "instant": true
            }
         ],
         "title": "Memory Requests Commitment",
         "type": "stat"
      },
      {
         "datasource": {
            "type": "datasource",
            "uid": "-- Mixed --"
         },
         "fieldConfig": {
            "defaults": {
               "unit": "percentunit"
            }
         },
         "gridPos": {
            "h": 3,
            "w": 4,
            "x": 20,
            "y": 0
         },
         "id": 6,
         "interval": "1m",
         "options": {
            "colorMode": "none"
         },
         "pluginVersion": "v11.4.0",
         "targets": [
            {
               "datasource": {
                  "type": "prometheus",
                  "uid": "${datasource}"
               },
               "expr": "sum(kube_pod_windows_container_resource_memory_limit{cluster=\"$cluster\"}) / sum(:windows_node_memory_MemTotal_bytes:sum{cluster=\"$cluster\"})",
               "instant": true
            }
         ],
         "title": "Memory Limits Commitment",
         "type": "stat"
      },
      {
         "datasource": {
            "type": "datasource",
            "uid": "-- Mixed --"
         },
         "fieldConfig": {
            "defaults": {
               "custom": {
                  "fillOpacity": 10,
                  "showPoints": "never",
                  "spanNulls": true
               }
            }
         },
         "gridPos": {
            "h": 7,
            "w": 24,
            "x": 0,
            "y": 7
         },
         "id": 7,
         "interval": "1m",
         "options": {
            "legend": {
               "asTable": true,
               "calcs": [
                  "lastNotNull"
               ],
               "displayMode": "table",
               "placement": "right",
               "showLegend": true
            },
            "tooltip": {
               "mode": "single"
            }
         },
         "pluginVersion": "v11.4.0",
         "targets": [
            {
               "datasource": {
                  "type": "prometheus",
                  "uid": "${datasource}"
               },
               "expr": "sum(namespace_pod_container:windows_container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\"}) by (namespace)",
               "legendFormat": "__auto"
            }
         ],
         "title": "CPU Usage",
         "type": "timeseries"
      },
      {
         "datasource": {
            "type": "datasource",
            "uid": "-- Mixed --"
         },
         "fieldConfig": {
            "overrides": [
               {
                  "matcher": {
                     "id": "byRegexp",
                     "options": "/%/"
                  },
                  "properties": [
                     {
                        "id": "unit",
                        "value": "percentunit"
                     }
                  ]
               },
               {
                  "matcher": {
                     "id": "byName",
                     "options": "Namespace"
                  },
                  "properties": [
                     {
                        "id": "links",
                        "value": [
                           {
                              "title": "Drill down to pods",
                              "url": "/d/490b402361724ab1d4c45666c1fa9b6f/k8s-resources-windows-namespace?${datasource:queryparam}&var-cluster=$cluster&var-namespace=${__data.fields.Namespace}"
                           }
                        ]
                     }
                  ]
               }
            ]
         },
         "gridPos": {
            "h": 7,
            "w": 24,
            "x": 0,
            "y": 14
         },
         "id": 8,
         "pluginVersion": "v11.4.0",
         "targets": [
            {
               "datasource": {
                  "type": "prometheus",
                  "uid": "${datasource}"
               },
               "expr": "sum(namespace_pod_container:windows_container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\"}) by (namespace)",
               "format": "table",
               "instant": true
            },
            {
               "datasource": {
                  "type": "prometheus",
                  "uid": "${datasource}"
               },
               "expr": "sum(kube_pod_windows_container_resource_cpu_cores_request{cluster=\"$cluster\"}) by (namespace)",
               "format": "table",
               "instant": true
            },
            {
               "datasource": {
                  "type": "prometheus",
                  "uid": "${datasource}"
               },
               "expr": "sum(namespace_pod_container:windows_container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\"}) by (namespace) / sum(kube_pod_windows_container_resource_cpu_cores_request{cluster=\"$cluster\"}) by (namespace)",
               "format": "table",
               "instant": true
            },
            {
               "datasource": {
                  "type": "prometheus",
                  "uid": "${datasource}"
               },
               "expr": "sum(kube_pod_windows_container_resource_cpu_cores_limit{cluster=\"$cluster\"}) by (namespace)",
               "format": "table",
               "instant": true
            },
            {
               "datasource": {
                  "type": "prometheus",
                  "uid": "${datasource}"
               },
               "expr": "sum(namespace_pod_container:windows_container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\"}) by (namespace) / sum(kube_pod_windows_container_resource_cpu_cores_limit{cluster=\"$cluster\"}) by (namespace)",
               "format": "table",
               "instant": true
            }
         ],
         "title": "CPU Quota",
         "transformations": [
            {
               "id": "joinByField",
               "options": {
                  "byField": "namespace",
                  "mode": "outer"
               }
            },
            {
               "id": "organize",
               "options": {
                  "excludeByName": {
                     "Time": true,
                     "Time 1": true,
                     "Time 2": true,
                     "Time 3": true,
                     "Time 4": true,
                     "Time 5": true
                  },
                  "indexByName": {
                     "Time 1": 0,
                     "Time 2": 1,
                     "Time 3": 2,
                     "Time 4": 3,
                     "Time 5": 4,
                     "Value #A": 6,
                     "Value #B": 7,
                     "Value #C": 8,
                     "Value #D": 9,
                     "Value #E": 10,
                     "namespace": 5
                  },
                  "renameByName": {
                     "Value #A": "CPU Usage",
                     "Value #B": "CPU Requests",
                     "Value #C": "CPU Requests %",
                     "Value #D": "CPU Limits",
                     "Value #E": "CPU Limits %",
                     "namespace": "Namespace"
                  }
               }
            }
         ],
         "type": "table"
      },
      {
         "datasource": {
            "type": "datasource",
            "uid": "-- Mixed --"
         },
         "fieldConfig": {
            "defaults": {
               "custom": {
                  "fillOpacity": 10,
                  "showPoints": "never",
                  "spanNulls": true
               },
               "unit": "decbytes"
            }
         },
         "gridPos": {
            "h": 7,
            "w": 24,
            "x": 0,
            "y": 21
         },
         "id": 9,
         "interval": "1m",
         "options": {
            "legend": {
               "asTable": true,
               "calcs": [
                  "lastNotNull"
               ],
               "displayMode": "table",
               "placement": "right",
               "showLegend": true
            },
            "tooltip": {
               "mode": "single"
            }
         },
         "pluginVersion": "v11.4.0",
         "targets": [
            {
               "datasource": {
                  "type": "prometheus",
                  "uid": "${datasource}"
               },
               "expr": "sum(windows_container_private_working_set_usage{cluster=\"$cluster\"}) by (namespace)",
               "legendFormat": "__auto"
            }
         ],
         "title": "Memory Usage (Private Working Set)",
         "type": "timeseries"
      },
      {
         "datasource": {
            "type": "datasource",
            "uid": "-- Mixed --"
         },
         "fieldConfig": {
            "defaults": {
               "unit": "bytes"
            },
            "overrides": [
               {
                  "matcher": {
                     "id": "byRegexp",
                     "options": "/%/"
                  },
                  "properties": [
                     {
                        "id": "unit",
                        "value": "percentunit"
                     }
                  ]
               },
               {
                  "matcher": {
                     "id": "byName",
                     "options": "Memory Usage"
                  },
                  "properties": [
                     {
                        "id": "unit",
                        "value": "decbytes"
                     }
                  ]
               },
               {
                  "matcher": {
                     "id": "byName",
                     "options": "Memory Requests"
                  },
                  "properties": [
                     {
                        "id": "unit",
                        "value": "decbytes"
                     }
                  ]
               },
               {
                  "matcher": {
                     "id": "byName",
                     "options": "Memory Limits"
                  },
                  "properties": [
                     {
                        "id": "unit",
                        "value": "decbytes"
                     }
                  ]
               },
               {
                  "matcher": {
                     "id": "byName",
                     "options": "Namespace"
                  },
                  "properties": [
                     {
                        "id": "links",
                        "value": [
                           {
                              "title": "Drill down to pods",
                              "url": "/d/490b402361724ab1d4c45666c1fa9b6f/k8s-resources-windows-namespace?${datasource:queryparam}&var-cluster=$cluster&var-namespace=${__data.fields.Namespace}"
                           }
                        ]
                     }
                  ]
               }
            ]
         },
         "gridPos": {
            "h": 7,
            "w": 24,
            "x": 0,
            "y": 28
         },
         "id": 10,
         "pluginVersion": "v11.4.0",
         "targets": [
            {
               "datasource": {
                  "type": "prometheus",
                  "uid": "${datasource}"
               },
               "expr": "sum(windows_container_private_working_set_usage{cluster=\"$cluster\"}) by (namespace)",
               "format": "table",
               "instant": true
            },
            {
               "datasource": {
                  "type": "prometheus",
                  "uid": "${datasource}"
               },
               "expr": "sum(kube_pod_windows_container_resource_memory_request{cluster=\"$cluster\"}) by (namespace)",
               "format": "table",
               "instant": true
            },
            {
               "datasource": {
                  "type": "prometheus",
                  "uid": "${datasource}"
               },
               "expr": "sum(windows_container_private_working_set_usage{cluster=\"$cluster\"}) by (namespace) / sum(kube_pod_windows_container_resource_memory_request{cluster=\"$cluster\"}) by (namespace)",
               "format": "table",
               "instant": true
            },
            {
               "datasource": {
                  "type": "prometheus",
                  "uid": "${datasource}"
               },
               "expr": "sum(kube_pod_windows_container_resource_memory_limit{cluster=\"$cluster\"}) by (namespace)",
               "format": "table",
               "instant": true
            },
            {
               "datasource": {
                  "type": "prometheus",
                  "uid": "${datasource}"
               },
               "expr": "sum(windows_container_private_working_set_usage{cluster=\"$cluster\"}) by (namespace) / sum(kube_pod_windows_container_resource_memory_limit{cluster=\"$cluster\"}) by (namespace)",
               "format": "table",
               "instant": true
            }
         ],
         "title": "Memory Requests by Namespace",
         "transformations": [
            {
               "id": "joinByField",
               "options": {
                  "byField": "namespace",
                  "mode": "outer"
               }
            },
            {
               "id": "organize",
               "options": {
                  "excludeByName": {
                     "Time": true,
                     "Time 1": true,
                     "Time 2": true,
                     "Time 3": true,
                     "Time 4": true,
                     "Time 5": true
                  },
                  "indexByName": {
                     "Time 1": 0,
                     "Time 2": 1,
                     "Time 3": 2,
                     "Time 4": 3,
                     "Time 5": 4,
                     "Value #A": 6,
                     "Value #B": 7,
                     "Value #C": 8,
                     "Value #D": 9,
                     "Value #E": 10,
                     "namespace": 5
                  },
                  "renameByName": {
                     "Value #A": "Memory Usage",
                     "Value #B": "Memory Requests",
                     "Value #C": "Memory Requests %",
                     "Value #D": "Memory Limits",
                     "Value #E": "Memory Limits %",
                     "namespace": "Namespace"
                  }
               }
            }
         ],
         "type": "table"
      }
   ],
   "refresh": "10s",
   "schemaVersion": 39,
   "tags": [
      "kubernetes"
   ],
   "templating": {
      "list": [
         {
            "current": {
               "selected": true,
               "text": "default",
               "value": "default"
            },
            "hide": 0,
            "label": "Data source",
            "name": "datasource",
            "query": "prometheus",
            "regex": "",
            "type": "datasource"
         },
         {
            "datasource": {
               "type": "prometheus",
               "uid": "${datasource}"
            },
            "hide": 2,
            "label": "cluster",
            "name": "cluster",
            "query": "label_values(up{job=\"kubernetes-windows-exporter\"}, cluster)",
            "refresh": 2,
            "sort": 1,
            "type": "query"
         }
      ]
   },
   "time": {
      "from": "now-1h",
      "to": "now"
   },
   "timezone": "utc",
   "title": "Compute Resources / Cluster(Windows)",
   "uid": "4d08557fd9391b100730f2494bccac68"
}
