Grafana dashboard: Metricbeat Kubernetes Namespace Metrics
Description: Kubernetes Namespace level metrics using Elasticsearch Metricbeat

This dashboard shows Kubernetes cluster and node level metrics and events scoped to a specific Kubernetes cluster.

See also Kubernetes Cluster metrics:
https://grafana.com/grafana/dashboards/11701

{
  "__inputs": [],
  "__requires": [
    {
      "type": "datasource",
      "id": "elasticsearch",
      "name": "Elasticsearch",
      "version": "1.0.0"
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "6.1.6"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": 11700,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1581020322519,
  "links": [],
  "panels": [
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "$k8sindices",
      "decimals": null,
      "fill": 1,
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 0,
        "y": 0
      },
      "id": 2,
      "legend": {
        "alignAsTable": false,
        "avg": false,
        "current": 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": [
        {
          "alias": "/limit/",
          "color": "#bf1b00",
          "dashes": true,
          "fill": 0,
          "hideTooltip": true,
          "legend": false,
          "linewidth": 1
        },
        {
          "alias": "/requests/",
          "color": "#5794F2",
          "dashLength": 10,
          "dashes": true,
          "fill": 0,
          "legend": false,
          "linewidth": 1,
          "spaceLength": 20
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "",
          "bucketAggs": [
            {
              "fake": true,
              "field": "kubernetes.pod.name",
              "id": "4",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "1",
                "size": "10"
              },
              "type": "terms"
            },
            {
              "fake": true,
              "field": "kubernetes.container.name",
              "id": "3",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "1",
                "size": "15"
              },
              "type": "terms"
            },
            {
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "10s",
                "min_doc_count": 0,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "hide": false,
          "metrics": [
            {
              "field": "kubernetes.container.cpu.usage.nanocores",
              "id": "1",
              "inlineScript": "_value / 1000000000",
              "meta": {},
              "settings": {
                "script": {
                  "inline": "_value / 1000000000"
                }
              },
              "type": "sum"
            }
          ],
          "query": "kubernetes.node.name:$node AND kubernetes.namespace:$namespace AND kubernetes.pod.name:$podname",
          "refId": "C",
          "timeField": "@timestamp"
        },
        {
          "alias": "requests-{{term kubernetes.container.name}}",
          "bucketAggs": [
            {
              "fake": true,
              "field": "kubernetes.pod.name",
              "id": "4",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "_term",
                "size": "10"
              },
              "type": "terms"
            },
            {
              "fake": true,
              "field": "kubernetes.container.name",
              "id": "3",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "_term",
                "size": "15"
              },
              "type": "terms"
            },
            {
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "10s",
                "min_doc_count": 0,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "hide": false,
          "metrics": [
            {
              "field": "kubernetes.container.cpu.request.cores",
              "id": "1",
              "inlineScript": null,
              "meta": {},
              "settings": {},
              "type": "sum"
            }
          ],
          "query": "kubernetes.node.name:$node AND kubernetes.namespace:$namespace AND kubernetes.pod.name:$podname",
          "refId": "D",
          "timeField": "@timestamp"
        },
        {
          "alias": "limits-{{term kubernetes.container.name}}",
          "bucketAggs": [
            {
              "fake": true,
              "field": "kubernetes.pod.name",
              "id": "4",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "_term",
                "size": "10"
              },
              "type": "terms"
            },
            {
              "fake": true,
              "field": "kubernetes.container.name",
              "id": "3",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "_term",
                "size": "15"
              },
              "type": "terms"
            },
            {
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "10s",
                "min_doc_count": 0,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "hide": false,
          "metrics": [
            {
              "field": "kubernetes.container.cpu.limit.cores",
              "id": "1",
              "inlineScript": null,
              "meta": {},
              "settings": {},
              "type": "sum"
            }
          ],
          "query": "kubernetes.node.name:$node AND kubernetes.namespace:$namespace AND kubernetes.pod.name:$podname",
          "refId": "A",
          "timeField": "@timestamp"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Pod Container vCPU Usage",
      "tooltip": {
        "shared": true,
        "sort": 2,
        "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
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "$k8sindices",
      "fill": 1,
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 12,
        "y": 0
      },
      "id": 3,
      "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": [
        {
          "alias": "/limit/",
          "color": "#C4162A",
          "dashes": true,
          "fill": 0,
          "hideTooltip": true,
          "legend": false,
          "linewidth": 1
        },
        {
          "alias": "/request/",
          "color": "#5794F2",
          "dashLength": 10,
          "dashes": true,
          "fill": 0,
          "legend": false,
          "linewidth": 1,
          "spaceLength": 20
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "bucketAggs": [
            {
              "fake": true,
              "field": "kubernetes.pod.name",
              "id": "3",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "1",
                "size": "15"
              },
              "type": "terms"
            },
            {
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "10s",
                "min_doc_count": 0,
                "trimEdges": 2
              },
              "type": "date_histogram"
            }
          ],
          "metrics": [
            {
              "field": "kubernetes.pod.memory.usage.bytes",
              "id": "1",
              "meta": {},
              "settings": {},
              "type": "sum"
            }
          ],
          "query": "kubernetes.node.name:$node AND kubernetes.namespace:$namespace AND kubernetes.pod.name:$podname",
          "refId": "A",
          "timeField": "@timestamp"
        },
        {
          "alias": "request-{{term kubernetes.container.name}}",
          "bucketAggs": [
            {
              "fake": true,
              "field": "kubernetes.container.name",
              "id": "4",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "_term",
                "size": "10"
              },
              "type": "terms"
            },
            {
              "fake": true,
              "field": "kubernetes.pod.name",
              "id": "3",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "1",
                "size": "15"
              },
              "type": "terms"
            },
            {
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "10s",
                "min_doc_count": 0,
                "trimEdges": 2
              },
              "type": "date_histogram"
            }
          ],
          "metrics": [
            {
              "field": "kubernetes.container.memory.request.bytes",
              "id": "1",
              "meta": {},
              "settings": {},
              "type": "sum"
            }
          ],
          "query": "kubernetes.node.name:$node AND kubernetes.namespace:$namespace AND kubernetes.pod.name:$podname",
          "refId": "B",
          "timeField": "@timestamp"
        },
        {
          "alias": "limit-{{term kubernetes.container.name}}",
          "bucketAggs": [
            {
              "fake": true,
              "field": "kubernetes.container.name",
              "id": "4",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "_term",
                "size": "10"
              },
              "type": "terms"
            },
            {
              "fake": true,
              "field": "kubernetes.pod.name",
              "id": "3",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "1",
                "size": "15"
              },
              "type": "terms"
            },
            {
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "10s",
                "min_doc_count": 0,
                "trimEdges": 2
              },
              "type": "date_histogram"
            }
          ],
          "metrics": [
            {
              "field": "kubernetes.container.memory.limit.bytes",
              "id": "1",
              "meta": {},
              "settings": {},
              "type": "sum"
            }
          ],
          "query": "kubernetes.node.name:$node AND kubernetes.namespace:$namespace AND kubernetes.pod.name:$podname",
          "refId": "C",
          "timeField": "@timestamp"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Pod Memory Usage",
      "tooltip": {
        "shared": true,
        "sort": 2,
        "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
      }
    },
    {
      "aliasColors": {},
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": "$k8sindices",
      "fill": 0,
      "gridPos": {
        "h": 4,
        "w": 12,
        "x": 0,
        "y": 9
      },
      "id": 12,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": false,
      "linewidth": 2,
      "links": [],
      "maxPerRow": 1,
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "repeat": null,
      "repeatDirection": "h",
      "seriesOverrides": [
        {
          "alias": "/true/",
          "color": "#629e51"
        },
        {
          "alias": "/false/",
          "color": "#bf1b00"
        }
      ],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": true,
      "targets": [
        {
          "bucketAggs": [
            {
              "fake": true,
              "field": "kubernetes.pod.status.ready",
              "id": "6",
              "settings": {
                "min_doc_count": 1,
                "order": "asc",
                "orderBy": "_term",
                "size": "10"
              },
              "type": "terms"
            },
            {
              "fake": true,
              "field": "kubernetes.pod.name",
              "id": "5",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "_term",
                "size": "10"
              },
              "type": "terms"
            },
            {
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "10s",
                "min_doc_count": 0,
                "trimEdges": 1
              },
              "type": "date_histogram"
            }
          ],
          "metrics": [
            {
              "field": "select field",
              "id": "1",
              "type": "count"
            }
          ],
          "query": "kubernetes.node.name:$node AND kubernetes.namespace:$namespace AND kubernetes.pod.name:$podname",
          "refId": "A",
          "timeField": "@timestamp"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Pod Status - Ready",
      "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": false
        },
        {
          "format": "percentunit",
          "label": null,
          "logBase": 1,
          "max": "1",
          "min": "0",
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": "$k8sindices",
      "fill": 1,
      "gridPos": {
        "h": 4,
        "w": 12,
        "x": 12,
        "y": 9
      },
      "id": 13,
      "legend": {
        "avg": false,
        "current": false,
        "hideEmpty": false,
        "hideZero": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": false,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null as zero",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "/pending/",
          "color": "#e5ac0e"
        },
        {
          "alias": "/running/",
          "color": "#629e51"
        }
      ],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "alias": "",
          "bucketAggs": [
            {
              "fake": true,
              "field": "kubernetes.pod.status.phase",
              "id": "4",
              "settings": {
                "min_doc_count": 1,
                "order": "asc",
                "orderBy": "_term",
                "size": "10"
              },
              "type": "terms"
            },
            {
              "fake": true,
              "field": "kubernetes.pod.name",
              "id": "3",
              "settings": {
                "min_doc_count": 1,
                "missing": "0",
                "order": "desc",
                "orderBy": "_term",
                "size": "10"
              },
              "type": "terms"
            },
            {
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "10s",
                "min_doc_count": 0,
                "trimEdges": 1
              },
              "type": "date_histogram"
            }
          ],
          "hide": false,
          "metrics": [
            {
              "field": "kubernetes.pod.status.phase",
              "id": "1",
              "meta": {},
              "settings": {},
              "type": "count"
            }
          ],
          "query": "kubernetes.node.name:$node AND kubernetes.namespace:$namespace AND kubernetes.pod.name:$podname",
          "refId": "A",
          "timeField": "@timestamp"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Pod Status - Phase",
      "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": false
        },
        {
          "format": "percentunit",
          "label": null,
          "logBase": 1,
          "max": "1",
          "min": "0",
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "columns": [],
      "datasource": "$k8sindices",
      "fontSize": "80%",
      "gridPos": {
        "h": 9,
        "w": 3,
        "x": 0,
        "y": 13
      },
      "id": 7,
      "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": "date"
        },
        {
          "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": [
        {
          "alias": "Node: {{term kubernetes.node.name}}",
          "bucketAggs": [
            {
              "fake": true,
              "field": "kubernetes.node.name",
              "id": "3",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "_term",
                "size": "10"
              },
              "type": "terms"
            },
            {
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "auto",
                "min_doc_count": 1,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "metrics": [
            {
              "field": "select field",
              "id": "1",
              "type": "count"
            }
          ],
          "query": "kubernetes.node.name:$node AND kubernetes.namespace:$namespace AND kubernetes.pod.name:$podname",
          "refId": "B",
          "timeField": "@timestamp"
        }
      ],
      "timeFrom": null,
      "title": "Hosting Nodes",
      "transform": "timeseries_aggregations",
      "type": "table"
    },
    {
      "columns": [
        {
          "text": "Current",
          "value": "current"
        }
      ],
      "datasource": "$k8sindices",
      "fontSize": "80%",
      "gridPos": {
        "h": 9,
        "w": 9,
        "x": 3,
        "y": 13
      },
      "id": 9,
      "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": "date"
        },
        {
          "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": [
        {
          "alias": "Core Limit: {{term kubernetes.pod.name}}",
          "bucketAggs": [
            {
              "fake": true,
              "field": "kubernetes.pod.name",
              "id": "3",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "_term",
                "size": "10"
              },
              "type": "terms"
            },
            {
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "10s",
                "min_doc_count": 1,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "metrics": [
            {
              "field": "kubernetes.container.cpu.limit.cores",
              "id": "1",
              "meta": {},
              "settings": {},
              "type": "max"
            }
          ],
          "query": "kubernetes.node.name:$node AND kubernetes.namespace:$namespace AND kubernetes.pod.name:$podname",
          "refId": "B",
          "timeField": "@timestamp"
        },
        {
          "alias": "Memory Limit (GB): {{term kubernetes.pod.name}}",
          "bucketAggs": [
            {
              "fake": true,
              "field": "kubernetes.pod.name",
              "id": "3",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "_term",
                "size": "10"
              },
              "type": "terms"
            },
            {
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "10s",
                "min_doc_count": 1,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "metrics": [
            {
              "field": "kubernetes.container.memory.limit.bytes",
              "id": "1",
              "inlineScript": "_value / 1024/1024/1024",
              "meta": {},
              "settings": {
                "script": {
                  "inline": "_value / 1024/1024/1024"
                }
              },
              "type": "max"
            }
          ],
          "query": "kubernetes.node.name:$node AND kubernetes.namespace:$namespace AND kubernetes.pod.name:$podname",
          "refId": "A",
          "timeField": "@timestamp"
        },
        {
          "alias": "Memory Reserve (GB): {{term kubernetes.pod.name}}",
          "bucketAggs": [
            {
              "fake": true,
              "field": "kubernetes.pod.name",
              "id": "3",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "_term",
                "size": "10"
              },
              "type": "terms"
            },
            {
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "10s",
                "min_doc_count": 1,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "metrics": [
            {
              "field": "kubernetes.container.memory.request.bytes",
              "id": "1",
              "inlineScript": "_value / 1024/1024/1024",
              "meta": {},
              "settings": {
                "script": {
                  "inline": "_value / 1024/1024/1024"
                }
              },
              "type": "max"
            }
          ],
          "query": "kubernetes.node.name:$node AND kubernetes.namespace:$namespace AND kubernetes.pod.name:$podname",
          "refId": "C",
          "timeField": "@timestamp"
        },
        {
          "alias": "Core Requests: {{term kubernetes.pod.name}}",
          "bucketAggs": [
            {
              "fake": true,
              "field": "kubernetes.pod.name",
              "id": "3",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "_term",
                "size": "10"
              },
              "type": "terms"
            },
            {
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "10s",
                "min_doc_count": 1,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "metrics": [
            {
              "field": "kubernetes.container.cpu.request.cores",
              "id": "1",
              "meta": {},
              "settings": {},
              "type": "max"
            }
          ],
          "query": "kubernetes.node.name:$node AND kubernetes.namespace:$namespace AND kubernetes.pod.name:$podname",
          "refId": "D",
          "timeField": "@timestamp"
        }
      ],
      "timeFrom": null,
      "title": "Pod Quotas",
      "transform": "timeseries_aggregations",
      "type": "table"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "$k8sindices",
      "fill": 1,
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 12,
        "y": 13
      },
      "id": 4,
      "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": [
        {
          "alias": "/.*tx/",
          "transform": "negative-Y"
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "rx|{{term kubernetes.pod.name}}",
          "bucketAggs": [
            {
              "fake": true,
              "field": "kubernetes.pod.name",
              "id": "3",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "_term",
                "size": "15"
              },
              "type": "terms"
            },
            {
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "10s",
                "min_doc_count": 0,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "metrics": [
            {
              "field": "kubernetes.pod.network.rx.bytes",
              "hide": true,
              "id": "1",
              "meta": {},
              "settings": {},
              "type": "max"
            },
            {
              "field": "1",
              "id": "4",
              "meta": {},
              "pipelineAgg": "1",
              "settings": {},
              "type": "derivative"
            }
          ],
          "query": "kubernetes.node.name:$node AND kubernetes.namespace:$namespace AND kubernetes.pod.name:$podname",
          "refId": "A",
          "timeField": "@timestamp"
        },
        {
          "alias": "tx|{{term kubernetes.pod.name}}",
          "bucketAggs": [
            {
              "fake": true,
              "field": "kubernetes.pod.name",
              "id": "3",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "_term",
                "size": "15"
              },
              "type": "terms"
            },
            {
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "10s",
                "min_doc_count": 0,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "metrics": [
            {
              "field": "kubernetes.pod.network.tx.bytes",
              "hide": true,
              "id": "1",
              "meta": {},
              "settings": {},
              "type": "max"
            },
            {
              "field": "1",
              "id": "4",
              "meta": {},
              "pipelineAgg": "1",
              "settings": {},
              "type": "derivative"
            }
          ],
          "query": "kubernetes.node.name:$node AND kubernetes.namespace:$namespace AND kubernetes.pod.name:$podname",
          "refId": "B",
          "timeField": "@timestamp"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Pod Network Usage",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "bps",
          "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
      }
    },
    {
      "columns": [],
      "datasource": "$k8sindices",
      "fontSize": "80%",
      "gridPos": {
        "h": 6,
        "w": 7,
        "x": 0,
        "y": 22
      },
      "id": 19,
      "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": "date"
        },
        {
          "alias": "Container Events",
          "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": "Metric",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        }
      ],
      "targets": [
        {
          "alias": "{{term kubernetes.pod.name}} | {{term kubernetes.container.status.phase}} | {{term kubernetes.container.status.reason}}",
          "bucketAggs": [
            {
              "fake": true,
              "field": "kubernetes.pod.name",
              "id": "4",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "_term",
                "size": "10"
              },
              "type": "terms"
            },
            {
              "fake": true,
              "field": "kubernetes.container.status.phase",
              "id": "5",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "_term",
                "size": "10"
              },
              "type": "terms"
            },
            {
              "fake": true,
              "field": "kubernetes.container.status.reason",
              "id": "3",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "_term",
                "size": "10"
              },
              "type": "terms"
            },
            {
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "auto",
                "min_doc_count": 0,
                "trimEdges": null
              },
              "type": "date_histogram"
            }
          ],
          "metrics": [
            {
              "field": "select field",
              "id": "1",
              "meta": {},
              "settings": {},
              "type": "count"
            }
          ],
          "query": "kubernetes.node.name:$node AND kubernetes.namespace:$namespace AND kubernetes.pod.name:$podname AND kubernetes.container.status.ready:false",
          "refId": "A",
          "timeField": "@timestamp"
        }
      ],
      "timeFrom": null,
      "title": "Container Ready=False Reason",
      "transform": "timeseries_aggregations",
      "type": "table"
    },
    {
      "columns": [
        {
          "text": "Current",
          "value": "current"
        }
      ],
      "datasource": "$k8sindices",
      "fontSize": "80%",
      "gridPos": {
        "h": 6,
        "w": 5,
        "x": 7,
        "y": 22
      },
      "id": 10,
      "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": "date"
        },
        {
          "alias": "Container",
          "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": "Metric",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        },
        {
          "alias": "Max Restarts",
          "colorMode": "value",
          "colors": [
            "rgba(50, 172, 45, 0.97)",
            "rgba(237, 129, 40, 0.89)",
            "#bf1b00"
          ],
          "decimals": null,
          "pattern": "/Current/",
          "thresholds": [
            "10"
          ],
          "type": "number",
          "unit": "none"
        }
      ],
      "targets": [
        {
          "alias": "{{term kubernetes.pod.name}}",
          "bucketAggs": [
            {
              "fake": true,
              "field": "kubernetes.pod.name",
              "id": "4",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "_term",
                "size": "10"
              },
              "type": "terms"
            },
            {
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "10s",
                "min_doc_count": 1,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "metrics": [
            {
              "field": "kubernetes.container.status.restarts",
              "id": "1",
              "meta": {},
              "settings": {},
              "type": "max"
            }
          ],
          "query": "kubernetes.node.name:$node AND kubernetes.namespace:$namespace AND kubernetes.pod.name:$podname",
          "refId": "A",
          "timeField": "@timestamp"
        }
      ],
      "timeFrom": null,
      "title": "Pod Restarts",
      "transform": "timeseries_aggregations",
      "type": "table"
    },
    {
      "columns": [],
      "datasource": "$k8sindices",
      "fontSize": "80%",
      "gridPos": {
        "h": 6,
        "w": 12,
        "x": 12,
        "y": 22
      },
      "id": 8,
      "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": "date"
        },
        {
          "alias": "Container",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "decimals": 2,
          "pattern": "Metric",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        }
      ],
      "targets": [
        {
          "alias": "{{term kubernetes.pod.name}} | Image: {{term kubernetes.container.image}}",
          "bucketAggs": [
            {
              "fake": true,
              "field": "kubernetes.pod.name",
              "id": "4",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "_term",
                "size": "10"
              },
              "type": "terms"
            },
            {
              "fake": true,
              "field": "kubernetes.container.image",
              "id": "3",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "_term",
                "size": "10"
              },
              "type": "terms"
            },
            {
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "auto",
                "min_doc_count": 0,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "metrics": [
            {
              "field": "select field",
              "id": "1",
              "type": "count"
            }
          ],
          "query": "kubernetes.node.name:$node AND kubernetes.namespace:$namespace AND kubernetes.pod.name:$podname",
          "refId": "A",
          "timeField": "@timestamp"
        }
      ],
      "timeFrom": null,
      "title": "Container Image Version",
      "transform": "timeseries_aggregations",
      "type": "table"
    },
    {
      "columns": [],
      "datasource": "$k8sindices",
      "fontSize": "80%",
      "gridPos": {
        "h": 5,
        "w": 12,
        "x": 0,
        "y": 28
      },
      "id": 20,
      "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": "date"
        },
        {
          "alias": "Namespace Object Events",
          "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": "Metric",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        }
      ],
      "targets": [
        {
          "alias": "{{term kubernetes.event.involved_object.name}}   | {{term kubernetes.event.message}}",
          "bucketAggs": [
            {
              "fake": true,
              "field": "kubernetes.event.involved_object.name",
              "id": "4",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "_term",
                "size": "10"
              },
              "type": "terms"
            },
            {
              "fake": true,
              "field": "kubernetes.event.message",
              "id": "3",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "_term",
                "size": "10"
              },
              "type": "terms"
            },
            {
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "auto",
                "min_doc_count": 0,
                "trimEdges": null
              },
              "type": "date_histogram"
            }
          ],
          "metrics": [
            {
              "field": "select field",
              "id": "1",
              "meta": {},
              "settings": {},
              "type": "count"
            }
          ],
          "query": "host.name:$node AND kubernetes.event.metadata.namespace:$namespace",
          "refId": "A",
          "timeField": "@timestamp"
        }
      ],
      "timeFrom": null,
      "title": "Namespace Events",
      "transform": "timeseries_aggregations",
      "type": "table"
    }
  ],
  "refresh": false,
  "schemaVersion": 18,
  "style": "dark",
  "tags": [
    "containers"
  ],
  "templating": {
    "list": [
      {
        "current": {
          "text": "metricbeat-kubernetes-prod",
          "value": "metricbeat-kubernetes-prod"
        },
        "hide": 0,
        "includeAll": false,
        "label": "Indices",
        "multi": false,
        "name": "k8sindices",
        "options": [],
        "query": "elasticsearch",
        "refresh": 1,
        "regex": "/metricbeat-kubernetes/",
        "skipUrlSync": false,
        "type": "datasource"
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "$k8sindices",
        "definition": "{\"find\": \"terms\", \"field\": \"kubernetes.labels.cluster\", \"size\":200}",
        "hide": 0,
        "includeAll": false,
        "label": "Cluster",
        "multi": false,
        "name": "cluster",
        "options": [],
        "query": "{\"find\": \"terms\", \"field\": \"kubernetes.labels.cluster\", \"size\":200}",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "$k8sindices",
        "definition": "{\"find\": \"terms\", \"field\": \"kubernetes.node.name\", \"query\": \"kubernetes.labels.cluster:$cluster\"}",
        "hide": 2,
        "includeAll": true,
        "label": null,
        "multi": false,
        "name": "node",
        "options": [],
        "query": "{\"find\": \"terms\", \"field\": \"kubernetes.node.name\", \"query\": \"kubernetes.labels.cluster:$cluster\"}",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "$k8sindices",
        "definition": "{\"find\": \"terms\", \"field\": \"kubernetes.namespace\", \"query\": \"kubernetes.node.name:$node\", \"size\":300}",
        "hide": 0,
        "includeAll": false,
        "label": "Namespace",
        "multi": false,
        "name": "namespace",
        "options": [],
        "query": "{\"find\": \"terms\", \"field\": \"kubernetes.namespace\", \"query\": \"kubernetes.node.name:$node\", \"size\":300}",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "$k8sindices",
        "definition": "{\"find\": \"terms\", \"field\": \"kubernetes.pod.name\", \"query\": \"kubernetes.node.name:$node AND kubernetes.namespace:$namespace\"}",
        "hide": 0,
        "includeAll": true,
        "label": "Pod Name",
        "multi": true,
        "name": "podname",
        "options": [],
        "query": "{\"find\": \"terms\", \"field\": \"kubernetes.pod.name\", \"query\": \"kubernetes.node.name:$node AND kubernetes.namespace:$namespace\"}",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-1h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "",
  "title": "Metricbeat Kubernetes Namespace Metrics",
  "uid": "xFRhVeUmz",
  "version": 21,
  "description": "Kubernetes Namespace level metrics using Elasticsearch Metricbeat"
}