Grafana dashboard: Kubernetes Workload
Description: An extensive Kubernetes Workload Dashboard based on existing recording rules


{
  "__inputs": [
    {
      "name": "DS_PROMETHEUS",
      "label": "prometheus",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    },
    {
      "name": "DS_GRAPHITE",
      "label": "Graphite",
      "description": "",
      "type": "datasource",
      "pluginId": "graphite",
      "pluginName": "Graphite"
    },
    {
      "name": "VAR_HEADROOM",
      "type": "constant",
      "label": "headroom",
      "value": "1.2",
      "description": ""
    },
    {
      "name": "VAR_MINIMUM_CPU_CORES_MS",
      "type": "constant",
      "label": "minimum_cpu_cores_ms",
      "value": "10",
      "description": ""
    }
  ],
  "__elements": [],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "8.4.4"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph (old)",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "graphite",
      "name": "Graphite",
      "version": "1.0.0"
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "stat",
      "name": "Stat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "timeseries",
      "name": "Time series",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "${DS_GRAPHITE}",
        "enable": false,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "limit": 100,
        "name": "Annotations & Alerts",
        "showIn": 0,
        "tags": "deploy_inbox_chimera_service",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 1,
  "id": null,
  "iteration": 1661235631995,
  "links": [
    {
      "$$hashKey": "object:98",
      "icon": "external link",
      "tags": [],
      "title": "How to optimize my service resources guid",
      "type": "link",
      "url": "https://fiverrdata.atlassian.net/wiki/spaces/~292312507/pages/1843724347/Workload+resource+optimization+guid"
    }
  ],
  "liveNow": false,
  "panels": [
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "description": "Taken from the autoscaler file",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "options": {
                "match": "null",
                "result": {
                  "text": "N/A"
                }
              },
              "type": "special"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 3,
        "w": 3,
        "x": 0,
        "y": 0
      },
      "id": 19,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "colorMode": "none",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.4.4",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": false,
          "expr": "max(kube_horizontalpodautoscaler_spec_min_replicas{cluster=\"$cluster\", horizontalpodautoscaler=~\"(keda-hpa-)?$workload\"}) without (instance, pod)",
          "instant": true,
          "interval": "",
          "intervalFactor": 2,
          "legendFormat": "",
          "metric": "kube_deployment_spec_replicas",
          "refId": "A",
          "step": 600
        }
      ],
      "title": "Min Replicas",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "description": "Taken from the autoscaler file",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "options": {
                "match": "null",
                "result": {
                  "text": "N/A"
                }
              },
              "type": "special"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 3,
        "w": 3,
        "x": 3,
        "y": 0
      },
      "id": 17,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "colorMode": "none",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.4.4",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": false,
          "expr": "max(kube_horizontalpodautoscaler_spec_max_replicas{cluster=\"$cluster\", horizontalpodautoscaler=~\"(keda-hpa-)?$workload\"}) without (instance, pod)",
          "instant": true,
          "interval": "",
          "intervalFactor": 2,
          "legendFormat": "",
          "metric": "kube_deployment_spec_replicas",
          "refId": "A",
          "step": 600
        }
      ],
      "title": "Max Replicas",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "description": "Taken from the autoscaler file",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "options": {
                "match": "null",
                "result": {
                  "text": "N/A"
                }
              },
              "type": "special"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 3,
        "w": 4,
        "x": 6,
        "y": 0
      },
      "id": 18,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "colorMode": "none",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.4.4",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": false,
          "expr": "max(kube_horizontalpodautoscaler_spec_target_metric{cluster=\"$cluster\", horizontalpodautoscaler=\"$workload\"}) without (instance, pod)",
          "instant": true,
          "interval": "",
          "intervalFactor": 2,
          "legendFormat": "",
          "metric": "kube_deployment_spec_replicas",
          "refId": "A",
          "step": 600
        }
      ],
      "title": "Target CPU Utilization",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "options": {
                "match": "null",
                "result": {
                  "text": "N/A"
                }
              },
              "type": "special"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 3,
        "w": 3,
        "x": 10,
        "y": 0
      },
      "id": 5,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "colorMode": "none",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.4.4",
      "targets": [
        {
          "exemplar": true,
          "expr": "kube_deployment_spec_replicas{cluster=\"$cluster\", deployment=\"$workload\", namespace=~\"$namespace\"}",
          "instant": true,
          "interval": "",
          "intervalFactor": 2,
          "legendFormat": "",
          "metric": "kube_deployment_spec_replicas",
          "refId": "A",
          "step": 600
        },
        {
          "expr": "kube_statefulset_replicas{cluster=\"$cluster\", statefulset=\"$workload\"}",
          "instant": true,
          "intervalFactor": 2,
          "metric": "kube_deployment_spec_replicas",
          "refId": "B",
          "step": 600
        },
        {
          "exemplar": true,
          "expr": "rollout_info_replicas_desired{cluster=\"$cluster\", name=\"$workload\"}",
          "hide": false,
          "instant": true,
          "interval": "",
          "intervalFactor": 2,
          "legendFormat": "",
          "metric": "kube_deployment_spec_replicas",
          "refId": "C",
          "step": 600
        }
      ],
      "title": "Desired Replicas",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "options": {
                "match": "null",
                "result": {
                  "text": "N/A"
                }
              },
              "type": "special"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 3,
        "w": 3,
        "x": 13,
        "y": 0
      },
      "id": 6,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "colorMode": "none",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.4.4",
      "targets": [
        {
          "exemplar": true,
          "expr": "kube_deployment_status_replicas_available{cluster=\"$cluster\", deployment=\"$workload\", namespace=~\"$namespace\"}",
          "instant": true,
          "interval": "",
          "intervalFactor": 2,
          "legendFormat": "",
          "refId": "A",
          "step": 600
        },
        {
          "expr": "kube_daemonset_status_number_available{cluster=\"$cluster\", daemonset=\"$workload\"}",
          "instant": true,
          "intervalFactor": 2,
          "refId": "B",
          "step": 600
        },
        {
          "exemplar": true,
          "expr": "kube_statefulset_status_replicas{cluster=\"$cluster\", statefulset=\"$workload\"}",
          "instant": true,
          "interval": "",
          "intervalFactor": 2,
          "legendFormat": "",
          "refId": "C",
          "step": 600
        },
        {
          "exemplar": true,
          "expr": "rollout_info_replicas_available{cluster=\"$cluster\", name=\"$workload\"}",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "D"
        }
      ],
      "title": "Available Replicas",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "options": {
                "match": "null",
                "result": {
                  "text": "N/A"
                }
              },
              "type": "special"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 3,
        "w": 4,
        "x": 16,
        "y": 0
      },
      "id": 3,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "colorMode": "none",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.4.4",
      "targets": [
        {
          "exemplar": true,
          "expr": "kube_deployment_status_observed_generation{cluster=\"$cluster\", deployment=\"$workload\", namespace=~\"$namespace\"}",
          "instant": true,
          "interval": "",
          "intervalFactor": 2,
          "legendFormat": "",
          "refId": "A",
          "step": 600
        },
        {
          "expr": "kube_statefulset_status_observed_generation{cluster=\"$cluster\", statefulset=\"$workload\"}",
          "instant": true,
          "intervalFactor": 2,
          "legendFormat": "",
          "refId": "B",
          "step": 600
        }
      ],
      "title": "Observed Generation",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "options": {
                "match": "null",
                "result": {
                  "text": "N/A"
                }
              },
              "type": "special"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 3,
        "w": 4,
        "x": 20,
        "y": 0
      },
      "id": 2,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "colorMode": "none",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.4.4",
      "targets": [
        {
          "exemplar": true,
          "expr": "kube_deployment_metadata_generation{cluster=\"$cluster\", deployment=\"$workload\", namespace=~\"$namespace\"}",
          "instant": true,
          "interval": "",
          "intervalFactor": 2,
          "legendFormat": "",
          "refId": "A",
          "step": 600
        },
        {
          "expr": "kube_statefulset_metadata_generation{cluster=\"$cluster\", statefulset=\"$workload\"}",
          "instant": true,
          "intervalFactor": 2,
          "legendFormat": "",
          "refId": "B",
          "step": 600
        },
        {
          "expr": "kube_daemonset_metadata_generation{cluster=\"$cluster\", daemonset=\"$workload\"}",
          "instant": true,
          "intervalFactor": 2,
          "legendFormat": "",
          "refId": "C",
          "step": 600
        }
      ],
      "title": "Metadata Generation",
      "type": "stat"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 3
      },
      "id": 25,
      "panels": [],
      "title": "Overview",
      "type": "row"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "description": "The naming convention format goes as follows:\npod_name - container_name - metric_type\n\n\nMetric Types:\n\n`total` - Total memory used by container\n`working_set`  - Memory needed w/o buffers and cache",
      "fieldConfig": {
        "defaults": {
          "links": []
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 4
      },
      "hiddenSeries": false,
      "id": 23,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": true,
        "hideEmpty": true,
        "hideZero": true,
        "max": true,
        "min": false,
        "rightSide": false,
        "show": true,
        "sort": "current",
        "sortDesc": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "8.4.4",
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": true,
          "expr": "workload:container_memory_usage_bytes:aggr{aggr=\"avg\", cluster=\"$cluster\", workload=\"$workload\", container_name=~\".*\", workload=\"$workload\", workload_type=\"$workload_type\"}",
          "format": "time_series",
          "hide": false,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "AVG Memory - {{container_name}}",
          "refId": "A",
          "target": ""
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": true,
          "expr": "workload:container_memory_usage_bytes:aggr{aggr=\"max\", cluster=\"$cluster\", workload=\"$workload\", container_name=~\".*\", workload_type=\"$workload_type\"}",
          "hide": false,
          "interval": "",
          "legendFormat": "MAX Memory - {{container_name}}",
          "refId": "D"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": true,
          "expr": "workload:container_resource_requests:aggr{resource=\"memory\", cluster=\"$cluster\", workload=\"$workload\", container=~\".*\", workload_type=\"$workload_type\", workload_type=\"$workload_type\"}",
          "format": "time_series",
          "hide": false,
          "instant": false,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "Memory Request - {{container}}  - {{workload_type}}",
          "refId": "B"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": true,
          "expr": "workload:container_memory_working_set_bytes:aggr{aggr=\"avg\", cluster=\"$cluster\", workload=\"$workload\", container_name=~\".*\", workload_type=\"$workload_type\"}",
          "format": "time_series",
          "hide": false,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "AVG Working Set Memory - {{container_name}}",
          "refId": "C",
          "target": ""
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": true,
          "expr": "workload:container_memory_working_set_bytes:aggr{aggr=\"max\", cluster=\"$cluster\", workload=\"$workload\", container_name=~\".*\", workload_type=\"$workload_type\"}",
          "interval": "",
          "legendFormat": "MAX Working Set Memory - {{container_name}}",
          "refId": "E"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": true,
          "expr": "workload:container_resource_limits:aggr{cluster=\"$cluster\", workload=\"$workload\", resource=\"memory\", workload_type=\"$workload_type\"}",
          "interval": "",
          "legendFormat": "Memory limit - {{container_name}}",
          "refId": "F"
        }
      ],
      "thresholds": [],
      "timeRegions": [],
      "title": "Aggregated Memory Usage by [container]",
      "tooltip": {
        "shared": true,
        "sort": 2,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "mode": "time",
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:963",
          "decimals": 1,
          "format": "bytes",
          "logBase": 1,
          "show": true
        },
        {
          "$$hashKey": "object:964",
          "decimals": 1,
          "format": "bytes",
          "logBase": 1,
          "show": true
        }
      ],
      "yaxis": {
        "align": false
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "fieldConfig": {
        "defaults": {
          "links": []
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 4
      },
      "hiddenSeries": false,
      "id": 22,
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": true,
        "hideEmpty": true,
        "hideZero": true,
        "max": false,
        "min": false,
        "rightSide": false,
        "show": true,
        "sort": "current",
        "sortDesc": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "8.4.4",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "exemplar": true,
          "expr": "workload:container_cpu_usage_seconds:rate5m:aggr{aggr=\"avg\", cluster=\"$cluster\", workload=\"$workload\", container_name=~\".*\"}",
          "hide": false,
          "interval": "",
          "legendFormat": "CPU AVG- {{container_name}}",
          "refId": "A"
        },
        {
          "exemplar": true,
          "expr": "workload:container_resource_requests:aggr{resource=\"cpu\", cluster=\"$cluster\", workload=\"$workload\",container=~\".*\", workload_type=\"$workload_type\"}",
          "hide": false,
          "interval": "",
          "legendFormat": "CPU Request - {{container}}",
          "refId": "B"
        },
        {
          "exemplar": true,
          "expr": "workload:container_cpu_usage_seconds:rate5m:aggr{aggr=\"max\", cluster=\"$cluster\", workload=\"$workload\", container_name=~\".*\", workload_type=\"$workload_type\"}",
          "hide": false,
          "interval": "",
          "legendFormat": "CPU MAX- {{container_name}}",
          "refId": "C"
        },
        {
          "exemplar": true,
          "expr": "workload:container_resource_limits:aggr{cluster=\"$cluster\", workload=\"$workload\", resource=\"cpu\" ,container=~\".*\", workload_type=\"$workload_type\"}",
          "interval": "",
          "legendFormat": "CPU Limit- {{container_name}}",
          "refId": "D"
        }
      ],
      "thresholds": [],
      "timeRegions": [],
      "title": "Aggregated CPU Usage by [container]",
      "tooltip": {
        "shared": true,
        "sort": 2,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "mode": "time",
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:103",
          "format": "s",
          "label": "Microcores",
          "logBase": 1,
          "show": true
        },
        {
          "$$hashKey": "object:104",
          "format": "short",
          "logBase": 1,
          "show": true
        }
      ],
      "yaxis": {
        "align": false
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "description": "`Current` - The number of replicas that are currently running in the system\n\n`Available` - The number of replicas that are passing readiness probes\n\n`Unavailable` - The opposite of available\n\n`Desired` - The number of replicas you asked for in the deployment file\n\n`Updated` - The number of replicas that are up to date with the desired state",
      "editable": true,
      "error": false,
      "fieldConfig": {
        "defaults": {
          "links": []
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "grid": {},
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 12
      },
      "hiddenSeries": false,
      "id": 1,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": true,
        "hideZero": false,
        "max": false,
        "min": false,
        "rightSide": true,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 2,
      "links": [],
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "8.4.4",
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": true,
          "expr": "avg without(instance, pod) (kube_deployment_status_replicas{cluster=\"$cluster\", deployment=\"$workload\", namespace=~\"$namespace\"})",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "Current",
          "refId": "A",
          "step": 30
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": true,
          "expr": "avg without(instance, pod) (kube_deployment_status_replicas_available{cluster=\"$cluster\", deployment=\"$workload\", namespace=~\"$namespace\"})",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "Available",
          "refId": "B",
          "step": 30
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": true,
          "expr": "avg without(instance, pod) (kube_deployment_status_replicas_unavailable{cluster=\"$cluster\", deployment=\"$workload\", namespace=~\"$namespace\"})",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "Unavailable",
          "refId": "C",
          "step": 30
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": true,
          "expr": "avg without(instance, pod) (kube_deployment_status_replicas_updated{cluster=\"$cluster\", deployment=\"$workload\", namespace=~\"$namespace\"})",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "Updated",
          "refId": "D",
          "step": 30
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": true,
          "expr": "avg without(instance, pod) (kube_deployment_spec_replicas{cluster=\"$cluster\", deployment=\"$workload\", namespace=~\"$namespace\"})",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "Desired",
          "refId": "E",
          "step": 30
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": true,
          "expr": "avg without(instance, pod) (kube_hpa_spec_max_replicas{cluster=\"$cluster\", hpa=~\"(keda-hpa-)?$workload\"})",
          "interval": "",
          "legendFormat": "HPA Pod Limit Max",
          "refId": "F"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": true,
          "expr": "avg without(instance, pod) (kube_hpa_spec_min_replicas{cluster=\"$cluster\", hpa=~\"(keda-hpa-)?$workload\"})",
          "hide": false,
          "interval": "",
          "legendFormat": "HPA Pod Limit Min",
          "refId": "Q"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "expr": "avg without(instance, pod) (kube_statefulset_status_replicas{cluster=\"$cluster\", statefulset=\"$workload\"})",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "Available",
          "refId": "G",
          "step": 30
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "expr": "avg without(instance, pod) (kube_statefulset_replicas{cluster=\"$cluster\", statefulset=\"$workload\"})",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "Desired",
          "refId": "H",
          "step": 30
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "expr": "avg without(instance, pod) (kube_daemonset_status_number_ready{cluster=\"$cluster\", daemonset=\"$workload\"})",
          "legendFormat": "Ready",
          "refId": "I"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": true,
          "expr": "avg without(instance, pod) (kube_daemonset_status_number_available{cluster=\"$cluster\", daemonset=\"$workload\"})",
          "hide": false,
          "interval": "",
          "legendFormat": "Available",
          "refId": "J"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "expr": "avg without(instance, pod) (kube_daemonset_status_number_unavailable{cluster=\"$cluster\", daemonset=\"$workload\"})",
          "legendFormat": "Unavailable",
          "refId": "K"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "expr": "avg without(instance, pod) (kube_daemonset_status_number_misscheduled{cluster=\"$cluster\", daemonset=\"$workload\"})",
          "legendFormat": "Misscheduled",
          "refId": "L"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "expr": "avg without(instance, pod) (kube_daemonset_status_desired_number_scheduled{cluster=\"$cluster\", daemonset=\"$workload\"})",
          "legendFormat": "Desired",
          "refId": "M"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": true,
          "expr": "avg without(instance, pod) (rollout_info_replicas_desired{cluster=\"$cluster\", name=\"$workload\"})",
          "format": "time_series",
          "hide": false,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "Desired",
          "refId": "N",
          "step": 30
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": true,
          "expr": "avg without(instance, pod) (rollout_info_replicas_available{cluster=\"$cluster\", name=\"$workload\"})",
          "format": "time_series",
          "hide": false,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "Available",
          "refId": "O",
          "step": 30
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": true,
          "expr": "avg without(instance, pod) (rollout_info_replicas_unavailable{cluster=\"$cluster\", name=\"$workload\"})",
          "format": "time_series",
          "hide": false,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "Unavailable",
          "refId": "P",
          "step": 30
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": true,
          "expr": "avg without(instance, pod) (kube_horizontalpodautoscaler_spec_max_replicas{cluster=\"$cluster\", horizontalpodautoscaler=~\"(keda-hpa-)?$workload\"})",
          "hide": false,
          "interval": "",
          "legendFormat": "HPA Pod Limit Max",
          "refId": "R"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": true,
          "expr": "avg without(instance, pod) (kube_horizontalpodautoscaler_spec_min_replicas{cluster=\"$cluster\", horizontalpodautoscaler=~\"(keda-hpa-)?$workload\"})",
          "hide": false,
          "interval": "",
          "legendFormat": "HPA Pod Limit Min",
          "refId": "S"
        }
      ],
      "thresholds": [],
      "timeRegions": [],
      "title": "Replica Status",
      "tooltip": {
        "msResolution": true,
        "shared": true,
        "sort": 2,
        "value_type": "cumulative"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "mode": "time",
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:1231",
          "format": "locale",
          "label": "",
          "logBase": 1,
          "show": true
        },
        {
          "$$hashKey": "object:1232",
          "format": "short",
          "logBase": 1,
          "show": false
        }
      ],
      "yaxis": {
        "align": false
      }
    },
    {
      "aliasColors": {
        "Min Request": "dark-red",
        "max(kube_hpa_spec_max_replicas{hpa=\"attachments-chimera-service\",namespace=\"default\"}) - max(kube_deployment_status_replicas{deployment=\"attachments-chimera-service\",namespace=\"default\"})": "super-light-yellow",
        "{cluster=\"eks-prod-main-1\",deployment=\"attachments-chimera-service\",endpoint=\"http\",job=\"kube-state-metrics\",namespace=\"default\",prometheus=\"monitoring/prometheus-k8s-prometheus\",service=\"kube-state-metrics\"}": "dark-green"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "decimals": 0,
      "description": "The B metric can be set as an alert, when its value is greater than n, you are nearing the max replica set and the number may need to be updated",
      "fieldConfig": {
        "defaults": {
          "links": []
        },
        "overrides": []
      },
      "fill": 10,
      "fillGradient": 0,
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 12
      },
      "hiddenSeries": false,
      "id": 29,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": true,
        "max": false,
        "min": false,
        "rightSide": true,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 0,
      "nullPointMode": "connected",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "8.4.4",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "$$hashKey": "object:197",
          "alias": "Min Request",
          "fill": 0,
          "lines": true,
          "linewidth": 1,
          "stack": false
        }
      ],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": true,
          "expr": "avg without(instance, pod) (kube_deployment_status_replicas{cluster=\"$cluster\", deployment=\"$workload\", namespace=~\"$namespace\"})",
          "hide": false,
          "interval": "",
          "legendFormat": "Current replicas",
          "refId": "A"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": true,
          "expr": "max(kube_hpa_spec_max_replicas{cluster=\"$cluster\", hpa=~\"(keda-hpa-)?$workload\", namespace=~\"$namespace\"}) - max(kube_deployment_status_replicas{cluster=\"$cluster\", deployment=\"$workload\", namespace=~\"$namespace\"})",
          "hide": false,
          "interval": "",
          "legendFormat": "Distance from Max Replicas",
          "refId": "B"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": true,
          "expr": "max(kube_hpa_spec_min_replicas{cluster=\"$cluster\", hpa=\"$workload\", namespace=~\"$namespace\"})",
          "interval": "",
          "legendFormat": "Min Request",
          "refId": "C"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": true,
          "expr": "avg without(instance, pod) (rollout_info_replicas_available{cluster=\"$cluster\", name=\"$workload\"})",
          "hide": false,
          "interval": "",
          "legendFormat": "Current replicas",
          "refId": "E"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": true,
          "expr": "max(kube_horizontalpodautoscaler_spec_max_replicas{cluster=\"$cluster\", horizontalpodautoscaler=~\"(keda-hpa-)?$workload\"}) - max(rollout_info_replicas_available{cluster=\"$cluster\", name=\"$workload\"})",
          "hide": false,
          "interval": "",
          "legendFormat": "Distance from Max Replicas",
          "refId": "D"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": true,
          "expr": "max(kube_horizontalpodautoscaler_spec_max_replicas{cluster=\"$cluster\", horizontalpodautoscaler=~\"(keda-hpa-)?$workload\", namespace=~\"$namespace\"}) - max(kube_deployment_status_replicas{cluster=\"$cluster\", deployment=\"$workload\", namespace=~\"$namespace\"})",
          "hide": false,
          "interval": "",
          "legendFormat": "Distance from Max Replicas",
          "refId": "F"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": true,
          "expr": "max(kube_horizontalpodautoscaler_spec_min_replicas{cluster=\"$cluster\", horizontalpodautoscaler=\"$workload\", namespace=~\"$namespace\"})",
          "hide": false,
          "interval": "",
          "legendFormat": "Min Request",
          "refId": "G"
        }
      ],
      "thresholds": [],
      "timeRegions": [],
      "title": "Distance from max replicas(HPA)",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "mode": "time",
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:1153",
          "format": "short",
          "logBase": 1,
          "show": true
        },
        {
          "$$hashKey": "object:1154",
          "format": "short",
          "logBase": 1,
          "show": true
        }
      ],
      "yaxis": {
        "align": false
      }
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 10,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 2,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "locale"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 5,
        "x": 0,
        "y": 20
      },
      "id": 31,
      "options": {
        "legend": {
          "calcs": [
            "lastNotNull"
          ],
          "displayMode": "table",
          "placement": "right"
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      },
      "pluginVersion": "8.4.4",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": true,
          "expr": "sum(label_replace(sum(kube_pod_info{cluster=\"$cluster\",pod=~\"$workload.*\"}) by(node), \"node\", \"ip-$1-$2-$3-$4.ec2.internal\", \"instance\", \"([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3}):[0-9]{2,5}\") * on(node) group_left(label_beta_kubernetes_io_instance_type) kube_node_labels{cluster=\"$cluster\"}) by (label_beta_kubernetes_io_instance_type)",
          "interval": "",
          "legendFormat": "{{label_beta_kubernetes_io_instance_type}}",
          "refId": "A"
        }
      ],
      "title": "Pods On Instance Types Count",
      "transparent": true,
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineStyle": {
              "fill": "solid"
            },
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 5,
        "x": 5,
        "y": 20
      },
      "id": 35,
      "options": {
        "legend": {
          "calcs": [
            "lastNotNull",
            "max"
          ],
          "displayMode": "table",
          "placement": "right",
          "sortBy": "Last *",
          "sortDesc": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": true,
          "expr": "sum(label_replace(sum(kube_pod_info{cluster=\"$cluster\",pod=~\"$workload.*\"}) by(node), \"node\", \"ip-$1-$2-$3-$4.ec2.internal\", \"instance\", \"([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3}):[0-9]{2,5}\") * on(node) group_left(label_topology_kubernetes_io_zone) kube_node_labels{cluster=\"$cluster\"}) by (label_topology_kubernetes_io_zone)",
          "interval": "",
          "legendFormat": "{{label_topology_kubernetes_io_zone}}",
          "refId": "A"
        }
      ],
      "title": "Pods spreads across Availability Zones",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineStyle": {
              "fill": "solid"
            },
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "normal"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 8,
        "x": 10,
        "y": 20
      },
      "id": 33,
      "options": {
        "legend": {
          "calcs": [
            "lastNotNull",
            "max"
          ],
          "displayMode": "table",
          "placement": "right",
          "sortBy": "Last *",
          "sortDesc": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": true,
          "expr": "sum(label_replace(sum(kube_pod_info{cluster=\"$cluster\",pod=~\"$workload.*\"}) by(node), \"node\", \"ip-$1-$2-$3-$4.ec2.internal\", \"instance\", \"([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3}):[0-9]{2,5}\") * on(node) group_left(label_kubernetes_io_hostname) kube_node_labels{cluster=\"$cluster\"}) by (label_kubernetes_io_hostname, node)",
          "interval": "",
          "legendFormat": "{{node}}",
          "refId": "A"
        }
      ],
      "title": "Pods spreads across instances",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "bars",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineStyle": {
              "fill": "solid"
            },
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 6,
        "x": 18,
        "y": 20
      },
      "id": 34,
      "options": {
        "legend": {
          "calcs": [
            "lastNotNull",
            "max"
          ],
          "displayMode": "table",
          "placement": "right"
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": true,
          "expr": "sum(label_replace(sum(kube_pod_info{cluster=\"$cluster\",pod=~\"$workload.*\"}) by(node), \"node\", \"ip-$1-$2-$3-$4.ec2.internal\", \"instance\", \"([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3}):[0-9]{2,5}\") * on(node) group_left(label_spotinst_io_DrainingInitiated) kube_node_labels{cluster=\"$cluster\",label_spotinst_io_DrainingInitiated=\"true\"}) by (label_spotinst_io_DrainingInitiated)",
          "interval": "",
          "legendFormat": "Draining Nodes",
          "refId": "A"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": true,
          "expr": "sum(label_replace(sum(kube_pod_info{cluster=\"$cluster\",pod=~\"$workload.*\"}) by(node), \"node\", \"ip-$1-$2-$3-$4.ec2.internal\", \"instance\", \"([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3}):[0-9]{2,5}\") * on(node) group_left(label_spotinst_io_draining_initiated) kube_node_labels{cluster=\"$cluster\",label_spotinst_io_draining_initiated=\"true\"}) by (label_spotinst_io_draining_initiated)",
          "hide": false,
          "interval": "",
          "legendFormat": "Draining Nodes",
          "refId": "B"
        }
      ],
      "title": "Pods on Draining Nodes",
      "type": "timeseries"
    }
  ],
  "refresh": false,
  "schemaVersion": 35,
  "style": "dark",
  "tags": [
    "kubernetes",
    "prometheus",
    "k8s-importants"
  ],
  "templating": {
    "list": [
      {
        "allValue": ".*",
        "current": {},
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_PROMETHEUS}"
        },
        "definition": "label_values(label_cluster)",
        "hide": 0,
        "includeAll": false,
        "label": "Cluster",
        "multi": false,
        "name": "cluster",
        "options": [],
        "query": {
          "query": "label_values(label_cluster)",
          "refId": "prometheus-cluster-Variable-Query"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": ".*",
        "current": {},
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_PROMETHEUS}"
        },
        "definition": "label_values(mixin_pod_workload{cluster=\"$cluster\"}, namespace)",
        "hide": 0,
        "includeAll": false,
        "label": "Namespace",
        "multi": false,
        "name": "namespace",
        "options": [],
        "query": {
          "query": "label_values(mixin_pod_workload{cluster=\"$cluster\"}, namespace)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "current": {},
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_PROMETHEUS}"
        },
        "definition": "label_values(mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}, workload_type)",
        "hide": 0,
        "includeAll": false,
        "label": "Workload Type",
        "multi": false,
        "name": "workload_type",
        "options": [],
        "query": {
          "query": "label_values(mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}, workload_type)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "current": {},
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_PROMETHEUS}"
        },
        "definition": "label_values(mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$workload_type\"}, workload)",
        "hide": 0,
        "includeAll": false,
        "label": "Workload",
        "multi": false,
        "name": "workload",
        "options": [],
        "query": {
          "query": "label_values(mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$workload_type\"}, workload)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "hide": 2,
        "name": "headroom",
        "query": "${VAR_HEADROOM}",
        "skipUrlSync": false,
        "type": "constant",
        "current": {
          "value": "${VAR_HEADROOM}",
          "text": "${VAR_HEADROOM}",
          "selected": false
        },
        "options": [
          {
            "value": "${VAR_HEADROOM}",
            "text": "${VAR_HEADROOM}",
            "selected": false
          }
        ]
      },
      {
        "hide": 2,
        "name": "minimum_cpu_cores_ms",
        "query": "${VAR_MINIMUM_CPU_CORES_MS}",
        "skipUrlSync": false,
        "type": "constant",
        "current": {
          "value": "${VAR_MINIMUM_CPU_CORES_MS}",
          "text": "${VAR_MINIMUM_CPU_CORES_MS}",
          "selected": false
        },
        "options": [
          {
            "value": "${VAR_MINIMUM_CPU_CORES_MS}",
            "text": "${VAR_MINIMUM_CPU_CORES_MS}",
            "selected": false
          }
        ]
      }
    ]
  },
  "time": {
    "from": "now-12h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "browser",
  "title": "Kubernetes Workload",
  "uid": "rNVbvyAGz",
  "version": 48,
  "weekStart": "",
  "gnetId": 16760,
  "description": "An extensive Kubernetes Workload Dashboard based on existing recording rules"
}