{
  "apiVersion": "dashboard.grafana.app/v2",
  "kind": "Dashboard",
  "metadata": {
    "name": "adrspz7",
    "namespace": "default",
    "uid": "2e54e6da-9c81-4c6b-aa95-ca3d8c2428a6",
    "resourceVersion": "1777546137532997",
    "generation": 27,
    "creationTimestamp": "2026-04-28T10:58:00Z",
    "labels": {
      "grafana.app/deprecatedInternalID": "4446454973050880"
    },
    "annotations": {
      "grafana.app/createdBy": "user:dfj92b1cykg00a",
      "grafana.app/folder": "",
      "grafana.app/saved-from-ui": "Grafana v13.0.0 (e9de482b51)",
      "grafana.app/updatedBy": "user:dfj92b1cykg00a",
      "grafana.app/updatedTimestamp": "2026-04-30T10:48:57Z"
    }
  },
  "spec": {
    "annotations": [
      {
        "kind": "AnnotationQuery",
        "spec": {
          "query": {
            "kind": "DataQuery",
            "group": "grafana",
            "version": "v0",
            "datasource": {
              "name": "-- Grafana --"
            },
            "spec": {}
          },
          "enable": true,
          "hide": true,
          "iconColor": "rgba(0, 211, 255, 1)",
          "name": "Annotations & Alerts",
          "builtIn": true
        }
      }
    ],
    "cursorSync": "Off",
    "editable": true,
    "elements": {
      "panel-1": {
        "kind": "Panel",
        "spec": {
          "id": 1,
          "title": "RAID status",
          "description": "",
          "links": [],
          "data": {
            "kind": "QueryGroup",
            "spec": {
              "queries": [
                {
                  "kind": "PanelQuery",
                  "spec": {
                    "query": {
                      "kind": "DataQuery",
                      "group": "prometheus",
                      "version": "v0",
                      "datasource": {
                        "name": "bfj93vx9k7f28a"
                      },
                      "spec": {
                        "editorMode": "code",
                        "expr": "label_replace(\r\n  max by (raid_name, instance) (xiraid_raid_active == 1),\r\n  \"node\", \"$1\",\r\n  \"instance\", \"([^:]+):.*\"\r\n)\r\nor on(raid_name)\r\nmax by (raid_name) (xiraid_raid_active)",
                        "instant": false,
                        "legendFormat": "{{raid_name}} ({{node}})",
                        "range": true
                      }
                    },
                    "refId": "A",
                    "hidden": false
                  }
                }
              ],
              "transformations": [],
              "queryOptions": {}
            }
          },
          "vizConfig": {
            "kind": "VizConfig",
            "group": "stat",
            "version": "13.0.0",
            "spec": {
              "options": {
                "colorMode": "background_solid",
                "graphMode": "none",
                "justifyMode": "auto",
                "orientation": "vertical",
                "percentChangeColorMode": "standard",
                "reduceOptions": {
                  "calcs": [
                    "lastNotNull"
                  ],
                  "fields": "",
                  "values": false
                },
                "showPercentChange": false,
                "text": {},
                "textMode": "value_and_name",
                "wideLayout": false
              },
              "fieldConfig": {
                "defaults": {
                  "mappings": [
                    {
                      "type": "value",
                      "options": {
                        "0": {
                          "text": "offline",
                          "index": 0
                        },
                        "1": {
                          "text": "online",
                          "index": 1
                        }
                      }
                    }
                  ],
                  "thresholds": {
                    "mode": "absolute",
                    "steps": [
                      {
                        "value": 0,
                        "color": "orange"
                      },
                      {
                        "value": 1,
                        "color": "semi-dark-green"
                      }
                    ]
                  },
                  "color": {
                    "mode": "thresholds"
                  },
                  "noValue": "0",
                  "fieldMinMax": false
                },
                "overrides": []
              }
            }
          }
        }
      },
      "panel-2": {
        "kind": "Panel",
        "spec": {
          "id": 2,
          "title": "RAID config",
          "description": "",
          "links": [],
          "data": {
            "kind": "QueryGroup",
            "spec": {
              "queries": [
                {
                  "kind": "PanelQuery",
                  "spec": {
                    "query": {
                      "kind": "DataQuery",
                      "group": "prometheus",
                      "version": "v0",
                      "datasource": {
                        "name": "bfj93vx9k7f28a"
                      },
                      "spec": {
                        "editorMode": "code",
                        "expr": "label_replace( xiraid_raid_config, \"node\", \"$1\", \"instance\", \"([^:]+):.*\" )",
                        "legendFormat": "{{raid_name}} ({{node}})",
                        "range": true
                      }
                    },
                    "refId": "A",
                    "hidden": false
                  }
                }
              ],
              "transformations": [],
              "queryOptions": {}
            }
          },
          "vizConfig": {
            "kind": "VizConfig",
            "group": "stat",
            "version": "13.0.0",
            "spec": {
              "options": {
                "colorMode": "value",
                "graphMode": "none",
                "justifyMode": "auto",
                "orientation": "auto",
                "percentChangeColorMode": "standard",
                "reduceOptions": {
                  "calcs": [
                    "lastNotNull"
                  ],
                  "fields": "",
                  "values": false
                },
                "showPercentChange": false,
                "text": {},
                "textMode": "value_and_name",
                "wideLayout": false
              },
              "fieldConfig": {
                "defaults": {
                  "mappings": [
                    {
                      "type": "value",
                      "options": {
                        "0": {
                          "text": "Not OK",
                          "index": 1
                        },
                        "1": {
                          "text": "OK",
                          "index": 0
                        }
                      }
                    }
                  ],
                  "thresholds": {
                    "mode": "absolute",
                    "steps": [
                      {
                        "value": 0,
                        "color": "orange"
                      },
                      {
                        "value": 1,
                        "color": "green"
                      }
                    ]
                  },
                  "color": {
                    "mode": "thresholds"
                  }
                },
                "overrides": []
              }
            }
          }
        }
      },
      "panel-3": {
        "kind": "Panel",
        "spec": {
          "id": 3,
          "title": "RAID Size",
          "description": "",
          "links": [],
          "data": {
            "kind": "QueryGroup",
            "spec": {
              "queries": [
                {
                  "kind": "PanelQuery",
                  "spec": {
                    "query": {
                      "kind": "DataQuery",
                      "group": "prometheus",
                      "version": "v0",
                      "datasource": {
                        "name": "bfj93vx9k7f28a"
                      },
                      "spec": {
                        "editorMode": "code",
                        "expr": "max by (raid_name) (xiraid_raid_size_bytes)",
                        "legendFormat": "__auto",
                        "range": true
                      }
                    },
                    "refId": "A",
                    "hidden": false
                  }
                }
              ],
              "transformations": [],
              "queryOptions": {}
            }
          },
          "vizConfig": {
            "kind": "VizConfig",
            "group": "stat",
            "version": "13.0.0",
            "spec": {
              "options": {
                "colorMode": "value",
                "graphMode": "area",
                "justifyMode": "auto",
                "orientation": "auto",
                "percentChangeColorMode": "standard",
                "reduceOptions": {
                  "calcs": [
                    "lastNotNull"
                  ],
                  "fields": "",
                  "values": false
                },
                "showPercentChange": false,
                "textMode": "value_and_name",
                "wideLayout": true
              },
              "fieldConfig": {
                "defaults": {
                  "unit": "bytes",
                  "min": 0,
                  "thresholds": {
                    "mode": "absolute",
                    "steps": [
                      {
                        "value": 0,
                        "color": "orange"
                      },
                      {
                        "value": 1073741824,
                        "color": "green"
                      }
                    ]
                  },
                  "color": {
                    "mode": "thresholds"
                  },
                  "fieldMinMax": true
                },
                "overrides": []
              }
            }
          }
        }
      },
      "panel-4": {
        "kind": "Panel",
        "spec": {
          "id": 4,
          "title": "License status",
          "description": "",
          "links": [],
          "data": {
            "kind": "QueryGroup",
            "spec": {
              "queries": [
                {
                  "kind": "PanelQuery",
                  "spec": {
                    "query": {
                      "kind": "DataQuery",
                      "group": "prometheus",
                      "version": "v0",
                      "datasource": {
                        "name": "bfj93vx9k7f28a"
                      },
                      "spec": {
                        "editorMode": "code",
                        "expr": "label_replace(\r\n  xiraid_license_valid,\r\n  \"node\", \"$1\",\r\n  \"instance\", \"([^:]+):.*\"\r\n)",
                        "legendFormat": "{{node}}",
                        "range": true
                      }
                    },
                    "refId": "A",
                    "hidden": false
                  }
                }
              ],
              "transformations": [],
              "queryOptions": {}
            }
          },
          "vizConfig": {
            "kind": "VizConfig",
            "group": "stat",
            "version": "13.0.0",
            "spec": {
              "options": {
                "colorMode": "value",
                "graphMode": "area",
                "justifyMode": "auto",
                "orientation": "vertical",
                "percentChangeColorMode": "standard",
                "reduceOptions": {
                  "calcs": [
                    "lastNotNull"
                  ],
                  "fields": "",
                  "values": false
                },
                "showPercentChange": false,
                "text": {},
                "textMode": "auto",
                "wideLayout": true
              },
              "fieldConfig": {
                "defaults": {
                  "mappings": [
                    {
                      "type": "value",
                      "options": {
                        "0": {
                          "text": "No license",
                          "index": 0
                        },
                        "1": {
                          "text": "Valid",
                          "index": 1
                        }
                      }
                    }
                  ],
                  "thresholds": {
                    "mode": "absolute",
                    "steps": [
                      {
                        "value": 0,
                        "color": "orange"
                      },
                      {
                        "value": 1,
                        "color": "green"
                      }
                    ]
                  },
                  "color": {
                    "mode": "thresholds"
                  }
                },
                "overrides": []
              }
            }
          }
        }
      },
      "panel-6": {
        "kind": "Panel",
        "spec": {
          "id": 6,
          "title": "Drives licensed",
          "description": "",
          "links": [],
          "data": {
            "kind": "QueryGroup",
            "spec": {
              "queries": [
                {
                  "kind": "PanelQuery",
                  "spec": {
                    "query": {
                      "kind": "DataQuery",
                      "group": "prometheus",
                      "version": "v0",
                      "datasource": {
                        "name": "bfj93vx9k7f28a"
                      },
                      "spec": {
                        "editorMode": "code",
                        "expr": "label_replace(\r\n  xiraid_license_disks_in_use,\r\n  \"node\", \"$1\",\r\n  \"instance\", \"([^:]+):.*\"\r\n)",
                        "interval": "",
                        "legendFormat": "{{node}} / IN USE",
                        "range": true
                      }
                    },
                    "refId": "A",
                    "hidden": false
                  }
                },
                {
                  "kind": "PanelQuery",
                  "spec": {
                    "query": {
                      "kind": "DataQuery",
                      "group": "prometheus",
                      "version": "v0",
                      "datasource": {
                        "name": "bfj93vx9k7f28a"
                      },
                      "spec": {
                        "editorMode": "code",
                        "expr": "label_replace(\r\n  xiraid_license_disks_total,\r\n  \"node\", \"$1\",\r\n  \"instance\", \"([^:]+):.*\"\r\n)",
                        "instant": false,
                        "legendFormat": "{{node}} / TOTAL",
                        "range": true
                      }
                    },
                    "refId": "B",
                    "hidden": false
                  }
                }
              ],
              "transformations": [],
              "queryOptions": {}
            }
          },
          "vizConfig": {
            "kind": "VizConfig",
            "group": "stat",
            "version": "13.0.0",
            "spec": {
              "options": {
                "colorMode": "value",
                "graphMode": "area",
                "justifyMode": "auto",
                "orientation": "auto",
                "percentChangeColorMode": "standard",
                "reduceOptions": {
                  "calcs": [
                    "lastNotNull"
                  ],
                  "fields": "",
                  "values": false
                },
                "showPercentChange": false,
                "textMode": "auto",
                "wideLayout": true
              },
              "fieldConfig": {
                "defaults": {
                  "thresholds": {
                    "mode": "absolute",
                    "steps": [
                      {
                        "value": 0,
                        "color": "green"
                      },
                      {
                        "value": 80,
                        "color": "red"
                      }
                    ]
                  }
                },
                "overrides": []
              }
            }
          }
        }
      },
      "panel-7": {
        "kind": "Panel",
        "spec": {
          "id": 7,
          "title": "RAID drives status",
          "description": "",
          "links": [],
          "data": {
            "kind": "QueryGroup",
            "spec": {
              "queries": [
                {
                  "kind": "PanelQuery",
                  "spec": {
                    "query": {
                      "kind": "DataQuery",
                      "group": "prometheus",
                      "version": "v0",
                      "datasource": {
                        "name": "bfj93vx9k7f28a"
                      },
                      "spec": {
                        "editorMode": "code",
                        "expr": "label_replace(xiraid_raid_device_state{uuid!=\"\"}, \"node\", \"$1\", \"instance\", \"([^:]+):.*\" )",
                        "legendFormat": "{{serial}} ({{node}})",
                        "range": true
                      }
                    },
                    "refId": "A",
                    "hidden": false
                  }
                }
              ],
              "transformations": [],
              "queryOptions": {}
            }
          },
          "vizConfig": {
            "kind": "VizConfig",
            "group": "stat",
            "version": "13.0.0",
            "spec": {
              "options": {
                "colorMode": "background_solid",
                "graphMode": "area",
                "justifyMode": "auto",
                "orientation": "auto",
                "percentChangeColorMode": "standard",
                "reduceOptions": {
                  "calcs": [
                    "lastNotNull"
                  ],
                  "fields": "",
                  "values": false
                },
                "showPercentChange": false,
                "text": {
                  "titleSize": 15,
                  "valueSize": 15
                },
                "textMode": "value_and_name",
                "wideLayout": true
              },
              "fieldConfig": {
                "defaults": {
                  "min": 1,
                  "max": 2,
                  "mappings": [
                    {
                      "type": "value",
                      "options": {
                        "1": {
                          "text": "OK",
                          "index": 0
                        },
                        "2": {
                          "text": "FAIL",
                          "index": 1
                        }
                      }
                    }
                  ],
                  "thresholds": {
                    "mode": "absolute",
                    "steps": [
                      {
                        "value": 0,
                        "color": "#396034"
                      },
                      {
                        "value": 2,
                        "color": "red"
                      }
                    ]
                  }
                },
                "overrides": []
              }
            }
          }
        }
      },
      "panel-8": {
        "kind": "Panel",
        "spec": {
          "id": 8,
          "title": "RAID Details",
          "description": "",
          "links": [],
          "data": {
            "kind": "QueryGroup",
            "spec": {
              "queries": [
                {
                  "kind": "PanelQuery",
                  "spec": {
                    "query": {
                      "kind": "DataQuery",
                      "group": "prometheus",
                      "version": "v0",
                      "datasource": {
                        "name": "bfj93vx9k7f28a"
                      },
                      "spec": {
                        "editorMode": "code",
                        "expr": "label_replace(\r\n  xiraid_raid_info{uuid!=\"\"},\r\n  \"node\", \"$1\",\r\n  \"instance\", \"([^:]+):.*\"\r\n)",
                        "format": "table",
                        "interval": "",
                        "legendFormat": "{{_name_}}",
                        "range": true
                      }
                    },
                    "refId": "A",
                    "hidden": false
                  }
                }
              ],
              "transformations": [
                {
                  "kind": "Transformation",
                  "group": "organize",
                  "spec": {
                    "options": {
                      "excludeByName": {
                        "Time": true,
                        "Value": true,
                        "__name__": true,
                        "block_size": true,
                        "cluster": true,
                        "instance": true,
                        "job": true
                      },
                      "includeByName": {},
                      "indexByName": {
                        "Time": 0,
                        "Value": 13,
                        "__name__": 1,
                        "block_size": 4,
                        "cluster": 7,
                        "group_size": 5,
                        "instance": 8,
                        "job": 9,
                        "level": 3,
                        "node": 11,
                        "raid_name": 2,
                        "sparepool": 12,
                        "strip_size": 6,
                        "uuid": 10
                      },
                      "renameByName": {}
                    }
                  }
                }
              ],
              "queryOptions": {}
            }
          },
          "vizConfig": {
            "kind": "VizConfig",
            "group": "table",
            "version": "13.0.0",
            "spec": {
              "options": {
                "cellHeight": "sm",
                "showHeader": true,
                "sortBy": [
                  {
                    "desc": false,
                    "displayName": "raid_name"
                  }
                ]
              },
              "fieldConfig": {
                "defaults": {
                  "thresholds": {
                    "mode": "absolute",
                    "steps": [
                      {
                        "value": 0,
                        "color": "green"
                      },
                      {
                        "value": 80,
                        "color": "red"
                      }
                    ]
                  },
                  "color": {
                    "mode": "thresholds"
                  },
                  "custom": {
                    "align": "auto",
                    "cellOptions": {
                      "type": "auto"
                    },
                    "footer": {
                      "reducers": []
                    },
                    "inspect": false
                  }
                },
                "overrides": [
                  {
                    "matcher": {
                      "id": "byName",
                      "options": ""
                    },
                    "properties": []
                  },
                  {
                    "matcher": {
                      "id": "byName",
                      "options": "strip_size"
                    },
                    "properties": [
                      {
                        "id": "custom.width",
                        "value": 102
                      }
                    ]
                  },
                  {
                    "matcher": {
                      "id": "byName",
                      "options": "raid_name"
                    },
                    "properties": [
                      {
                        "id": "custom.width",
                        "value": 121
                      }
                    ]
                  },
                  {
                    "matcher": {
                      "id": "byName",
                      "options": "level"
                    },
                    "properties": [
                      {
                        "id": "custom.width",
                        "value": 92
                      }
                    ]
                  },
                  {
                    "matcher": {
                      "id": "byName",
                      "options": "group_size"
                    },
                    "properties": [
                      {
                        "id": "custom.width",
                        "value": 127
                      }
                    ]
                  },
                  {
                    "matcher": {
                      "id": "byName",
                      "options": "uuid"
                    },
                    "properties": [
                      {
                        "id": "custom.width",
                        "value": 376
                      }
                    ]
                  }
                ]
              }
            }
          }
        }
      }
    },
    "layout": {
      "kind": "GridLayout",
      "spec": {
        "items": [
          {
            "kind": "GridLayoutItem",
            "spec": {
              "x": 0,
              "y": 0,
              "width": 4,
              "height": 4,
              "element": {
                "kind": "ElementReference",
                "name": "panel-4"
              }
            }
          },
          {
            "kind": "GridLayoutItem",
            "spec": {
              "x": 4,
              "y": 0,
              "width": 8,
              "height": 4,
              "element": {
                "kind": "ElementReference",
                "name": "panel-1"
              }
            }
          },
          {
            "kind": "GridLayoutItem",
            "spec": {
              "x": 12,
              "y": 0,
              "width": 12,
              "height": 12,
              "element": {
                "kind": "ElementReference",
                "name": "panel-7"
              }
            }
          },
          {
            "kind": "GridLayoutItem",
            "spec": {
              "x": 0,
              "y": 4,
              "width": 4,
              "height": 5,
              "element": {
                "kind": "ElementReference",
                "name": "panel-6"
              }
            }
          },
          {
            "kind": "GridLayoutItem",
            "spec": {
              "x": 4,
              "y": 4,
              "width": 8,
              "height": 5,
              "element": {
                "kind": "ElementReference",
                "name": "panel-2"
              }
            }
          },
          {
            "kind": "GridLayoutItem",
            "spec": {
              "x": 0,
              "y": 9,
              "width": 12,
              "height": 3,
              "element": {
                "kind": "ElementReference",
                "name": "panel-3"
              }
            }
          },
          {
            "kind": "GridLayoutItem",
            "spec": {
              "x": 0,
              "y": 12,
              "width": 24,
              "height": 8,
              "element": {
                "kind": "ElementReference",
                "name": "panel-8"
              }
            }
          }
        ]
      }
    },
    "links": [],
    "liveNow": false,
    "preload": false,
    "tags": [],
    "timeSettings": {
      "timezone": "browser",
      "from": "now",
      "to": "now",
      "autoRefresh": "",
      "autoRefreshIntervals": [
        "5s",
        "10s",
        "30s",
        "1m",
        "5m",
        "15m",
        "30m",
        "1h",
        "2h",
        "1d"
      ],
      "hideTimepicker": false,
      "fiscalYearStartMonth": 0
    },
    "title": "RAID Status",
    "variables": [],
    "preferences": {
      "layout": {
        "kind": "GridLayout",
        "spec": {
          "items": []
        }
      }
    }
  }
}