Kubernetes Pods
Kubernetes to monitor POD statistics
test
Kubernetes to monitor POD statistics
{
  "__inputs": [
    {
      "name": "DS_PROMETHEUS",
      "label": "Prometheus",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "5.0.0-beta1"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "text",
      "name": "Text",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "description": "Kubernetes to monitor POD statistics",
  "editable": true,
  "gnetId": 9029,
  "graphTooltip": 1,
  "id": null,
  "iteration": 1518600378158,
  "links": [],
  "panels": [
    {
      "content": "<h2 style=\"height:100%; text-align: center; display: flex; align-items: center; justify-content: center;\"><span style=\"color: #ff9900;\">$image</span></h2>",
      "gridPos": {
        "h": 2,
        "w": 13,
        "x": 0,
        "y": 0
      },
      "id": 13,
      "links": [],
      "mode": "html",
      "title": "Running Image",
      "type": "text"
    },
    {
      "content": "<h2 style=\"height:100%; text-align: center; display: flex; align-items: center; justify-content: center;\"><span style=\"color: #ff9900;\">$pod</span></h2>",
      "gridPos": {
        "h": 2,
        "w": 11,
        "x": 13,
        "y": 0
      },
      "id": 3,
      "links": [],
      "mode": "html",
      "title": "Pod Name",
      "type": "text"
    },
    {
      "content": "<h2 style=\"height:100%; text-align: center; display: flex; align-items: center; justify-content: center;\"><span style=\"color: #ff9900;\">$node</span></h2>",
      "gridPos": {
        "h": 2,
        "w": 5,
        "x": 0,
        "y": 2
      },
      "id": 7,
      "links": [],
      "mode": "html",
      "title": "Node",
      "type": "text"
    },
    {
      "content": "<h2 style=\"height:100%; text-align: center; display: flex; align-items: center; justify-content: center;\"><span style=\"color: #ff9900;\">$pod_ip</span></h2>",
      "gridPos": {
        "h": 2,
        "w": 6,
        "x": 5,
        "y": 2
      },
      "id": 5,
      "links": [],
      "mode": "html",
      "title": "Pod IP",
      "type": "text"
    },
    {
      "content": "<h2 style=\"height:100%; text-align: center; display: flex; align-items: center; justify-content: center;\"><span style=\"color: #ff9900;\">$ready</span></h2>",
      "gridPos": {
        "h": 2,
        "w": 4,
        "x": 11,
        "y": 2
      },
      "id": 11,
      "links": [],
      "mode": "html",
      "title": "Ready Status",
      "type": "text"
    },
    {
      "content": "<h2 style=\"height:100%; text-align: center; display: flex; align-items: center; justify-content: center;\"><span style=\"color: #ff9900;\">$kind</span></h2>",
      "gridPos": {
        "h": 2,
        "w": 4,
        "x": 15,
        "y": 2
      },
      "id": 9,
      "links": [],
      "mode": "html",
      "title": "Deployment Kind",
      "type": "text"
    },
    {
      "content": "<h2 style=\"height:100%; text-align: center; display: flex; align-items: center; justify-content: center;\"><span style=\"color: #ff9900;\">$pod_ns</span></h2>",
      "gridPos": {
        "h": 2,
        "w": 5,
        "x": 19,
        "y": 2
      },
      "id": 15,
      "links": [],
      "mode": "html",
      "title": "Namespace",
      "type": "text"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS}",
      "editable": true,
      "error": false,
      "fill": 1,
      "grid": {},
      "gridPos": {
        "h": 5,
        "w": 24,
        "x": 0,
        "y": 4
      },
      "id": 1,
      "isNew": true,
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": true,
        "max": false,
        "min": false,
        "rightSide": true,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 2,
      "links": [],
      "nullPointMode": "connected",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum by(container_name) (container_memory_usage_bytes{pod_name=\"$pod\", container_name=~\"$container\", container_name!=\"POD\"})",
          "interval": "10s",
          "intervalFactor": 1,
          "legendFormat": "Current: {{ container_name }}",
          "metric": "container_memory_usage_bytes",
          "refId": "A",
          "step": 10
        },
        {
          "expr": "kube_pod_container_resource_requests_memory_bytes{pod=\"$pod\", container=~\"$container\"}",
          "interval": "10s",
          "intervalFactor": 2,
          "legendFormat": "Requested: {{ container }}",
          "metric": "kube_pod_container_resource_requests_memory_bytes",
          "refId": "B",
          "step": 20
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "Memory Usage",
      "tooltip": {
        "msResolution": true,
        "shared": true,
        "sort": 0,
        "value_type": "cumulative"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "bytes",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ]
    }
  ],
  "schemaVersion": 16,
  "style": "dark",
  "tags": [
    "kubernetes"
  ],
  "templating": {
    "list": [
      {
        "allValue": ".*",
        "current": {},
        "datasource": "${DS_PROMETHEUS}",
        "hide": 0,
        "includeAll": true,
        "label": "Namespace",
        "multi": false,
        "name": "namespace",
        "options": [],
        "query": "label_values(kube_pod_info, namespace)",
        "refresh": 1,
        "regex": "",
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS}",
        "hide": 0,
        "includeAll": false,
        "label": "Pod",
        "multi": false,
        "name": "pod",
        "options": [],
        "query": "label_values(kube_pod_info{namespace=~\"$namespace\"}, pod)",
        "refresh": 1,
        "regex": "",
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": ".*",
        "current": {},
        "datasource": "${DS_PROMETHEUS}",
        "hide": 0,
        "includeAll": true,
        "label": "Container",
        "multi": false,
        "name": "container",
        "options": [],
        "query": "label_values(kube_pod_info{namespace=~\"$namespace\"}, pod)",
        "refresh": 1,
        "regex": "",
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS}",
        "hide": 0,
        "includeAll": false,
        "label": "pod_ip",
        "multi": false,
        "name": "pod_ip",
        "options": [],
        "query": "label_values(kube_pod_info{pod=~\"$pod\"}, pod_ip)",
        "refresh": 1,
        "regex": "",
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS}",
        "hide": 0,
        "includeAll": false,
        "label": "node",
        "multi": false,
        "name": "node",
        "options": [],
        "query": "label_values(kube_pod_info{pod=~\"$pod\"}, node)",
        "refresh": 1,
        "regex": "",
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS}",
        "hide": 0,
        "includeAll": false,
        "label": "kind",
        "multi": false,
        "name": "kind",
        "options": [],
        "query": "label_values(kube_pod_info{pod=~\"$pod\"}, created_by_kind)",
        "refresh": 1,
        "regex": "",
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS}",
        "hide": 0,
        "includeAll": false,
        "label": "image",
        "multi": false,
        "name": "image",
        "options": [],
        "query": "label_values(kube_pod_container_info{pod=~\"$pod\"}, image)",
        "refresh": 1,
        "regex": "",
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS}",
        "hide": 0,
        "includeAll": false,
        "label": "ready",
        "multi": false,
        "name": "ready",
        "options": [],
        "query": "label_values(kube_pod_status_phase{pod=~\"$pod\"}, phase)",
        "refresh": 1,
        "regex": "",
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS}",
        "hide": 0,
        "includeAll": false,
        "label": "pod_ns",
        "multi": false,
        "name": "pod_ns",
        "options": [],
        "query": "label_values(kube_pod_status_phase{pod=~\"$pod\"}, namespace)",
        "refresh": 1,
        "regex": "",
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-6h",
    "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": "browser",
  "title": "Kubernetes Pods",
  "uid": "6tKfHH3zz",
  "version": 15
}