Grafana dashboard: Proxmox VE Storages
Description: Display storage from Proxmox VE

Configure Proxmox VE to send metrics to InfluxDB https://pve.proxmox.com/wiki/External_Metric_Server

https://www.cv4pve-metrics.com

https://github.com/Corsinvest/cv4pve-metrics

https://www.corsinvest.it

{
  "__inputs": [
    {
      "name": "DS_PROXMOX",
      "label": "proxmox",
      "description": "",
      "type": "datasource",
      "pluginId": "influxdb",
      "pluginName": "InfluxDB"
    }
  ],
  "__requires": [
    {
      "type": "panel",
      "id": "gauge",
      "name": "Gauge",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "6.5.2"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "influxdb",
      "name": "InfluxDB",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "limit": 100,
        "name": "Annotations & Alerts",
        "showIn": 0,
        "type": "dashboard"
      }
    ]
  },
  "description": "Display storage from Proxmox VE",
  "editable": true,
  "gnetId": 12914,
  "graphTooltip": 1,
  "id": null,
  "iteration": 1598615853382,
  "links": [
    {
      "icon": "external link",
      "tags": [],
      "targetBlank": true,
      "title": "cv4pve-tools",
      "tooltip": "cv4pve-tools",
      "type": "link",
      "url": "https://www.corsinvest.it/cv4pve-tools"
    }
  ],
  "panels": [
    {
      "collapsed": false,
      "datasource": null,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 52,
      "panels": [],
      "title": "Storage",
      "type": "row"
    },
    {
      "columns": [],
      "datasource": "${DS_PROXMOX}",
      "fontSize": "100%",
      "gridPos": {
        "h": 6,
        "w": 24,
        "x": 0,
        "y": 1
      },
      "id": 73,
      "options": {},
      "pageSize": null,
      "showHeader": true,
      "sort": {
        "col": 0,
        "desc": true
      },
      "styles": [
        {
          "alias": "Time",
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "pattern": "Time",
          "type": "hidden"
        },
        {
          "alias": "Used",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "decimals": 2,
          "pattern": "used",
          "thresholds": [],
          "type": "number",
          "unit": "decbytes"
        },
        {
          "alias": "Available",
          "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": "avail",
          "thresholds": [],
          "type": "number",
          "unit": "decbytes"
        },
        {
          "alias": "Storage",
          "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": "host",
          "thresholds": [],
          "type": "string",
          "unit": "short"
        },
        {
          "alias": "Type",
          "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,
          "link": false,
          "mappingType": 1,
          "pattern": "type",
          "thresholds": [],
          "type": "string",
          "unit": "short",
          "valueMaps": []
        },
        {
          "alias": "Total",
          "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": "total",
          "thresholds": [],
          "type": "number",
          "unit": "decbytes"
        },
        {
          "alias": "Percent",
          "colorMode": "row",
          "colors": [
            "rgba(50, 172, 45, 0.97)",
            "#FA6400",
            "rgba(245, 54, 54, 0.9)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "perc",
          "thresholds": [
            "70",
            "80",
            "90"
          ],
          "type": "number",
          "unit": "percent"
        }
      ],
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "host"
              ],
              "type": "tag"
            },
            {
              "params": [
                "type"
              ],
              "type": "tag"
            }
          ],
          "hide": false,
          "measurement": "system",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT mean(\"used\") as used, mean(\"avail\") as avail ,mean(\"total\") as total, mean(\"perc\") as perc FROM \n(SELECT used, avail, total, used / total * 100  as perc FROM \"system\" WHERE (\"object\" = 'storages'   AND \"host\" =~ /^$storage$/ ) AND $timeFilter )\nGROUP BY \"host\", \"type\"",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "used"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ],
            [
              {
                "params": [
                  "avail"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": [
            {
              "key": "object",
              "operator": "=",
              "value": "storages"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Storages",
      "transform": "table",
      "type": "table"
    },
    {
      "collapsed": false,
      "datasource": null,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 7
      },
      "id": 88,
      "panels": [],
      "repeat": "storage",
      "title": "$storage",
      "type": "row"
    },
    {
      "datasource": "${DS_PROXMOX}",
      "gridPos": {
        "h": 6,
        "w": 4,
        "x": 0,
        "y": 8
      },
      "id": 84,
      "options": {
        "fieldOptions": {
          "calcs": [
            "mean"
          ],
          "defaults": {
            "mappings": [],
            "max": 100,
            "min": 0,
            "thresholds": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 70
              },
              {
                "color": "dark-red",
                "value": 90
              }
            ],
            "unit": "percent"
          },
          "override": {},
          "values": false
        },
        "orientation": "auto",
        "showThresholdLabels": false,
        "showThresholdMarkers": true
      },
      "pluginVersion": "6.5.2",
      "repeat": null,
      "repeatDirection": "h",
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "system",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT mean(\"perc\") AS Perc FROM \n(SELECT used / total *100  AS perc FROM \"system\" WHERE (\"object\" = 'storages' AND \"host\" =~ /^$storage$/) AND $timeFilter )\nGROUP BY time($__interval) fill(null)",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "used"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              },
              {
                "params": [
                  "Used"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": [
            {
              "key": "object",
              "operator": "=",
              "value": "storages"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "",
      "transparent": true,
      "type": "gauge"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROXMOX}",
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 6,
        "w": 20,
        "x": 4,
        "y": 8
      },
      "hiddenSeries": false,
      "id": 74,
      "legend": {
        "alignAsTable": false,
        "avg": false,
        "current": true,
        "hideEmpty": false,
        "hideZero": false,
        "max": false,
        "min": false,
        "rightSide": false,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "maxPerRow": 2,
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "repeat": null,
      "repeatDirection": null,
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "$interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "hide": false,
          "measurement": "system",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT mean(\"used\") as used, mean(\"avail\") as avail ,mean(\"total\") as total, mean(\"perc\") as perc FROM \n(SELECT used, avail, total, used / total * 100  as perc FROM \"system\" WHERE (\"object\" = 'storages') AND $timeFilter )\nGROUP BY \"host\", \"type\"",
          "rawQuery": false,
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "used"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              },
              {
                "params": [
                  "Used"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "total"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              },
              {
                "params": [
                  "Total"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": [
            {
              "key": "object",
              "operator": "=",
              "value": "storages"
            },
            {
              "condition": "AND",
              "key": "host",
              "operator": "=~",
              "value": "/^$storage$/"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": 2,
          "format": "decbytes",
          "label": "",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    }
  ],
  "refresh": "5m",
  "schemaVersion": 21,
  "style": "dark",
  "tags": [
    "Proxmox VE",
    "Storage"
  ],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROXMOX}",
        "definition": "SHOW TAG VALUES FROM system WITH KEY=host WHERE object='nodes'",
        "hide": 0,
        "includeAll": true,
        "label": "Node",
        "multi": true,
        "name": "node",
        "options": [],
        "query": "SHOW TAG VALUES FROM system WITH KEY=host WHERE object='nodes'",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 5,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROXMOX}",
        "definition": "SHOW TAG VALUES FROM system WITH KEY=host WHERE object='storages' AND \"nodename\" =~ /^$node$/",
        "hide": 0,
        "includeAll": true,
        "label": "Storage",
        "multi": true,
        "name": "storage",
        "options": [],
        "query": "SHOW TAG VALUES FROM system WITH KEY=host WHERE object='storages' AND \"nodename\" =~ /^$node$/",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 5,
        "tagValuesQuery": "$host",
        "tags": [
          "dir",
          "nfs",
          "zfspool"
        ],
        "tagsQuery": "SHOW TAG VALUES FROM system WITH KEY=type WHERE object='storages' AND \"nodename\" =~ /^$node$/",
        "type": "query",
        "useTags": true
      }
    ]
  },
  "time": {
    "from": "now-7d",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "",
  "title": "Proxmox VE Storages",
  "uid": "GBU_ZvxWk",
  "version": 10
}