Grafana dashboard: Prometheus FileSystem Gauges
Description: Dashboard showing gauges for used file system space with maximum being set from total size.


{
  "__inputs": [
    {
      "name": "DS_PROMETHEUS",
      "label": "Prometheus",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__elements": [],
  "__requires": [
    {
      "type": "panel",
      "id": "gauge",
      "name": "Gauge",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "8.3.2"
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "description": "Dashboard showing gauges for used file system space with maximum being set from total size.",
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "id": null,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 75
              },
              {
                "color": "red",
                "value": 90
              }
            ]
          },
          "unit": "decbytes"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 5,
      "options": {
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true
      },
      "pluginVersion": "8.3.2",
      "repeatDirection": "h",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": false,
          "expr": "node_filesystem_size_bytes- node_filesystem_free_bytes",
          "format": "time_series",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "Free",
          "refId": "A"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "exemplar": false,
          "expr": "node_filesystem_size_bytes",
          "format": "time_series",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "Total",
          "refId": "B"
        }
      ],
      "title": "File systems used space",
      "transformations": [
        {
          "id": "labelsToFields",
          "options": {
            "keepLabels": [
              "mountpoint",
              "__name__"
            ]
          }
        },
        {
          "id": "merge",
          "options": {}
        },
        {
          "id": "sortBy",
          "options": {
            "fields": {},
            "sort": [
              {
                "desc": false,
                "field": "__name__"
              }
            ]
          }
        },
        {
          "id": "filterByValue",
          "options": {
            "filters": [
              {
                "config": {
                  "id": "regex",
                  "options": {
                    "value": "^/run.*$"
                  }
                },
                "fieldName": "mountpoint"
              }
            ],
            "match": "any",
            "type": "exclude"
          }
        },
        {
          "id": "groupBy",
          "options": {
            "fields": {
              "Value": {
                "aggregations": [
                  "min",
                  "max"
                ],
                "operation": "aggregate"
              },
              "mountpoint": {
                "aggregations": [],
                "operation": "groupby"
              }
            }
          }
        },
        {
          "id": "rowsToFields",
          "options": {
            "mappings": [
              {
                "fieldName": "mountpoint",
                "handlerKey": "field.name"
              },
              {
                "fieldName": "Value (min)",
                "handlerKey": "field.value"
              },
              {
                "fieldName": "Value (max)",
                "handlerKey": "max"
              }
            ]
          }
        }
      ],
      "type": "gauge"
    }
  ],
  "refresh": "",
  "schemaVersion": 33,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": []
  },
  "time": {
    "from": "now-6h",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "Prometheus FileSystem Gauges",
  "uid": "R6PnPT0nk",
  "version": 17,
  "weekStart": "",
  "gnetId": 15458
}