Grafana dashboard: memory-usage
Description: This Graph shows pod memory usage on Devtron dashboard.

https://www.devtron.ai

This is a part of Devtron config. 
This Graph shows pod memory usage on Devtron dashboard.

For clusters K8s 1.16 and above.
https://www.devtron.ai

{
  "__inputs": [],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "7.0.3"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "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": 13325,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1604310333784,
  "links": [],
  "panels": [
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "$datasource",
      "fieldConfig": {
        "defaults": {
          "custom": {}
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 10,
        "w": 11,
        "x": 0,
        "y": 0
      },
      "hiddenSeries": false,
      "id": 2,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum by (label_appId,label_envId,label_rollouts_pod_template_hash) (\n    label_replace(\n    max(\n    kube_pod_labels{label_appId=\"$app\",label_envId=\"$env\"}) by (label_appId,label_envId, pod, label_rollouts_pod_template_hash)\n    ,\"label_rollouts_pod_template_hash\",  \"$1(new)\", \"label_rollouts_pod_template_hash\",  \"($new_rollout_pod_template_hash)\")\n    *\n    on(pod)\n    group_right(label_appId, label_envId, label_rollouts_pod_template_hash)\n    label_replace(\n       sum by(pod) (\n           container_memory_working_set_bytes{container!=\"\", container!=\"POD\"}\n       ), \"pod\", \"$1\",\"pod\", \"(.+)\"\n    )\n)",
          "format": "time_series",
          "hide": false,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "{{label_rollouts_pod_template_hash}}",
          "refId": "A"
        },
        {
          "expr": "sum by (label_app_id,label_env_id,label_rollouts_pod_template_hash) (\n    label_replace(\n    max(\n    kube_pod_labels{label_app_id=\"$app\",label_env_id=\"$env\"}) by (label_app_id,label_env_id, pod, label_rollouts_pod_template_hash)\n    ,\"label_rollouts_pod_template_hash\",  \"$1(new)\", \"label_rollouts_pod_template_hash\",  \"($new_rollout_pod_template_hash)\")\n    *\n    on(pod)\n    group_right(label_app_id, label_env_id, label_rollouts_pod_template_hash)\n    label_replace(\n       sum by(pod) (\n           container_memory_working_set_bytes{container!=\"\", container!=\"POD\"}\n       ), \"pod\", \"$1\",\"pod\", \"(.+)\"\n    )\n)",
          "format": "time_series",
          "hide": false,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "{{label_rollouts_pod_template_hash}}",
          "refId": "B"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "",
      "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": "decbytes",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "$datasource",
      "fieldConfig": {
        "defaults": {
          "custom": {}
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 10,
        "w": 11,
        "x": 11,
        "y": 0
      },
      "hiddenSeries": false,
      "id": 4,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": false,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum by (label_appId,label_envId,label_rollouts_pod_template_hash) (\n    label_replace(\n    max(\n    kube_pod_labels{label_appId=\"$app\",label_envId=\"$env\"}) by (label_appId,label_envId, pod, label_rollouts_pod_template_hash)\n    ,\"label_rollouts_pod_template_hash\",  \"$1(new)\", \"label_rollouts_pod_template_hash\",  \"($new_rollout_pod_template_hash)\")\n    *\n    on(pod)\n    group_right(label_appId, label_envId, label_rollouts_pod_template_hash)\n    label_replace(\n       sum by(pod) (\n           container_memory_working_set_bytes{container!=\"\", container!=\"POD\"}\n       ), \"pod\", \"$1\",\"pod\", \"(.+)\"\n    )\n)",
          "format": "time_series",
          "hide": false,
          "intervalFactor": 1,
          "legendFormat": "{{label_rollouts_pod_template_hash}}",
          "refId": "A"
        },
        {
          "expr": "sum by (label_app_id,label_env_id,label_rollouts_pod_template_hash) (\n    label_replace(\n    max(\n    kube_pod_labels{label_app_id=\"$app\",label_env_id=\"$env\"}) by (label_app_id,label_env_id, pod, label_rollouts_pod_template_hash)\n    ,\"label_rollouts_pod_template_hash\",  \"$1(new)\", \"label_rollouts_pod_template_hash\",  \"($new_rollout_pod_template_hash)\")\n    *\n    on(pod)\n    group_right(label_app_id, label_env_id, label_rollouts_pod_template_hash)\n    label_replace(\n       sum by(pod) (\n           container_memory_working_set_bytes{container!=\"\", container!=\"POD\"}\n       ), \"pod\", \"$1\",\"pod\", \"(.+)\"\n    )\n)",
          "format": "time_series",
          "hide": false,
          "intervalFactor": 1,
          "legendFormat": "{{label_rollouts_pod_template_hash}}",
          "refId": "B"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "",
      "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": "decbytes",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "$datasource",
      "fieldConfig": {
        "defaults": {
          "custom": {}
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 10
      },
      "hiddenSeries": false,
      "id": 3,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum by (pod,label_appId,label_envId,label_rollouts_pod_template_hash) (\n    label_replace(\n    max(\n    kube_pod_labels{label_appId=\"$app\",label_envId=\"$env\"}) by (label_appId,label_envId, pod, label_rollouts_pod_template_hash)\n    ,\"label_rollouts_pod_template_hash\",  \"$1(new)\", \"label_rollouts_pod_template_hash\",  \"($new_rollout_pod_template_hash)\")\n    *\n    on(pod)\n    group_right(label_appId, label_envId, label_rollouts_pod_template_hash)\n    label_replace(\n       sum by(pod) (\n           container_memory_working_set_bytes{container!=\"\", container!=\"POD\"}\n       ), \"pod\", \"$1\",\"pod\", \"(.+)\"\n    )\n)",
          "format": "time_series",
          "hide": false,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "{{pod}}",
          "refId": "A"
        },
        {
          "expr": "sum by (pod,label_app_id,label_env_id,label_rollouts_pod_template_hash) (\n    label_replace(\n    max(\n    kube_pod_labels{label_app_id=\"$app\",label_env_id=\"$env\"}) by (label_app_id,label_env_id, pod, label_rollouts_pod_template_hash)\n    ,\"label_rollouts_pod_template_hash\",  \"$1(new)\", \"label_rollouts_pod_template_hash\",  \"($new_rollout_pod_template_hash)\")\n    *\n    on(pod)\n    group_right(label_app_id, label_env_id, label_rollouts_pod_template_hash)\n    label_replace(\n       sum by(pod) (\n           container_memory_working_set_bytes{container!=\"\", container!=\"POD\"}\n       ), \"pod\", \"$1\",\"pod\", \"(.+)\"\n    )\n)",
          "format": "time_series",
          "hide": false,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "{{pod}}",
          "refId": "B"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "",
      "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": "decbytes",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "$datasource",
      "fieldConfig": {
        "defaults": {
          "custom": {}
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 8,
        "w": 11,
        "x": 12,
        "y": 10
      },
      "hiddenSeries": false,
      "id": 5,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": false,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum by (pod,label_appId,label_envId,label_rollouts_pod_template_hash) (\n    label_replace(\n    max(\n    kube_pod_labels{label_appId=\"$app\",label_envId=\"$env\"}) by (label_appId,label_envId, pod, label_rollouts_pod_template_hash)\n    ,\"label_rollouts_pod_template_hash\",  \"$1(new)\", \"label_rollouts_pod_template_hash\",  \"($new_rollout_pod_template_hash)\")\n    *\n    on(pod)\n    group_right(label_appId, label_envId, label_rollouts_pod_template_hash)\n    label_replace(\n       sum by(pod) (\n           container_memory_working_set_bytes{container!=\"\", container!=\"POD\"}\n       ), \"pod\", \"$1\",\"pod\", \"(.+)\"\n    )\n)",
          "format": "time_series",
          "hide": false,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "{{pod}}",
          "refId": "A"
        },
        {
          "expr": "sum by (pod,label_app_id,label_env_id,label_rollouts_pod_template_hash) (\n    label_replace(\n    max(\n    kube_pod_labels{label_app_id=\"$app\",label_env_id=\"$env\"}) by (label_app_id,label_env_id, pod, label_rollouts_pod_template_hash)\n    ,\"label_rollouts_pod_template_hash\",  \"$1(new)\", \"label_rollouts_pod_template_hash\",  \"($new_rollout_pod_template_hash)\")\n    *\n    on(pod)\n    group_right(label_app_id, label_env_id, label_rollouts_pod_template_hash)\n    label_replace(\n       sum by(pod) (\n           container_memory_working_set_bytes{container!=\"\", container!=\"POD\"}\n       ), \"pod\", \"$1\",\"pod\", \"(.+)\"\n    )\n)",
          "format": "time_series",
          "hide": false,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "{{pod}}",
          "refId": "B"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "",
      "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": "decbytes",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    }
  ],
  "refresh": "10s",
  "schemaVersion": 25,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "$datasource",
        "definition": "label_values(kube_pod_labels,label_appId)",
        "hide": 0,
        "includeAll": false,
        "label": "app",
        "multi": false,
        "name": "app",
        "options": [],
        "query": "label_values(kube_pod_labels,label_appId)",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "$datasource",
        "definition": "label_values(kube_pod_labels,label_envId)",
        "hide": 0,
        "includeAll": false,
        "label": "env",
        "multi": false,
        "name": "env",
        "options": [],
        "query": "label_values(kube_pod_labels,label_envId)",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "current": {
          "selected": false,
          "text": "65d74b6698",
          "value": "65d74b6698"
        },
        "hide": 0,
        "label": "new_rollout_pod_template_hash",
        "name": "new_rollout_pod_template_hash",
        "options": [
          {
            "selected": true,
            "text": "65d74b6698",
            "value": "65d74b6698"
          }
        ],
        "query": "65d74b6698",
        "skipUrlSync": false,
        "type": "textbox"
      },
      {
        "current": {
          "selected": false,
          "text": "Prometheus",
          "value": "Prometheus"
        },
        "hide": 0,
        "includeAll": false,
        "label": "datasource",
        "multi": false,
        "name": "datasource",
        "options": [],
        "query": "prometheus",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "type": "datasource"
      }
    ]
  },
  "time": {
    "from": "now-6h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "",
  "title": "memory-usage",
  "uid": "devtron-app-metrics-memory",
  "version": 4,
  "description": "This Graph shows pod memory usage on Devtron dashboard.\n\nhttps://www.devtron.ai"
}