Grafana dashboard: HPE Storage Arrays
Description: Enumerates HPE storage arrays with a clickable singlestat to drill down to storage pools.

This dashboard enumerates any arrays found in the datasource using a HPE Storage Array Exporter for Prometheus scrape target. 

# Requirements

- Scrape target label named "array" with the storage array name or designation.
- Requires the following drill-down dashboards to function properly:
  - [HPE Storage Pools](https://grafana.com/grafana/dashboards/14907)
  - [HPE Storage Array Details](https://grafana.com/grafana/dashboards/14908)
  - [HPE Storage Volumes](https://grafana.com/grafana/dashboards/14909)
  - [HPE Storage Volume Details](https://grafana.com/grafana/dashboards/14910)

The source metrics needs to be normalized with the following `metric_relabel_configs` for the scrape target.

```
metric_relabel_configs:
  - source_labels: [__name__]
    action: labelmap
    regex: "cpg|pool"
    replacement: "storagepool"
  - source_labels: [__name__]
    regex: "^hpe(primera|nimble|3par|alletra6000|alletra9000)_(.*)"
    target_label: "__name__"
    replacement: "hpe_$2"
  - source_labels: [__name__]
    regex: "^hpe_(pool|cpg)_(.*)"
    target_label: "__name__"
    replacement: "hpe_storagepool_$2"
```

# Resources

This dashboard utilize the officially supported exporter for HPE storage systems.
- [HPE Storage Array Exporter for Prometheus](https://hpe-storage.github.io/array-exporter/)

# Support

This dashboard is provided, as-is, as an example and it's not officially supported by HPE. Join us on Slack at [slack.hpedev.io](https://slack.hpedev.io) in the storage platform channels if you have questions or feedback.

{
  "__inputs": [
    {
      "name": "DS_PROMETHEUS",
      "label": "Prometheus",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "8.0.5"
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "stat",
      "name": "Stat",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "description": "Enumerates HPE storage arrays with a clickable singlestat to drill down to storage pools.",
  "editable": true,
  "gnetId": 14836,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1630369173110,
  "links": [],
  "panels": [
    {
      "datasource": null,
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "green",
            "mode": "fixed"
          },
          "links": [
            {
              "title": "My Link",
              "url": "d/MQVBAqMnk?var-array=${__field.labels.array}&${__url_time_range}"
            }
          ],
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "bytes"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 3,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 2,
      "links": [],
      "options": {
        "colorMode": "none",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "name"
      },
      "pluginVersion": "8.0.5",
      "repeat": "array",
      "repeatDirection": "v",
      "targets": [
        {
          "exemplar": true,
          "expr": "sum(hpe_storagepool_used_bytes{array=\"${array}\"}) by (array)",
          "interval": "",
          "legendFormat": "{{array}}",
          "refId": "A"
        }
      ],
      "transformations": [],
      "type": "stat"
    }
  ],
  "refresh": "",
  "schemaVersion": 30,
  "style": "dark",
  "tags": [
    "HPE Storage Arrays",
    "Start Here"
  ],
  "templating": {
    "list": [
      {
        "allValue": "",
        "current": {},
        "datasource": "${DS_PROMETHEUS}",
        "definition": "label_values(array)",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": "Array",
        "multi": false,
        "name": "array",
        "options": [],
        "query": {
          "query": "label_values(array)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      }
    ]
  },
  "time": {
    "from": "now-7d",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "HPE Storage Arrays",
  "uid": "bdFK5qMnk",
  "version": 55
}