Grafana dashboard: Cluster view - CPU and Mem2
Description: Total view of the AWS cluster 


{
  "__inputs": [
    {
      "name": "DS_PROMETHEUS",
      "label": "Prometheus",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__requires": [
    {
      "type": "panel",
      "id": "gauge",
      "name": "Gauge",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "6.1.6"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "${DS_PROMETHEUS}",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "description": "Total view of the AWS cluster ",
  "editable": true,
  "gnetId": 10260,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1558867446500,
  "links": [],
  "panels": [
    {
      "gridPos": {
        "h": 8,
        "w": 8,
        "x": 0,
        "y": 0
      },
      "id": 6,
      "links": [],
      "options": {
        "maxValue": 100,
        "minValue": 0,
        "orientation": "auto",
        "showThresholdLabels": false,
        "showThresholdMarkers": true,
        "thresholds": [
          {
            "color": "green",
            "index": 0,
            "value": null
          },
          {
            "color": "semi-dark-blue",
            "index": 1,
            "value": 20
          },
          {
            "color": "#EF843C",
            "index": 2,
            "value": 40
          },
          {
            "color": "#EAB839",
            "index": 3,
            "value": 75
          },
          {
            "color": "#6ED0E0",
            "index": 4,
            "value": 100
          }
        ],
        "valueMappings": [],
        "valueOptions": {
          "decimals": null,
          "prefix": "",
          "stat": "mean",
          "suffix": "",
          "unit": "none"
        }
      },
      "pluginVersion": "6.1.6",
      "targets": [
        {
          "expr": " sum(kube_node_status_allocatable_cpu_cores)",
          "format": "time_series",
          "intervalFactor": 1,
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Available Cores",
      "transparent": true,
      "type": "gauge"
    },
    {
      "gridPos": {
        "h": 8,
        "w": 8,
        "x": 8,
        "y": 0
      },
      "id": 9,
      "links": [],
      "options": {
        "maxValue": 100,
        "minValue": 0,
        "orientation": "auto",
        "showThresholdLabels": false,
        "showThresholdMarkers": true,
        "thresholds": [
          {
            "color": "green",
            "index": 0,
            "value": null
          },
          {
            "color": "semi-dark-blue",
            "index": 1,
            "value": 20
          },
          {
            "color": "#EF843C",
            "index": 2,
            "value": 40
          },
          {
            "color": "#EAB839",
            "index": 3,
            "value": 75
          },
          {
            "color": "#6ED0E0",
            "index": 4,
            "value": 100
          }
        ],
        "valueMappings": [],
        "valueOptions": {
          "decimals": null,
          "prefix": "",
          "stat": "mean",
          "suffix": "%",
          "unit": "none"
        }
      },
      "pluginVersion": "6.1.6",
      "targets": [
        {
          "expr": "sum(rate(container_cpu_user_seconds_total[5m]))/sum(kube_node_status_allocatable_cpu_cores)*100",
          "format": "time_series",
          "intervalFactor": 1,
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Used Cores",
      "transparent": true,
      "type": "gauge"
    },
    {
      "gridPos": {
        "h": 8,
        "w": 7,
        "x": 16,
        "y": 0
      },
      "id": 7,
      "links": [],
      "options": {
        "maxValue": 100,
        "minValue": 0,
        "orientation": "auto",
        "showThresholdLabels": false,
        "showThresholdMarkers": true,
        "thresholds": [
          {
            "color": "green",
            "index": 0,
            "value": null
          },
          {
            "color": "semi-dark-blue",
            "index": 1,
            "value": 20
          },
          {
            "color": "#EF843C",
            "index": 2,
            "value": 40
          },
          {
            "color": "#EAB839",
            "index": 3,
            "value": 75
          },
          {
            "color": "#6ED0E0",
            "index": 4,
            "value": 100
          }
        ],
        "valueMappings": [],
        "valueOptions": {
          "decimals": null,
          "prefix": "",
          "stat": "mean",
          "suffix": "",
          "unit": "none"
        }
      },
      "pluginVersion": "6.1.6",
      "targets": [
        {
          "expr": " sum(rate(container_cpu_user_seconds_total[10m]))",
          "format": "time_series",
          "intervalFactor": 1,
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Used Cores",
      "transparent": true,
      "type": "gauge"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS}",
      "description": "Total CPU use ",
      "fill": 1,
      "gridPos": {
        "h": 14,
        "w": 24,
        "x": 0,
        "y": 8
      },
      "id": 4,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": false,
        "max": false,
        "min": true,
        "rightSide": true,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "rate(container_cpu_user_seconds_total{namespace=~\"$namespace\",image=~\"$service\", pod_name=~\"$podname\",container_name=~\"$container\"}[5m])",
          "format": "time_series",
          "hide": false,
          "intervalFactor": 1,
          "legendFormat": "namespace:{{namespace}} pod:{{pod_name}}",
          "refId": "A"
        },
        {
          "expr": "rate(container_cpu_user_seconds_total{failure_domain_beta_kubernetes_io_region!=\"\",failure_domain_beta_kubernetes_io_zone!=\"\"}[5m])",
          "format": "time_series",
          "hide": true,
          "intervalFactor": 1,
          "legendFormat": "",
          "refId": "B"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "CPU consumtion",
      "tooltip": {
        "shared": true,
        "sort": 2,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "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
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS}",
      "decimals": null,
      "description": "All cluster view",
      "fill": 1,
      "gridPos": {
        "h": 15,
        "w": 24,
        "x": 0,
        "y": 22
      },
      "id": 2,
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": false,
        "hideEmpty": false,
        "hideZero": false,
        "max": true,
        "min": true,
        "rightSide": true,
        "show": true,
        "total": true,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 1,
      "points": false,
      "renderer": "flot",
      "repeat": null,
      "repeatDirection": "h",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum(rate(container_memory_working_set_bytes{namespace=~\"$namespace\",image=~\"$service\", pod_name=~\"$podname\",container_name=~\"$container\"}[5m])) by (pod_name)",
          "format": "time_series",
          "hide": false,
          "intervalFactor": 1,
          "legendFormat": "{{pod_name}}",
          "refId": "B"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Memory consumption",
      "tooltip": {
        "shared": false,
        "sort": 2,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "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
      }
    }
  ],
  "refresh": false,
  "schemaVersion": 18,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS}",
        "definition": "label_values(kube_pod_info,namespace)",
        "hide": 0,
        "includeAll": true,
        "label": "Namespace",
        "multi": true,
        "name": "namespace",
        "options": [],
        "query": "label_values(kube_pod_info,namespace)",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS}",
        "definition": "label_values(image)",
        "hide": 0,
        "includeAll": true,
        "label": "service",
        "multi": true,
        "name": "service",
        "options": [],
        "query": "label_values(image)",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS}",
        "definition": "label_values(pod_name)",
        "hide": 0,
        "includeAll": true,
        "label": "Podname",
        "multi": true,
        "name": "podname",
        "options": [],
        "query": "label_values(pod_name)",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "SHOW TAG VALUE FROM prometheus WITH KEY = ",
        "tags": [],
        "tagsQuery": "SHOW TAG VALUE FROM prometheus WITH KEY = \"pod_name\"",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS}",
        "definition": "label_values(container_name)",
        "hide": 0,
        "includeAll": true,
        "label": "container_name",
        "multi": true,
        "name": "container",
        "options": [],
        "query": "label_values(container_name)",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "SHOW TAG VALUE FROM prometheus WITH KEY = ",
        "tags": [],
        "tagsQuery": "SHOW TAG VALUE FROM prometheus WITH KEY = \"pod_name\"",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "2019-05-26T08:59:20.663Z",
    "to": "2019-05-26T08:59:55.262Z"
  },
  "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 view - CPU and Mem2",
  "uid": "9Pd7u5ZWl",
  "version": 4
}