apiVersion: v1
kind: ConfigMap
metadata:
  name: dashboards-config
  namespace: federatorai
data:  
  clusterhealth.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,
        "links": [],
        "panels": [
          {
            "collapsed": false,
            "gridPos": {
              "h": 1,
              "w": 24,
              "x": 0,
              "y": 0
            },
            "id": 8,
            "panels": [],
            "title": "Cluster Health Status",
            "type": "row"
          },
          {
            "cacheTimeout": null,
            "colorBackground": false,
            "colorValue": true,
            "colors": [
              "rgba(245, 54, 54, 0.9)",
              "rgba(237, 129, 40, 0.89)",
              "rgba(50, 172, 45, 0.97)"
            ],
            "datasource": "Prometheus",
            "editable": true,
            "format": "percentunit",
            "gauge": {
              "maxValue": 1,
              "minValue": 0,
              "show": true,
              "thresholdLabels": true,
              "thresholdMarkers": true
            },
            "gridPos": {
              "h": 5,
              "w": 4,
              "x": 0,
              "y": 1
            },
            "id": 26,
            "interval": null,
            "links": [],
            "mappingType": 1,
            "mappingTypes": [
              {
                "name": "value to text",
                "value": 1
              },
              {
                "name": "range to text",
                "value": 2
              }
            ],
            "maxDataPoints": 100,
            "nullPointMode": "connected",
            "nullText": null,
            "postfix": "",
            "postfixFontSize": "50%",
            "prefix": "",
            "prefixFontSize": "50%",
            "rangeMaps": [
              {
                "from": "null",
                "text": "N/A",
                "to": "null"
              }
            ],
            "sparkline": {
              "fillColor": "rgba(31, 118, 189, 0.18)",
              "full": false,
              "lineColor": "rgb(31, 120, 193)",
              "show": false
            },
            "tableColumn": "",
            "targets": [
              {
                "expr": "(sum(up{job=~\".*apiserver.*\"} == 1) / count(up{job=~\".*apiserver.*\"}))",
                "format": "time_series",
                "intervalFactor": 2,
                "refId": "A",
                "step": 600
              }
            ],
            "thresholds": "0.5, 0.8",
            "title": "API Servers UP",
            "transparent": true,
            "type": "singlestat",
            "valueFontSize": "80%",
            "valueMaps": [
              {
                "op": "=",
                "text": "N/A",
                "value": "null"
              }
            ],
            "valueName": "avg"
          },
          {
            "aliasColors": {},
            "bars": false,
            "dashLength": 10,
            "dashes": false,
            "datasource": "Prometheus",
            "editable": true,
            "error": false,
            "fill": 1,
            "grid": {
              "threshold1Color": "rgba(216, 200, 27, 0.27)",
              "threshold2Color": "rgba(234, 112, 112, 0.22)"
            },
            "gridPos": {
              "h": 5,
              "w": 10,
              "x": 4,
              "y": 1
            },
            "id": 32,
            "isNew": false,
            "legend": {
              "alignAsTable": false,
              "avg": false,
              "current": false,
              "hideEmpty": false,
              "hideZero": false,
              "max": false,
              "min": false,
              "rightSide": false,
              "show": true,
              "total": false,
              "values": false
            },
            "lines": true,
            "linewidth": 1,
            "links": [],
            "nullPointMode": "null",
            "percentage": false,
            "pointradius": 5,
            "points": false,
            "renderer": "flot",
            "seriesOverrides": [],
            "spaceLength": 10,
            "stack": false,
            "steppedLine": false,
            "targets": [
              {
                "expr": "sum by(instance) (rate(apiserver_request_count{code=~\"5..\"}[5m])) / sum by(instance) (rate(apiserver_request_count[5m]))",
                "format": "time_series",
                "intervalFactor": 2,
                "legendFormat": "{{instance}}",
                "refId": "A",
                "step": 60
              }
            ],
            "thresholds": [],
            "timeFrom": null,
            "timeRegions": [],
            "timeShift": null,
            "title": "API Server Request Error Rates",
            "tooltip": {
              "msResolution": false,
              "shared": true,
              "sort": 0,
              "value_type": "individual"
            },
            "transparent": false,
            "type": "graph",
            "xaxis": {
              "buckets": null,
              "mode": "time",
              "name": null,
              "show": true,
              "values": []
            },
            "yaxes": [
              {
                "format": "percentunit",
                "logBase": 1,
                "max": "1",
                "show": true
              },
              {
                "format": "short",
                "logBase": 1,
                "show": true
              }
            ],
            "yaxis": {
              "align": false,
              "alignLevel": null
            }
          },
          {
            "cacheTimeout": null,
            "colorBackground": false,
            "colorValue": true,
            "colors": [
              "rgba(50, 172, 45, 0.97)",
              "rgba(237, 129, 40, 0.89)",
              "rgba(245, 54, 54, 0.9)"
            ],
            "datasource": "Prometheus",
            "description": "Crashing Pods in control plane (kube-system)",
            "editable": true,
            "format": "none",
            "gauge": {
              "maxValue": 100,
              "minValue": 0,
              "show": false,
              "thresholdLabels": false,
              "thresholdMarkers": true
            },
            "gridPos": {
              "h": 5,
              "w": 5,
              "x": 14,
              "y": 1
            },
            "id": 24,
            "interval": null,
            "links": [],
            "mappingType": 1,
            "mappingTypes": [
              {
                "name": "value to text",
                "value": 1
              },
              {
                "name": "range to text",
                "value": 2
              }
            ],
            "maxDataPoints": 100,
            "nullPointMode": "connected",
            "nullText": null,
            "postfix": "",
            "postfixFontSize": "50%",
            "prefix": "",
            "prefixFontSize": "50%",
            "rangeMaps": [
              {
                "from": "null",
                "text": "N/A",
                "to": "null"
              }
            ],
            "sparkline": {
              "fillColor": "rgba(31, 118, 189, 0.18)",
              "full": false,
              "lineColor": "rgb(31, 120, 193)",
              "show": false
            },
            "tableColumn": "",
            "targets": [
              {
                "expr": "count(increase(kube_pod_container_status_restarts_total{namespace=~\"kube-system\"}[1h]) > 5)",
                "format": "time_series",
                "intervalFactor": 2,
                "refId": "A",
                "step": 600
              }
            ],
            "thresholds": "1, 3",
            "title": "Crashing Control Plane Pods",
            "transparent": false,
            "type": "singlestat",
            "valueFontSize": "80%",
            "valueMaps": [
              {
                "op": "=",
                "text": "0",
                "value": "null"
              }
            ],
            "valueName": "current"
          },
          {
            "cacheTimeout": null,
            "colorBackground": false,
            "colorValue": true,
            "colors": [
              "rgba(50, 172, 45, 0.97)",
              "rgba(237, 129, 40, 0.89)",
              "rgba(245, 54, 54, 0.9)"
            ],
            "datasource": "Prometheus",
            "description": "Crashing Pods in cluster (include the control plane)",
            "editable": true,
            "format": "none",
            "gauge": {
              "maxValue": 100,
              "minValue": 0,
              "show": false,
              "thresholdLabels": false,
              "thresholdMarkers": true
            },
            "gridPos": {
              "h": 5,
              "w": 5,
              "x": 19,
              "y": 1
            },
            "id": 52,
            "interval": null,
            "links": [],
            "mappingType": 1,
            "mappingTypes": [
              {
                "name": "value to text",
                "value": 1
              },
              {
                "name": "range to text",
                "value": 2
              }
            ],
            "maxDataPoints": 100,
            "nullPointMode": "connected",
            "nullText": null,
            "postfix": "",
            "postfixFontSize": "50%",
            "prefix": "",
            "prefixFontSize": "50%",
            "rangeMaps": [
              {
                "from": "null",
                "text": "N/A",
                "to": "null"
              }
            ],
            "sparkline": {
              "fillColor": "rgba(31, 118, 189, 0.18)",
              "full": false,
              "lineColor": "rgb(31, 120, 193)",
              "show": false
            },
            "tableColumn": "",
            "targets": [
              {
                "expr": "count(increase(kube_pod_container_status_restarts_total[1h]) > 5)",
                "format": "time_series",
                "intervalFactor": 2,
                "refId": "A",
                "step": 600
              }
            ],
            "thresholds": "1, 3",
            "title": "Crashing Pods",
            "transparent": false,
            "type": "singlestat",
            "valueFontSize": "80%",
            "valueMaps": [
              {
                "op": "=",
                "text": "0",
                "value": "null"
              }
            ],
            "valueName": "current"
          },
          {
            "cacheTimeout": null,
            "colorBackground": false,
            "colorValue": false,
            "colors": [
              "rgba(245, 54, 54, 0.9)",
              "rgba(237, 129, 40, 0.89)",
              "rgba(50, 172, 45, 0.97)"
            ],
            "datasource": "Prometheus",
            "editable": true,
            "format": "none",
            "gauge": {
              "maxValue": 100,
              "minValue": 0,
              "show": false,
              "thresholdLabels": false,
              "thresholdMarkers": true
            },
            "gridPos": {
              "h": 4,
              "w": 4,
              "x": 0,
              "y": 6
            },
            "id": 46,
            "interval": null,
            "links": [],
            "mappingType": 1,
            "mappingTypes": [
              {
                "name": "value to text",
                "value": 1
              },
              {
                "name": "range to text",
                "value": 2
              }
            ],
            "maxDataPoints": 100,
            "nullPointMode": "connected",
            "nullText": null,
            "postfix": "",
            "postfixFontSize": "50%",
            "prefix": "",
            "prefixFontSize": "50%",
            "rangeMaps": [
              {
                "from": "null",
                "text": "N/A",
                "to": "null"
              }
            ],
            "sparkline": {
              "fillColor": "rgba(31, 118, 189, 0.18)",
              "full": false,
              "lineColor": "rgb(31, 120, 193)",
              "show": false
            },
            "tableColumn": "",
            "targets": [
              {
                "expr": "count(up{job=\"kubelet\"})",
                "format": "time_series",
                "intervalFactor": 2,
                "refId": "A",
                "step": 600
              }
            ],
            "thresholds": "",
            "title": "Total Nodes",
            "transparent": false,
            "type": "singlestat",
            "valueFontSize": "80%",
            "valueMaps": [
              {
                "op": "=",
                "text": "N/A",
                "value": "null"
              }
            ],
            "valueName": "current"
          },
          {
            "cacheTimeout": null,
            "colorBackground": false,
            "colorValue": true,
            "colors": [
              "rgba(245, 54, 54, 0.9)",
              "rgba(237, 129, 40, 0.89)",
              "rgba(50, 172, 45, 0.97)"
            ],
            "datasource": "Prometheus",
            "decimals": null,
            "editable": true,
            "format": "percentunit",
            "gauge": {
              "maxValue": 1,
              "minValue": 0,
              "show": true,
              "thresholdLabels": true,
              "thresholdMarkers": true
            },
            "gridPos": {
              "h": 4,
              "w": 4,
              "x": 4,
              "y": 6
            },
            "hideTimeOverride": false,
            "id": 22,
            "interval": null,
            "links": [],
            "mappingType": 1,
            "mappingTypes": [
              {
                "name": "value to text",
                "value": 1
              },
              {
                "name": "range to text",
                "value": 2
              }
            ],
            "maxDataPoints": 100,
            "nullPointMode": "connected",
            "nullText": null,
            "postfix": "",
            "postfixFontSize": "50%",
            "prefix": "",
            "prefixFontSize": "50%",
            "rangeMaps": [
              {
                "from": "null",
                "text": "N/A",
                "to": "null"
              }
            ],
            "sparkline": {
              "fillColor": "rgba(31, 118, 189, 0.18)",
              "full": false,
              "lineColor": "rgb(31, 120, 193)",
              "show": false
            },
            "tableColumn": "",
            "targets": [
              {
                "expr": "sum(kube_node_status_condition{condition=\"Ready\",status=\"true\"}) / sum(kube_node_status_condition{condition=\"Ready\"})",
                "format": "time_series",
                "intervalFactor": 2,
                "legendFormat": "",
                "refId": "A",
                "step": 600
              }
            ],
            "thresholds": "0.5,0.9",
            "title": "Node Ready",
            "transparent": true,
            "type": "singlestat",
            "valueFontSize": "80%",
            "valueMaps": [
              {
                "op": "=",
                "text": "N/A",
                "value": "null"
              }
            ],
            "valueName": "min"
          },
          {
            "cacheTimeout": null,
            "colorBackground": false,
            "colorValue": true,
            "colors": [
              "rgba(245, 54, 54, 0.9)",
              "rgba(237, 129, 40, 0.89)",
              "rgba(50, 172, 45, 0.97)"
            ],
            "datasource": "Prometheus",
            "editable": true,
            "format": "percentunit",
            "gauge": {
              "maxValue": 1,
              "minValue": 0,
              "show": true,
              "thresholdLabels": true,
              "thresholdMarkers": true
            },
            "gridPos": {
              "h": 4,
              "w": 4,
              "x": 8,
              "y": 6
            },
            "id": 28,
            "interval": null,
            "links": [],
            "mappingType": 1,
            "mappingTypes": [
              {
                "name": "value to text",
                "value": 1
              },
              {
                "name": "range to text",
                "value": 2
              }
            ],
            "maxDataPoints": 100,
            "nullPointMode": "connected",
            "nullText": null,
            "postfix": "",
            "postfixFontSize": "50%",
            "prefix": "",
            "prefixFontSize": "50%",
            "rangeMaps": [
              {
                "from": "null",
                "text": "N/A",
                "to": "null"
              }
            ],
            "sparkline": {
              "fillColor": "rgba(31, 118, 189, 0.18)",
              "full": false,
              "lineColor": "rgb(31, 120, 193)",
              "show": false
            },
            "tableColumn": "",
            "targets": [
              {
                "expr": "(sum(up{job=\"kubelet\"} == 1) / count(up{job=\"kubelet\"}))",
                "format": "time_series",
                "intervalFactor": 2,
                "refId": "A",
                "step": 600
              }
            ],
            "thresholds": "0.5, 0.8",
            "title": "Nodes UP",
            "transparent": true,
            "type": "singlestat",
            "valueFontSize": "80%",
            "valueMaps": [
              {
                "op": "=",
                "text": "N/A",
                "value": "null"
              }
            ],
            "valueName": "min"
          },
          {
            "cacheTimeout": null,
            "colorBackground": false,
            "colorValue": true,
            "colors": [
              "rgba(50, 172, 45, 0.97)",
              "rgba(237, 129, 40, 0.89)",
              "rgba(245, 54, 54, 0.9)"
            ],
            "datasource": "Prometheus",
            "decimals": null,
            "editable": true,
            "format": "percentunit",
            "gauge": {
              "maxValue": 1,
              "minValue": 0,
              "show": true,
              "thresholdLabels": true,
              "thresholdMarkers": true
            },
            "gridPos": {
              "h": 4,
              "w": 4,
              "x": 12,
              "y": 6
            },
            "hideTimeOverride": false,
            "id": 20,
            "interval": null,
            "links": [],
            "mappingType": 1,
            "mappingTypes": [
              {
                "name": "value to text",
                "value": 1
              },
              {
                "name": "range to text",
                "value": 2
              }
            ],
            "maxDataPoints": 100,
            "nullPointMode": "connected",
            "nullText": null,
            "postfix": "",
            "postfixFontSize": "50%",
            "prefix": "",
            "prefixFontSize": "50%",
            "rangeMaps": [
              {
                "from": "null",
                "text": "N/A",
                "to": "null"
              }
            ],
            "sparkline": {
              "fillColor": "rgba(31, 118, 189, 0.18)",
              "full": false,
              "lineColor": "rgb(31, 120, 193)",
              "show": false
            },
            "tableColumn": "",
            "targets": [
              {
                "expr": "sum(kube_node_status_condition{condition=\"MemoryPressure\",status=\"true\"}) / sum(kube_node_status_condition{condition=\"MemoryPressure\"})",
                "format": "time_series",
                "intervalFactor": 2,
                "legendFormat": "",
                "refId": "A",
                "step": 600
              }
            ],
            "thresholds": "0.1,0.5",
            "title": "Node Memory Pressure",
            "transparent": true,
            "type": "singlestat",
            "valueFontSize": "80%",
            "valueMaps": [
              {
                "op": "=",
                "text": "N/A",
                "value": "null"
              }
            ],
            "valueName": "max"
          },
          {
            "cacheTimeout": null,
            "colorBackground": false,
            "colorValue": true,
            "colors": [
              "rgba(50, 172, 45, 0.97)",
              "rgba(237, 129, 40, 0.89)",
              "rgba(245, 54, 54, 0.9)"
            ],
            "datasource": "Prometheus",
            "editable": true,
            "format": "percentunit",
            "gauge": {
              "maxValue": 1,
              "minValue": 0,
              "show": true,
              "thresholdLabels": true,
              "thresholdMarkers": true
            },
            "gridPos": {
              "h": 4,
              "w": 4,
              "x": 16,
              "y": 6
            },
            "hideTimeOverride": false,
            "id": 51,
            "interval": null,
            "links": [],
            "mappingType": 1,
            "mappingTypes": [
              {
                "name": "value to text",
                "value": 1
              },
              {
                "name": "range to text",
                "value": 2
              }
            ],
            "maxDataPoints": 100,
            "nullPointMode": "connected",
            "nullText": null,
            "postfix": "",
            "postfixFontSize": "50%",
            "prefix": "",
            "prefixFontSize": "50%",
            "rangeMaps": [
              {
                "from": "null",
                "text": "N/A",
                "to": "null"
              }
            ],
            "sparkline": {
              "fillColor": "rgba(31, 118, 189, 0.18)",
              "full": false,
              "lineColor": "rgb(31, 120, 193)",
              "show": false
            },
            "tableColumn": "",
            "targets": [
              {
                "expr": "sum(kube_node_status_condition{condition=\"DiskPressure\",status=\"true\"}) / sum(kube_node_status_condition{condition=\"DiskPressure\"})",
                "format": "time_series",
                "intervalFactor": 2,
                "legendFormat": "",
                "refId": "A",
                "step": 600
              }
            ],
            "thresholds": "0.1,0.5",
            "title": "Node Disk Pressure",
            "transparent": true,
            "type": "singlestat",
            "valueFontSize": "80%",
            "valueMaps": [
              {
                "op": "=",
                "text": "N/A",
                "value": "null"
              }
            ],
            "valueName": "max"
          },
          {
            "cacheTimeout": null,
            "colorBackground": false,
            "colorValue": true,
            "colors": [
              "rgba(50, 172, 45, 0.97)",
              "rgba(237, 129, 40, 0.89)",
              "rgba(245, 54, 54, 0.9)"
            ],
            "datasource": "Prometheus",
            "description": "Percentage of nodes over cluster that have unscheduled objects",
            "editable": true,
            "format": "percentunit",
            "gauge": {
              "maxValue": 1,
              "minValue": 0,
              "show": true,
              "thresholdLabels": true,
              "thresholdMarkers": true
            },
            "gridPos": {
              "h": 4,
              "w": 4,
              "x": 20,
              "y": 6
            },
            "hideTimeOverride": false,
            "id": 12,
            "interval": null,
            "links": [],
            "mappingType": 1,
            "mappingTypes": [
              {
                "name": "value to text",
                "value": 1
              },
              {
                "name": "range to text",
                "value": 2
              }
            ],
            "maxDataPoints": 100,
            "nullPointMode": "connected",
            "nullText": null,
            "postfix": "",
            "postfixFontSize": "50%",
            "prefix": "",
            "prefixFontSize": "50%",
            "rangeMaps": [
              {
                "from": "null",
                "text": "N/A",
                "to": "null"
              }
            ],
            "sparkline": {
              "fillColor": "rgba(31, 118, 189, 0.18)",
              "full": false,
              "lineColor": "rgb(31, 120, 193)",
              "show": false
            },
            "tableColumn": "",
            "targets": [
              {
                "expr": "sum(kube_node_spec_unschedulable)  / count(up{job=\"kubelet\"})",
                "format": "time_series",
                "intervalFactor": 2,
                "legendFormat": "",
                "refId": "A",
                "step": 600
              }
            ],
            "thresholds": "0.1, 0.5",
            "title": "Nodes Unschedulable",
            "transparent": true,
            "type": "singlestat",
            "valueFontSize": "80%",
            "valueMaps": [],
            "valueName": "max"
          },
          {
            "collapsed": false,
            "gridPos": {
              "h": 1,
              "w": 24,
              "x": 0,
              "y": 10
            },
            "id": 59,
            "panels": [],
            "title": "Cluster Resource Usage",
            "type": "row"
          },
          {
            "aliasColors": {},
            "bars": false,
            "dashLength": 10,
            "dashes": false,
            "datasource": "Prometheus",
            "description": "Utilization against total cluster CPU resource",
            "fill": 1,
            "gridPos": {
              "h": 6,
              "w": 12,
              "x": 0,
              "y": 11
            },
            "id": 54,
            "legend": {
              "avg": false,
              "current": false,
              "max": false,
              "min": false,
              "show": true,
              "total": false,
              "values": false
            },
            "lines": true,
            "linewidth": 1,
            "links": [],
            "nullPointMode": "null",
            "percentage": false,
            "pointradius": 5,
            "points": false,
            "renderer": "flot",
            "seriesOverrides": [],
            "spaceLength": 10,
            "stack": false,
            "steppedLine": false,
            "targets": [
              {
                "expr": "node:node_cpu_utilisation:avg1m * node:node_num_cpu:sum / scalar(sum(node:node_num_cpu:sum))",
                "format": "time_series",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "intervalFactor": 2,
                "legendFormat": "{{node}}",
                "orderByTime": "ASC",
                "policy": "default",
                "refId": "A",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              }
            ],
            "thresholds": [],
            "timeFrom": null,
            "timeRegions": [],
            "timeShift": null,
            "title": "CPU Utilisation",
            "tooltip": {
              "shared": true,
              "sort": 0,
              "value_type": "individual"
            },
            "type": "graph",
            "xaxis": {
              "buckets": null,
              "mode": "time",
              "name": null,
              "show": true,
              "values": []
            },
            "yaxes": [
              {
                "format": "percentunit",
                "label": null,
                "logBase": 1,
                "max": "1",
                "min": "0",
                "show": true
              },
              {
                "format": "short",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": false
              }
            ],
            "yaxis": {
              "align": false,
              "alignLevel": null
            }
          },
          {
            "aliasColors": {},
            "bars": false,
            "dashLength": 10,
            "dashes": false,
            "datasource": "Prometheus",
            "description": "Utilization against total cluster memory resource",
            "fill": 1,
            "gridPos": {
              "h": 6,
              "w": 12,
              "x": 12,
              "y": 11
            },
            "id": 56,
            "legend": {
              "avg": false,
              "current": false,
              "max": false,
              "min": false,
              "show": true,
              "total": false,
              "values": false
            },
            "lines": true,
            "linewidth": 1,
            "links": [],
            "nullPointMode": "null",
            "percentage": false,
            "pointradius": 5,
            "points": false,
            "renderer": "flot",
            "seriesOverrides": [],
            "spaceLength": 10,
            "stack": false,
            "steppedLine": false,
            "targets": [
              {
                "expr": "node:node_memory_utilisation:ratio",
                "format": "time_series",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "intervalFactor": 2,
                "legendFormat": "{{node}}",
                "orderByTime": "ASC",
                "policy": "default",
                "refId": "A",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              }
            ],
            "thresholds": [],
            "timeFrom": null,
            "timeRegions": [],
            "timeShift": null,
            "title": "Memory Utilisation",
            "tooltip": {
              "shared": true,
              "sort": 0,
              "value_type": "individual"
            },
            "type": "graph",
            "xaxis": {
              "buckets": null,
              "mode": "time",
              "name": null,
              "show": true,
              "values": []
            },
            "yaxes": [
              {
                "format": "percentunit",
                "label": null,
                "logBase": 1,
                "max": "1",
                "min": "0",
                "show": true
              },
              {
                "format": "short",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": false
              }
            ],
            "yaxis": {
              "align": false,
              "alignLevel": null
            }
          },
          {
            "aliasColors": {},
            "bars": false,
            "dashLength": 10,
            "dashes": false,
            "datasource": "Prometheus",
            "description": "Utilization against total cluster disk resource",
            "fill": 1,
            "gridPos": {
              "h": 6,
              "w": 12,
              "x": 0,
              "y": 17
            },
            "id": 55,
            "legend": {
              "avg": false,
              "current": false,
              "max": false,
              "min": false,
              "show": true,
              "total": false,
              "values": false
            },
            "lines": true,
            "linewidth": 1,
            "links": [],
            "nullPointMode": "null",
            "percentage": false,
            "pointradius": 5,
            "points": false,
            "renderer": "flot",
            "seriesOverrides": [],
            "spaceLength": 10,
            "stack": false,
            "steppedLine": false,
            "targets": [
              {
                "expr": "sum(max(node_filesystem_size_bytes{fstype=~\"ext[234]|btrfs|xfs|zfs\"} - node_filesystem_avail_bytes{fstype=~\"ext[234]|btrfs|xfs|zfs\"}) by (device,pod,namespace)) by (pod,namespace)\n/ scalar(sum(max(node_filesystem_size_bytes{fstype=~\"ext[234]|btrfs|xfs|zfs\"}) by (device,pod,namespace)))\n* on (namespace, pod) group_left (node) node_namespace_pod:kube_pod_info:",
                "format": "time_series",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "intervalFactor": 2,
                "legendFormat": "{{node}}",
                "orderByTime": "ASC",
                "policy": "default",
                "refId": "A",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              }
            ],
            "thresholds": [],
            "timeFrom": null,
            "timeRegions": [],
            "timeShift": null,
            "title": "Disk Capacity",
            "tooltip": {
              "shared": true,
              "sort": 0,
              "value_type": "individual"
            },
            "type": "graph",
            "xaxis": {
              "buckets": null,
              "mode": "time",
              "name": null,
              "show": true,
              "values": []
            },
            "yaxes": [
              {
                "format": "percentunit",
                "label": null,
                "logBase": 1,
                "max": "1",
                "min": "0",
                "show": true
              },
              {
                "format": "short",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": false
              }
            ],
            "yaxis": {
              "align": false,
              "alignLevel": null
            }
          },
          {
            "aliasColors": {},
            "bars": false,
            "dashLength": 10,
            "dashes": false,
            "datasource": "Prometheus",
            "fill": 1,
            "gridPos": {
              "h": 6,
              "w": 12,
              "x": 12,
              "y": 17
            },
            "id": 57,
            "legend": {
              "avg": false,
              "current": false,
              "max": false,
              "min": false,
              "show": true,
              "total": false,
              "values": false
            },
            "lines": true,
            "linewidth": 1,
            "links": [],
            "nullPointMode": "null",
            "percentage": false,
            "pointradius": 5,
            "points": false,
            "renderer": "flot",
            "seriesOverrides": [],
            "spaceLength": 10,
            "stack": false,
            "steppedLine": false,
            "targets": [
              {
                "expr": "node:node_disk_utilisation:avg_irate / scalar(:kube_pod_info_node_count:)",
                "format": "time_series",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "intervalFactor": 2,
                "legendFormat": "{{node}}",
                "orderByTime": "ASC",
                "policy": "default",
                "refId": "A",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              }
            ],
            "thresholds": [],
            "timeFrom": null,
            "timeRegions": [],
            "timeShift": null,
            "title": "Disk IO Utilisation",
            "tooltip": {
              "shared": true,
              "sort": 0,
              "value_type": "individual"
            },
            "type": "graph",
            "xaxis": {
              "buckets": null,
              "mode": "time",
              "name": null,
              "show": true,
              "values": []
            },
            "yaxes": [
              {
                "format": "percentunit",
                "label": null,
                "logBase": 1,
                "max": "1",
                "min": "0",
                "show": true
              },
              {
                "format": "short",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": false
              }
            ],
            "yaxis": {
              "align": false,
              "alignLevel": null
            }
          }
        ],
        "refresh": false,
        "schemaVersion": 16,
        "style": "dark",
        "tags": [],
        "templating": {
          "list": []
        },
        "time": {
          "from": "now-1h",
          "to": "now"
        },
        "timepicker": {
          "refresh_intervals": [
            "5s",
            "10s",
            "30s",
            "1m",
            "5m",
            "15m",
            "30m",
            "1h",
            "2h",
            "1d"
          ],
          "time_options": [
            "5m",
            "15m",
            "1h",
            "6h",
            "12h",
            "24h",
            "2d",
            "7d",
            "30d"
          ]
        },
        "timezone": "",
        "title": "Cluster Health",
        "uid": "Re7d8mTlddmka",
        "version": 1
      }

  nodehealth.json:
    |-
      {
        "annotations": {
          "list": [
            {
              "builtIn": 1,
              "datasource": "-- Grafana --",
              "enable": true,
              "hide": true,
              "iconColor": "rgba(0, 211, 255, 1)",
              "name": "Annotations & Alerts",
              "type": "dashboard"
            }
          ]
        },
        "editable": true,
        "gnetId": null,
        "graphTooltip": 0,
        "id": 2,
        "iteration": 1552461762846,
        "links": [],
        "panels": [
          {
            "collapsed": false,
            "gridPos": {
              "h": 1,
              "w": 24,
              "x": 0,
              "y": 0
            },
            "id": 2,
            "panels": [],
            "title": "Node Resource Usage",
            "type": "row"
          },
          {
            "cacheTimeout": null,
            "colorBackground": false,
            "colorValue": false,
            "colors": [
              "#299c46",
              "rgba(237, 129, 40, 0.89)",
              "#d44a3a"
            ],
            "datasource": "Prometheus",
            "description": "number of CPU cores",
            "format": "none",
            "gauge": {
              "maxValue": 100,
              "minValue": 0,
              "show": false,
              "thresholdLabels": false,
              "thresholdMarkers": true
            },
            "gridPos": {
              "h": 6,
              "w": 4,
              "x": 0,
              "y": 1
            },
            "id": 66,
            "interval": null,
            "links": [],
            "mappingType": 1,
            "mappingTypes": [
              {
                "name": "value to text",
                "value": 1
              },
              {
                "name": "range to text",
                "value": 2
              }
            ],
            "maxDataPoints": 100,
            "nullPointMode": "connected",
            "nullText": null,
            "postfix": "",
            "postfixFontSize": "50%",
            "prefix": "",
            "prefixFontSize": "50%",
            "rangeMaps": [
              {
                "from": "null",
                "text": "N/A",
                "to": "null"
              }
            ],
            "sparkline": {
              "fillColor": "rgba(31, 118, 189, 0.18)",
              "full": false,
              "lineColor": "rgb(31, 120, 193)",
              "show": false
            },
            "tableColumn": "",
            "targets": [
              {
                "expr": "kube_node_status_capacity_cpu_cores{node=\"$node\"}",
                "format": "time_series",
                "intervalFactor": 1,
                "refId": "A"
              }
            ],
            "thresholds": "",
            "title": "CPU Capacity",
            "type": "singlestat",
            "valueFontSize": "80%",
            "valueMaps": [
              {
                "op": "=",
                "text": "N/A",
                "value": "null"
              }
            ],
            "valueName": "avg"
          },
          {
            "cacheTimeout": null,
            "colorBackground": false,
            "colorValue": true,
            "colors": [
              "rgba(237, 129, 40, 0.89)",
              "rgba(50, 172, 45, 0.97)",
              "rgba(245, 54, 54, 0.9)"
            ],
            "datasource": "Prometheus",
            "decimals": 2,
            "format": "percent",
            "gauge": {
              "maxValue": 100,
              "minValue": 0,
              "show": true,
              "thresholdLabels": false,
              "thresholdMarkers": true
            },
            "gridPos": {
              "h": 6,
              "w": 5,
              "x": 4,
              "y": 1
            },
            "id": 54,
            "interval": null,
            "links": [],
            "mappingType": 1,
            "mappingTypes": [
              {
                "name": "value to text",
                "value": 1
              },
              {
                "name": "range to text",
                "value": 2
              }
            ],
            "maxDataPoints": 100,
            "nullPointMode": "connected",
            "nullText": null,
            "postfix": "",
            "postfixFontSize": "50%",
            "prefix": "",
            "prefixFontSize": "50%",
            "rangeMaps": [
              {
                "from": "null",
                "text": "N/A",
                "to": "null"
              }
            ],
            "sparkline": {
              "fillColor": "rgba(31, 118, 189, 0.18)",
              "full": false,
              "lineColor": "rgb(31, 120, 193)",
              "show": false
            },
            "tableColumn": "",
            "targets": [
              {
                "expr": "node:node_cpu_utilisation:avg1m{node=\"$node\"} * 100",
                "format": "time_series",
                "intervalFactor": 1,
                "refId": "A"
              }
            ],
            "thresholds": "50, 80",
            "title": "CPU Usage",
            "type": "singlestat",
            "valueFontSize": "80%",
            "valueMaps": [
              {
                "op": "=",
                "text": "N/A",
                "value": "null"
              }
            ],
            "valueName": "avg"
          },
          {
            "aliasColors": {},
            "bars": false,
            "dashLength": 10,
            "dashes": false,
            "datasource": "Prometheus",
            "description": "",
            "fill": 0,
            "gridPos": {
              "h": 6,
              "w": 15,
              "x": 9,
              "y": 1
            },
            "height": "230px",
            "id": 73,
            "legend": {
              "alignAsTable": true,
              "avg": false,
              "current": true,
              "hideEmpty": false,
              "hideZero": false,
              "max": false,
              "min": false,
              "rightSide": true,
              "show": true,
              "sort": "current",
              "sortDesc": true,
              "total": false,
              "values": true
            },
            "lines": true,
            "linewidth": 2,
            "links": [],
            "nullPointMode": "null",
            "percentage": false,
            "pointradius": 5,
            "points": false,
            "renderer": "flot",
            "seriesOverrides": [],
            "spaceLength": 10,
            "stack": false,
            "steppedLine": false,
            "targets": [
              {
                "expr": "topk(5, sum(rate(container_cpu_usage_seconds_total{image!=\"\",name=~\"^k8s_.*\",container_name!=\"POD\"}[2m])\r\n* on (namespace, pod_name) group_left (node) label_replace(node_namespace_pod:kube_pod_info:{node=\"$node\"}, \"pod_name\", \"$1\", \"pod\", \"(.*)\"))  by (pod_name))",
                "format": "time_series",
                "instant": false,
                "interval": "",
                "intervalFactor": 2,
                "legendFormat": "{{ pod_name }}",
                "metric": "container_cpu_usage_seconds_total",
                "refId": "A",
                "step": 4
              }
            ],
            "thresholds": [],
            "timeFrom": null,
            "timeRegions": [],
            "timeShift": null,
            "title": "TOP CPU Pods",
            "tooltip": {
              "shared": true,
              "sort": 0,
              "value_type": "individual"
            },
            "type": "graph",
            "xaxis": {
              "buckets": null,
              "mode": "time",
              "name": null,
              "show": true,
              "values": []
            },
            "yaxes": [
              {
                "decimals": null,
                "format": "short",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": true
              },
              {
                "format": "short",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": false
              }
            ],
            "yaxis": {
              "align": false,
              "alignLevel": null
            }
          },
          {
            "cacheTimeout": null,
            "colorBackground": false,
            "colorValue": false,
            "colors": [
              "#299c46",
              "rgba(237, 129, 40, 0.89)",
              "#d44a3a"
            ],
            "datasource": "Prometheus",
            "format": "bytes",
            "gauge": {
              "maxValue": 100,
              "minValue": 0,
              "show": false,
              "thresholdLabels": false,
              "thresholdMarkers": true
            },
            "gridPos": {
              "h": 6,
              "w": 4,
              "x": 0,
              "y": 7
            },
            "id": 68,
            "interval": null,
            "links": [],
            "mappingType": 1,
            "mappingTypes": [
              {
                "name": "value to text",
                "value": 1
              },
              {
                "name": "range to text",
                "value": 2
              }
            ],
            "maxDataPoints": 100,
            "nullPointMode": "connected",
            "nullText": null,
            "postfix": "",
            "postfixFontSize": "50%",
            "prefix": "",
            "prefixFontSize": "50%",
            "rangeMaps": [
              {
                "from": "null",
                "text": "N/A",
                "to": "null"
              }
            ],
            "sparkline": {
              "fillColor": "rgba(31, 118, 189, 0.18)",
              "full": false,
              "lineColor": "rgb(31, 120, 193)",
              "show": false
            },
            "tableColumn": "",
            "targets": [
              {
                "expr": "kube_node_status_capacity_memory_bytes{node=\"$node\"}",
                "format": "time_series",
                "intervalFactor": 1,
                "refId": "A"
              }
            ],
            "thresholds": "",
            "title": "RAM Capacity",
            "type": "singlestat",
            "valueFontSize": "80%",
            "valueMaps": [
              {
                "op": "=",
                "text": "N/A",
                "value": "null"
              }
            ],
            "valueName": "current"
          },
          {
            "cacheTimeout": null,
            "colorBackground": false,
            "colorValue": true,
            "colors": [
              "rgba(237, 129, 40, 0.89)",
              "rgba(50, 172, 45, 0.97)",
              "rgba(245, 54, 54, 0.9)"
            ],
            "datasource": "Prometheus",
            "decimals": 2,
            "format": "percent",
            "gauge": {
              "maxValue": 100,
              "minValue": 0,
              "show": true,
              "thresholdLabels": false,
              "thresholdMarkers": true
            },
            "gridPos": {
              "h": 6,
              "w": 5,
              "x": 4,
              "y": 7
            },
            "id": 56,
            "interval": null,
            "links": [],
            "mappingType": 1,
            "mappingTypes": [
              {
                "name": "value to text",
                "value": 1
              },
              {
                "name": "range to text",
                "value": 2
              }
            ],
            "maxDataPoints": 100,
            "nullPointMode": "connected",
            "nullText": null,
            "postfix": "",
            "postfixFontSize": "50%",
            "prefix": "",
            "prefixFontSize": "50%",
            "rangeMaps": [
              {
                "from": "null",
                "text": "N/A",
                "to": "null"
              }
            ],
            "sparkline": {
              "fillColor": "rgba(31, 118, 189, 0.18)",
              "full": false,
              "lineColor": "rgb(31, 120, 193)",
              "show": false
            },
            "tableColumn": "",
            "targets": [
              {
                "expr": "node:node_memory_utilisation:{node=\"$node\"} * 100",
                "format": "time_series",
                "intervalFactor": 1,
                "refId": "A"
              }
            ],
            "thresholds": "50,80",
            "title": "Memory Usage",
            "type": "singlestat",
            "valueFontSize": "80%",
            "valueMaps": [
              {
                "op": "=",
                "text": "N/A",
                "value": "null"
              }
            ],
            "valueName": "avg"
          },
          {
            "aliasColors": {},
            "bars": false,
            "dashLength": 10,
            "dashes": false,
            "datasource": "Prometheus",
            "fill": 0,
            "gridPos": {
              "h": 6,
              "w": 15,
              "x": 9,
              "y": 7
            },
            "height": "300px",
            "id": 75,
            "legend": {
              "alignAsTable": true,
              "avg": false,
              "current": true,
              "max": false,
              "min": false,
              "rightSide": true,
              "show": true,
              "total": false,
              "values": true
            },
            "lines": true,
            "linewidth": 2,
            "links": [],
            "nullPointMode": "null",
            "percentage": false,
            "pointradius": 5,
            "points": false,
            "renderer": "flot",
            "seriesOverrides": [],
            "spaceLength": 10,
            "stack": false,
            "steppedLine": false,
            "targets": [
              {
                "expr": "topk(5, sum(container_memory_usage_bytes{image!=\"\"}\n* on (namespace, pod_name) group_left (node) label_replace(node_namespace_pod:kube_pod_info:{node=\"$node\"}, \"pod_name\", \"$1\", \"pod\", \"(.*)\"))  by (pod_name))\n",
                "format": "time_series",
                "intervalFactor": 2,
                "legendFormat": "{{pod_name}}",
                "refId": "A",
                "step": 10
              }
            ],
            "thresholds": [],
            "timeFrom": null,
            "timeRegions": [],
            "timeShift": null,
            "title": "Top 5 Memory Intense Pods",
            "tooltip": {
              "shared": true,
              "sort": 0,
              "value_type": "individual"
            },
            "type": "graph",
            "xaxis": {
              "buckets": null,
              "mode": "time",
              "name": null,
              "show": true,
              "values": []
            },
            "yaxes": [
              {
                "format": "decbytes",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": true
              },
              {
                "format": "short",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": true
              }
            ],
            "yaxis": {
              "align": false,
              "alignLevel": null
            }
          },
          {
            "collapsed": false,
            "gridPos": {
              "h": 1,
              "w": 24,
              "x": 0,
              "y": 13
            },
            "id": 71,
            "panels": [],
            "title": "Node Running Status",
            "type": "row"
          },
          {
            "aliasColors": {},
            "bars": false,
            "dashLength": 10,
            "dashes": false,
            "datasource": "Prometheus",
            "decimals": 0,
            "fill": 0,
            "gridPos": {
              "h": 6,
              "w": 24,
              "x": 0,
              "y": 14
            },
            "id": 77,
            "legend": {
              "alignAsTable": true,
              "avg": false,
              "current": true,
              "max": true,
              "min": true,
              "rightSide": true,
              "show": true,
              "sideWidth": 250,
              "total": false,
              "values": true
            },
            "lines": true,
            "linewidth": 2,
            "links": [],
            "nullPointMode": "null as zero",
            "percentage": false,
            "pointradius": 5,
            "points": false,
            "renderer": "flot",
            "seriesOverrides": [],
            "spaceLength": 10,
            "stack": false,
            "steppedLine": false,
            "targets": [
              {
                "expr": "sum(kube_pod_status_phase\r\n* on (namespace, pod) group_left (node) node_namespace_pod:kube_pod_info:{node=\"$node\"}\r\n) by (phase)",
                "format": "time_series",
                "hide": false,
                "interval": "",
                "intervalFactor": 2,
                "legendFormat": "{{ phase }}",
                "metric": "kube_pod_status_phase",
                "refId": "A",
                "step": 10
              }
            ],
            "thresholds": [],
            "timeFrom": null,
            "timeRegions": [],
            "timeShift": null,
            "title": "Pods Running Status Count",
            "tooltip": {
              "shared": true,
              "sort": 0,
              "value_type": "individual"
            },
            "type": "graph",
            "xaxis": {
              "buckets": null,
              "mode": "time",
              "name": null,
              "show": true,
              "values": []
            },
            "yaxes": [
              {
                "decimals": 0,
                "format": "short",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": "0",
                "show": true
              },
              {
                "decimals": 0,
                "format": "short",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": false
              }
            ],
            "yaxis": {
              "align": false,
              "alignLevel": null
            }
          },
          {
            "columns": [
              {
                "text": "Avg",
                "value": "avg"
              }
            ],
            "datasource": "Prometheus",
            "description": "Note: limit may exceeds usage in a pod due to  some containers of it  does not have limits.",
            "fontSize": "100%",
            "gridPos": {
              "h": 9,
              "w": 24,
              "x": 0,
              "y": 20
            },
            "hideTimeOverride": true,
            "id": 60,
            "links": [],
            "pageSize": 8,
            "repeat": null,
            "repeatDirection": "v",
            "scroll": true,
            "showHeader": true,
            "sort": {
              "col": 6,
              "desc": false
            },
            "styles": [
              {
                "alias": "Pod",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(50, 172, 45, 0.97)",
                  "#c15c17"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "link": false,
                "linkTooltip": "",
                "linkUrl": "",
                "pattern": "pod_name",
                "thresholds": [
                  "30",
                  "80"
                ],
                "type": "string",
                "unit": "currencyUSD"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "Time",
                "thresholds": [],
                "type": "hidden",
                "unit": "short"
              },
              {
                "alias": "CPU Usage",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 3,
                "mappingType": 1,
                "pattern": "Value #C",
                "thresholds": [],
                "type": "number",
                "unit": "short"
              },
              {
                "alias": "CPU Request",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 3,
                "mappingType": 1,
                "pattern": "Value #A",
                "thresholds": [],
                "type": "number",
                "unit": "short"
              },
              {
                "alias": "CPU Limit",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 3,
                "mappingType": 1,
                "pattern": "Value #B",
                "thresholds": [],
                "type": "number",
                "unit": "short"
              },
              {
                "alias": "Mem Usage",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 0,
                "mappingType": 1,
                "pattern": "Value #D",
                "thresholds": [],
                "type": "number",
                "unit": "bytes"
              },
              {
                "alias": "Mem Request",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 0,
                "mappingType": 1,
                "pattern": "Value #E",
                "thresholds": [],
                "type": "number",
                "unit": "bytes"
              },
              {
                "alias": "Mem Limit",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 0,
                "mappingType": 1,
                "pattern": "Value #F",
                "thresholds": [],
                "type": "number",
                "unit": "bytes"
              },
              {
                "alias": "Restart time",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 0,
                "mappingType": 1,
                "pattern": "Value #G",
                "thresholds": [],
                "type": "number",
                "unit": "short"
              }
            ],
            "targets": [
              {
                "expr": "sum(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{container_name!=\"\",container_name!=\"POD\",pod_name!=\"\"}\r\n* on (namespace, pod_name) group_left (node) label_replace(node_namespace_pod:kube_pod_info:{node=\"$node\"}, \"pod_name\", \"$1\", \"pod\", \"(.*)\")) by (pod_name)",
                "format": "table",
                "hide": false,
                "instant": true,
                "intervalFactor": 1,
                "refId": "C"
              },
              {
                "expr": "sum(label_replace(\nsum(avg_over_time(kube_pod_container_resource_requests_cpu_cores{container!=\"\",container!=\"POD\",node=\"$node\"}[10m])) by (pod), \n\"pod_name\",\"$1\",\"pod\",\"(.+)\")\nor up * 0\n) by (pod_name)",
                "format": "table",
                "hide": false,
                "instant": true,
                "intervalFactor": 1,
                "refId": "A"
              },
              {
                "expr": "sum(label_replace(\nsum(avg_over_time(kube_pod_container_resource_limits_cpu_cores{container!=\"\",container!=\"POD\",node=\"$node\"}[10m])) by (pod), \n\"pod_name\",\"$1\",\"pod\",\"(.+)\")\nor up * 0\n) by (pod_name)",
                "format": "table",
                "hide": false,
                "instant": true,
                "intervalFactor": 1,
                "refId": "B"
              },
              {
                "expr": "sum(container_memory_usage_bytes{container_name!=\"POD\", container_name!=\"\"}\r\n* on (namespace, pod_name) group_left (node) label_replace(node_namespace_pod:kube_pod_info:{node=\"$node\"}, \"pod_name\", \"$1\", \"pod\", \"(.*)\")\r\n) by (pod_name)",
                "format": "table",
                "hide": false,
                "instant": true,
                "intervalFactor": 1,
                "refId": "D"
              },
              {
                "expr": "sum(label_replace(label_replace(\nsum(avg_over_time(kube_pod_container_resource_requests_memory_bytes{container!=\"\",container!=\"POD\",node=\"$node\"}[10m])) by (pod),\n\"container_name\",\"$1\",\"container\",\"(.+)\"), \"pod_name\",\"$1\",\"pod\",\"(.+)\")\nor up * 0\n) by (pod_name)\n",
                "format": "table",
                "hide": false,
                "instant": true,
                "intervalFactor": 1,
                "refId": "E"
              },
              {
                "expr": "sum(label_replace(label_replace(\nsum(avg_over_time(kube_pod_container_resource_limits_memory_bytes{container!=\"\",container!=\"POD\",node=\"$node\"}[10m])) by (pod),\n\"container_name\",\"$1\",\"container\",\"(.+)\"), \"pod_name\",\"$1\",\"pod\",\"(.+)\")\nor up * 0\n) by (pod_name)\n",
                "format": "table",
                "hide": false,
                "instant": true,
                "intervalFactor": 1,
                "refId": "F"
              },
              {
                "expr": "sum(label_replace(kube_pod_container_status_restarts_total{container!=\"\",container!=\"POD\",pod !=\"\"}, \"pod_name\", \"$1\", \"pod\", \"(.*)\")\r\n* on (namespace, pod) group_left (node) node_namespace_pod:kube_pod_info:{node=\"$node\"}) by (pod_name)",
                "format": "table",
                "instant": true,
                "intervalFactor": 1,
                "legendFormat": "",
                "refId": "G"
              }
            ],
            "timeFrom": "1M",
            "timeShift": null,
            "title": "Current running pods",
            "transform": "table",
            "transparent": false,
            "type": "table"
          }
        ],
        "refresh": "1m",
        "schemaVersion": 16,
        "style": "dark",
        "tags": [],
        "templating": {
          "list": [
            {
              "allValue": null,
              "current": {
                "text": "vm1",
                "value": "vm1"
              },
              "datasource": "Prometheus",
              "definition": "label_values(kube_node_labels, label_kubernetes_io_hostname)",
              "hide": 0,
              "includeAll": false,
              "label": null,
              "multi": false,
              "name": "node",
              "options": [],
              "query": "label_values(kube_node_labels, label_kubernetes_io_hostname)",
              "refresh": 2,
              "regex": "",
              "skipUrlSync": false,
              "sort": 0,
              "tagValuesQuery": "",
              "tags": [],
              "tagsQuery": "",
              "type": "query",
              "useTags": false
            }
          ]
        },
        "time": {
          "from": "now-1h",
          "to": "now"
        },
        "timepicker": {
          "refresh_intervals": [
            "5s",
            "10s",
            "30s",
            "1m",
            "5m",
            "15m",
            "30m",
            "1h",
            "2h",
            "1d"
          ],
          "time_options": [
            "5m",
            "15m",
            "1h",
            "6h",
            "12h",
            "24h",
            "2d",
            "7d",
            "30d"
          ]
        },
        "timezone": "",
        "title": "Node Health",
        "uid": "Re78meddmk",
        "version": 1
      }

  hpa-recommendation.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": 10,
        "iteration": 1560932393249,
        "links": [],
        "panels": [
          {
            "collapsed": false,
            "gridPos": {
              "h": 1,
              "w": 24,
              "x": 0,
              "y": 0
            },
            "id": 12,
            "panels": [],
            "title": "Managed Objects",
            "type": "row"
          },
          {
            "columns": [],
            "datasource": "InfluxDB",
            "description": "",
            "fontSize": "100%",
            "gridPos": {
              "h": 5,
              "w": 24,
              "x": 0,
              "y": 1
            },
            "id": 5,
            "links": [],
            "pageSize": null,
            "scroll": true,
            "showHeader": true,
            "sort": {
              "col": 0,
              "desc": true
            },
            "styles": [
              {
                "alias": "Time",
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "pattern": "Time",
                "type": "hidden"
              },
              {
                "alias": "Project (Namespace)",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "namespace",
                "thresholds": [],
                "type": "string",
                "unit": "short"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 0,
                "mappingType": 1,
                "pattern": "current replicas",
                "thresholds": [],
                "type": "number",
                "unit": "short"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 0,
                "mappingType": 1,
                "pattern": "desired replicas",
                "thresholds": [],
                "type": "number",
                "unit": "short"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 0,
                "mappingType": 1,
                "pattern": "memory limit",
                "thresholds": [],
                "type": "number",
                "unit": "bytes"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 0,
                "mappingType": 1,
                "pattern": "memory request",
                "thresholds": [],
                "type": "number",
                "unit": "bytes"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 0,
                "mappingType": 1,
                "pattern": "cpu limit",
                "thresholds": [],
                "type": "number",
                "unit": "short"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 0,
                "mappingType": 1,
                "pattern": "cpu request",
                "thresholds": [],
                "type": "number",
                "unit": "short"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "decimals": 2,
                "pattern": "/.*/",
                "thresholds": [],
                "type": "number",
                "unit": "short"
              }
            ],
            "targets": [
              {
                "expr": "count(up{job=\"kubernetes-nodes\"})",
                "format": "table",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "intervalFactor": 1,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select top_controller_kind as \"kind\", top_controller_name as \"controller\" from alameda_cluster_status..container where enable_HPA = true group by alameda_scaler_name, alameda_scaler_namespace limit 1",
                "rawQuery": true,
                "refId": "A",
                "resultFormat": "table",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              }
            ],
            "title": "Managed Controllers with HPA ScalingTool per Selected AlamedaScaler",
            "transform": "table",
            "transparent": false,
            "type": "table"
          },
          {
            "collapsed": false,
            "gridPos": {
              "h": 1,
              "w": 24,
              "x": 0,
              "y": 6
            },
            "id": 17,
            "panels": [],
            "title": "Controller Resource Usage and Recommendation",
            "type": "row"
          },
          {
            "cacheTimeout": null,
            "colorBackground": false,
            "colorValue": false,
            "colors": [
              "#299c46",
              "rgba(237, 129, 40, 0.89)",
              "#d44a3a"
            ],
            "datasource": "InfluxDB",
            "format": "none",
            "gauge": {
              "maxValue": 100,
              "minValue": 0,
              "show": false,
              "thresholdLabels": false,
              "thresholdMarkers": true
            },
            "gridPos": {
              "h": 3,
              "w": 4,
              "x": 0,
              "y": 7
            },
            "id": 15,
            "interval": null,
            "links": [],
            "mappingType": 1,
            "mappingTypes": [
              {
                "name": "value to text",
                "value": 1
              },
              {
                "name": "range to text",
                "value": 2
              }
            ],
            "maxDataPoints": 100,
            "nullPointMode": "connected",
            "nullText": null,
            "postfix": "",
            "postfixFontSize": "50%",
            "prefix": "",
            "prefixFontSize": "50%",
            "rangeMaps": [
              {
                "from": "null",
                "text": "N/A",
                "to": "null"
              }
            ],
            "sparkline": {
              "fillColor": "rgba(31, 118, 189, 0.18)",
              "full": false,
              "lineColor": "rgb(31, 120, 193)",
              "show": false
            },
            "tableColumn": "desired replicas",
            "targets": [
              {
                "expr": "",
                "format": "time_series",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "intervalFactor": 1,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select desired_replicas as \"desired replicas\" from alameda_recommendation..controller where type = 'CRT_Primitive' and namespace = '$ns' and \"name\" = '$controller' order by time desc limit 1",
                "rawQuery": true,
                "refId": "A",
                "resultFormat": "table",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              }
            ],
            "thresholds": "",
            "title": "Desired replica",
            "type": "singlestat",
            "valueFontSize": "80%",
            "valueMaps": [
              {
                "op": "=",
                "text": "N/A",
                "value": "null"
              }
            ],
            "valueName": "avg"
          },
          {
            "cacheTimeout": null,
            "colorBackground": false,
            "colorValue": false,
            "colors": [
              "#299c46",
              "rgba(237, 129, 40, 0.89)",
              "#d44a3a"
            ],
            "datasource": "Prometheus",
            "format": "none",
            "gauge": {
              "maxValue": 100,
              "minValue": 0,
              "show": false,
              "thresholdLabels": false,
              "thresholdMarkers": true
            },
            "gridPos": {
              "h": 3,
              "w": 4,
              "x": 4,
              "y": 7
            },
            "hideTimeOverride": true,
            "id": 14,
            "interval": null,
            "links": [],
            "mappingType": 1,
            "mappingTypes": [
              {
                "name": "value to text",
                "value": 1
              },
              {
                "name": "range to text",
                "value": 2
              }
            ],
            "maxDataPoints": 100,
            "nullPointMode": "connected",
            "nullText": null,
            "postfix": "",
            "postfixFontSize": "50%",
            "prefix": "",
            "prefixFontSize": "50%",
            "rangeMaps": [
              {
                "from": "null",
                "text": "N/A",
                "to": "null"
              }
            ],
            "sparkline": {
              "fillColor": "rgba(31, 118, 189, 0.18)",
              "full": false,
              "lineColor": "rgb(31, 120, 193)",
              "show": false
            },
            "tableColumn": "current replicas",
            "targets": [
              {
                "expr": "sum(kube_replicationcontroller_spec_replicas{namespace = \"$ns\", replicationcontroller=~\"$controller.*\" }) or 1-absent(sum(kube_replicationcontroller_spec_replicas{namespace = \"$ns\", replicationcontroller=~\"$controller.*\" }))\n\n+ \n\nsum(kube_replicaset_spec_replicas{namespace = \"$ns\", replicaset=~\"$controller.*\" }) or 1-absent(sum(kube_replicaset_spec_replicas{namespace = \"$ns\", replicaset=~\"$controller.*\" }))",
                "format": "time_series",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "intervalFactor": 1,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select current_replicas as \"current replicas\" from alameda_recommendation..controller where namespace = '$ns' and \"name\" = '$controller' order by time desc limit 1",
                "rawQuery": true,
                "refId": "A",
                "resultFormat": "table",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              }
            ],
            "thresholds": "",
            "timeFrom": "5m",
            "timeShift": null,
            "title": "Current replica",
            "type": "singlestat",
            "valueFontSize": "80%",
            "valueMaps": [
              {
                "op": "=",
                "text": "N/A",
                "value": "null"
              }
            ],
            "valueName": "current"
          },
          {
            "cacheTimeout": null,
            "colorBackground": false,
            "colorValue": false,
            "colors": [
              "#299c46",
              "rgba(237, 129, 40, 0.89)",
              "#d44a3a"
            ],
            "datasource": "Prometheus",
            "format": "none",
            "gauge": {
              "maxValue": 100,
              "minValue": 0,
              "show": false,
              "thresholdLabels": false,
              "thresholdMarkers": true
            },
            "gridPos": {
              "h": 3,
              "w": 4,
              "x": 8,
              "y": 7
            },
            "hideTimeOverride": true,
            "id": 18,
            "interval": null,
            "links": [],
            "mappingType": 1,
            "mappingTypes": [
              {
                "name": "value to text",
                "value": 1
              },
              {
                "name": "range to text",
                "value": 2
              }
            ],
            "maxDataPoints": 100,
            "nullPointMode": "connected",
            "nullText": null,
            "postfix": "",
            "postfixFontSize": "50%",
            "prefix": "",
            "prefixFontSize": "50%",
            "rangeMaps": [
              {
                "from": "null",
                "text": "N/A",
                "to": "null"
              }
            ],
            "sparkline": {
              "fillColor": "rgba(31, 118, 189, 0.18)",
              "full": false,
              "lineColor": "rgb(31, 120, 193)",
              "show": false
            },
            "tableColumn": "current_cpu_limits",
            "targets": [
              {
                "expr": "1000 * sum(sum(kube_pod_container_resource_limits_cpu_cores{namespace=\"$ns\", pod=~\"$controller.*\"}) by (namespace, pod) * sum(kube_pod_status_phase{phase=\"Running\", namespace=\"$ns\", pod=~\"$controller.*\"}) by (namespace, pod))",
                "format": "time_series",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "intervalFactor": 1,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select current_cpu_limits from alameda_recommendation..controller where namespace = '$ns' and \"name\" = '$controller' order by time desc limit 1\n\nsum(label_replace(\nsum(avg_over_time(kube_pod_container_resource_limits_cpu_cores{container!=\"\",container!=\"POD\",node=\"$node\"}[10m])) by (pod), \n\"pod_name\",\"$1\",\"pod\",\"(.+)\")\nor up * 0\n) by (pod_name)",
                "rawQuery": true,
                "refId": "A",
                "resultFormat": "table",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              }
            ],
            "thresholds": "",
            "timeFrom": "5m",
            "title": "Total CPU limit (milicore)",
            "type": "singlestat",
            "valueFontSize": "80%",
            "valueMaps": [
              {
                "op": "=",
                "text": "N/A",
                "value": "null"
              }
            ],
            "valueName": "current"
          },
          {
            "cacheTimeout": null,
            "colorBackground": false,
            "colorValue": false,
            "colors": [
              "#299c46",
              "rgba(237, 129, 40, 0.89)",
              "#d44a3a"
            ],
            "datasource": "Prometheus",
            "format": "none",
            "gauge": {
              "maxValue": 100,
              "minValue": 0,
              "show": false,
              "thresholdLabels": false,
              "thresholdMarkers": true
            },
            "gridPos": {
              "h": 3,
              "w": 4,
              "x": 12,
              "y": 7
            },
            "hideTimeOverride": true,
            "id": 19,
            "interval": null,
            "links": [],
            "mappingType": 1,
            "mappingTypes": [
              {
                "name": "value to text",
                "value": 1
              },
              {
                "name": "range to text",
                "value": 2
              }
            ],
            "maxDataPoints": 100,
            "nullPointMode": "connected",
            "nullText": null,
            "postfix": "",
            "postfixFontSize": "50%",
            "prefix": "",
            "prefixFontSize": "50%",
            "rangeMaps": [
              {
                "from": "null",
                "text": "N/A",
                "to": "null"
              }
            ],
            "sparkline": {
              "fillColor": "rgba(31, 118, 189, 0.18)",
              "full": false,
              "lineColor": "rgb(31, 120, 193)",
              "show": false
            },
            "tableColumn": "current_cpu_requests",
            "targets": [
              {
                "expr": "1000 * sum(sum(kube_pod_container_resource_requests_cpu_cores{namespace=\"$ns\", pod=~\"$controller.*\"}) by (namespace, pod) * sum(kube_pod_status_phase{phase=\"Running\", namespace=\"$ns\", pod=~\"$controller.*\"}) by (namespace, pod))",
                "format": "time_series",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "intervalFactor": 1,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "1000 * sum(kube_pod_container_resource_requests_cpu_cores{namespace=\"$ns\", pod=~\"$controller.*\"})",
                "rawQuery": true,
                "refId": "A",
                "resultFormat": "table",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              }
            ],
            "thresholds": "",
            "timeFrom": "5m",
            "title": "Total CPU request (milicore)",
            "type": "singlestat",
            "valueFontSize": "80%",
            "valueMaps": [
              {
                "op": "=",
                "text": "N/A",
                "value": "null"
              }
            ],
            "valueName": "current"
          },
          {
            "cacheTimeout": null,
            "colorBackground": false,
            "colorValue": false,
            "colors": [
              "#299c46",
              "rgba(237, 129, 40, 0.89)",
              "#d44a3a"
            ],
            "datasource": "Prometheus",
            "format": "bytes",
            "gauge": {
              "maxValue": 100,
              "minValue": 0,
              "show": false,
              "thresholdLabels": false,
              "thresholdMarkers": true
            },
            "gridPos": {
              "h": 3,
              "w": 4,
              "x": 16,
              "y": 7
            },
            "hideTimeOverride": true,
            "id": 20,
            "interval": null,
            "links": [],
            "mappingType": 1,
            "mappingTypes": [
              {
                "name": "value to text",
                "value": 1
              },
              {
                "name": "range to text",
                "value": 2
              }
            ],
            "maxDataPoints": 100,
            "nullPointMode": "connected",
            "nullText": null,
            "postfix": "",
            "postfixFontSize": "50%",
            "prefix": "",
            "prefixFontSize": "50%",
            "rangeMaps": [
              {
                "from": "null",
                "text": "N/A",
                "to": "null"
              }
            ],
            "sparkline": {
              "fillColor": "rgba(31, 118, 189, 0.18)",
              "full": false,
              "lineColor": "rgb(31, 120, 193)",
              "show": false
            },
            "tableColumn": "current_mem_limits",
            "targets": [
              {
                "expr": "sum(sum(kube_pod_container_resource_limits_memory_bytes{namespace=\"$ns\", pod=~\"$controller.*\"}) by (namespace, pod) * sum(kube_pod_status_phase{phase=\"Running\", namespace=\"$ns\", pod=~\"$controller.*\"}) by (namespace, pod))",
                "format": "time_series",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "intervalFactor": 1,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select current_mem_limits from alameda_recommendation..controller where namespace = '$ns' and \"name\" = '$controller' order by time desc limit 1",
                "rawQuery": true,
                "refId": "A",
                "resultFormat": "table",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              }
            ],
            "thresholds": "",
            "timeFrom": "5m",
            "title": "Total memory limit",
            "type": "singlestat",
            "valueFontSize": "80%",
            "valueMaps": [
              {
                "op": "=",
                "text": "N/A",
                "value": "null"
              }
            ],
            "valueName": "current"
          },
          {
            "cacheTimeout": null,
            "colorBackground": false,
            "colorValue": false,
            "colors": [
              "#299c46",
              "rgba(237, 129, 40, 0.89)",
              "#d44a3a"
            ],
            "datasource": "Prometheus",
            "format": "bytes",
            "gauge": {
              "maxValue": 100,
              "minValue": 0,
              "show": false,
              "thresholdLabels": false,
              "thresholdMarkers": true
            },
            "gridPos": {
              "h": 3,
              "w": 4,
              "x": 20,
              "y": 7
            },
            "hideTimeOverride": true,
            "id": 21,
            "interval": null,
            "links": [],
            "mappingType": 1,
            "mappingTypes": [
              {
                "name": "value to text",
                "value": 1
              },
              {
                "name": "range to text",
                "value": 2
              }
            ],
            "maxDataPoints": 100,
            "nullPointMode": "connected",
            "nullText": null,
            "postfix": "",
            "postfixFontSize": "50%",
            "prefix": "",
            "prefixFontSize": "50%",
            "rangeMaps": [
              {
                "from": "null",
                "text": "N/A",
                "to": "null"
              }
            ],
            "sparkline": {
              "fillColor": "rgba(31, 118, 189, 0.18)",
              "full": false,
              "lineColor": "rgb(31, 120, 193)",
              "show": false
            },
            "tableColumn": "current_mem_requests",
            "targets": [
              {
                "expr": "sum(sum(kube_pod_container_resource_requests_memory_bytes{namespace=\"$ns\", pod=~\"$controller.*\"}) by (namespace, pod) * sum(kube_pod_status_phase{phase=\"Running\", namespace=\"$ns\", pod=~\"$controller.*\"}) by (namespace, pod))",
                "format": "time_series",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "intervalFactor": 1,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select current_mem_requests from alameda_recommendation..controller where namespace = '$ns' and \"name\" = '$controller' order by time desc limit 1",
                "rawQuery": true,
                "refId": "A",
                "resultFormat": "table",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              }
            ],
            "thresholds": "",
            "timeFrom": "5m",
            "title": "Total memory request",
            "type": "singlestat",
            "valueFontSize": "80%",
            "valueMaps": [
              {
                "op": "=",
                "text": "N/A",
                "value": "null"
              }
            ],
            "valueName": "current"
          },
          {
            "aliasColors": {},
            "bars": false,
            "dashLength": 10,
            "dashes": false,
            "datasource": "-- Mixed --",
            "fill": 0,
            "gridPos": {
              "h": 6,
              "w": 24,
              "x": 0,
              "y": 10
            },
            "height": "",
            "id": 9,
            "interval": ">30s",
            "legend": {
              "avg": false,
              "current": false,
              "hideEmpty": false,
              "hideZero": false,
              "max": false,
              "min": false,
              "show": true,
              "total": false,
              "values": false
            },
            "lines": true,
            "linewidth": 2,
            "links": [],
            "nullPointMode": "null",
            "percentage": false,
            "pointradius": 5,
            "points": false,
            "renderer": "flot",
            "seriesOverrides": [
              {
                "alias": "Observation : CPU usage",
                "color": "#5195ce"
              },
              {
                "alias": "Observation : current CPU limit",
                "color": "#f2c96d"
              },
              {
                "alias": "Observation : current CPU request",
                "color": "#7eb26d"
              },
              {
                "alias": "Recommendation: desired CPU limit",
                "color": "#f2c96d",
                "steppedLine": true
              }
            ],
            "spaceLength": 10,
            "stack": false,
            "steppedLine": false,
            "targets": [
              {
                "datasource": "Prometheus",
                "expr": "1000 * sum(max_over_time(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=\"$ns\", pod_name=~\"$pod\", container_name=~\"$container\", container_name!=\"\"}[30s]))",
                "format": "time_series",
                "hide": false,
                "instant": false,
                "intervalFactor": 1,
                "legendFormat": "Observation : CPU usage",
                "refId": "C"
              },
              {
                "alias": "Observation : current CPU limit",
                "datasource": "InfluxDB",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "hide": true,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select current_cpu_limits from \"alameda_recommendation\"..\"controller\" where type = 'CRT_Primitive' and \"name\" = '$controller' and \"namespace\" = '$ns'  AND $timeFilter",
                "rawQuery": true,
                "refId": "K",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              },
              {
                "alias": "Observation : current CPU request",
                "datasource": "InfluxDB",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "hide": true,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select current_cpu_requests  from \"alameda_recommendation\"..\"controller\" where type = 'CRT_Primitive' and \"name\" = '$controller' and \"namespace\" = '$ns'  AND $timeFilter",
                "rawQuery": true,
                "refId": "L",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              },
              {
                "alias": "Recommendation: desired CPU limit",
                "datasource": "InfluxDB",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "hide": false,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select desired_cpu_limits from \"alameda_recommendation\"..\"controller\" where type = 'CRT_Primitive' and \"name\" = '$controller' and \"namespace\" = '$ns'  AND $timeFilter",
                "rawQuery": true,
                "refId": "J",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              },
              {
                "alias": "Recommendation: desired replica",
                "datasource": "InfluxDB",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "hide": true,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select desired_replicas from \"alameda_recommendation\"..\"controller\" where type = 'CRT_Primitive' and \"name\" = '$controller' and \"namespace\" = '$ns'  AND $timeFilter",
                "rawQuery": true,
                "refId": "M",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              },
              {
                "alias": "Observation : current replica",
                "datasource": "InfluxDB",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "hide": true,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select current_replicas from \"alameda_recommendation\"..\"controller\" where type = 'CRT_Primitive' and \"name\" = '$controller' and \"namespace\" = '$ns'  AND $timeFilter",
                "rawQuery": true,
                "refId": "N",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              }
            ],
            "thresholds": [],
            "timeFrom": null,
            "timeRegions": [],
            "timeShift": null,
            "title": "Resource Object CPU Usage(milicore) vs Replica Recommendation",
            "tooltip": {
              "shared": true,
              "sort": 0,
              "value_type": "individual"
            },
            "type": "graph",
            "xaxis": {
              "buckets": null,
              "mode": "time",
              "name": null,
              "show": true,
              "values": []
            },
            "yaxes": [
              {
                "decimals": 0,
                "format": "none",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": true
              },
              {
                "decimals": 0,
                "format": "none",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": true
              }
            ],
            "yaxis": {
              "align": false,
              "alignLevel": null
            }
          },
          {
            "aliasColors": {},
            "bars": false,
            "dashLength": 10,
            "dashes": false,
            "datasource": "-- Mixed --",
            "fill": 0,
            "gridPos": {
              "h": 6,
              "w": 24,
              "x": 0,
              "y": 16
            },
            "height": "",
            "id": 10,
            "interval": ">30s",
            "legend": {
              "avg": false,
              "current": false,
              "hideEmpty": false,
              "hideZero": false,
              "max": false,
              "min": false,
              "show": true,
              "total": false,
              "values": false
            },
            "lines": true,
            "linewidth": 2,
            "links": [],
            "nullPointMode": "null",
            "percentage": false,
            "pointradius": 5,
            "points": false,
            "renderer": "flot",
            "seriesOverrides": [
              {
                "alias": "Observation : memory usage",
                "color": "#5195ce"
              },
              {
                "alias": "Observation : current memory limit",
                "color": "#f2c96d",
                "steppedLine": true
              },
              {
                "alias": "Observation : current memory request",
                "color": "#7eb26d",
                "steppedLine": true
              },
              {
                "alias": "Recommendation : desired memory limit",
                "color": "#f2c96d",
                "steppedLine": true
              }
            ],
            "spaceLength": 10,
            "stack": false,
            "steppedLine": false,
            "targets": [
              {
                "datasource": "Prometheus",
                "expr": "sum(max_over_time(container_memory_usage_bytes{namespace=\"$ns\", pod_name=~\"$pod\", container_name=~\"$container\", container_name!=\"\"}[30s]))",
                "format": "time_series",
                "hide": false,
                "instant": false,
                "intervalFactor": 1,
                "legendFormat": "Observation : memory usage",
                "refId": "C"
              },
              {
                "alias": "Observation : current memory limit",
                "datasource": "InfluxDB",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "hide": true,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select current_mem_limits from \"alameda_recommendation\"..\"controller\" where type = 'CRT_Primitive' and \"name\" = '$controller' and \"namespace\" = '$ns'  AND $timeFilter",
                "rawQuery": true,
                "refId": "J",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              },
              {
                "alias": "Observation : current memory request",
                "datasource": "InfluxDB",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "hide": true,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select current_mem_requests from \"alameda_recommendation\"..\"controller\" where type = 'CRT_Primitive' and \"name\" = '$controller' and \"namespace\" = '$ns'  AND $timeFilter",
                "rawQuery": true,
                "refId": "A",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              },
              {
                "alias": "Recommendation : desired memory limit",
                "datasource": "InfluxDB",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select desired_mem_limits from \"alameda_recommendation\"..\"controller\" where \"name\" = '$controller' and \"namespace\" = '$ns'  AND $timeFilter",
                "rawQuery": true,
                "refId": "B",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              },
              {
                "alias": "Observation : current replica",
                "datasource": "InfluxDB",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "hide": true,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select current_replicas from \"alameda_recommendation\"..\"controller\" where type = 'CRT_Primitive' and \"name\" = '$controller' and \"namespace\" = '$ns'  AND $timeFilter",
                "rawQuery": true,
                "refId": "D",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              },
              {
                "alias": "Recommendation : desired replica",
                "datasource": "InfluxDB",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "hide": true,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select desired_replicas from \"alameda_recommendation\"..\"controller\" where type = 'CRT_Primitive' and \"name\" = '$controller' and \"namespace\" = '$ns'  AND $timeFilter",
                "rawQuery": true,
                "refId": "E",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              }
            ],
            "thresholds": [],
            "timeFrom": null,
            "timeRegions": [],
            "timeShift": null,
            "title": "Resource Object Memory vs Replica Recommendation",
            "tooltip": {
              "shared": true,
              "sort": 0,
              "value_type": "individual"
            },
            "type": "graph",
            "xaxis": {
              "buckets": null,
              "mode": "time",
              "name": null,
              "show": true,
              "values": []
            },
            "yaxes": [
              {
                "decimals": null,
                "format": "bytes",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": true
              },
              {
                "decimals": 0,
                "format": "none",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": true
              }
            ],
            "yaxis": {
              "align": false,
              "alignLevel": null
            }
          }
        ],
        "refresh": "30s",
        "schemaVersion": 16,
        "style": "dark",
        "tags": [],
        "templating": {
          "list": [
            {
              "allValue": null,
              "current": {
                "text": "webapp",
                "value": "webapp"
              },
              "datasource": "InfluxDB",
              "definition": "select alameda_scaler_namespace,enable_HPA from alameda_cluster_status..container where enable_HPA= true group by \"alameda_scaler_namespace\" order by time desc limit 1",
              "hide": 0,
              "includeAll": false,
              "label": "Namespace",
              "multi": false,
              "name": "ns",
              "options": [],
              "query": "select alameda_scaler_namespace,enable_HPA from alameda_cluster_status..container where enable_HPA= true group by \"alameda_scaler_namespace\" order by time desc limit 1",
              "refresh": 2,
              "regex": "",
              "skipUrlSync": false,
              "sort": 0,
              "tagValuesQuery": "",
              "tags": [],
              "tagsQuery": "",
              "type": "query",
              "useTags": false
            },
            {
              "allValue": null,
              "current": {
                "text": "nginx-app",
                "value": "nginx-app"
              },
              "datasource": "InfluxDB",
              "definition": "select alameda_scaler_name,enable_HPA from alameda_cluster_status..container where \"alameda_scaler_namespace\" = '$ns' and enable_HPA= true group by \"alameda_scaler_namespace\", \"alameda_scaler_name\" order by time desc limit 1",
              "hide": 0,
              "includeAll": false,
              "label": "AlamedaScaler",
              "multi": false,
              "name": "scaler",
              "options": [],
              "query": "select alameda_scaler_name,enable_HPA from alameda_cluster_status..container where \"alameda_scaler_namespace\" = '$ns' and enable_HPA= true group by \"alameda_scaler_namespace\", \"alameda_scaler_name\" order by time desc limit 1",
              "refresh": 2,
              "regex": "",
              "skipUrlSync": false,
              "sort": 0,
              "tagValuesQuery": "",
              "tags": [],
              "tagsQuery": "",
              "type": "query",
              "useTags": false
            },
            {
              "allValue": null,
              "current": {
                "text": "nginx-deployment",
                "value": "nginx-deployment"
              },
              "datasource": "InfluxDB",
              "definition": "show tag values on alameda_cluster_status from controller with key=\"name\" where \"owner_namespace\" = '$ns' and \"owner_name\" = '$scaler'",
              "hide": 0,
              "includeAll": false,
              "label": "controller",
              "multi": false,
              "name": "controller",
              "options": [],
              "query": "show tag values on alameda_cluster_status from controller with key=\"name\" where \"owner_namespace\" = '$ns' and \"owner_name\" = '$scaler'",
              "refresh": 2,
              "regex": "",
              "skipUrlSync": false,
              "sort": 0,
              "tagValuesQuery": "",
              "tags": [],
              "tagsQuery": "",
              "type": "query",
              "useTags": false
            },
            {
              "allValue": null,
              "current": {
                "text": "All",
                "value": "$__all"
              },
              "datasource": "InfluxDB",
              "definition": "select pod_name,enable_HPA from alameda_cluster_status..container where \"alameda_scaler_namespace\" = '$ns' and \"alameda_scaler_name\" = '$scaler' and \"top_controller_name\" = '$controller' group by \"pod_name\" order by time desc limit 1",
              "hide": 2,
              "includeAll": true,
              "label": "pod",
              "multi": true,
              "name": "pod",
              "options": [],
              "query": "select pod_name,enable_HPA from alameda_cluster_status..container where \"alameda_scaler_namespace\" = '$ns' and \"alameda_scaler_name\" = '$scaler' and \"top_controller_name\" = '$controller' group by \"pod_name\" order by time desc limit 1",
              "refresh": 2,
              "regex": "",
              "skipUrlSync": false,
              "sort": 0,
              "tagValuesQuery": "",
              "tags": [],
              "tagsQuery": "",
              "type": "query",
              "useTags": false
            },
            {
              "allValue": null,
              "current": {
                "text": "All",
                "value": "$__all"
              },
              "datasource": "InfluxDB",
              "definition": "select \"name\",enable_HPA from alameda_cluster_status..container where \"alameda_scaler_namespace\" = '$ns' and \"alameda_scaler_name\" = '$scaler' and \"top_controller_name\" = '$controller' group by \"name\" order by time desc limit 1",
              "hide": 2,
              "includeAll": true,
              "label": "container",
              "multi": true,
              "name": "container",
              "options": [],
              "query": "select \"name\",enable_HPA from alameda_cluster_status..container where \"alameda_scaler_namespace\" = '$ns' and \"alameda_scaler_name\" = '$scaler' and \"top_controller_name\" = '$controller' group by \"name\" order by time desc limit 1",
              "refresh": 2,
              "regex": "",
              "skipUrlSync": false,
              "sort": 0,
              "tagValuesQuery": "",
              "tags": [],
              "tagsQuery": "",
              "type": "query",
              "useTags": false
            }
          ]
        },
        "time": {
          "from": "now-1h",
          "to": "now+20m"
        },
        "timepicker": {
          "refresh_intervals": [
            "5s",
            "10s",
            "30s",
            "1m",
            "5m",
            "15m",
            "30m",
            "1h",
            "2h",
            "1d"
          ],
          "time_options": [
            "5m",
            "15m",
            "1h",
            "6h",
            "12h",
            "24h",
            "2d",
            "7d",
            "30d"
          ]
        },
        "timezone": "",
        "title": "HPA Recommendation",
        "uid": "dddy5uda",
        "version": 7
      }

  prediction-1day.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": 21,
        "iteration": 1560761224017,
        "links": [],
        "panels": [
          {
            "collapsed": false,
            "gridPos": {
              "h": 1,
              "w": 24,
              "x": 0,
              "y": 0
            },
            "id": 12,
            "panels": [],
            "title": "Managed Objects",
            "type": "row"
          },
          {
            "columns": [],
            "datasource": "InfluxDB",
            "description": "",
            "fontSize": "100%",
            "gridPos": {
              "h": 6,
              "w": 18,
              "x": 0,
              "y": 1
            },
            "id": 5,
            "links": [],
            "pageSize": null,
            "scroll": true,
            "showHeader": true,
            "sort": {
              "col": 0,
              "desc": true
            },
            "styles": [
              {
                "alias": "Time",
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "pattern": "Time",
                "type": "hidden"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "is_alameda",
                "thresholds": [],
                "type": "hidden",
                "unit": "decgbytes"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "name",
                "thresholds": [],
                "type": "hidden",
                "unit": "short"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "alameda_scaler_namespace",
                "thresholds": [],
                "type": "hidden",
                "unit": "short"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "alameda_scaler_name",
                "thresholds": [],
                "type": "hidden",
                "unit": "short"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "pod_name",
                "thresholds": [],
                "type": "hidden",
                "unit": "short"
              },
              {
                "alias": "AlamedaScaler Name",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "alameda scaler",
                "thresholds": [],
                "type": "string",
                "unit": "short"
              },
              {
                "alias": "Project (Namespace)",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "namespace",
                "thresholds": [],
                "type": "string",
                "unit": "short"
              },
              {
                "alias": "Pod Name",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "pod",
                "thresholds": [],
                "type": "string",
                "unit": "short"
              },
              {
                "alias": "Container Name",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "container",
                "thresholds": [],
                "type": "string",
                "unit": "short"
              },
              {
                "alias": "Node Name",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "node",
                "thresholds": [],
                "type": "number",
                "unit": "short"
              },
              {
                "alias": "Policy",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "policy",
                "thresholds": [],
                "type": "string",
                "unit": "short"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "decimals": 2,
                "pattern": "/.*/",
                "thresholds": [],
                "type": "number",
                "unit": "short"
              }
            ],
            "targets": [
              {
                "expr": "count(up{job=\"kubernetes-nodes\"})",
                "format": "table",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "intervalFactor": 1,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select \"name\" as \"container\", alameda_scaler_namespace as namespace, alameda_scaler_name as \"alameda scaler\", pod_name as pod, node_name as node, \"policy\", is_alameda from alameda_cluster_status..container group by \"alameda_scaler_namespace\", \"alameda_scaler_name\", \"pod_name\", \"name\" order by time desc limit 1",
                "rawQuery": true,
                "refId": "A",
                "resultFormat": "table",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              }
            ],
            "title": "Managed Containers",
            "transform": "table",
            "transparent": false,
            "type": "table"
          },
          {
            "columns": [],
            "datasource": "InfluxDB",
            "fontSize": "100%",
            "gridPos": {
              "h": 6,
              "w": 6,
              "x": 18,
              "y": 1
            },
            "id": 4,
            "links": [],
            "pageSize": null,
            "scroll": true,
            "showHeader": true,
            "sort": {
              "col": 4,
              "desc": true
            },
            "styles": [
              {
                "alias": "Time",
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "pattern": "Time",
                "type": "hidden"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "in_cluster",
                "thresholds": [],
                "type": "hidden",
                "unit": "short"
              },
              {
                "alias": "Memory Size",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "node_memory_bytes",
                "thresholds": [],
                "type": "number",
                "unit": "decbytes"
              },
              {
                "alias": "CPU Cores",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 0,
                "mappingType": 1,
                "pattern": "node_cpu_cores",
                "thresholds": [],
                "type": "number",
                "unit": "short"
              },
              {
                "alias": "Node Name",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "name",
                "thresholds": [],
                "type": "string",
                "unit": "short"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "decimals": 2,
                "pattern": "/.*/",
                "thresholds": [],
                "type": "number",
                "unit": "short"
              }
            ],
            "targets": [
              {
                "expr": "count(up{job=\"kubernetes-nodes\"})",
                "format": "table",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "intervalFactor": 1,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select * from alameda_cluster_status..node",
                "rawQuery": true,
                "refId": "A",
                "resultFormat": "table",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              }
            ],
            "title": "Managed Nodes",
            "transform": "table",
            "transparent": false,
            "type": "table"
          },
          {
            "collapsed": false,
            "gridPos": {
              "h": 1,
              "w": 24,
              "x": 0,
              "y": 7
            },
            "id": 7,
            "panels": [],
            "title": "Container Resource Usage and Recommendation",
            "type": "row"
          },
          {
            "aliasColors": {},
            "bars": false,
            "dashLength": 10,
            "dashes": false,
            "datasource": "-- Mixed --",
            "fill": 0,
            "gridPos": {
              "h": 7,
              "w": 24,
              "x": 0,
              "y": 8
            },
            "height": "",
            "id": 9,
            "interval": ">60m",
            "legend": {
              "avg": false,
              "current": false,
              "hideEmpty": false,
              "hideZero": false,
              "max": false,
              "min": false,
              "show": true,
              "total": false,
              "values": false
            },
            "lines": true,
            "linewidth": 2,
            "links": [],
            "nullPointMode": "null",
            "percentage": false,
            "pointradius": 5,
            "points": false,
            "renderer": "flot",
            "seriesOverrides": [
              {
                "alias": "Observation : CPU Usage",
                "color": "#5195ce"
              },
              {
                "alias": "Recommendation: CPU limit",
                "color": "#f2c96d",
                "steppedLine": true
              },
              {
                "alias": "Recommendation: CPU request",
                "color": "#7eb26d",
                "steppedLine": true
              },
              {
                "alias": "Prediction: CPU usage (in 1d)",
                "color": "#f9e2d2",
                "dashLength": 5,
                "dashes": true,
                "spaceLength": 4
              },
              {
                "alias": "Prediction: CPU usage upperbound (in 1d)",
                "color": "#fce2de",
                "fillBelowTo": "Prediction: CPU usage lowerbound (in 1d)",
                "hideTooltip": false,
                "legend": false,
                "lines": false
              },
              {
                "alias": "Prediction: CPU usage lowerbound (in 1d)",
                "color": "#f9e2d2",
                "hideTooltip": false,
                "legend": false,
                "lines": false
              },
              {
                "alias": "Prediction: CPU usage lowerbound (in 1d)",
                "lines": false
              }
            ],
            "spaceLength": 10,
            "stack": false,
            "steppedLine": false,
            "targets": [
              {
                "datasource": "Prometheus",
                "expr": "1000 * max_over_time(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=\"$ns\", pod_name=\"$pod\", container_name=\"$container\", container_name!=\"\"}[3600s])",
                "format": "time_series",
                "hide": false,
                "instant": false,
                "interval": "",
                "intervalFactor": 1,
                "legendFormat": "Observation : CPU Usage",
                "refId": "C"
              },
              {
                "alias": "Recommendation: CPU limit",
                "datasource": "InfluxDB",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "hide": true,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select resource_limit_cpu from \"alameda_recommendation\"..\"container\" where granularity = '3600' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'  AND $timeFilter",
                "rawQuery": true,
                "refId": "A",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              },
              {
                "alias": "Recommendation: CPU request",
                "datasource": "InfluxDB",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "hide": true,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select resource_request_cpu from \"alameda_recommendation\"..\"container\" where granularity = '3600' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'  AND $timeFilter",
                "rawQuery": true,
                "refId": "D",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              },
              {
                "alias": "Prediction: CPU usage (in 15m)",
                "datasource": "InfluxDB",
                "groupBy": [],
                "hide": true,
                "measurement": "node_prediction",
                "orderByTime": "ASC",
                "policy": "node_prediction",
                "query": "select value from \"alameda_prediction\"..\"container\" where kind = 'raw' and granularity = '30' and \"metric\" = 'cpu_usage_seconds_percentage' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'  AND $timeFilter",
                "rawQuery": true,
                "refId": "B",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    }
                  ]
                ],
                "tags": [
                  {
                    "key": "node",
                    "operator": "=",
                    "value": "ip-172-23-1-91.us-east-2.compute.internal"
                  },
                  {
                    "condition": "AND",
                    "key": "type",
                    "operator": "=",
                    "value": "cpu"
                  }
                ]
              },
              {
                "alias": "Prediction: CPU usage upperbound (in 15m)",
                "datasource": "InfluxDB",
                "groupBy": [],
                "hide": true,
                "measurement": "node_prediction",
                "orderByTime": "ASC",
                "policy": "node_prediction",
                "query": "select value from \"alameda_prediction\"..\"container\" where kind = 'upper_bound' and granularity = '30' and \"metric\" = 'cpu_usage_seconds_percentage' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'   AND time >= now()",
                "rawQuery": true,
                "refId": "F",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    }
                  ]
                ],
                "tags": [
                  {
                    "key": "node",
                    "operator": "=",
                    "value": "ip-172-23-1-91.us-east-2.compute.internal"
                  },
                  {
                    "condition": "AND",
                    "key": "type",
                    "operator": "=",
                    "value": "cpu"
                  }
                ]
              },
              {
                "alias": "Prediction: CPU usage lowerbound (in 15m)",
                "datasource": "InfluxDB",
                "groupBy": [],
                "hide": true,
                "measurement": "node_prediction",
                "orderByTime": "ASC",
                "policy": "node_prediction",
                "query": "select value from \"alameda_prediction\"..\"container\" where kind = 'lower_bound' and granularity = '30' and \"metric\" = 'cpu_usage_seconds_percentage' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'   AND time >= now()",
                "rawQuery": true,
                "refId": "G",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    }
                  ]
                ],
                "tags": [
                  {
                    "key": "node",
                    "operator": "=",
                    "value": "ip-172-23-1-91.us-east-2.compute.internal"
                  },
                  {
                    "condition": "AND",
                    "key": "type",
                    "operator": "=",
                    "value": "cpu"
                  }
                ]
              },
              {
                "alias": "Prediction: CPU usage (in 1d)",
                "datasource": "InfluxDB",
                "groupBy": [],
                "hide": false,
                "measurement": "node_prediction",
                "orderByTime": "ASC",
                "policy": "node_prediction",
                "query": "select value from \"alameda_prediction\"..\"container\" where kind = 'raw' and granularity = '3600' and \"metric\" = 'cpu_usage_seconds_percentage' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'  AND $timeFilter",
                "rawQuery": true,
                "refId": "E",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    }
                  ]
                ],
                "tags": [
                  {
                    "key": "node",
                    "operator": "=",
                    "value": "ip-172-23-1-91.us-east-2.compute.internal"
                  },
                  {
                    "condition": "AND",
                    "key": "type",
                    "operator": "=",
                    "value": "cpu"
                  }
                ]
              },
              {
                "alias": "Prediction: CPU usage upperbound (in 1d)",
                "datasource": "InfluxDB",
                "groupBy": [],
                "hide": false,
                "measurement": "node_prediction",
                "orderByTime": "ASC",
                "policy": "node_prediction",
                "query": "select value from \"alameda_prediction\"..\"container\" where kind = 'upper_bound' and granularity = '3600' and \"metric\" = 'cpu_usage_seconds_percentage' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'   AND time >= now()",
                "rawQuery": true,
                "refId": "H",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    }
                  ]
                ],
                "tags": [
                  {
                    "key": "node",
                    "operator": "=",
                    "value": "ip-172-23-1-91.us-east-2.compute.internal"
                  },
                  {
                    "condition": "AND",
                    "key": "type",
                    "operator": "=",
                    "value": "cpu"
                  }
                ]
              },
              {
                "alias": "Prediction: CPU usage lowerbound (in 1d)",
                "datasource": "InfluxDB",
                "groupBy": [],
                "hide": false,
                "measurement": "node_prediction",
                "orderByTime": "ASC",
                "policy": "node_prediction",
                "query": "select value from \"alameda_prediction\"..\"container\" where kind = 'lower_bound' and granularity = '3600' and \"metric\" = 'cpu_usage_seconds_percentage' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'   AND time >= now()",
                "rawQuery": true,
                "refId": "I",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    }
                  ]
                ],
                "tags": [
                  {
                    "key": "node",
                    "operator": "=",
                    "value": "ip-172-23-1-91.us-east-2.compute.internal"
                  },
                  {
                    "condition": "AND",
                    "key": "type",
                    "operator": "=",
                    "value": "cpu"
                  }
                ]
              }
            ],
            "thresholds": [],
            "timeFrom": null,
            "timeRegions": [],
            "timeShift": null,
            "title": "Container CPU: Observation, Prediction, and Recommendation (in CPU milicore)",
            "tooltip": {
              "shared": false,
              "sort": 0,
              "value_type": "individual"
            },
            "type": "graph",
            "xaxis": {
              "buckets": null,
              "mode": "time",
              "name": null,
              "show": true,
              "values": []
            },
            "yaxes": [
              {
                "decimals": 3,
                "format": "none",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": true
              },
              {
                "format": "decbytes",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": false
              }
            ],
            "yaxis": {
              "align": false,
              "alignLevel": null
            }
          },
          {
            "aliasColors": {},
            "bars": false,
            "dashLength": 10,
            "dashes": false,
            "datasource": "-- Mixed --",
            "fill": 0,
            "gridPos": {
              "h": 7,
              "w": 24,
              "x": 0,
              "y": 15
            },
            "height": "",
            "id": 10,
            "interval": ">60m",
            "legend": {
              "avg": false,
              "current": false,
              "hideEmpty": false,
              "hideZero": false,
              "max": false,
              "min": false,
              "show": true,
              "total": false,
              "values": false
            },
            "lines": true,
            "linewidth": 2,
            "links": [],
            "nullPointMode": "null",
            "percentage": false,
            "pointradius": 5,
            "points": false,
            "renderer": "flot",
            "seriesOverrides": [
              {
                "alias": "Observation: memory usage",
                "color": "#5195ce"
              },
              {
                "alias": "Recommendation: memory limit",
                "color": "#f2c96d",
                "steppedLine": true
              },
              {
                "alias": "Recommendation: memory request",
                "color": "#7eb26d",
                "steppedLine": true
              },
              {
                "alias": "Prediction: memory usage (1d)",
                "color": "#f9e2d2",
                "dashLength": 5,
                "dashes": true,
                "spaceLength": 4
              },
              {
                "alias": "Prediction: memory usage upperbound (1d)",
                "color": "#f9e2d2",
                "fillBelowTo": "Prediction: memory usage lowerbound (1d)",
                "lines": false
              },
              {
                "alias": "Prediction: memory usage lowerbound (1d)",
                "lines": false
              },
              {
                "alias": "Prediction: memory usage lowerbound (1d)",
                "lines": false
              }
            ],
            "spaceLength": 10,
            "stack": false,
            "steppedLine": false,
            "targets": [
              {
                "datasource": "Prometheus",
                "expr": "max_over_time(container_memory_usage_bytes{namespace=\"$ns\", pod_name=\"$pod\", container_name=\"$container\", container_name!=\"\"}[3600s])",
                "format": "time_series",
                "hide": false,
                "instant": false,
                "interval": "",
                "intervalFactor": 1,
                "legendFormat": "Observation: memory usage",
                "refId": "C"
              },
              {
                "alias": "Recommendation: memory limit",
                "datasource": "InfluxDB",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "hide": true,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select resource_limit_memory from \"alameda_recommendation\"..\"container\" where granularity = '3600' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'  AND $timeFilter",
                "rawQuery": true,
                "refId": "B",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              },
              {
                "alias": "Recommendation: memory request",
                "datasource": "InfluxDB",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "hide": true,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select resource_request_memory from \"alameda_recommendation\"..\"container\" where granularity = '3600' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'  AND $timeFilter",
                "rawQuery": true,
                "refId": "D",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              },
              {
                "alias": "Prediction: memory usage (in 15m)",
                "datasource": "InfluxDB",
                "groupBy": [],
                "hide": true,
                "measurement": "node_prediction",
                "orderByTime": "ASC",
                "policy": "node_prediction",
                "query": "select value from \"alameda_prediction\"..\"container\" where kind = 'raw' and granularity = '30' and \"metric\" = 'memory_usage_bytes' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'  AND $timeFilter",
                "rawQuery": true,
                "refId": "A",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    }
                  ]
                ],
                "tags": [
                  {
                    "key": "node",
                    "operator": "=",
                    "value": "ip-172-23-1-91.us-east-2.compute.internal"
                  },
                  {
                    "condition": "AND",
                    "key": "type",
                    "operator": "=",
                    "value": "cpu"
                  }
                ]
              },
              {
                "alias": "Prediction: memory usage upperbound (in 15m)",
                "datasource": "InfluxDB",
                "groupBy": [],
                "hide": true,
                "measurement": "node_prediction",
                "orderByTime": "ASC",
                "policy": "node_prediction",
                "query": "select value from \"alameda_prediction\"..\"container\" where kind = 'upper_bound' and granularity = '30' and \"metric\" = 'memory_usage_bytes' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'   AND time >= now()",
                "rawQuery": true,
                "refId": "E",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    }
                  ]
                ],
                "tags": [
                  {
                    "key": "node",
                    "operator": "=",
                    "value": "ip-172-23-1-91.us-east-2.compute.internal"
                  },
                  {
                    "condition": "AND",
                    "key": "type",
                    "operator": "=",
                    "value": "cpu"
                  }
                ]
              },
              {
                "alias": "Prediction: memory usage lowerbound (in 15m)",
                "datasource": "InfluxDB",
                "groupBy": [],
                "hide": true,
                "measurement": "node_prediction",
                "orderByTime": "ASC",
                "policy": "node_prediction",
                "query": "select value from \"alameda_prediction\"..\"container\" where kind = 'lower_bound' and granularity = '30' and \"metric\" = 'memory_usage_bytes' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'   AND time >= now()",
                "rawQuery": true,
                "refId": "F",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    }
                  ]
                ],
                "tags": [
                  {
                    "key": "node",
                    "operator": "=",
                    "value": "ip-172-23-1-91.us-east-2.compute.internal"
                  },
                  {
                    "condition": "AND",
                    "key": "type",
                    "operator": "=",
                    "value": "cpu"
                  }
                ]
              },
              {
                "alias": "Prediction: memory usage (1d)",
                "datasource": "InfluxDB",
                "groupBy": [],
                "hide": false,
                "measurement": "node_prediction",
                "orderByTime": "ASC",
                "policy": "node_prediction",
                "query": "select value from \"alameda_prediction\"..\"container\" where kind = 'raw' and granularity = '3600' and \"metric\" = 'memory_usage_bytes' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'  AND $timeFilter",
                "rawQuery": true,
                "refId": "G",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    }
                  ]
                ],
                "tags": [
                  {
                    "key": "node",
                    "operator": "=",
                    "value": "ip-172-23-1-91.us-east-2.compute.internal"
                  },
                  {
                    "condition": "AND",
                    "key": "type",
                    "operator": "=",
                    "value": "cpu"
                  }
                ]
              },
              {
                "alias": "Prediction: memory usage upperbound (1d)",
                "datasource": "InfluxDB",
                "groupBy": [],
                "hide": false,
                "measurement": "node_prediction",
                "orderByTime": "ASC",
                "policy": "node_prediction",
                "query": "select value from \"alameda_prediction\"..\"container\" where kind = 'upper_bound' and granularity = '3600' and \"metric\" = 'memory_usage_bytes' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'   AND time >= now()",
                "rawQuery": true,
                "refId": "H",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    }
                  ]
                ],
                "tags": [
                  {
                    "key": "node",
                    "operator": "=",
                    "value": "ip-172-23-1-91.us-east-2.compute.internal"
                  },
                  {
                    "condition": "AND",
                    "key": "type",
                    "operator": "=",
                    "value": "cpu"
                  }
                ]
              },
              {
                "alias": "Prediction: memory usage lowerbound (1d)",
                "datasource": "InfluxDB",
                "groupBy": [],
                "hide": false,
                "measurement": "node_prediction",
                "orderByTime": "ASC",
                "policy": "node_prediction",
                "query": "select value from \"alameda_prediction\"..\"container\" where kind = 'lower_bound' and granularity = '3600' and \"metric\" = 'memory_usage_bytes' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'   AND time >= now()",
                "rawQuery": true,
                "refId": "I",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    }
                  ]
                ],
                "tags": [
                  {
                    "key": "node",
                    "operator": "=",
                    "value": "ip-172-23-1-91.us-east-2.compute.internal"
                  },
                  {
                    "condition": "AND",
                    "key": "type",
                    "operator": "=",
                    "value": "cpu"
                  }
                ]
              }
            ],
            "thresholds": [],
            "timeFrom": null,
            "timeRegions": [],
            "timeShift": null,
            "title": "Container Memory: Observation, Prediction, and Recommendation",
            "tooltip": {
              "shared": false,
              "sort": 0,
              "value_type": "individual"
            },
            "type": "graph",
            "xaxis": {
              "buckets": null,
              "mode": "time",
              "name": null,
              "show": true,
              "values": []
            },
            "yaxes": [
              {
                "decimals": null,
                "format": "bytes",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": true
              },
              {
                "format": "decbytes",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": false
              }
            ],
            "yaxis": {
              "align": false,
              "alignLevel": null
            }
          }
        ],
        "refresh": "5m",
        "schemaVersion": 16,
        "style": "dark",
        "tags": [],
        "templating": {
          "list": [
            {
              "allValue": null,
              "current": {
                "text": "webapp",
                "value": "webapp"
              },
              "datasource": "InfluxDB",
              "definition": "show tag values on alameda_cluster_status from container with key=\"alameda_scaler_namespace\"",
              "hide": 0,
              "includeAll": false,
              "label": "Namespace",
              "multi": false,
              "name": "ns",
              "options": [],
              "query": "show tag values on alameda_cluster_status from container with key=\"alameda_scaler_namespace\"",
              "refresh": 2,
              "regex": "",
              "skipUrlSync": false,
              "sort": 0,
              "tagValuesQuery": "",
              "tags": [],
              "tagsQuery": "",
              "type": "query",
              "useTags": false
            },
            {
              "allValue": null,
              "current": {
                "text": "nginx-app",
                "value": "nginx-app"
              },
              "datasource": "InfluxDB",
              "definition": "show tag values on alameda_cluster_status from container with key=\"alameda_scaler_name\" where \"alameda_scaler_namespace\" = '$ns'",
              "hide": 0,
              "includeAll": false,
              "label": "AlamedaScaler",
              "multi": false,
              "name": "scaler",
              "options": [],
              "query": "show tag values on alameda_cluster_status from container with key=\"alameda_scaler_name\" where \"alameda_scaler_namespace\" = '$ns'",
              "refresh": 2,
              "regex": "",
              "skipUrlSync": false,
              "sort": 0,
              "tagValuesQuery": "",
              "tags": [],
              "tagsQuery": "",
              "type": "query",
              "useTags": false
            },
            {
              "allValue": null,
              "current": {
                "text": "nginx-deployment-7bdddc58f9-fkz52",
                "value": "nginx-deployment-7bdddc58f9-fkz52"
              },
              "datasource": "InfluxDB",
              "definition": "show tag values on alameda_cluster_status from container with key=\"pod_name\" where \"alameda_scaler_namespace\" = '$ns' and \"alameda_scaler_name\" = '$scaler'",
              "hide": 0,
              "includeAll": false,
              "label": "pod",
              "multi": false,
              "name": "pod",
              "options": [],
              "query": "show tag values on alameda_cluster_status from container with key=\"pod_name\" where \"alameda_scaler_namespace\" = '$ns' and \"alameda_scaler_name\" = '$scaler'",
              "refresh": 2,
              "regex": "",
              "skipUrlSync": false,
              "sort": 0,
              "tagValuesQuery": "",
              "tags": [],
              "tagsQuery": "",
              "type": "query",
              "useTags": false
            },
            {
              "allValue": null,
              "current": {
                "text": "nginx",
                "value": "nginx"
              },
              "datasource": "InfluxDB",
              "definition": "show tag values on alameda_cluster_status from container with key=\"name\" where \"alameda_scaler_namespace\" = '$ns' and \"alameda_scaler_name\" = '$scaler' and \"pod_name\" = '$pod'",
              "hide": 0,
              "includeAll": false,
              "label": "container",
              "multi": false,
              "name": "container",
              "options": [],
              "query": "show tag values on alameda_cluster_status from container with key=\"name\" where \"alameda_scaler_namespace\" = '$ns' and \"alameda_scaler_name\" = '$scaler' and \"pod_name\" = '$pod'",
              "refresh": 2,
              "regex": "",
              "skipUrlSync": false,
              "sort": 0,
              "tagValuesQuery": "",
              "tags": [],
              "tagsQuery": "",
              "type": "query",
              "useTags": false
            }
          ]
        },
        "time": {
          "from": "now-5d",
          "to": "now+1d"
        },
        "timepicker": {
          "refresh_intervals": [
            "5s",
            "10s",
            "30s",
            "1m",
            "5m",
            "15m",
            "30m",
            "1h",
            "2h",
            "1d"
          ],
          "time_options": [
            "5m",
            "15m",
            "1h",
            "6h",
            "12h",
            "24h",
            "2d",
            "7d",
            "30d"
          ]
        },
        "timezone": "",
        "title": "Prediction  (1-day prediction window)",
        "uid": "56affda",
        "version": 1
      }

  vpa-recommendation.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": 13,
        "iteration": 1560761297688,
        "links": [],
        "panels": [
          {
            "collapsed": false,
            "gridPos": {
              "h": 1,
              "w": 24,
              "x": 0,
              "y": 0
            },
            "id": 12,
            "panels": [],
            "title": "Managed Objects",
            "type": "row"
          },
          {
            "columns": [],
            "datasource": "InfluxDB",
            "description": "",
            "fontSize": "100%",
            "gridPos": {
              "h": 6,
              "w": 18,
              "x": 0,
              "y": 1
            },
            "id": 5,
            "links": [],
            "pageSize": null,
            "scroll": true,
            "showHeader": true,
            "sort": {
              "col": 0,
              "desc": true
            },
            "styles": [
              {
                "alias": "Time",
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "pattern": "Time",
                "type": "hidden"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "is_alameda",
                "thresholds": [],
                "type": "hidden",
                "unit": "decgbytes"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "name",
                "thresholds": [],
                "type": "hidden",
                "unit": "short"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "alameda_scaler_namespace",
                "thresholds": [],
                "type": "hidden",
                "unit": "short"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "alameda_scaler_name",
                "thresholds": [],
                "type": "hidden",
                "unit": "short"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "pod_name",
                "thresholds": [],
                "type": "hidden",
                "unit": "short"
              },
              {
                "alias": "AlamedaScaler Name",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "alameda scaler",
                "thresholds": [],
                "type": "string",
                "unit": "short"
              },
              {
                "alias": "Project (Namespace)",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "namespace",
                "thresholds": [],
                "type": "string",
                "unit": "short"
              },
              {
                "alias": "Pod Name",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "pod",
                "thresholds": [],
                "type": "string",
                "unit": "short"
              },
              {
                "alias": "Container Name",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "container",
                "thresholds": [],
                "type": "string",
                "unit": "short"
              },
              {
                "alias": "Node Name",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "node",
                "thresholds": [],
                "type": "number",
                "unit": "short"
              },
              {
                "alias": "Policy",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "policy",
                "thresholds": [],
                "type": "string",
                "unit": "short"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "decimals": 2,
                "pattern": "/.*/",
                "thresholds": [],
                "type": "number",
                "unit": "short"
              }
            ],
            "targets": [
              {
                "expr": "count(up{job=\"kubernetes-nodes\"})",
                "format": "table",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "intervalFactor": 1,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select \"name\" as \"container\", alameda_scaler_namespace as namespace, alameda_scaler_name as \"alameda scaler\", pod_name as pod, node_name as node, \"policy\", is_alameda from alameda_cluster_status..container where enable_VPA= true group by \"alameda_scaler_namespace\", \"alameda_scaler_name\", \"pod_name\", \"name\" order by time desc limit 1",
                "rawQuery": true,
                "refId": "A",
                "resultFormat": "table",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              }
            ],
            "title": "Managed Containers by VPA scaling Tool",
            "transform": "table",
            "transparent": false,
            "type": "table"
          },
          {
            "columns": [],
            "datasource": "InfluxDB",
            "fontSize": "100%",
            "gridPos": {
              "h": 6,
              "w": 6,
              "x": 18,
              "y": 1
            },
            "id": 4,
            "links": [],
            "pageSize": null,
            "scroll": true,
            "showHeader": true,
            "sort": {
              "col": 4,
              "desc": true
            },
            "styles": [
              {
                "alias": "Time",
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "pattern": "Time",
                "type": "hidden"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "in_cluster",
                "thresholds": [],
                "type": "hidden",
                "unit": "short"
              },
              {
                "alias": "Memory Size",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "node_memory_bytes",
                "thresholds": [],
                "type": "number",
                "unit": "decbytes"
              },
              {
                "alias": "CPU Cores",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 0,
                "mappingType": 1,
                "pattern": "node_cpu_cores",
                "thresholds": [],
                "type": "number",
                "unit": "short"
              },
              {
                "alias": "Node Name",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "name",
                "thresholds": [],
                "type": "string",
                "unit": "short"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "decimals": 2,
                "pattern": "/.*/",
                "thresholds": [],
                "type": "number",
                "unit": "short"
              }
            ],
            "targets": [
              {
                "expr": "count(up{job=\"kubernetes-nodes\"})",
                "format": "table",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "intervalFactor": 1,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select * from alameda_cluster_status..node",
                "rawQuery": true,
                "refId": "A",
                "resultFormat": "table",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              }
            ],
            "title": "Managed Nodes",
            "transform": "table",
            "transparent": false,
            "type": "table"
          },
          {
            "collapsed": false,
            "gridPos": {
              "h": 1,
              "w": 24,
              "x": 0,
              "y": 7
            },
            "id": 7,
            "panels": [],
            "title": "Container Resource Usage and Recommendation",
            "type": "row"
          },
          {
            "aliasColors": {},
            "bars": false,
            "dashLength": 10,
            "dashes": false,
            "datasource": "-- Mixed --",
            "fill": 0,
            "gridPos": {
              "h": 7,
              "w": 24,
              "x": 0,
              "y": 8
            },
            "height": "",
            "id": 9,
            "interval": ">30s",
            "legend": {
              "avg": false,
              "current": false,
              "hideEmpty": false,
              "hideZero": false,
              "max": false,
              "min": false,
              "show": true,
              "total": false,
              "values": false
            },
            "lines": true,
            "linewidth": 2,
            "links": [],
            "nullPointMode": "null",
            "percentage": false,
            "pointradius": 5,
            "points": false,
            "renderer": "flot",
            "seriesOverrides": [
              {
                "alias": "Observation : CPU Usage",
                "color": "#5195ce"
              },
              {
                "alias": "Recommendation: CPU limit",
                "color": "#f2c96d",
                "steppedLine": true
              },
              {
                "alias": "Recommendation: CPU request",
                "color": "#7eb26d",
                "steppedLine": true
              },
              {
                "alias": "Prediction: CPU usage (in 15m)",
                "color": "#f9e2d2",
                "dashLength": 5,
                "dashes": true,
                "spaceLength": 4
              },
              {
                "alias": "Prediction: CPU usage upperbound (in 15m)",
                "color": "#f9e2d2",
                "fillBelowTo": "Prediction: CPU usage lowerbound (in 15m)",
                "hideTooltip": true,
                "legend": false,
                "lines": false
              },
              {
                "alias": "Prediction: CPU usage lowerbound (in 15m)",
                "color": "#f9e2d2",
                "hideTooltip": false,
                "legend": false,
                "lines": false
              },
              {
                "alias": "Prediction: CPU usage (in 1d)",
                "color": "#f29191",
                "dashLength": 5,
                "dashes": true,
                "spaceLength": 4
              },
              {
                "alias": "Prediction: CPU usage upperbound (in 1d)",
                "color": "#f29191",
                "dashLength": 5,
                "dashes": true,
                "spaceLength": 4
              },
              {
                "alias": "Prediction: CPU usage lowerbound (in 1d)",
                "color": "#f29191",
                "dashLength": 5,
                "dashes": true,
                "spaceLength": 4
              }
            ],
            "spaceLength": 10,
            "stack": false,
            "steppedLine": false,
            "targets": [
              {
                "datasource": "Prometheus",
                "expr": "1000 * max_over_time(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=\"$ns\", pod_name=\"$pod\", container_name=\"$container\", container_name!=\"\"}[30s])",
                "format": "time_series",
                "hide": false,
                "instant": false,
                "interval": "30s",
                "intervalFactor": 1,
                "legendFormat": "Observation : CPU Usage",
                "refId": "C"
              },
              {
                "alias": "Recommendation: CPU limit",
                "datasource": "InfluxDB",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "hide": false,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select resource_limit_cpu from \"alameda_recommendation\"..\"container\" where granularity = '30' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'  AND $timeFilter",
                "rawQuery": true,
                "refId": "A",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              },
              {
                "alias": "Recommendation: CPU request",
                "datasource": "InfluxDB",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "hide": false,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select resource_request_cpu from \"alameda_recommendation\"..\"container\" where granularity = '30' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'  AND $timeFilter",
                "rawQuery": true,
                "refId": "D",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              },
              {
                "alias": "Prediction: CPU usage (in 15m)",
                "datasource": "InfluxDB",
                "groupBy": [],
                "hide": false,
                "measurement": "node_prediction",
                "orderByTime": "ASC",
                "policy": "node_prediction",
                "query": "select value from \"alameda_prediction\"..\"container\" where kind = 'raw' and granularity = '30' and \"metric\" = 'cpu_usage_seconds_percentage' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'  AND $timeFilter",
                "rawQuery": true,
                "refId": "B",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    }
                  ]
                ],
                "tags": [
                  {
                    "key": "node",
                    "operator": "=",
                    "value": "ip-172-23-1-91.us-east-2.compute.internal"
                  },
                  {
                    "condition": "AND",
                    "key": "type",
                    "operator": "=",
                    "value": "cpu"
                  }
                ]
              },
              {
                "alias": "Prediction: CPU usage upperbound (in 15m)",
                "datasource": "InfluxDB",
                "groupBy": [],
                "hide": false,
                "measurement": "node_prediction",
                "orderByTime": "ASC",
                "policy": "node_prediction",
                "query": "select value from \"alameda_prediction\"..\"container\" where kind = 'upper_bound' and granularity = '30' and \"metric\" = 'cpu_usage_seconds_percentage' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'   AND time >= now()",
                "rawQuery": true,
                "refId": "F",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    }
                  ]
                ],
                "tags": [
                  {
                    "key": "node",
                    "operator": "=",
                    "value": "ip-172-23-1-91.us-east-2.compute.internal"
                  },
                  {
                    "condition": "AND",
                    "key": "type",
                    "operator": "=",
                    "value": "cpu"
                  }
                ]
              },
              {
                "alias": "Prediction: CPU usage lowerbound (in 15m)",
                "datasource": "InfluxDB",
                "groupBy": [],
                "hide": false,
                "measurement": "node_prediction",
                "orderByTime": "ASC",
                "policy": "node_prediction",
                "query": "select value from \"alameda_prediction\"..\"container\" where kind = 'lower_bound' and granularity = '30' and \"metric\" = 'cpu_usage_seconds_percentage' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'   AND time >= now()",
                "rawQuery": true,
                "refId": "G",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    }
                  ]
                ],
                "tags": [
                  {
                    "key": "node",
                    "operator": "=",
                    "value": "ip-172-23-1-91.us-east-2.compute.internal"
                  },
                  {
                    "condition": "AND",
                    "key": "type",
                    "operator": "=",
                    "value": "cpu"
                  }
                ]
              },
              {
                "alias": "Prediction: CPU usage (in 1d)",
                "datasource": "InfluxDB",
                "groupBy": [],
                "hide": true,
                "measurement": "node_prediction",
                "orderByTime": "ASC",
                "policy": "node_prediction",
                "query": "select value from \"alameda_prediction\"..\"container\" where kind = 'raw' and granularity = '3600' and \"metric\" = 'cpu_usage_seconds_percentage' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'  AND $timeFilter",
                "rawQuery": true,
                "refId": "E",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    }
                  ]
                ],
                "tags": [
                  {
                    "key": "node",
                    "operator": "=",
                    "value": "ip-172-23-1-91.us-east-2.compute.internal"
                  },
                  {
                    "condition": "AND",
                    "key": "type",
                    "operator": "=",
                    "value": "cpu"
                  }
                ]
              },
              {
                "alias": "Prediction: CPU usage upperbound (in 1d)",
                "datasource": "InfluxDB",
                "groupBy": [],
                "hide": true,
                "measurement": "node_prediction",
                "orderByTime": "ASC",
                "policy": "node_prediction",
                "query": "select value from \"alameda_prediction\"..\"container\" where kind = 'upper_bound' and granularity = '3600' and \"metric\" = 'cpu_usage_seconds_percentage' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'   AND time >= now()",
                "rawQuery": true,
                "refId": "H",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    }
                  ]
                ],
                "tags": [
                  {
                    "key": "node",
                    "operator": "=",
                    "value": "ip-172-23-1-91.us-east-2.compute.internal"
                  },
                  {
                    "condition": "AND",
                    "key": "type",
                    "operator": "=",
                    "value": "cpu"
                  }
                ]
              },
              {
                "alias": "Prediction: CPU usage lowerbound (in 1d)",
                "datasource": "InfluxDB",
                "groupBy": [],
                "hide": true,
                "measurement": "node_prediction",
                "orderByTime": "ASC",
                "policy": "node_prediction",
                "query": "select value from \"alameda_prediction\"..\"container\" where kind = 'lower_bound' and granularity = '3600' and \"metric\" = 'cpu_usage_seconds_percentage' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'   AND time >= now()",
                "rawQuery": true,
                "refId": "I",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    }
                  ]
                ],
                "tags": [
                  {
                    "key": "node",
                    "operator": "=",
                    "value": "ip-172-23-1-91.us-east-2.compute.internal"
                  },
                  {
                    "condition": "AND",
                    "key": "type",
                    "operator": "=",
                    "value": "cpu"
                  }
                ]
              }
            ],
            "thresholds": [],
            "timeFrom": null,
            "timeRegions": [],
            "timeShift": null,
            "title": "Container CPU: Observation, Prediction, and Recommendation (in CPU milicore)",
            "tooltip": {
              "shared": false,
              "sort": 0,
              "value_type": "individual"
            },
            "type": "graph",
            "xaxis": {
              "buckets": null,
              "mode": "time",
              "name": null,
              "show": true,
              "values": []
            },
            "yaxes": [
              {
                "decimals": 3,
                "format": "none",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": true
              },
              {
                "format": "decbytes",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": false
              }
            ],
            "yaxis": {
              "align": false,
              "alignLevel": null
            }
          },
          {
            "aliasColors": {},
            "bars": false,
            "dashLength": 10,
            "dashes": false,
            "datasource": "-- Mixed --",
            "fill": 0,
            "gridPos": {
              "h": 7,
              "w": 24,
              "x": 0,
              "y": 15
            },
            "height": "",
            "id": 10,
            "interval": ">30s",
            "legend": {
              "avg": false,
              "current": false,
              "hideEmpty": false,
              "hideZero": false,
              "max": false,
              "min": false,
              "show": true,
              "total": false,
              "values": false
            },
            "lines": true,
            "linewidth": 2,
            "links": [],
            "nullPointMode": "null",
            "percentage": false,
            "pointradius": 5,
            "points": false,
            "renderer": "flot",
            "seriesOverrides": [
              {
                "alias": "Observation: memory usage",
                "color": "#5195ce"
              },
              {
                "alias": "Recommendation: memory limit",
                "color": "#f2c96d",
                "steppedLine": true
              },
              {
                "alias": "Recommendation: memory request",
                "color": "#7eb26d",
                "steppedLine": true
              },
              {
                "alias": "Prediction: memory usage (in 15m)",
                "color": "#f9e2d2",
                "dashLength": 5,
                "dashes": true,
                "spaceLength": 4
              },
              {
                "alias": "Prediction: memory usage upperbound (in 15m)",
                "color": "#f9e2d2",
                "fillBelowTo": "Prediction: memory usage lowerbound (in 15m)",
                "hideTooltip": false,
                "legend": false,
                "lines": false
              },
              {
                "alias": "Prediction: memory usage lowerbound (in 15m)",
                "color": "#f9e2d2",
                "hideTooltip": false,
                "legend": false,
                "lines": false
              },
              {
                "alias": "Prediction: memory usage (in 1d)",
                "color": "#f29191",
                "dashLength": 5,
                "dashes": true,
                "spaceLength": 4
              },
              {
                "alias": "Prediction: memory usage upperbound (in 1d)",
                "color": "#f29191",
                "dashLength": 5,
                "dashes": true,
                "spaceLength": 4
              },
              {
                "alias": "Prediction: memory usage lowerbound (in 1d)",
                "color": "#f29191",
                "dashLength": 5,
                "dashes": true,
                "spaceLength": 4
              }
            ],
            "spaceLength": 10,
            "stack": false,
            "steppedLine": false,
            "targets": [
              {
                "datasource": "Prometheus",
                "expr": "max_over_time(container_memory_usage_bytes{namespace=\"$ns\", pod_name=\"$pod\", container_name=\"$container\", container_name!=\"\"}[30s])",
                "format": "time_series",
                "hide": false,
                "instant": false,
                "interval": "30s",
                "intervalFactor": 1,
                "legendFormat": "Observation: memory usage",
                "refId": "C"
              },
              {
                "alias": "Recommendation: memory limit",
                "datasource": "InfluxDB",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "hide": false,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select resource_limit_memory from \"alameda_recommendation\"..\"container\" where granularity = '30' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'  AND $timeFilter",
                "rawQuery": true,
                "refId": "B",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              },
              {
                "alias": "Recommendation: memory request",
                "datasource": "InfluxDB",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "hide": false,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select resource_request_memory from \"alameda_recommendation\"..\"container\" where granularity = '30' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'  AND $timeFilter",
                "rawQuery": true,
                "refId": "D",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              },
              {
                "alias": "Prediction: memory usage (in 15m)",
                "datasource": "InfluxDB",
                "groupBy": [],
                "hide": false,
                "measurement": "node_prediction",
                "orderByTime": "ASC",
                "policy": "node_prediction",
                "query": "select value from \"alameda_prediction\"..\"container\" where kind = 'raw' and granularity = '30' and \"metric\" = 'memory_usage_bytes' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'  AND $timeFilter",
                "rawQuery": true,
                "refId": "A",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    }
                  ]
                ],
                "tags": [
                  {
                    "key": "node",
                    "operator": "=",
                    "value": "ip-172-23-1-91.us-east-2.compute.internal"
                  },
                  {
                    "condition": "AND",
                    "key": "type",
                    "operator": "=",
                    "value": "cpu"
                  }
                ]
              },
              {
                "alias": "Prediction: memory usage upperbound (in 15m)",
                "datasource": "InfluxDB",
                "groupBy": [],
                "hide": false,
                "measurement": "node_prediction",
                "orderByTime": "ASC",
                "policy": "node_prediction",
                "query": "select value from \"alameda_prediction\"..\"container\" where kind = 'upper_bound' and granularity = '30' and \"metric\" = 'memory_usage_bytes' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'   AND time >= now()",
                "rawQuery": true,
                "refId": "E",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    }
                  ]
                ],
                "tags": [
                  {
                    "key": "node",
                    "operator": "=",
                    "value": "ip-172-23-1-91.us-east-2.compute.internal"
                  },
                  {
                    "condition": "AND",
                    "key": "type",
                    "operator": "=",
                    "value": "cpu"
                  }
                ]
              },
              {
                "alias": "Prediction: memory usage lowerbound (in 15m)",
                "datasource": "InfluxDB",
                "groupBy": [],
                "hide": false,
                "measurement": "node_prediction",
                "orderByTime": "ASC",
                "policy": "node_prediction",
                "query": "select value from \"alameda_prediction\"..\"container\" where kind = 'lower_bound' and granularity = '30' and \"metric\" = 'memory_usage_bytes' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'   AND time >= now()",
                "rawQuery": true,
                "refId": "F",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    }
                  ]
                ],
                "tags": [
                  {
                    "key": "node",
                    "operator": "=",
                    "value": "ip-172-23-1-91.us-east-2.compute.internal"
                  },
                  {
                    "condition": "AND",
                    "key": "type",
                    "operator": "=",
                    "value": "cpu"
                  }
                ]
              },
              {
                "alias": "Prediction: memory usage (in 1d)",
                "datasource": "InfluxDB",
                "groupBy": [],
                "hide": true,
                "measurement": "node_prediction",
                "orderByTime": "ASC",
                "policy": "node_prediction",
                "query": "select value from \"alameda_prediction\"..\"container\" where kind = 'raw' and granularity = '3600' and \"metric\" = 'memory_usage_bytes' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'  AND $timeFilter",
                "rawQuery": true,
                "refId": "G",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    }
                  ]
                ],
                "tags": [
                  {
                    "key": "node",
                    "operator": "=",
                    "value": "ip-172-23-1-91.us-east-2.compute.internal"
                  },
                  {
                    "condition": "AND",
                    "key": "type",
                    "operator": "=",
                    "value": "cpu"
                  }
                ]
              },
              {
                "alias": "Prediction: memory usage upperbound (in 1d)",
                "datasource": "InfluxDB",
                "groupBy": [],
                "hide": true,
                "measurement": "node_prediction",
                "orderByTime": "ASC",
                "policy": "node_prediction",
                "query": "select value from \"alameda_prediction\"..\"container\" where kind = 'upper_bound' and granularity = '3600' and \"metric\" = 'memory_usage_bytes' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'   AND time >= now()",
                "rawQuery": true,
                "refId": "H",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    }
                  ]
                ],
                "tags": [
                  {
                    "key": "node",
                    "operator": "=",
                    "value": "ip-172-23-1-91.us-east-2.compute.internal"
                  },
                  {
                    "condition": "AND",
                    "key": "type",
                    "operator": "=",
                    "value": "cpu"
                  }
                ]
              },
              {
                "alias": "Prediction: memory usage lowerbound (in 1d)",
                "datasource": "InfluxDB",
                "groupBy": [],
                "hide": true,
                "measurement": "node_prediction",
                "orderByTime": "ASC",
                "policy": "node_prediction",
                "query": "select value from \"alameda_prediction\"..\"container\" where kind = 'upper_bound' and granularity = '3600' and \"metric\" = 'memory_usage_bytes' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'   AND time >= now()",
                "rawQuery": true,
                "refId": "I",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    }
                  ]
                ],
                "tags": [
                  {
                    "key": "node",
                    "operator": "=",
                    "value": "ip-172-23-1-91.us-east-2.compute.internal"
                  },
                  {
                    "condition": "AND",
                    "key": "type",
                    "operator": "=",
                    "value": "cpu"
                  }
                ]
              }
            ],
            "thresholds": [],
            "timeFrom": null,
            "timeRegions": [],
            "timeShift": null,
            "title": "Container Memory: Observation, Prediction, and Recommendation",
            "tooltip": {
              "shared": false,
              "sort": 0,
              "value_type": "individual"
            },
            "type": "graph",
            "xaxis": {
              "buckets": null,
              "mode": "time",
              "name": null,
              "show": true,
              "values": []
            },
            "yaxes": [
              {
                "decimals": null,
                "format": "bytes",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": true
              },
              {
                "format": "decbytes",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": false
              }
            ],
            "yaxis": {
              "align": false,
              "alignLevel": null
            }
          }
        ],
        "refresh": "30s",
        "schemaVersion": 16,
        "style": "dark",
        "tags": [],
        "templating": {
          "list": [
            {
              "allValue": null,
              "current": {
                "text": "webapp",
                "value": "webapp"
              },
              "datasource": "InfluxDB",
              "definition": "select alameda_scaler_namespace,enable_VPA from alameda_cluster_status..container where enable_VPA = true group by \"alameda_scaler_namespace\" order by time desc limit 1",
              "hide": 0,
              "includeAll": false,
              "label": "Namespace",
              "multi": false,
              "name": "ns",
              "options": [],
              "query": "select alameda_scaler_namespace,enable_VPA from alameda_cluster_status..container where enable_VPA = true group by \"alameda_scaler_namespace\" order by time desc limit 1",
              "refresh": 2,
              "regex": "",
              "skipUrlSync": false,
              "sort": 0,
              "tagValuesQuery": "",
              "tags": [],
              "tagsQuery": "",
              "type": "query",
              "useTags": false
            },
            {
              "allValue": null,
              "current": {
                "text": "influxdb-app",
                "value": "influxdb-app"
              },
              "datasource": "InfluxDB",
              "definition": "select alameda_scaler_name,enable_VPA from alameda_cluster_status..container where \"alameda_scaler_namespace\" =~ /^[[ns]]$/ and enable_VPA= true group by \"alameda_scaler_namespace\", \"alameda_scaler_name\" order by time desc limit 1",
              "hide": 0,
              "includeAll": false,
              "label": "AlamedaScaler",
              "multi": false,
              "name": "scaler",
              "options": [],
              "query": "select alameda_scaler_name,enable_VPA from alameda_cluster_status..container where \"alameda_scaler_namespace\" =~ /^[[ns]]$/ and enable_VPA= true group by \"alameda_scaler_namespace\", \"alameda_scaler_name\" order by time desc limit 1",
              "refresh": 2,
              "regex": "",
              "skipUrlSync": false,
              "sort": 0,
              "tagValuesQuery": "",
              "tags": [],
              "tagsQuery": "",
              "type": "query",
              "useTags": false
            },
            {
              "allValue": null,
              "current": {
                "text": "influxdb-0-7bcfd4f68-fdd57",
                "value": "influxdb-0-7bcfd4f68-fdd57"
              },
              "datasource": "InfluxDB",
              "definition": "select pod_name,enable_VPA from alameda_cluster_status..container where \"alameda_scaler_namespace\" =~ /^[[ns]]$/ and \"alameda_scaler_name\" =~ /^[[scaler]]$/ group by \"pod_name\" order by time desc limit 1",
              "hide": 0,
              "includeAll": false,
              "label": "pod",
              "multi": false,
              "name": "pod",
              "options": [],
              "query": "select pod_name,enable_VPA from alameda_cluster_status..container where \"alameda_scaler_namespace\" =~ /^[[ns]]$/ and \"alameda_scaler_name\" =~ /^[[scaler]]$/ group by \"pod_name\" order by time desc limit 1",
              "refresh": 2,
              "regex": "",
              "skipUrlSync": false,
              "sort": 0,
              "tagValuesQuery": "",
              "tags": [],
              "tagsQuery": "",
              "type": "query",
              "useTags": false
            },
            {
              "allValue": null,
              "current": {
                "text": "influxdb-0",
                "value": "influxdb-0"
              },
              "datasource": "InfluxDB",
              "definition": "show tag values on alameda_cluster_status from container with key=\"name\" where \"alameda_scaler_namespace\" = '$ns' and \"alameda_scaler_name\" = '$scaler' and \"pod_name\" = '$pod'",
              "hide": 0,
              "includeAll": false,
              "label": "container",
              "multi": false,
              "name": "container",
              "options": [],
              "query": "show tag values on alameda_cluster_status from container with key=\"name\" where \"alameda_scaler_namespace\" = '$ns' and \"alameda_scaler_name\" = '$scaler' and \"pod_name\" = '$pod'",
              "refresh": 2,
              "regex": "",
              "skipUrlSync": false,
              "sort": 0,
              "tagValuesQuery": "",
              "tags": [],
              "tagsQuery": "",
              "type": "query",
              "useTags": false
            }
          ]
        },
        "time": {
          "from": "now-1h",
          "to": "now+20m"
        },
        "timepicker": {
          "refresh_intervals": [
            "5s",
            "10s",
            "30s",
            "1m",
            "5m",
            "15m",
            "30m",
            "1h",
            "2h",
            "1d"
          ],
          "time_options": [
            "5m",
            "15m",
            "1h",
            "6h",
            "12h",
            "24h",
            "2d",
            "7d",
            "30d"
          ]
        },
        "timezone": "",
        "title": "VPA Recommendation",
        "uid": "7dqda",
        "version": 9
      }

  vpa-recommendation-alamedascaler.json:
    |-
      {
        "annotations": {
          "list": [
            {
              "builtIn": 1,
              "datasource": "-- Grafana --",
              "enable": true,
              "hide": true,
              "iconColor": "rgba(0, 211, 255, 1)",
              "limit": 100,
              "name": "Annotations & Alerts",
              "showIn": 0,
              "type": "dashboard"
            }
          ]
        },
        "editable": true,
        "gnetId": null,
        "graphTooltip": 0,
        "id": 11,
        "iteration": 1560761288060,
        "links": [],
        "panels": [
          {
            "collapsed": false,
            "gridPos": {
              "h": 1,
              "w": 24,
              "x": 0,
              "y": 0
            },
            "id": 12,
            "panels": [],
            "title": "Managed Objects",
            "type": "row"
          },
          {
            "columns": [],
            "datasource": "InfluxDB",
            "description": "",
            "fontSize": "100%",
            "gridPos": {
              "h": 6,
              "w": 18,
              "x": 0,
              "y": 1
            },
            "id": 5,
            "links": [],
            "pageSize": null,
            "scroll": true,
            "showHeader": true,
            "sort": {
              "col": 0,
              "desc": true
            },
            "styles": [
              {
                "alias": "Time",
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "pattern": "Time",
                "type": "hidden"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "is_alameda",
                "thresholds": [],
                "type": "hidden",
                "unit": "decgbytes"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "name",
                "thresholds": [],
                "type": "hidden",
                "unit": "short"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "alameda_scaler_namespace",
                "thresholds": [],
                "type": "hidden",
                "unit": "short"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "alameda_scaler_name",
                "thresholds": [],
                "type": "hidden",
                "unit": "short"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "pod_name",
                "thresholds": [],
                "type": "hidden",
                "unit": "short"
              },
              {
                "alias": "AlamedaScaler Name",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "alameda scaler",
                "thresholds": [],
                "type": "string",
                "unit": "short"
              },
              {
                "alias": "Project (Namespace)",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "namespace",
                "thresholds": [],
                "type": "string",
                "unit": "short"
              },
              {
                "alias": "Pod Name",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "pod",
                "thresholds": [],
                "type": "string",
                "unit": "short"
              },
              {
                "alias": "Container Name",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "container",
                "thresholds": [],
                "type": "string",
                "unit": "short"
              },
              {
                "alias": "Node Name",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "node",
                "thresholds": [],
                "type": "number",
                "unit": "short"
              },
              {
                "alias": "Policy",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "policy",
                "thresholds": [],
                "type": "string",
                "unit": "short"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "decimals": 2,
                "pattern": "/.*/",
                "thresholds": [],
                "type": "number",
                "unit": "short"
              }
            ],
            "targets": [
              {
                "expr": "count(up{job=\"kubernetes-nodes\"})",
                "format": "table",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "intervalFactor": 1,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select \"name\" as \"container\", alameda_scaler_namespace as namespace, alameda_scaler_name as \"alameda scaler\", pod_name as pod, node_name as node, \"policy\", is_alameda from alameda_cluster_status..container where \"pod_name\" =~ /^[[pod]]$/ and \"namespace\" = '$ns' group by \"alameda_scaler_namespace\", \"alameda_scaler_name\", \"pod_name\", \"name\" order by time desc limit 1",
                "rawQuery": true,
                "refId": "A",
                "resultFormat": "table",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              }
            ],
            "title": "Managed Containers",
            "transform": "table",
            "transparent": false,
            "type": "table"
          },
          {
            "columns": [],
            "datasource": "InfluxDB",
            "fontSize": "100%",
            "gridPos": {
              "h": 6,
              "w": 6,
              "x": 18,
              "y": 1
            },
            "id": 4,
            "links": [],
            "pageSize": null,
            "scroll": true,
            "showHeader": true,
            "sort": {
              "col": 4,
              "desc": true
            },
            "styles": [
              {
                "alias": "Time",
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "pattern": "Time",
                "type": "hidden"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "in_cluster",
                "thresholds": [],
                "type": "hidden",
                "unit": "short"
              },
              {
                "alias": "Memory Size",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "node_memory_bytes",
                "thresholds": [],
                "type": "number",
                "unit": "decbytes"
              },
              {
                "alias": "CPU Cores",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 0,
                "mappingType": 1,
                "pattern": "node_cpu_cores",
                "thresholds": [],
                "type": "number",
                "unit": "short"
              },
              {
                "alias": "Node Name",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "name",
                "thresholds": [],
                "type": "string",
                "unit": "short"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "decimals": 2,
                "pattern": "/.*/",
                "thresholds": [],
                "type": "number",
                "unit": "short"
              }
            ],
            "targets": [
              {
                "expr": "count(up{job=\"kubernetes-nodes\"})",
                "format": "table",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "intervalFactor": 1,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select * from alameda_cluster_status..node",
                "rawQuery": true,
                "refId": "A",
                "resultFormat": "table",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              }
            ],
            "title": "Managed Nodes",
            "transform": "table",
            "transparent": false,
            "type": "table"
          },
          {
            "collapsed": false,
            "gridPos": {
              "h": 1,
              "w": 24,
              "x": 0,
              "y": 7
            },
            "id": 7,
            "panels": [],
            "title": "Resource Usage and Recommendation of Application",
            "type": "row"
          },
          {
            "aliasColors": {},
            "bars": false,
            "dashLength": 10,
            "dashes": false,
            "datasource": "-- Mixed --",
            "fill": 0,
            "gridPos": {
              "h": 7,
              "w": 24,
              "x": 0,
              "y": 8
            },
            "height": "",
            "id": 9,
            "interval": ">30s",
            "legend": {
              "avg": false,
              "current": false,
              "hideEmpty": false,
              "hideZero": false,
              "max": false,
              "min": false,
              "show": true,
              "total": false,
              "values": false
            },
            "lines": true,
            "linewidth": 2,
            "links": [],
            "nullPointMode": "null",
            "percentage": false,
            "pointradius": 5,
            "points": false,
            "renderer": "flot",
            "seriesOverrides": [
              {
                "alias": "Observation : CPU Usage",
                "color": "#5195ce"
              },
              {
                "alias": "Recommendation: CPU limit",
                "color": "#f2c96d",
                "steppedLine": true
              },
              {
                "alias": "Recommendation: CPU request",
                "color": "#7eb26d",
                "steppedLine": true
              },
              {
                "alias": "Prediction: CPU usage",
                "color": "#f9e2d2",
                "dashLength": 5,
                "dashes": true,
                "spaceLength": 4
              }
            ],
            "spaceLength": 10,
            "stack": false,
            "steppedLine": false,
            "targets": [
              {
                "alias": "Prediction: CPU usage",
                "datasource": "InfluxDB",
                "groupBy": [],
                "hide": true,
                "measurement": "node_prediction",
                "orderByTime": "ASC",
                "policy": "node_prediction",
                "query": "select value from \"alameda_prediction\"..\"container\" where \"metric\" = 'cpu_usage_seconds_percentage' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'  AND $timeFilter",
                "rawQuery": true,
                "refId": "B",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    }
                  ]
                ],
                "tags": [
                  {
                    "key": "node",
                    "operator": "=",
                    "value": "ip-172-23-1-91.us-east-2.compute.internal"
                  },
                  {
                    "condition": "AND",
                    "key": "type",
                    "operator": "=",
                    "value": "cpu"
                  }
                ]
              },
              {
                "datasource": "Prometheus",
                "expr": "1000 * sum(max_over_time(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=\"$ns\", pod_name=~\"$pod\", container_name!=\"\", container_name!=\"POD\"}[30s]))",
                "format": "time_series",
                "hide": false,
                "instant": false,
                "intervalFactor": 1,
                "legendFormat": "Observation : CPU Usage",
                "refId": "C"
              },
              {
                "alias": "Recommendation: CPU limit",
                "datasource": "InfluxDB",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "hide": false,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select sum(mean) from (select mean(resource_limit_cpu) from \"alameda_recommendation\"..\"container\" where granularity = '30' and \"pod_name\" =~ /^[[pod]]$/ and \"namespace\" = '$ns'  AND $timeFilter group by pod_name, time($recomInterval)) group by time($recomInterval)",
                "rawQuery": true,
                "refId": "A",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              },
              {
                "alias": "Recommendation: CPU request",
                "datasource": "InfluxDB",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "hide": false,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select sum(mean) from (select mean(resource_request_cpu ) from \"alameda_recommendation\"..\"container\" where granularity = '30' and \"pod_name\" =~ /^[[pod]]$/ and \"namespace\" = '$ns'  AND $timeFilter group by pod_name, time($recomInterval)) group by time($recomInterval)",
                "rawQuery": true,
                "refId": "D",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              }
            ],
            "thresholds": [],
            "timeFrom": null,
            "timeRegions": [],
            "timeShift": null,
            "title": "CPU: Observation and Recommendation (in CPU milicore)",
            "tooltip": {
              "shared": false,
              "sort": 0,
              "value_type": "individual"
            },
            "type": "graph",
            "xaxis": {
              "buckets": null,
              "mode": "time",
              "name": null,
              "show": true,
              "values": []
            },
            "yaxes": [
              {
                "decimals": 3,
                "format": "none",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": true
              },
              {
                "format": "decbytes",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": false
              }
            ],
            "yaxis": {
              "align": false,
              "alignLevel": null
            }
          },
          {
            "aliasColors": {},
            "bars": false,
            "dashLength": 10,
            "dashes": false,
            "datasource": "-- Mixed --",
            "fill": 0,
            "gridPos": {
              "h": 7,
              "w": 24,
              "x": 0,
              "y": 15
            },
            "height": "",
            "id": 10,
            "interval": ">30s",
            "legend": {
              "avg": false,
              "current": false,
              "hideEmpty": false,
              "hideZero": false,
              "max": false,
              "min": false,
              "show": true,
              "total": false,
              "values": false
            },
            "lines": true,
            "linewidth": 2,
            "links": [],
            "nullPointMode": "null",
            "percentage": false,
            "pointradius": 5,
            "points": false,
            "renderer": "flot",
            "seriesOverrides": [
              {
                "alias": "Observation: memory usage",
                "color": "#5195ce"
              },
              {
                "alias": "Recommendation: memory limit",
                "color": "#f2c96d",
                "steppedLine": true
              },
              {
                "alias": "Recommendation: memory request",
                "color": "#7eb26d",
                "steppedLine": true
              },
              {
                "alias": "Prediction: memory usage",
                "color": "#f9e2d2",
                "dashLength": 5,
                "dashes": true,
                "spaceLength": 4
              }
            ],
            "spaceLength": 10,
            "stack": false,
            "steppedLine": false,
            "targets": [
              {
                "alias": "Prediction: memory usage",
                "datasource": "InfluxDB",
                "groupBy": [],
                "hide": true,
                "measurement": "node_prediction",
                "orderByTime": "ASC",
                "policy": "node_prediction",
                "query": "select value from \"alameda_prediction\"..\"container\" where \"metric\" = 'memory_usage_bytes' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'  AND $timeFilter",
                "rawQuery": true,
                "refId": "A",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    }
                  ]
                ],
                "tags": [
                  {
                    "key": "node",
                    "operator": "=",
                    "value": "ip-172-23-1-91.us-east-2.compute.internal"
                  },
                  {
                    "condition": "AND",
                    "key": "type",
                    "operator": "=",
                    "value": "cpu"
                  }
                ]
              },
              {
                "datasource": "Prometheus",
                "expr": "sum(max_over_time(container_memory_usage_bytes{namespace=\"$ns\", pod_name=~\"$pod\", container_name!=\"\", container_name!=\"POD\"}[30s]))",
                "format": "time_series",
                "instant": false,
                "intervalFactor": 1,
                "legendFormat": "Observation: memory usage",
                "refId": "C"
              },
              {
                "alias": "Recommendation: memory limit",
                "datasource": "InfluxDB",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "hide": false,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select sum(mean) from (select mean(resource_limit_memory ) from \"alameda_recommendation\"..\"container\" where granularity = '30' and \"pod_name\" =~ /^[[pod]]$/ and \"namespace\" = '$ns'  AND $timeFilter group by pod_name, time($recomInterval)) group by time($recomInterval)",
                "rawQuery": true,
                "refId": "B",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              },
              {
                "alias": "Recommendation: memory request",
                "datasource": "InfluxDB",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "hide": false,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select sum(mean) from (select mean(resource_request_memory ) from \"alameda_recommendation\"..\"container\" where granularity = '30' and \"pod_name\" =~ /^[[pod]]$/ and \"namespace\" = '$ns'  AND $timeFilter group by pod_name, time($recomInterval)) group by time($recomInterval)",
                "rawQuery": true,
                "refId": "D",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              }
            ],
            "thresholds": [],
            "timeFrom": null,
            "timeRegions": [],
            "timeShift": null,
            "title": "Memory: Observation and Recommendation",
            "tooltip": {
              "shared": false,
              "sort": 0,
              "value_type": "individual"
            },
            "type": "graph",
            "xaxis": {
              "buckets": null,
              "mode": "time",
              "name": null,
              "show": true,
              "values": []
            },
            "yaxes": [
              {
                "decimals": null,
                "format": "bytes",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": true
              },
              {
                "format": "decbytes",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": false
              }
            ],
            "yaxis": {
              "align": false,
              "alignLevel": null
            }
          }
        ],
        "refresh": "30s",
        "schemaVersion": 16,
        "style": "dark",
        "tags": [],
        "templating": {
          "list": [
            {
              "allValue": null,
              "current": {
                "text": "webapp",
                "value": "webapp"
              },
              "datasource": "InfluxDB",
              "definition": "select alameda_scaler_namespace,enable_HPA from alameda_cluster_status..container where enable_VPA = true group by \"alameda_scaler_namespace\" order by time desc limit 1",
              "hide": 0,
              "includeAll": false,
              "label": "Namespace",
              "multi": false,
              "name": "ns",
              "options": [],
              "query": "select alameda_scaler_namespace,enable_HPA from alameda_cluster_status..container where enable_VPA = true group by \"alameda_scaler_namespace\" order by time desc limit 1",
              "refresh": 2,
              "regex": "",
              "skipUrlSync": false,
              "sort": 0,
              "tagValuesQuery": "",
              "tags": [],
              "tagsQuery": "",
              "type": "query",
              "useTags": false
            },
            {
              "allValue": null,
              "current": {
                "text": "influxdb-app",
                "value": "influxdb-app"
              },
              "datasource": "InfluxDB",
              "definition": "select alameda_scaler_name,enable_VPA from alameda_cluster_status..container where \"alameda_scaler_namespace\" =~ /^[[ns]]$/ and enable_VPA= true group by \"alameda_scaler_namespace\", \"alameda_scaler_name\" order by time desc limit 1",
              "hide": 0,
              "includeAll": false,
              "label": "AlamedaScaler",
              "multi": false,
              "name": "scaler",
              "options": [],
              "query": "select alameda_scaler_name,enable_VPA from alameda_cluster_status..container where \"alameda_scaler_namespace\" =~ /^[[ns]]$/ and enable_VPA= true group by \"alameda_scaler_namespace\", \"alameda_scaler_name\" order by time desc limit 1",
              "refresh": 2,
              "regex": "",
              "skipUrlSync": false,
              "sort": 0,
              "tagValuesQuery": "",
              "tags": [],
              "tagsQuery": "",
              "type": "query",
              "useTags": false
            },
            {
              "allValue": null,
              "current": {
                "text": "All",
                "value": [
                  "$__all"
                ]
              },
              "datasource": "InfluxDB",
              "definition": "select pod_name,enable_VPA from alameda_cluster_status..container where \"alameda_scaler_namespace\" =~ /^[[ns]]$/ and \"alameda_scaler_name\" =~ /^[[scaler]]$/ group by \"pod_name\" order by time desc limit 1",
              "hide": 2,
              "includeAll": true,
              "label": "pod",
              "multi": true,
              "name": "pod",
              "options": [],
              "query": "select pod_name,enable_VPA from alameda_cluster_status..container where \"alameda_scaler_namespace\" =~ /^[[ns]]$/ and \"alameda_scaler_name\" =~ /^[[scaler]]$/ group by \"pod_name\" order by time desc limit 1",
              "refresh": 2,
              "regex": "",
              "skipUrlSync": false,
              "sort": 0,
              "tagValuesQuery": "",
              "tags": [],
              "tagsQuery": "",
              "type": "query",
              "useTags": false
            },
            {
              "current": {
                "text": "15m",
                "value": "15m"
              },
              "hide": 2,
              "label": null,
              "name": "recomInterval",
              "options": [
                {
                  "selected": true,
                  "text": "15m",
                  "value": "15m"
                }
              ],
              "query": "15m",
              "skipUrlSync": false,
              "type": "constant"
            }
          ]
        },
        "time": {
          "from": "now-2h",
          "to": "now"
        },
        "timepicker": {
          "refresh_intervals": [
            "5s",
            "10s",
            "30s",
            "1m",
            "5m",
            "15m",
            "30m",
            "1h",
            "2h",
            "1d"
          ],
          "time_options": [
            "5m",
            "15m",
            "1h",
            "6h",
            "12h",
            "24h",
            "2d",
            "7d",
            "30d"
          ]
        },
        "timezone": "",
        "title": "Per AlamedaScaler VPA Resource Recommendations",
        "uid": "awdhhqw",
        "version": 3
      }

  vpa-recommendation-cluster.json:
    |-
      {
        "annotations": {
          "list": [
            {
              "builtIn": 1,
              "datasource": "-- Grafana --",
              "enable": true,
              "hide": true,
              "iconColor": "rgba(0, 211, 255, 1)",
              "limit": 100,
              "name": "Annotations & Alerts",
              "showIn": 0,
              "type": "dashboard"
            }
          ]
        },
        "editable": true,
        "gnetId": null,
        "graphTooltip": 0,
        "id": 9,
        "iteration": 1560761259450,
        "links": [],
        "panels": [
          {
            "collapsed": false,
            "gridPos": {
              "h": 1,
              "w": 24,
              "x": 0,
              "y": 0
            },
            "id": 12,
            "panels": [],
            "title": "Cluster-Wide Managed Objects",
            "type": "row"
          },
          {
            "columns": [],
            "datasource": "InfluxDB",
            "description": "",
            "fontSize": "100%",
            "gridPos": {
              "h": 6,
              "w": 18,
              "x": 0,
              "y": 1
            },
            "id": 5,
            "links": [],
            "pageSize": null,
            "scroll": true,
            "showHeader": true,
            "sort": {
              "col": 8,
              "desc": true
            },
            "styles": [
              {
                "alias": "Time",
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "pattern": "Time",
                "type": "hidden"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "is_alameda",
                "thresholds": [],
                "type": "hidden",
                "unit": "decgbytes"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "name",
                "thresholds": [],
                "type": "hidden",
                "unit": "short"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "alameda_scaler_namespace",
                "thresholds": [],
                "type": "hidden",
                "unit": "short"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "alameda_scaler_name",
                "thresholds": [],
                "type": "hidden",
                "unit": "short"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "pod_name",
                "thresholds": [],
                "type": "hidden",
                "unit": "short"
              },
              {
                "alias": "AlamedaScaler Name",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "alameda scaler",
                "thresholds": [],
                "type": "string",
                "unit": "short"
              },
              {
                "alias": "Project (Namespace)",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "namespace",
                "thresholds": [],
                "type": "string",
                "unit": "short"
              },
              {
                "alias": "Pod Name",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "pod",
                "thresholds": [],
                "type": "string",
                "unit": "short"
              },
              {
                "alias": "Container Name",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "container",
                "thresholds": [],
                "type": "string",
                "unit": "short"
              },
              {
                "alias": "Node Name",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "node",
                "thresholds": [],
                "type": "number",
                "unit": "short"
              },
              {
                "alias": "Policy",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "policy",
                "thresholds": [],
                "type": "string",
                "unit": "short"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "decimals": 2,
                "pattern": "/.*/",
                "thresholds": [],
                "type": "number",
                "unit": "short"
              }
            ],
            "targets": [
              {
                "expr": "count(up{job=\"kubernetes-nodes\"})",
                "format": "table",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "intervalFactor": 1,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select \"name\" as \"container\", alameda_scaler_namespace as namespace, alameda_scaler_name as \"alameda scaler\", pod_name as pod, node_name as node, \"policy\", is_alameda from alameda_cluster_status..container where \"pod_name\" =~ /^[[pod]]$/ and \"namespace\" =~ /^[[ns]]$/ group by \"alameda_scaler_namespace\", \"alameda_scaler_name\", \"pod_name\", \"name\" order by time desc limit 1",
                "rawQuery": true,
                "refId": "A",
                "resultFormat": "table",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              }
            ],
            "title": "Managed Containers",
            "transform": "table",
            "transparent": false,
            "type": "table"
          },
          {
            "columns": [],
            "datasource": "InfluxDB",
            "fontSize": "100%",
            "gridPos": {
              "h": 6,
              "w": 6,
              "x": 18,
              "y": 1
            },
            "id": 4,
            "links": [],
            "pageSize": null,
            "scroll": true,
            "showHeader": true,
            "sort": {
              "col": 4,
              "desc": true
            },
            "styles": [
              {
                "alias": "Time",
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "pattern": "Time",
                "type": "hidden"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "in_cluster",
                "thresholds": [],
                "type": "hidden",
                "unit": "short"
              },
              {
                "alias": "Memory Size",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "node_memory_bytes",
                "thresholds": [],
                "type": "number",
                "unit": "decbytes"
              },
              {
                "alias": "CPU Cores",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 0,
                "mappingType": 1,
                "pattern": "node_cpu_cores",
                "thresholds": [],
                "type": "number",
                "unit": "short"
              },
              {
                "alias": "Node Name",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "name",
                "thresholds": [],
                "type": "string",
                "unit": "short"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "decimals": 2,
                "pattern": "/.*/",
                "thresholds": [],
                "type": "number",
                "unit": "short"
              }
            ],
            "targets": [
              {
                "expr": "count(up{job=\"kubernetes-nodes\"})",
                "format": "table",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "intervalFactor": 1,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select * from alameda_cluster_status..node",
                "rawQuery": true,
                "refId": "A",
                "resultFormat": "table",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              }
            ],
            "title": "Managed Nodes",
            "transform": "table",
            "transparent": false,
            "type": "table"
          },
          {
            "collapsed": false,
            "gridPos": {
              "h": 1,
              "w": 24,
              "x": 0,
              "y": 7
            },
            "id": 7,
            "panels": [],
            "title": "Resource Usage and Recommendation of Cluster",
            "type": "row"
          },
          {
            "aliasColors": {},
            "bars": false,
            "dashLength": 10,
            "dashes": false,
            "datasource": "-- Mixed --",
            "fill": 0,
            "gridPos": {
              "h": 7,
              "w": 24,
              "x": 0,
              "y": 8
            },
            "height": "",
            "id": 9,
            "interval": ">30s",
            "legend": {
              "avg": false,
              "current": false,
              "hideEmpty": false,
              "hideZero": false,
              "max": false,
              "min": false,
              "show": true,
              "total": false,
              "values": false
            },
            "lines": true,
            "linewidth": 2,
            "links": [],
            "nullPointMode": "null",
            "percentage": false,
            "pointradius": 5,
            "points": false,
            "renderer": "flot",
            "seriesOverrides": [
              {
                "alias": "Observation : CPU Usage",
                "color": "#5195ce"
              },
              {
                "alias": "Recommendation: CPU limit",
                "color": "#f2c96d",
                "steppedLine": true
              },
              {
                "alias": "Recommendation: CPU request",
                "color": "#7eb26d",
                "steppedLine": true
              },
              {
                "alias": "Prediction: CPU usage",
                "color": "#f9e2d2",
                "dashLength": 5,
                "dashes": true,
                "spaceLength": 4
              }
            ],
            "spaceLength": 10,
            "stack": false,
            "steppedLine": false,
            "targets": [
              {
                "alias": "Prediction: CPU usage",
                "datasource": "InfluxDB",
                "groupBy": [],
                "hide": true,
                "measurement": "node_prediction",
                "orderByTime": "ASC",
                "policy": "node_prediction",
                "query": "select value from \"alameda_prediction\"..\"container\" where \"metric\" = 'cpu_usage_seconds_percentage' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'  AND $timeFilter",
                "rawQuery": true,
                "refId": "B",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    }
                  ]
                ],
                "tags": [
                  {
                    "key": "node",
                    "operator": "=",
                    "value": "ip-172-23-1-91.us-east-2.compute.internal"
                  },
                  {
                    "condition": "AND",
                    "key": "type",
                    "operator": "=",
                    "value": "cpu"
                  }
                ]
              },
              {
                "datasource": "Prometheus",
                "expr": "1000 * sum(max_over_time(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=~\"$ns\", pod_name=~\"$pod\", container_name!=\"\", container_name!=\"POD\"}[30s]))",
                "format": "time_series",
                "hide": false,
                "instant": false,
                "interval": "",
                "intervalFactor": 1,
                "legendFormat": "Observation : CPU Usage",
                "refId": "C"
              },
              {
                "alias": "Recommendation: CPU limit",
                "datasource": "InfluxDB",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "hide": false,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select sum(mean) from (select mean(resource_limit_cpu) from \"alameda_recommendation\"..\"container\" where granularity = '30' and \"pod_name\" =~ /^[[pod]]$/ and \"namespace\" =~ /^[[ns]]$/ AND $timeFilter group by pod_name, time($recomInterval)) group by time($recomInterval)",
                "rawQuery": true,
                "refId": "A",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              },
              {
                "alias": "Recommendation: CPU request",
                "datasource": "InfluxDB",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "hide": false,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select sum(mean) from (select mean(resource_request_cpu ) from \"alameda_recommendation\"..\"container\" where granularity = '30' and \"pod_name\" =~ /^[[pod]]$/ and \"namespace\" =~ /^[[ns]]$/ AND $timeFilter group by pod_name, time($recomInterval)) group by time($recomInterval)",
                "rawQuery": true,
                "refId": "D",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              }
            ],
            "thresholds": [],
            "timeFrom": null,
            "timeRegions": [],
            "timeShift": null,
            "title": "CPU: Observation and Recommendation (in CPU milicore)",
            "tooltip": {
              "shared": false,
              "sort": 0,
              "value_type": "individual"
            },
            "type": "graph",
            "xaxis": {
              "buckets": null,
              "mode": "time",
              "name": null,
              "show": true,
              "values": []
            },
            "yaxes": [
              {
                "decimals": 3,
                "format": "none",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": true
              },
              {
                "format": "decbytes",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": false
              }
            ],
            "yaxis": {
              "align": false,
              "alignLevel": null
            }
          },
          {
            "aliasColors": {},
            "bars": false,
            "dashLength": 10,
            "dashes": false,
            "datasource": "-- Mixed --",
            "fill": 0,
            "gridPos": {
              "h": 7,
              "w": 24,
              "x": 0,
              "y": 15
            },
            "height": "",
            "id": 10,
            "interval": ">30s",
            "legend": {
              "avg": false,
              "current": false,
              "hideEmpty": false,
              "hideZero": false,
              "max": false,
              "min": false,
              "show": true,
              "total": false,
              "values": false
            },
            "lines": true,
            "linewidth": 2,
            "links": [],
            "nullPointMode": "null",
            "percentage": false,
            "pointradius": 5,
            "points": false,
            "renderer": "flot",
            "seriesOverrides": [
              {
                "alias": "Observation: memory usage",
                "color": "#5195ce"
              },
              {
                "alias": "Recommendation: memory limit",
                "color": "#f2c96d",
                "steppedLine": true
              },
              {
                "alias": "Recommendation: memory request",
                "color": "#7eb26d",
                "steppedLine": true
              },
              {
                "alias": "Prediction: memory usage",
                "color": "#f9e2d2",
                "dashLength": 5,
                "dashes": true,
                "spaceLength": 4
              }
            ],
            "spaceLength": 10,
            "stack": false,
            "steppedLine": false,
            "targets": [
              {
                "alias": "Prediction: memory usage",
                "datasource": "InfluxDB",
                "groupBy": [],
                "hide": true,
                "measurement": "node_prediction",
                "orderByTime": "ASC",
                "policy": "node_prediction",
                "query": "select value from \"alameda_prediction\"..\"container\" where \"metric\" = 'memory_usage_bytes' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'  AND $timeFilter",
                "rawQuery": true,
                "refId": "A",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    }
                  ]
                ],
                "tags": [
                  {
                    "key": "node",
                    "operator": "=",
                    "value": "ip-172-23-1-91.us-east-2.compute.internal"
                  },
                  {
                    "condition": "AND",
                    "key": "type",
                    "operator": "=",
                    "value": "cpu"
                  }
                ]
              },
              {
                "datasource": "Prometheus",
                "expr": "sum(max_over_time(container_memory_usage_bytes{namespace=~\"$ns\", pod_name=~\"$pod\", container_name!=\"\", container_name!=\"POD\"}[30s]))",
                "format": "time_series",
                "instant": false,
                "interval": "",
                "intervalFactor": 1,
                "legendFormat": "Observation: memory usage",
                "refId": "C"
              },
              {
                "alias": "Recommendation: memory limit",
                "datasource": "InfluxDB",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "hide": false,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select sum(mean) from (select mean(resource_limit_memory ) from \"alameda_recommendation\"..\"container\" where \"pod_name\" =~ /^[[pod]]$/ and \"namespace\" =~ /^[[ns]]$/ AND $timeFilter group by pod_name, time($recomInterval)) group by time($recomInterval)",
                "rawQuery": true,
                "refId": "B",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              },
              {
                "alias": "Recommendation: memory request",
                "datasource": "InfluxDB",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "hide": false,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select sum(mean) from (select mean(resource_request_memory ) from \"alameda_recommendation\"..\"container\" where \"pod_name\" =~ /^[[pod]]$/ and \"namespace\" =~ /^[[ns]]$/ AND $timeFilter group by pod_name, time($recomInterval)) group by time($recomInterval)",
                "rawQuery": true,
                "refId": "D",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              }
            ],
            "thresholds": [],
            "timeFrom": null,
            "timeRegions": [],
            "timeShift": null,
            "title": "Memory: Observation and Recommendation",
            "tooltip": {
              "shared": false,
              "sort": 0,
              "value_type": "individual"
            },
            "type": "graph",
            "xaxis": {
              "buckets": null,
              "mode": "time",
              "name": null,
              "show": true,
              "values": []
            },
            "yaxes": [
              {
                "decimals": null,
                "format": "bytes",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": true
              },
              {
                "format": "decbytes",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": false
              }
            ],
            "yaxis": {
              "align": false,
              "alignLevel": null
            }
          }
        ],
        "refresh": "30s",
        "schemaVersion": 16,
        "style": "dark",
        "tags": [],
        "templating": {
          "list": [
            {
              "allValue": null,
              "current": {
                "text": "All",
                "value": [
                  "$__all"
                ]
              },
              "datasource": "InfluxDB",
              "definition": "select alameda_scaler_namespace,enable_VPA from alameda_cluster_status..container where enable_VPA = true group by \"alameda_scaler_namespace\" order by time desc limit 1",
              "hide": 2,
              "includeAll": true,
              "label": "Namespace",
              "multi": true,
              "name": "ns",
              "options": [],
              "query": "select alameda_scaler_namespace,enable_VPA from alameda_cluster_status..container where enable_VPA = true group by \"alameda_scaler_namespace\" order by time desc limit 1",
              "refresh": 2,
              "regex": "",
              "skipUrlSync": false,
              "sort": 0,
              "tagValuesQuery": "",
              "tags": [],
              "tagsQuery": "",
              "type": "query",
              "useTags": false
            },
            {
              "allValue": null,
              "current": {
                "text": "All",
                "value": [
                  "$__all"
                ]
              },
              "datasource": "InfluxDB",
              "definition": "select alameda_scaler_name,enable_VPA from alameda_cluster_status..container where \"alameda_scaler_namespace\" =~ /^[[ns]]$/ and enable_VPA= true group by \"alameda_scaler_namespace\", \"alameda_scaler_name\" order by time desc limit 1",
              "hide": 2,
              "includeAll": true,
              "label": "AlamedaScaler",
              "multi": true,
              "name": "scaler",
              "options": [],
              "query": "select alameda_scaler_name,enable_VPA from alameda_cluster_status..container where \"alameda_scaler_namespace\" =~ /^[[ns]]$/ and enable_VPA= true group by \"alameda_scaler_namespace\", \"alameda_scaler_name\" order by time desc limit 1",
              "refresh": 2,
              "regex": "",
              "skipUrlSync": false,
              "sort": 0,
              "tagValuesQuery": "",
              "tags": [],
              "tagsQuery": "",
              "type": "query",
              "useTags": false
            },
            {
              "allValue": null,
              "current": {
                "text": "All",
                "value": [
                  "$__all"
                ]
              },
              "datasource": "InfluxDB",
              "definition": "select pod_name,enable_VPA from alameda_cluster_status..container where \"alameda_scaler_namespace\" =~ /^[[ns]]$/ and \"alameda_scaler_name\" =~ /^[[scaler]]$/ group by \"pod_name\" order by time desc limit 1",
              "hide": 2,
              "includeAll": true,
              "label": "pod",
              "multi": true,
              "name": "pod",
              "options": [],
              "query": "select pod_name,enable_VPA from alameda_cluster_status..container where \"alameda_scaler_namespace\" =~ /^[[ns]]$/ and \"alameda_scaler_name\" =~ /^[[scaler]]$/ group by \"pod_name\" order by time desc limit 1",
              "refresh": 2,
              "regex": "",
              "skipUrlSync": false,
              "sort": 0,
              "tagValuesQuery": "",
              "tags": [],
              "tagsQuery": "",
              "type": "query",
              "useTags": false
            },
            {
              "current": {
                "text": "15m",
                "value": "15m"
              },
              "hide": 2,
              "label": null,
              "name": "recomInterval",
              "options": [
                {
                  "selected": true,
                  "text": "15m",
                  "value": "15m"
                }
              ],
              "query": "15m",
              "skipUrlSync": false,
              "type": "constant"
            }
          ]
        },
        "time": {
          "from": "now-2h",
          "to": "now"
        },
        "timepicker": {
          "refresh_intervals": [
            "5s",
            "10s",
            "30s",
            "1m",
            "5m",
            "15m",
            "30m",
            "1h",
            "2h",
            "1d"
          ],
          "time_options": [
            "5m",
            "15m",
            "1h",
            "6h",
            "12h",
            "24h",
            "2d",
            "7d",
            "30d"
          ]
        },
        "timezone": "",
        "title": "Cluster-Wide VPA Resource Recommendations",
        "uid": "addqwe",
        "version": 4
      }

  vpa-recommendation-namespace.json:
    |-
      {
        "annotations": {
          "list": [
            {
              "builtIn": 1,
              "datasource": "-- Grafana --",
              "enable": true,
              "hide": true,
              "iconColor": "rgba(0, 211, 255, 1)",
              "limit": 100,
              "name": "Annotations & Alerts",
              "showIn": 0,
              "type": "dashboard"
            }
          ]
        },
        "editable": true,
        "gnetId": null,
        "graphTooltip": 0,
        "id": 12,
        "iteration": 1560761281179,
        "links": [],
        "panels": [
          {
            "collapsed": false,
            "gridPos": {
              "h": 1,
              "w": 24,
              "x": 0,
              "y": 0
            },
            "id": 12,
            "panels": [],
            "title": "Managed Objects",
            "type": "row"
          },
          {
            "columns": [],
            "datasource": "InfluxDB",
            "description": "",
            "fontSize": "100%",
            "gridPos": {
              "h": 6,
              "w": 18,
              "x": 0,
              "y": 1
            },
            "id": 5,
            "links": [],
            "pageSize": null,
            "scroll": true,
            "showHeader": true,
            "sort": {
              "col": 7,
              "desc": true
            },
            "styles": [
              {
                "alias": "Time",
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "pattern": "Time",
                "type": "hidden"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "is_alameda",
                "thresholds": [],
                "type": "hidden",
                "unit": "decgbytes"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "name",
                "thresholds": [],
                "type": "hidden",
                "unit": "short"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "alameda_scaler_namespace",
                "thresholds": [],
                "type": "hidden",
                "unit": "short"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "alameda_scaler_name",
                "thresholds": [],
                "type": "hidden",
                "unit": "short"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "pod_name",
                "thresholds": [],
                "type": "hidden",
                "unit": "short"
              },
              {
                "alias": "AlamedaScaler Name",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "alameda scaler",
                "thresholds": [],
                "type": "string",
                "unit": "short"
              },
              {
                "alias": "Project (Namespace)",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "namespace",
                "thresholds": [],
                "type": "string",
                "unit": "short"
              },
              {
                "alias": "Pod Name",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "pod",
                "thresholds": [],
                "type": "string",
                "unit": "short"
              },
              {
                "alias": "Container Name",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "container",
                "thresholds": [],
                "type": "string",
                "unit": "short"
              },
              {
                "alias": "Node Name",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "node",
                "thresholds": [],
                "type": "number",
                "unit": "short"
              },
              {
                "alias": "Policy",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "policy",
                "thresholds": [],
                "type": "string",
                "unit": "short"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "decimals": 2,
                "pattern": "/.*/",
                "thresholds": [],
                "type": "number",
                "unit": "short"
              }
            ],
            "targets": [
              {
                "expr": "count(up{job=\"kubernetes-nodes\"})",
                "format": "table",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "intervalFactor": 1,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select \"name\" as \"container\", alameda_scaler_namespace as namespace, alameda_scaler_name as \"alameda scaler\", pod_name as pod, node_name as node, \"policy\", is_alameda from alameda_cluster_status..container where \"pod_name\" =~ /^[[pod]]$/ and \"namespace\" =~ /^[[ns]]$/ group by \"alameda_scaler_namespace\", \"alameda_scaler_name\", \"pod_name\", \"name\" order by time desc limit 1",
                "rawQuery": true,
                "refId": "A",
                "resultFormat": "table",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              }
            ],
            "title": "Managed Containers",
            "transform": "table",
            "transparent": false,
            "type": "table"
          },
          {
            "columns": [],
            "datasource": "InfluxDB",
            "fontSize": "100%",
            "gridPos": {
              "h": 6,
              "w": 6,
              "x": 18,
              "y": 1
            },
            "id": 4,
            "links": [],
            "pageSize": null,
            "scroll": true,
            "showHeader": true,
            "sort": {
              "col": 4,
              "desc": true
            },
            "styles": [
              {
                "alias": "Time",
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "pattern": "Time",
                "type": "hidden"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "in_cluster",
                "thresholds": [],
                "type": "hidden",
                "unit": "short"
              },
              {
                "alias": "Memory Size",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "node_memory_bytes",
                "thresholds": [],
                "type": "number",
                "unit": "decbytes"
              },
              {
                "alias": "CPU Cores",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 0,
                "mappingType": 1,
                "pattern": "node_cpu_cores",
                "thresholds": [],
                "type": "number",
                "unit": "short"
              },
              {
                "alias": "Node Name",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "dateFormat": "YYYY-MM-DD HH:mm:ss",
                "decimals": 2,
                "mappingType": 1,
                "pattern": "name",
                "thresholds": [],
                "type": "string",
                "unit": "short"
              },
              {
                "alias": "",
                "colorMode": null,
                "colors": [
                  "rgba(245, 54, 54, 0.9)",
                  "rgba(237, 129, 40, 0.89)",
                  "rgba(50, 172, 45, 0.97)"
                ],
                "decimals": 2,
                "pattern": "/.*/",
                "thresholds": [],
                "type": "number",
                "unit": "short"
              }
            ],
            "targets": [
              {
                "expr": "count(up{job=\"kubernetes-nodes\"})",
                "format": "table",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "intervalFactor": 1,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select * from alameda_cluster_status..node",
                "rawQuery": true,
                "refId": "A",
                "resultFormat": "table",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              }
            ],
            "title": "Managed Nodes",
            "transform": "table",
            "transparent": false,
            "type": "table"
          },
          {
            "collapsed": false,
            "gridPos": {
              "h": 1,
              "w": 24,
              "x": 0,
              "y": 7
            },
            "id": 7,
            "panels": [],
            "title": "Resource Usage and Recommendation of Namespace",
            "type": "row"
          },
          {
            "aliasColors": {},
            "bars": false,
            "dashLength": 10,
            "dashes": false,
            "datasource": "-- Mixed --",
            "fill": 0,
            "gridPos": {
              "h": 7,
              "w": 24,
              "x": 0,
              "y": 8
            },
            "height": "",
            "id": 9,
            "interval": ">30s",
            "legend": {
              "avg": false,
              "current": false,
              "hideEmpty": false,
              "hideZero": false,
              "max": false,
              "min": false,
              "show": true,
              "total": false,
              "values": false
            },
            "lines": true,
            "linewidth": 2,
            "links": [],
            "nullPointMode": "null",
            "percentage": false,
            "pointradius": 5,
            "points": false,
            "renderer": "flot",
            "seriesOverrides": [
              {
                "alias": "Observation : CPU Usage",
                "color": "#5195ce"
              },
              {
                "alias": "Recommendation: CPU limit",
                "color": "#f2c96d",
                "steppedLine": true
              },
              {
                "alias": "Recommendation: CPU request",
                "color": "#7eb26d",
                "steppedLine": true
              },
              {
                "alias": "Prediction: CPU usage",
                "color": "#f9e2d2",
                "dashLength": 5,
                "dashes": true,
                "spaceLength": 4
              }
            ],
            "spaceLength": 10,
            "stack": false,
            "steppedLine": false,
            "targets": [
              {
                "alias": "Prediction: CPU usage",
                "datasource": "InfluxDB",
                "groupBy": [],
                "hide": true,
                "measurement": "node_prediction",
                "orderByTime": "ASC",
                "policy": "node_prediction",
                "query": "select value from \"alameda_prediction\"..\"container\" where \"metric\" = 'cpu_usage_seconds_percentage' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'  AND $timeFilter",
                "rawQuery": true,
                "refId": "B",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    }
                  ]
                ],
                "tags": [
                  {
                    "key": "node",
                    "operator": "=",
                    "value": "ip-172-23-1-91.us-east-2.compute.internal"
                  },
                  {
                    "condition": "AND",
                    "key": "type",
                    "operator": "=",
                    "value": "cpu"
                  }
                ]
              },
              {
                "datasource": "Prometheus",
                "expr": "1000 * sum(max_over_time(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=~\"$ns\", pod_name=~\"$pod\", container_name!=\"\", container_name!=\"POD\"}[30s]))",
                "format": "time_series",
                "hide": false,
                "instant": false,
                "intervalFactor": 1,
                "legendFormat": "Observation : CPU Usage",
                "refId": "C"
              },
              {
                "alias": "Recommendation: CPU limit",
                "datasource": "InfluxDB",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "hide": false,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select sum(mean) from (select mean(resource_limit_cpu) from \"alameda_recommendation\"..\"container\" where granularity = '30' and \"pod_name\" =~ /^[[pod]]$/ and \"namespace\" =~ /^[[ns]]$/ AND $timeFilter group by pod_name, time($recomInterval)) group by time($recomInterval)",
                "rawQuery": true,
                "refId": "A",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              },
              {
                "alias": "Recommendation: CPU request",
                "datasource": "InfluxDB",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "hide": false,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select sum(mean) from (select mean(resource_request_cpu ) from \"alameda_recommendation\"..\"container\" where granularity = '30' and \"pod_name\" =~ /^[[pod]]$/ and \"namespace\" =~ /^[[ns]]$/ AND $timeFilter group by pod_name, time($recomInterval)) group by time($recomInterval)",
                "rawQuery": true,
                "refId": "D",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              }
            ],
            "thresholds": [],
            "timeFrom": null,
            "timeRegions": [],
            "timeShift": null,
            "title": "CPU: Observation and Recommendation (in CPU milicore)",
            "tooltip": {
              "shared": false,
              "sort": 0,
              "value_type": "individual"
            },
            "type": "graph",
            "xaxis": {
              "buckets": null,
              "mode": "time",
              "name": null,
              "show": true,
              "values": []
            },
            "yaxes": [
              {
                "decimals": 3,
                "format": "none",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": true
              },
              {
                "format": "decbytes",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": false
              }
            ],
            "yaxis": {
              "align": false,
              "alignLevel": null
            }
          },
          {
            "aliasColors": {},
            "bars": false,
            "dashLength": 10,
            "dashes": false,
            "datasource": "-- Mixed --",
            "fill": 0,
            "gridPos": {
              "h": 7,
              "w": 24,
              "x": 0,
              "y": 15
            },
            "height": "",
            "id": 10,
            "interval": ">30s",
            "legend": {
              "avg": false,
              "current": false,
              "hideEmpty": false,
              "hideZero": false,
              "max": false,
              "min": false,
              "show": true,
              "total": false,
              "values": false
            },
            "lines": true,
            "linewidth": 2,
            "links": [],
            "nullPointMode": "null",
            "percentage": false,
            "pointradius": 5,
            "points": false,
            "renderer": "flot",
            "seriesOverrides": [
              {
                "alias": "Observation: memory usage",
                "color": "#5195ce"
              },
              {
                "alias": "Recommendation: memory limit",
                "color": "#f2c96d",
                "steppedLine": true
              },
              {
                "alias": "Recommendation: memory request",
                "color": "#7eb26d",
                "steppedLine": true
              },
              {
                "alias": "Prediction: memory usage",
                "color": "#f9e2d2",
                "dashLength": 5,
                "dashes": true,
                "spaceLength": 4
              }
            ],
            "spaceLength": 10,
            "stack": false,
            "steppedLine": false,
            "targets": [
              {
                "alias": "Prediction: memory usage",
                "datasource": "InfluxDB",
                "groupBy": [],
                "hide": true,
                "measurement": "node_prediction",
                "orderByTime": "ASC",
                "policy": "node_prediction",
                "query": "select value from \"alameda_prediction\"..\"container\" where \"metric\" = 'memory_usage_bytes' and \"name\" = '$container' and \"pod_name\" = '$pod' and \"namespace\" = '$ns'  AND $timeFilter",
                "rawQuery": true,
                "refId": "A",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    }
                  ]
                ],
                "tags": [
                  {
                    "key": "node",
                    "operator": "=",
                    "value": "ip-172-23-1-91.us-east-2.compute.internal"
                  },
                  {
                    "condition": "AND",
                    "key": "type",
                    "operator": "=",
                    "value": "cpu"
                  }
                ]
              },
              {
                "datasource": "Prometheus",
                "expr": "sum(max_over_time(container_memory_usage_bytes{namespace=~\"$ns\", pod_name=~\"$pod\", container_name!=\"\", container_name!=\"POD\"}[30s]))",
                "format": "time_series",
                "instant": false,
                "intervalFactor": 1,
                "legendFormat": "Observation: memory usage",
                "refId": "C"
              },
              {
                "alias": "Recommendation: memory limit",
                "datasource": "InfluxDB",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "hide": false,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select sum(mean) from (select mean(resource_limit_memory ) from \"alameda_recommendation\"..\"container\" where granularity = '30' and \"pod_name\" =~ /^[[pod]]$/ and \"namespace\" =~ /^[[ns]]$/ AND $timeFilter group by pod_name, time($recomInterval)) group by time($recomInterval)",
                "rawQuery": true,
                "refId": "B",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              },
              {
                "alias": "Recommendation: memory request",
                "datasource": "InfluxDB",
                "groupBy": [
                  {
                    "params": [
                      "$__interval"
                    ],
                    "type": "time"
                  },
                  {
                    "params": [
                      "null"
                    ],
                    "type": "fill"
                  }
                ],
                "hide": false,
                "orderByTime": "ASC",
                "policy": "default",
                "query": "select sum(mean) from (select mean(resource_request_memory ) from \"alameda_recommendation\"..\"container\" where granularity = '30' and \"pod_name\" =~ /^[[pod]]$/ and \"namespace\" =~ /^[[ns]]$/ AND $timeFilter group by pod_name, time($recomInterval)) group by time($recomInterval)",
                "rawQuery": true,
                "refId": "D",
                "resultFormat": "time_series",
                "select": [
                  [
                    {
                      "params": [
                        "value"
                      ],
                      "type": "field"
                    },
                    {
                      "params": [],
                      "type": "mean"
                    }
                  ]
                ],
                "tags": []
              }
            ],
            "thresholds": [],
            "timeFrom": null,
            "timeRegions": [],
            "timeShift": null,
            "title": "Memory: Observation and Recommendation",
            "tooltip": {
              "shared": false,
              "sort": 0,
              "value_type": "individual"
            },
            "type": "graph",
            "xaxis": {
              "buckets": null,
              "mode": "time",
              "name": null,
              "show": true,
              "values": []
            },
            "yaxes": [
              {
                "decimals": null,
                "format": "bytes",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": true
              },
              {
                "format": "decbytes",
                "label": null,
                "logBase": 1,
                "max": null,
                "min": null,
                "show": false
              }
            ],
            "yaxis": {
              "align": false,
              "alignLevel": null
            }
          }
        ],
        "refresh": "30s",
        "schemaVersion": 16,
        "style": "dark",
        "tags": [],
        "templating": {
          "list": [
            {
              "allValue": null,
              "current": {
                "text": "webapp",
                "value": "webapp"
              },
              "datasource": "InfluxDB",
              "definition": "select alameda_scaler_namespace,enable_HPA from alameda_cluster_status..container where enable_VPA = true group by \"alameda_scaler_namespace\" order by time desc limit 1",
              "hide": 0,
              "includeAll": false,
              "label": "Namespace",
              "multi": false,
              "name": "ns",
              "options": [],
              "query": "select alameda_scaler_namespace,enable_HPA from alameda_cluster_status..container where enable_VPA = true group by \"alameda_scaler_namespace\" order by time desc limit 1",
              "refresh": 2,
              "regex": "",
              "skipUrlSync": false,
              "sort": 0,
              "tagValuesQuery": "",
              "tags": [],
              "tagsQuery": "",
              "type": "query",
              "useTags": false
            },
            {
              "allValue": null,
              "current": {
                "text": "All",
                "value": [
                  "$__all"
                ]
              },
              "datasource": "InfluxDB",
              "definition": "select alameda_scaler_name,enable_VPA from alameda_cluster_status..container where \"alameda_scaler_namespace\" =~ /^[[ns]]$/ and enable_VPA= true group by \"alameda_scaler_namespace\", \"alameda_scaler_name\" order by time desc limit 1",
              "hide": 2,
              "includeAll": true,
              "label": "AlamedaScaler",
              "multi": true,
              "name": "scaler",
              "options": [],
              "query": "select alameda_scaler_name,enable_VPA from alameda_cluster_status..container where \"alameda_scaler_namespace\" =~ /^[[ns]]$/ and enable_VPA= true group by \"alameda_scaler_namespace\", \"alameda_scaler_name\" order by time desc limit 1",
              "refresh": 2,
              "regex": "",
              "skipUrlSync": false,
              "sort": 0,
              "tagValuesQuery": "",
              "tags": [],
              "tagsQuery": "",
              "type": "query",
              "useTags": false
            },
            {
              "allValue": null,
              "current": {
                "text": "All",
                "value": "$__all"
              },
              "datasource": "InfluxDB",
              "definition": "select pod_name,enable_VPA from alameda_cluster_status..container where \"alameda_scaler_namespace\" =~ /^[[ns]]$/ and \"alameda_scaler_name\" =~ /^[[scaler]]$/ group by \"pod_name\" order by time desc limit 1",
              "hide": 2,
              "includeAll": true,
              "label": "pod",
              "multi": true,
              "name": "pod",
              "options": [],
              "query": "select pod_name,enable_VPA from alameda_cluster_status..container where \"alameda_scaler_namespace\" =~ /^[[ns]]$/ and \"alameda_scaler_name\" =~ /^[[scaler]]$/ group by \"pod_name\" order by time desc limit 1",
              "refresh": 2,
              "regex": "",
              "skipUrlSync": false,
              "sort": 0,
              "tagValuesQuery": "",
              "tags": [],
              "tagsQuery": "",
              "type": "query",
              "useTags": false
            },
            {
              "current": {
                "text": "15m",
                "value": "15m"
              },
              "hide": 2,
              "label": null,
              "name": "recomInterval",
              "options": [
                {
                  "selected": true,
                  "text": "15m",
                  "value": "15m"
                }
              ],
              "query": "15m",
              "skipUrlSync": false,
              "type": "constant"
            }
          ]
        },
        "time": {
          "from": "now-2h",
          "to": "now"
        },
        "timepicker": {
          "refresh_intervals": [
            "5s",
            "10s",
            "30s",
            "1m",
            "5m",
            "15m",
            "30m",
            "1h",
            "2h",
            "1d"
          ],
          "time_options": [
            "5m",
            "15m",
            "1h",
            "6h",
            "12h",
            "24h",
            "2d",
            "7d",
            "30d"
          ]
        },
        "timezone": "",
        "title": "Per Namespace VPA Resource Recommendations",
        "uid": "addaewe",
        "version": 3
      }


  dashboardproviders.yaml: |-
    apiVersion: 1
    providers:
    - disableDeletion: false
      editable: true
      folder: alameda
      name: alameda
      options:
        path: /var/lib/grafana/dashboards/alameda
      orgId: 1
      type: file
