{
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "uid": "-- Grafana --"
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "limit": 100,
        "name": "Annotations & Alerts",
        "showIn": 0,
        "type": "dashboard"
      }
    ]
  },
  "description": "Monitors all persistent volumes that exists within a Kubernetes cluster. Prometheus is used as datasource. ",
  "editable": true,
  "gnetId": 13646,
  "graphTooltip": 0,
  "iteration": 1609275169694,
  "links": [],
  "panels": [
    {
      "collapsed": false,
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 26,
      "panels": [],
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "refId": "A"
        }
      ],
      "title": "Alerts",
      "type": "row"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {},
          "decimals": 0,
          "mappings": [],
          "noValue": "--",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "light-green",
                "value": null
              },
              {
                "color": "light-green",
                "value": -0.0001
              },
              {
                "color": "semi-dark-orange",
                "value": 0.0001
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 8,
        "x": 0,
        "y": 1
      },
      "id": 22,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "percentChangeColorMode": "standard",
        "reduceOptions": {
          "calcs": ["mean"],
          "fields": "",
          "values": false
        },
        "showPercentChange": false,
        "textMode": "auto",
        "wideLayout": true
      },
      "pluginVersion": "7.2.1",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "(\n  count (\n    (kubelet_volume_stats_available_bytes{job=\"kubelet\", metrics_path=\"/metrics\", cluster=\"$cluster\", namespace=~\"$namespace\"})\n    and\n    (predict_linear(kubelet_volume_stats_available_bytes{job=\"kubelet\", metrics_path=\"/metrics\", cluster=\"$cluster\", namespace=~\"$namespace\"}[1d], 2 * 24 * 60 * 60) < 0)\n  )\n)\nor\nvector(0)",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "PVCs Full in 2 days - Based on Daily Usage",
      "transformations": [
        {
          "id": "organize",
          "options": {}
        }
      ],
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {},
          "decimals": 0,
          "mappings": [],
          "noValue": "--",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "light-green",
                "value": null
              },
              {
                "color": "light-green",
                "value": -0.0001
              },
              {
                "color": "semi-dark-orange",
                "value": 0.0001
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 8,
        "x": 8,
        "y": 1
      },
      "id": 28,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "percentChangeColorMode": "standard",
        "reduceOptions": {
          "calcs": ["mean"],
          "fields": "",
          "values": false
        },
        "showPercentChange": false,
        "textMode": "auto",
        "wideLayout": true
      },
      "pluginVersion": "7.2.1",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "(\n  count (\n    (kubelet_volume_stats_available_bytes{job=\"kubelet\", metrics_path=\"/metrics\", cluster=\"$cluster\", namespace=~\"$namespace\"})\n    and\n    (predict_linear(kubelet_volume_stats_available_bytes{job=\"kubelet\", metrics_path=\"/metrics\", cluster=\"$cluster\", namespace=~\"$namespace\"}[1d], 5 * 24 * 60 * 60) < 0)\n  )\n)\nor\nvector(0)",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "PVCs Full in 5 days - Based on Daily Usage",
      "transformations": [
        {
          "id": "organize",
          "options": {}
        }
      ],
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {},
          "decimals": 0,
          "mappings": [],
          "noValue": "--",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "light-green",
                "value": null
              },
              {
                "color": "light-green",
                "value": -0.0001
              },
              {
                "color": "semi-dark-orange",
                "value": 0.0001
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 8,
        "x": 16,
        "y": 1
      },
      "id": 27,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "percentChangeColorMode": "standard",
        "reduceOptions": {
          "calcs": ["mean"],
          "fields": "",
          "values": false
        },
        "showPercentChange": false,
        "textMode": "auto",
        "wideLayout": true
      },
      "pluginVersion": "7.2.1",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "(\n  count (\n    (kubelet_volume_stats_available_bytes{job=\"kubelet\", metrics_path=\"/metrics\", cluster=\"$cluster\", namespace=~\"$namespace\"})\n    and\n    (predict_linear(kubelet_volume_stats_available_bytes{job=\"kubelet\", metrics_path=\"/metrics\", cluster=\"$cluster\", namespace=~\"$namespace\"}[1d], 7 * 24 * 60 * 60) < 0)\n  )\n)\nor\nvector(0)",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "PVCs Full in 1 Week - Based on Daily Usage",
      "transformations": [
        {
          "id": "organize",
          "options": {}
        }
      ],
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {},
          "mappings": [],
          "noValue": "--",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "semi-dark-red",
                "value": null
              },
              {
                "color": "light-green",
                "value": -0.0001
              },
              {
                "color": "semi-dark-red",
                "value": 0.0001
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 8,
        "x": 0,
        "y": 5
      },
      "id": 21,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "percentChangeColorMode": "standard",
        "reduceOptions": {
          "calcs": ["mean"],
          "fields": "",
          "values": false
        },
        "showPercentChange": false,
        "textMode": "auto",
        "wideLayout": true
      },
      "pluginVersion": "7.2.1",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "count (max by (persistentvolumeclaim,namespace) (kubelet_volume_stats_used_bytes{job=\"kubelet\", metrics_path=\"/metrics\", cluster=\"$cluster\", namespace=~\"$namespace\"} ) and (max by (persistentvolumeclaim,namespace) (kubelet_volume_stats_used_bytes{job=\"kubelet\", metrics_path=\"/metrics\", cluster=\"$cluster\", namespace=~\"$namespace\"} )) / (max by (persistentvolumeclaim,namespace) (kubelet_volume_stats_capacity_bytes{job=\"kubelet\", metrics_path=\"/metrics\", cluster=\"$cluster\", namespace=~\"$namespace\"} )) >= (${warning_threshold} / 100)) or vector (0)",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "PVCs Above Warning Threshold",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {},
          "decimals": 0,
          "mappings": [],
          "noValue": "--",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "semi-dark-red",
                "value": null
              },
              {
                "color": "light-green",
                "value": -0.0001
              },
              {
                "color": "semi-dark-red",
                "value": 0.0001
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 8,
        "x": 8,
        "y": 5
      },
      "id": 24,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "percentChangeColorMode": "standard",
        "reduceOptions": {
          "calcs": ["mean"],
          "fields": "",
          "values": false
        },
        "showPercentChange": false,
        "textMode": "auto",
        "wideLayout": true
      },
      "pluginVersion": "7.2.1",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "count((kube_persistentvolumeclaim_status_phase{cluster=\"$cluster\", namespace=~\"$namespace\",phase=\"Pending\"}==1)) or vector(0)",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "PVCs in Pending State",
      "transformations": [
        {
          "id": "organize",
          "options": {}
        }
      ],
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {},
          "decimals": 0,
          "mappings": [],
          "noValue": "--",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "semi-dark-red",
                "value": null
              },
              {
                "color": "light-green",
                "value": -0.0001
              },
              {
                "color": "semi-dark-red",
                "value": 0.0001
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 8,
        "x": 16,
        "y": 5
      },
      "id": 23,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "percentChangeColorMode": "standard",
        "reduceOptions": {
          "calcs": ["mean"],
          "fields": "",
          "values": false
        },
        "showPercentChange": false,
        "textMode": "auto",
        "wideLayout": true
      },
      "pluginVersion": "7.2.1",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "count((kube_persistentvolumeclaim_status_phase{cluster=\"$cluster\", namespace=~\"$namespace\",phase=\"Lost\"}==1)) or vector(0)",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "PVCs in Lost State",
      "transformations": [
        {
          "id": "organize",
          "options": {}
        }
      ],
      "type": "stat"
    },
    {
      "collapsed": false,
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 9
      },
      "id": 17,
      "panels": [],
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "refId": "A"
        }
      ],
      "title": "Usage statistics",
      "type": "row"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": null,
            "cellOptions": {
              "type": "auto"
            },
            "filterable": false
          },
          "mappings": [],
          "noValue": "--",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "light-green",
                "value": null
              }
            ]
          },
          "unit": "none"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Used (%)"
            },
            "properties": [
              {
                "id": "custom.cellOptions",
                "value": {
                  "mode": "gradient",
                  "type": "gauge"
                }
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "light-green",
                      "value": null
                    },
                    {
                      "color": "semi-dark-yellow",
                      "value": 70
                    },
                    {
                      "color": "dark-red",
                      "value": 80
                    }
                  ]
                }
              },
              {
                "id": "decimals",
                "value": 1
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Status"
            },
            "properties": [
              {
                "id": "custom.cellOptions",
                "value": {
                  "mode": "gradient",
                  "type": "color-background"
                }
              },
              {
                "id": "mappings",
                "value": [
                  {
                    "options": {
                      "0": {
                        "text": "Bound"
                      },
                      "1": {
                        "text": "Pending"
                      },
                      "2": {
                        "text": "Lost"
                      }
                    },
                    "type": "value"
                  }
                ]
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "light-green",
                      "value": null
                    },
                    {
                      "color": "light-green",
                      "value": 0
                    },
                    {
                      "color": "semi-dark-orange",
                      "value": 1
                    },
                    {
                      "color": "semi-dark-red",
                      "value": 2
                    }
                  ]
                }
              },
              {
                "id": "noValue",
                "value": "--"
              },
              {
                "id": "custom.align",
                "value": "center"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Namespace"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 120
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Status"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 80
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Capacity (GiB)"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 120
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Used (GiB)"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 120
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Available (GiB)"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 120
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "StorageClass"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 150
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "PersistentVolumeClaim"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 370
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 12,
        "w": 24,
        "x": 0,
        "y": 10
      },
      "id": 29,
      "interval": "",
      "options": {
        "frameIndex": 2,
        "showHeader": true,
        "sortBy": [
          {
            "desc": false,
            "displayName": "PersistentVolumeClaim"
          }
        ]
      },
      "pluginVersion": "7.2.1",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "label_join(sum by (persistentvolumeclaim, namespace, storageclass, volumename) (kube_persistentvolumeclaim_info{cluster=\"$cluster\", namespace=~\"$namespace\"}), \"pvc_key\", \"/\", \"namespace\", \"persistentvolumeclaim\")",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "sum by (pvc_key) (label_join(sum by (persistentvolumeclaim, namespace) (kubelet_volume_stats_capacity_bytes{job=\"kubelet\", metrics_path=\"/metrics\", cluster=\"$cluster\", namespace=~\"$namespace\"} / 1024 / 1024 / 1024), \"pvc_key\", \"/\", \"namespace\", \"persistentvolumeclaim\"))",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "B"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "sum by (pvc_key) (label_join(sum by (persistentvolumeclaim, namespace) (kubelet_volume_stats_used_bytes{job=\"kubelet\", metrics_path=\"/metrics\", cluster=\"$cluster\", namespace=~\"$namespace\"} / 1024 / 1024 / 1024), \"pvc_key\", \"/\", \"namespace\", \"persistentvolumeclaim\"))",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "C"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "sum by (pvc_key) (label_join(sum by (persistentvolumeclaim, namespace) (kubelet_volume_stats_available_bytes{job=\"kubelet\", metrics_path=\"/metrics\", cluster=\"$cluster\", namespace=~\"$namespace\"} / 1024 / 1024 / 1024), \"pvc_key\", \"/\", \"namespace\", \"persistentvolumeclaim\"))",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "D"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "sum by (pvc_key) (label_join(sum by (persistentvolumeclaim, namespace) (kube_persistentvolumeclaim_status_phase{cluster=\"$cluster\", namespace=~\"$namespace\", phase=~\"(Pending|Lost)\"}) + sum by (persistentvolumeclaim, namespace) (kube_persistentvolumeclaim_status_phase{cluster=\"$cluster\", namespace=~\"$namespace\", phase=\"Lost\"}), \"pvc_key\", \"/\", \"namespace\", \"persistentvolumeclaim\"))",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "E"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "sum by (pvc_key) (label_join(sum by (persistentvolumeclaim, namespace) (kubelet_volume_stats_used_bytes{job=\"kubelet\", metrics_path=\"/metrics\", cluster=\"$cluster\", namespace=~\"$namespace\"} / kubelet_volume_stats_capacity_bytes{job=\"kubelet\", metrics_path=\"/metrics\", cluster=\"$cluster\", namespace=~\"$namespace\"} * 100), \"pvc_key\", \"/\", \"namespace\", \"persistentvolumeclaim\"))",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "F"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Persistent Volume Claim",
      "transformations": [
        {
          "id": "seriesToColumns",
          "options": {
            "byField": "pvc_key"
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": true,
              "Time 1": true,
              "Time 2": true,
              "Time 3": true,
              "Time 4": true,
              "Time 5": true,
              "Time 6": true,
              "Value #A": true,
              "pvc_key": true
            },
            "indexByName": {},
            "renameByName": {
              "Time 1": "",
              "Time 2": "",
              "Time 3": "",
              "Time 4": "",
              "Time 5": "",
              "Time 6": "",
              "Value #A": "",
              "Value #B": "Capacity (GiB)",
              "Value #C": "Used (GiB)",
              "Value #D": "Available (GiB)",
              "Value #E": "Status",
              "Value #F": "Used (%)",
              "namespace": "Namespace",
              "persistentvolumeclaim": "PersistentVolumeClaim",
              "storageclass": "StorageClass",
              "volumename": "PhysicalVolume"
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": null,
            "filterable": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 24,
        "x": 0,
        "y": 22
      },
      "id": 7,
      "options": {
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "Status"
          }
        ]
      },
      "pluginVersion": "7.2.1",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "kube_storageclass_info{cluster=\"$cluster\"}",
          "format": "table",
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Storage Class",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": true,
              "Value": true,
              "__name__": true,
              "app_kubernetes_io_instance": true,
              "app_kubernetes_io_name": true,
              "instance": true,
              "job": true,
              "kubernetes_namespace": true,
              "kubernetes_pod_name": true,
              "pod_template_hash": true
            },
            "indexByName": {
              "Time": 1,
              "Value": 13,
              "__name__": 2,
              "app_kubernetes_io_instance": 3,
              "app_kubernetes_io_name": 4,
              "instance": 5,
              "job": 6,
              "kubernetes_namespace": 7,
              "kubernetes_pod_name": 8,
              "pod_template_hash": 9,
              "provisioner": 10,
              "reclaimPolicy": 11,
              "storageclass": 0,
              "volumeBindingMode": 12
            },
            "renameByName": {
              "provisioner": "Provisioner",
              "reclaimPolicy": "ReclaimPolicy",
              "storageclass": "StorageClass",
              "volumeBindingMode": "VolumeBindingMode"
            }
          }
        },
        {
          "id": "groupBy",
          "options": {
            "fields": {
              "Provisioner": {
                "aggregations": [],
                "operation": "groupby"
              },
              "ReclaimPolicy": {
                "aggregations": [],
                "operation": "groupby"
              },
              "StorageClass": {
                "aggregations": [],
                "operation": "groupby"
              },
              "VolumeBindingMode": {
                "aggregations": [],
                "operation": "groupby"
              }
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "collapsed": false,
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 27
      },
      "id": 15,
      "panels": [],
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "refId": "A"
        }
      ],
      "title": "Graphical usage data ",
      "type": "row"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "fieldConfig": {
        "defaults": {
          "custom": {}
        },
        "overrides": []
      },
      "fill": 0,
      "fillGradient": 0,
      "gridPos": {
        "h": 12,
        "w": 24,
        "x": 0,
        "y": 28
      },
      "hiddenSeries": false,
      "id": 9,
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": true,
        "max": true,
        "min": true,
        "rightSide": true,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.2.1",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "(max by (persistentvolumeclaim,namespace) (kubelet_volume_stats_used_bytes{job=\"kubelet\", metrics_path=\"/metrics\", cluster=\"$cluster\", namespace=~\"$namespace\"}))",
          "interval": "",
          "legendFormat": "{{namespace}} ({{persistentvolumeclaim}})",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "All Running PVCs Used Bytes",
      "tooltip": {
        "shared": true,
        "sort": 2,
        "value_type": "individual"
      },
      "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": "Date & time",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "collapsed": true,
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 40
      },
      "id": 19,
      "panels": [
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "fieldConfig": {
            "defaults": {
              "custom": {}
            },
            "overrides": []
          },
          "fill": 0,
          "fillGradient": 0,
          "gridPos": {
            "h": 7,
            "w": 24,
            "x": 0,
            "y": 41
          },
          "hiddenSeries": false,
          "id": 11,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": false,
            "max": false,
            "min": false,
            "rightSide": true,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "7.2.1",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "rate(kubelet_volume_stats_used_bytes{job=\"kubelet\", metrics_path=\"/metrics\", cluster=\"$cluster\", namespace=~\"$namespace\"}[1h])",
              "instant": false,
              "interval": "",
              "legendFormat": "{{namespace}} ({{persistentvolumeclaim}})",
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "Hourly Volume Usage Rate",
          "tooltip": {
            "shared": true,
            "sort": 2,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "binBps",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "Date & time",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "fieldConfig": {
            "defaults": {
              "custom": {}
            },
            "overrides": []
          },
          "fill": 0,
          "fillGradient": 0,
          "gridPos": {
            "h": 7,
            "w": 24,
            "x": 0,
            "y": 48
          },
          "hiddenSeries": false,
          "id": 12,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": false,
            "max": false,
            "min": false,
            "rightSide": true,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "7.2.1",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "rate(kubelet_volume_stats_used_bytes{job=\"kubelet\", metrics_path=\"/metrics\", cluster=\"$cluster\", namespace=~\"$namespace\"}[1d])",
              "interval": "",
              "legendFormat": "{{namespace}} ({{persistentvolumeclaim}})",
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "Daily Volume Usage Rate",
          "tooltip": {
            "shared": true,
            "sort": 2,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "binBps",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "Date & time",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "fieldConfig": {
            "defaults": {
              "custom": {}
            },
            "overrides": []
          },
          "fill": 0,
          "fillGradient": 0,
          "gridPos": {
            "h": 7,
            "w": 24,
            "x": 0,
            "y": 55
          },
          "hiddenSeries": false,
          "id": 13,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": false,
            "max": false,
            "min": false,
            "rightSide": true,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "7.2.1",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "rate(kubelet_volume_stats_used_bytes{job=\"kubelet\", metrics_path=\"/metrics\", cluster=\"$cluster\", namespace=~\"$namespace\"}[1w])",
              "instant": false,
              "interval": "",
              "legendFormat": "{{namespace}} ({{persistentvolumeclaim}})",
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "Weekly Volume Usage Rate",
          "tooltip": {
            "shared": true,
            "sort": 2,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "binBps",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "Date & time",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        }
      ],
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "refId": "A"
        }
      ],
      "title": "Usage Rate",
      "type": "row"
    }
  ],
  "refresh": "1m",
  "schemaVersion": 42,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "current": {},
        "error": null,
        "hide": 0,
        "includeAll": false,
        "label": "Datasource",
        "multi": false,
        "name": "datasource",
        "options": [],
        "query": "prometheus",
        "queryValue": "",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "type": "datasource"
      },
      {
        "current": {},
        "datasource": {
          "type": "prometheus",
          "uid": "${datasource}"
        },
        "definition": "label_values(kube_node_info, cluster)",
        "hide": 0,
        "includeAll": false,
        "label": "Cluster",
        "multi": false,
        "name": "cluster",
        "options": [],
        "query": {
          "qryType": 1,
          "query": "label_values(kube_node_info, cluster)",
          "refId": "PrometheusVariableQueryEditor-Cluster"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "type": "query"
      },
      {
        "allValue": ".*",
        "current": {},
        "datasource": {
          "type": "prometheus",
          "uid": "${datasource}"
        },
        "definition": "label_values(kube_persistentvolumeclaim_info{cluster=\"$cluster\"}, namespace)",
        "hide": 0,
        "includeAll": true,
        "label": "Namespace",
        "multi": true,
        "name": "namespace",
        "options": [],
        "query": {
          "query": "label_values(kube_persistentvolumeclaim_info{cluster=\"$cluster\"}, namespace)",
          "refId": "PrometheusVariableQueryEditor-Namespace"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "type": "query"
      },
      {
        "current": {
          "selected": false,
          "text": "80",
          "value": "80"
        },
        "hide": 2,
        "label": "PVC % Used Warning Threshold",
        "name": "warning_threshold",
        "options": [
          {
            "selected": true,
            "text": "80",
            "value": "80"
          }
        ],
        "query": "80",
        "skipUrlSync": false,
        "type": "textbox"
      }
    ]
  },
  "time": {
    "from": "now-24h",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "Kubernetes / Storage / Persistent Volumes",
  "uid": "k8s_storage_persistent_volumes",
  "version": 1,
  "id": null
}
