From 130406a52ca98fce090ed049a23f09445b5d2195 Mon Sep 17 00:00:00 2001 From: hardikl Date: Mon, 4 Sep 2023 20:28:15 +0530 Subject: [PATCH 01/12] feat: Tiering data changes for volume - template change --- conf/rest/9.10.0/volume.yaml | 10 ++++++++++ conf/rest/9.9.0/volume.yaml | 10 ++++++++++ conf/zapi/cdot/9.8.0/volume_footprint.yaml | 15 +++++++++++++++ conf/zapi/default.yaml | 1 + 4 files changed, 36 insertions(+) create mode 100644 conf/zapi/cdot/9.8.0/volume_footprint.yaml diff --git a/conf/rest/9.10.0/volume.yaml b/conf/rest/9.10.0/volume.yaml index 399be8bdb..544c286cd 100644 --- a/conf/rest/9.10.0/volume.yaml +++ b/conf/rest/9.10.0/volume.yaml @@ -93,6 +93,16 @@ endpoints: - filter: - privilege_level=diagnostic + - query: api/private/cli/volume/footprint + counters: + - ^^volume + - ^^vserver => svm + - volume_blocks_footprint_bin0 => performance_tier_footprint + - volume_blocks_footprint_bin0_percent => performance_tier_footprint_percent + - volume_blocks_footprint_bin1 => capacity_tier_footprint + - volume_blocks_footprint_bin1_percent => capacity_tier_footprint_percent + + plugins: - Volume: schedule: diff --git a/conf/rest/9.9.0/volume.yaml b/conf/rest/9.9.0/volume.yaml index d2c9a6665..cdc5c3c9e 100644 --- a/conf/rest/9.9.0/volume.yaml +++ b/conf/rest/9.9.0/volume.yaml @@ -87,6 +87,16 @@ endpoints: - filter: - privilege_level=diagnostic + - query: api/private/cli/volume/footprint + counters: + - ^^volume + - ^^vserver => svm + - volume_blocks_footprint_bin0 => performance_tier_footprint + - volume_blocks_footprint_bin0_percent => performance_tier_footprint_percent + - volume_blocks_footprint_bin1 => capacity_tier_footprint + - volume_blocks_footprint_bin1_percent => capacity_tier_footprint_percent + + plugins: - Volume: schedule: diff --git a/conf/zapi/cdot/9.8.0/volume_footprint.yaml b/conf/zapi/cdot/9.8.0/volume_footprint.yaml new file mode 100644 index 000000000..8c6cf84ef --- /dev/null +++ b/conf/zapi/cdot/9.8.0/volume_footprint.yaml @@ -0,0 +1,15 @@ +name: VolumeFootprint +query: volume-footprint-get-iter +object: volume + +counters: + footprint-info: + - ^^volume => volume + - ^^vserver => svm + - volume-blocks-footprint-bin0 => performance_tier_footprint + - volume-blocks-footprint-bin0-percent => performance_tier_footprint_percent + - volume-blocks-footprint-bin1 => capacity_tier_footprint + - volume-blocks-footprint-bin1-percent => capacity_tier_footprint_percent + +export_options: + include_all_labels: true \ No newline at end of file diff --git a/conf/zapi/default.yaml b/conf/zapi/default.yaml index abc8c29e7..2a9f23a83 100644 --- a/conf/zapi/default.yaml +++ b/conf/zapi/default.yaml @@ -37,4 +37,5 @@ objects: Support: support.yaml SVM: svm.yaml Volume: volume.yaml + VolumeFootprint: volume_footprint.yaml From 3bb0274d425582241d87c4a8419369bf813d682a Mon Sep 17 00:00:00 2001 From: hardikl Date: Mon, 11 Sep 2023 18:52:03 +0530 Subject: [PATCH 02/12] feat: Tiering data changes for volume - dashboard change --- grafana/dashboards/cmode/volume.json | 472 ++++++++++++++++++++++++++- 1 file changed, 471 insertions(+), 1 deletion(-) diff --git a/grafana/dashboards/cmode/volume.json b/grafana/dashboards/cmode/volume.json index dd12e165c..d760b848e 100644 --- a/grafana/dashboards/cmode/volume.json +++ b/grafana/dashboards/cmode/volume.json @@ -5263,7 +5263,7 @@ }, "gridPos": { "h": 12, - "w": 12, + "w": 24, "x": 0, "y": 43 }, @@ -5318,6 +5318,384 @@ } ], "type": "table" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 12, + "w": 12, + "x": 0, + "y": 67 + }, + "id": 119, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.1.8", + "targets": [ + { + "exemplar": false, + "expr": "topk($TopResources, (volume_performance_tier_footprint{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\", volume=~\"$TopVolumePerformanceTierFootprint\"}))", + "hide": false, + "interval": "", + "legendFormat": "{{svm}} - {{volume}} ", + "refId": "A" + } + ], + "title": "Top $TopResources Volumes by Performance Tier Footprint", + "transformations": [], + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 12, + "w": 12, + "x": 12, + "y": 67 + }, + "id": 120, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.1.8", + "targets": [ + { + "exemplar": false, + "expr": "topk($TopResources, volume_capacity_tier_footprint{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\", volume=~\"$TopVolumeCapacityTierFootprint\"})", + "hide": false, + "interval": "", + "legendFormat": "{{svm}} - {{volume}} ", + "refId": "A" + } + ], + "title": "Top $TopResources Volumes by Capacity Tier Footprint", + "transformations": [], + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 12, + "w": 12, + "x": 0, + "y": 79 + }, + "id": 121, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.1.8", + "targets": [ + { + "exemplar": false, + "expr": "topk($TopResources, (volume_performance_tier_footprint_percent{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\", volume=~\"$TopVolumePerformanceTierFootprintPerc\"}))", + "hide": false, + "interval": "", + "legendFormat": "{{svm}} - {{volume}} ", + "refId": "A" + } + ], + "title": "Top $TopResources Volumes by Performance Tier Footprint %", + "transformations": [], + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 12, + "w": 12, + "x": 12, + "y": 79 + }, + "id": 122, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.1.8", + "targets": [ + { + "exemplar": false, + "expr": "topk($TopResources, volume_capacity_tier_footprint_percent{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\", volume=~\"$TopVolumeCapacityTierFootprintPerc\"})", + "hide": false, + "interval": "", + "legendFormat": "{{svm}} - {{volume}} ", + "refId": "A" + } + ], + "title": "Top $TopResources Volumes by Capacity Tier Footprint %", + "transformations": [], + "type": "timeseries" } ], "title": "Top Volume FabricPool Drilldown", @@ -7077,6 +7455,98 @@ "skipUrlSync": false, "sort": 0, "type": "query" + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_PROMETHEUS}", + "definition": "query_result(topk($TopResources,avg_over_time(volume_capacity_tier_footprint{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", svm=~\"$SVM\",volume=~\"$Volume\"}[${__range}])))", + "description": null, + "error": null, + "hide": 2, + "includeAll": true, + "label": null, + "multi": true, + "name": "TopVolumeCapacityTierFootprint", + "options": [], + "query": { + "query": "query_result(topk($TopResources,avg_over_time(volume_capacity_tier_footprint{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", svm=~\"$SVM\",volume=~\"$Volume\"}[${__range}])))", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": ".*volume=\\\"(.*?)\\\".*", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_PROMETHEUS}", + "definition": "query_result(topk($TopResources,avg_over_time(volume_performance_tier_footprint{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", svm=~\"$SVM\",volume=~\"$Volume\"}[${__range}])))", + "description": null, + "error": null, + "hide": 2, + "includeAll": true, + "label": null, + "multi": true, + "name": "TopVolumePerformanceTierFootprint", + "options": [], + "query": { + "query": "query_result(topk($TopResources,avg_over_time(volume_performance_tier_footprint{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", svm=~\"$SVM\",volume=~\"$Volume\"}[${__range}])))", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": ".*volume=\\\"(.*?)\\\".*", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_PROMETHEUS}", + "definition": "query_result(topk($TopResources,avg_over_time(volume_capacity_tier_footprint_percent{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", svm=~\"$SVM\",volume=~\"$Volume\"}[${__range}])))", + "description": null, + "error": null, + "hide": 2, + "includeAll": true, + "label": null, + "multi": true, + "name": "TopVolumeCapacityTierFootprintPerc", + "options": [], + "query": { + "query": "query_result(topk($TopResources,avg_over_time(volume_capacity_tier_footprint_percent{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", svm=~\"$SVM\",volume=~\"$Volume\"}[${__range}])))", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": ".*volume=\\\"(.*?)\\\".*", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_PROMETHEUS}", + "definition": "query_result(topk($TopResources,avg_over_time(volume_performance_tier_footprint_percent{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", svm=~\"$SVM\",volume=~\"$Volume\"}[${__range}])))", + "description": null, + "error": null, + "hide": 2, + "includeAll": true, + "label": null, + "multi": true, + "name": "TopVolumePerformanceTierFootprintPerc", + "options": [], + "query": { + "query": "query_result(topk($TopResources,avg_over_time(volume_performance_tier_footprint_percent{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", svm=~\"$SVM\",volume=~\"$Volume\"}[${__range}])))", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": ".*volume=\\\"(.*?)\\\".*", + "skipUrlSync": false, + "sort": 0, + "type": "query" } ] }, From af74e97618c339b397ae5f32892c0187ec6e56d8 Mon Sep 17 00:00:00 2001 From: hardikl Date: Tue, 12 Sep 2023 17:22:53 +0530 Subject: [PATCH 03/12] feat: Tiering data changes for aggr - template change --- conf/rest/9.10.0/aggr.yaml | 2 ++ conf/rest/9.12.0/aggr.yaml | 2 ++ conf/zapi/cdot/9.8.0/aggr_space.yaml | 13 +++++++++++++ conf/zapi/default.yaml | 1 + 4 files changed, 18 insertions(+) create mode 100644 conf/zapi/cdot/9.8.0/aggr_space.yaml diff --git a/conf/rest/9.10.0/aggr.yaml b/conf/rest/9.10.0/aggr.yaml index 44475b8dd..6d0cd880b 100644 --- a/conf/rest/9.10.0/aggr.yaml +++ b/conf/rest/9.10.0/aggr.yaml @@ -40,6 +40,8 @@ counters: - space.efficiency_without_snapshots.savings => efficiency_savings_wo_snapshots - space.efficiency_without_snapshots_flexclones.logical_used => logical_used_wo_snapshots_flexclones - space.efficiency_without_snapshots_flexclones.savings => efficiency_savings_wo_snapshots_flexclones + - space.footprint => space_performance_tier_used + - space.footprint_percent => space_performance_tier_used_percent - space.snapshot.available => snapshot_size_available - space.snapshot.reserve_percent => snapshot_reserve_percent - space.snapshot.total => snapshot_size_total diff --git a/conf/rest/9.12.0/aggr.yaml b/conf/rest/9.12.0/aggr.yaml index 60918227e..4e83030eb 100644 --- a/conf/rest/9.12.0/aggr.yaml +++ b/conf/rest/9.12.0/aggr.yaml @@ -50,6 +50,8 @@ counters: - space.efficiency_without_snapshots.savings => efficiency_savings_wo_snapshots - space.efficiency_without_snapshots_flexclones.logical_used => logical_used_wo_snapshots_flexclones - space.efficiency_without_snapshots_flexclones.savings => efficiency_savings_wo_snapshots_flexclones + - space.footprint => space_performance_tier_used + - space.footprint_percent => space_performance_tier_used_percent - space.snapshot.available => snapshot_size_available - space.snapshot.reserve_percent => snapshot_reserve_percent - space.snapshot.total => snapshot_size_total diff --git a/conf/zapi/cdot/9.8.0/aggr_space.yaml b/conf/zapi/cdot/9.8.0/aggr_space.yaml new file mode 100644 index 000000000..f330154eb --- /dev/null +++ b/conf/zapi/cdot/9.8.0/aggr_space.yaml @@ -0,0 +1,13 @@ +name: AggregateSpace +query: aggr-space-get-iter +object: aggr + +counters: + space-information: + - ^^aggregate => aggr + - ^^tier-name => tier_name + - volume-footprints => space_performance_tier_used + - volume-footprints-percent => space_performance_tier_used_percent + +export_options: + include_all_labels: true \ No newline at end of file diff --git a/conf/zapi/default.yaml b/conf/zapi/default.yaml index 2a9f23a83..b7463d06d 100644 --- a/conf/zapi/default.yaml +++ b/conf/zapi/default.yaml @@ -7,6 +7,7 @@ schedule: objects: Aggregate: aggr.yaml + AggregateSpace: aggr_space.yaml AggregateEfficiency: aggr_efficiency.yaml CIFSSession: cifs_session.yaml ClusterPeer: clusterpeer.yaml From 150edfb25864bf311c3a79dfc6cd473b3c6e9712 Mon Sep 17 00:00:00 2001 From: hardikl Date: Wed, 13 Sep 2023 21:21:26 +0530 Subject: [PATCH 04/12] feat: Tiering data changes for aggr - dashboard change --- grafana/dashboards/cmode/aggregate.json | 925 ++++++++++++++++++++++-- 1 file changed, 881 insertions(+), 44 deletions(-) diff --git a/grafana/dashboards/cmode/aggregate.json b/grafana/dashboards/cmode/aggregate.json index 205142dba..b8090864a 100644 --- a/grafana/dashboards/cmode/aggregate.json +++ b/grafana/dashboards/cmode/aggregate.json @@ -3925,23 +3925,695 @@ "x": 0, "y": 57 }, - "id": 81, + "id": 810, "panels": [ { "datasource": "${DS_PROMETHEUS}", - "description": "Flexgroup by-aggregate filtering does not display the per-aggregate breakdown, instead the sum of all flexgroup aggregates is displayed. This is how ONTAP reports the data, even when an aggregate is selected in the dropdown.", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 12, + "w": 12, + "x": 0, + "y": 82 + }, + "id": 195, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.1.8", + "targets": [ + { + "exemplar": false, + "expr": "topk($TopResources, (aggr_space_performance_tier_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",aggr=~\"$TopAggregatePerformanceTierFootprint\"}))", + "hide": false, + "interval": "", + "legendFormat": "{{aggr}}", + "refId": "A" + } + ], + "title": "Top $TopResources Aggregates by Performance Tier Footprint", + "transformations": [], + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 12, + "w": 12, + "x": 12, + "y": 82 + }, + "id": 197, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.1.8", + "targets": [ + { + "exemplar": false, + "expr": "topk($TopResources, aggr_space_capacity_tier_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", aggr=~\"$TopAggregateCapacityTierFootprint\"})", + "hide": false, + "interval": "", + "legendFormat": "{{aggr}}", + "refId": "A" + } + ], + "title": "Top $TopResources Aggregates by Capacity Tier Footprint", + "transformations": [], + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 12, + "w": 12, + "x": 0, + "y": 94 + }, + "id": 199, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.1.8", + "targets": [ + { + "exemplar": false, + "expr": "topk($TopResources, (aggr_space_performance_tier_used_percent{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",aggr=~\"$TopAggregatePerformanceTierFootprintPerc\"}))", + "hide": false, + "interval": "", + "legendFormat": "{{aggr}}", + "refId": "A" + } + ], + "title": "Top $TopResources Aggregates by Performance Tier Footprint %", + "transformations": [], + "type": "timeseries" + } + ], + "title": "Aggregate FabricPool Drilldown", + "type": "row" + }, + { + "collapsed": true, + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 106 + }, + "id": 81, + "panels": [ + { + "datasource": "${DS_PROMETHEUS}", + "description": "Flexgroup by-aggregate filtering does not display the per-aggregate breakdown, instead the sum of all flexgroup aggregates is displayed. This is how ONTAP reports the data, even when an aggregate is selected in the dropdown.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "Space Used", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 12, + "w": 12, + "x": 0, + "y": 107 + }, + "id": 83, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.1.8", + "targets": [ + { + "exemplar": false, + "expr": "topk($TopResources, volume_size_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", volume=~\"$TopVolumeSizeUsed\"} * on (cluster, svm, volume) group_left(aggr) volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",aggr=~\".*$Aggregate.*\",volume=~\"$TopVolumeSizeUsed\"})", + "hide": false, + "interval": "", + "legendFormat": "{{aggr}} - {{volume}} - {{style}}", + "refId": "D" + } + ], + "title": "Top $TopResources Volumes by Space Used by Aggregate", + "transformations": [], + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "Flexgroup by-aggregate filtering does not display the per-aggregate breakdown, instead the sum of all flexgroup aggregates is displayed. This is how ONTAP reports the data, even when an aggregate is selected in the dropdown.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "Space Used %", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 12, + "w": 12, + "x": 12, + "y": 107 + }, + "id": 84, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.1.8", + "targets": [ + { + "exemplar": false, + "expr": "topk($TopResources, volume_size_used_percent{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",volume=~\"$TopVolumeSizeUsedPercent\"} * on (cluster, svm, volume) group_left(aggr) volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",aggr=~\".*$Aggregate.*\",volume=~\"$TopVolumeSizeUsedPercent\"})", + "hide": false, + "interval": "", + "legendFormat": "{{aggr}} - {{volume}} - {{style}}", + "refId": "A" + } + ], + "title": "Top $TopResources Volumes by Space Used %", + "transformations": [], + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "Flexgroup by-aggregate filtering does not display the per-aggregate breakdown, instead the sum of all flexgroup aggregates is displayed. This is how ONTAP reports the data, even when an aggregate is selected in the dropdown.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "Snapshot Space Used", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 12, + "w": 12, + "x": 0, + "y": 119 + }, + "id": 87, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.1.8", + "targets": [ + { + "exemplar": false, + "expr": "topk($TopResources, volume_snapshots_size_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",volume=~\"$TopVolumeSnapshotSizeUsed\"} * on (cluster, svm, volume) group_left(aggr) volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",aggr=~\".*$Aggregate.*\",volume=~\"$TopVolumeSnapshotSizeUsed\"})", + "hide": false, + "interval": "", + "legendFormat": "{{aggr}} - {{volume}} - {{style}}", + "refId": "A" + } + ], + "title": "Top $TopResources Volumes by Snapshot Space Used", + "transformations": [], + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "Flexgroup by-aggregate filtering does not display the per-aggregate breakdown, instead the sum of all flexgroup aggregates is displayed. This is how ONTAP reports the data, even when an aggregate is selected in the dropdown.\n\nNote that in some scenarios, it is possible to exceed 100% of the space allocated.\n", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "Snapshot Space Used %", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 12, + "w": 12, + "x": 12, + "y": 119 + }, + "id": 85, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.1.8", + "targets": [ + { + "exemplar": false, + "expr": "topk($TopResources, volume_snapshot_reserve_used_percent{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",volume=~\"$TopVolumeSnapshotSizeUsedPercent\"} * on (cluster, svm, volume) group_left(aggr) volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",aggr=~\".*$Aggregate.*\",volume=~\"$TopVolumeSnapshotSizeUsedPercent\"})", + "hide": false, + "interval": "", + "legendFormat": "{{aggr}} - {{volume}} - {{style}}", + "refId": "C" + } + ], + "title": "Top $TopResources Volumes by Snapshot Space Used %", + "transformations": [], + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { - "axisLabel": "Space Used", + "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 10, - "gradientMode": "opacity", + "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, @@ -3971,6 +4643,10 @@ { "color": "green", "value": null + }, + { + "color": "red", + "value": 80 } ] }, @@ -3982,9 +4658,9 @@ "h": 12, "w": 12, "x": 0, - "y": 82 + "y": 131 }, - "id": 83, + "id": 95, "options": { "legend": { "calcs": [ @@ -4006,27 +4682,27 @@ "targets": [ { "exemplar": false, - "expr": "topk($TopResources, volume_size_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", volume=~\"$TopVolumeSizeUsed\"} * on (cluster, svm, volume) group_left(aggr) volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",aggr=~\".*$Aggregate.*\",volume=~\"$TopVolumeSizeUsed\"})", + "expr": "topk($TopResources, (volume_performance_tier_footprint{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",volume=~\"$TopVolumePerformanceTierFootprint\"}))", "hide": false, "interval": "", - "legendFormat": "{{aggr}} - {{volume}} - {{style}}", - "refId": "D" + "legendFormat": "{{volume}} ", + "refId": "A" } ], - "title": "Top $TopResources Volumes by Space Used by Aggregate", + "title": "Top $TopResources Volumes by Performance Tier Footprint", "transformations": [], "type": "timeseries" }, { "datasource": "${DS_PROMETHEUS}", - "description": "Flexgroup by-aggregate filtering does not display the per-aggregate breakdown, instead the sum of all flexgroup aggregates is displayed. This is how ONTAP reports the data, even when an aggregate is selected in the dropdown.", + "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { - "axisLabel": "Space Used %", + "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", @@ -4053,9 +4729,8 @@ "mode": "off" } }, + "decimals": 2, "mappings": [], - "max": 100, - "min": 0, "thresholds": { "mode": "absolute", "steps": [ @@ -4069,7 +4744,7 @@ } ] }, - "unit": "percent" + "unit": "bytes" }, "overrides": [] }, @@ -4077,9 +4752,9 @@ "h": 12, "w": 12, "x": 12, - "y": 82 + "y": 131 }, - "id": 84, + "id": 97, "options": { "legend": { "calcs": [ @@ -4101,27 +4776,27 @@ "targets": [ { "exemplar": false, - "expr": "topk($TopResources, volume_size_used_percent{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",volume=~\"$TopVolumeSizeUsedPercent\"} * on (cluster, svm, volume) group_left(aggr) volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",aggr=~\".*$Aggregate.*\",volume=~\"$TopVolumeSizeUsedPercent\"})", + "expr": "topk($TopResources, volume_capacity_tier_footprint{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",volume=~\"$TopVolumeCapacityTierFootprint\"})", "hide": false, "interval": "", - "legendFormat": "{{aggr}} - {{volume}} - {{style}}", + "legendFormat": "{{volume}} ", "refId": "A" } ], - "title": "Top $TopResources Volumes by Space Used %", + "title": "Top $TopResources Volumes by Capacity Tier Footprint", "transformations": [], "type": "timeseries" }, { "datasource": "${DS_PROMETHEUS}", - "description": "Flexgroup by-aggregate filtering does not display the per-aggregate breakdown, instead the sum of all flexgroup aggregates is displayed. This is how ONTAP reports the data, even when an aggregate is selected in the dropdown.", + "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { - "axisLabel": "Snapshot Space Used", + "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", @@ -4148,8 +4823,9 @@ "mode": "off" } }, - "decimals": 2, "mappings": [], + "max": 100, + "min": 0, "thresholds": { "mode": "absolute", "steps": [ @@ -4163,7 +4839,7 @@ } ] }, - "unit": "bytes" + "unit": "percent" }, "overrides": [] }, @@ -4171,9 +4847,9 @@ "h": 12, "w": 12, "x": 0, - "y": 94 + "y": 143 }, - "id": 87, + "id": 99, "options": { "legend": { "calcs": [ @@ -4195,27 +4871,27 @@ "targets": [ { "exemplar": false, - "expr": "topk($TopResources, volume_snapshots_size_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",volume=~\"$TopVolumeSnapshotSizeUsed\"} * on (cluster, svm, volume) group_left(aggr) volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",aggr=~\".*$Aggregate.*\",volume=~\"$TopVolumeSnapshotSizeUsed\"})", + "expr": "topk($TopResources, (volume_performance_tier_footprint_percent{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",volume=~\"$TopVolumePerformanceTierFootprintPerc\"}))", "hide": false, "interval": "", - "legendFormat": "{{aggr}} - {{volume}} - {{style}}", + "legendFormat": "{{volume}}", "refId": "A" } ], - "title": "Top $TopResources Volumes by Snapshot Space Used", + "title": "Top $TopResources Volumes by Performance Tier Footprint %", "transformations": [], "type": "timeseries" }, { "datasource": "${DS_PROMETHEUS}", - "description": "Flexgroup by-aggregate filtering does not display the per-aggregate breakdown, instead the sum of all flexgroup aggregates is displayed. This is how ONTAP reports the data, even when an aggregate is selected in the dropdown.\n\nNote that in some scenarios, it is possible to exceed 100% of the space allocated.\n", + "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { - "axisLabel": "Snapshot Space Used %", + "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", @@ -4266,9 +4942,9 @@ "h": 12, "w": 12, "x": 12, - "y": 94 + "y": 143 }, - "id": 85, + "id": 101, "options": { "legend": { "calcs": [ @@ -4290,14 +4966,14 @@ "targets": [ { "exemplar": false, - "expr": "topk($TopResources, volume_snapshot_reserve_used_percent{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",volume=~\"$TopVolumeSnapshotSizeUsedPercent\"} * on (cluster, svm, volume) group_left(aggr) volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",aggr=~\".*$Aggregate.*\",volume=~\"$TopVolumeSnapshotSizeUsedPercent\"})", + "expr": "topk($TopResources, volume_capacity_tier_footprint_percent{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",volume=~\"$TopVolumeCapacityTierFootprintPerc\"})", "hide": false, "interval": "", - "legendFormat": "{{aggr}} - {{volume}} - {{style}}", - "refId": "C" + "legendFormat": "{{volume}}", + "refId": "A" } ], - "title": "Top $TopResources Volumes by Snapshot Space Used %", + "title": "Top $TopResources Volumes by Capacity Tier Footprint %", "transformations": [], "type": "timeseries" } @@ -4312,7 +4988,7 @@ "h": 1, "w": 24, "x": 0, - "y": 58 + "y": 155 }, "id": 28, "panels": [ @@ -4374,7 +5050,7 @@ "h": 9, "w": 8, "x": 0, - "y": 6 + "y": 156 }, "id": 88, "options": { @@ -4463,7 +5139,7 @@ "h": 9, "w": 8, "x": 8, - "y": 6 + "y": 156 }, "id": 89, "options": { @@ -4553,7 +5229,7 @@ "h": 9, "w": 8, "x": 16, - "y": 6 + "y": 156 }, "id": 90, "options": { @@ -4642,7 +5318,7 @@ "h": 9, "w": 8, "x": 0, - "y": 15 + "y": 165 }, "id": 91, "options": { @@ -4731,7 +5407,7 @@ "h": 9, "w": 8, "x": 8, - "y": 15 + "y": 165 }, "id": 92, "options": { @@ -4820,7 +5496,7 @@ "h": 9, "w": 8, "x": 16, - "y": 15 + "y": 165 }, "id": 93, "options": { @@ -5333,6 +6009,167 @@ "skipUrlSync": false, "sort": 0, "type": "query" + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_PROMETHEUS}", + "definition": "query_result(topk($TopResources,avg_over_time(volume_capacity_tier_footprint{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"}[${__range}])))", + "description": null, + "error": null, + "hide": 2, + "includeAll": true, + "label": null, + "multi": true, + "name": "TopVolumeCapacityTierFootprint", + "options": [], + "query": { + "query": "query_result(topk($TopResources,avg_over_time(volume_capacity_tier_footprint{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"}[${__range}])))", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": ".*volume=\\\"(.*?)\\\".*", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_PROMETHEUS}", + "definition": "query_result(topk($TopResources,avg_over_time(volume_performance_tier_footprint{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"}[${__range}])))", + "description": null, + "error": null, + "hide": 2, + "includeAll": true, + "label": null, + "multi": true, + "name": "TopVolumePerformanceTierFootprint", + "options": [], + "query": { + "query": "query_result(topk($TopResources,avg_over_time(volume_performance_tier_footprint{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"}[${__range}])))", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": ".*volume=\\\"(.*?)\\\".*", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_PROMETHEUS}", + "definition": "query_result(topk($TopResources,avg_over_time(volume_capacity_tier_footprint_percent{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"}[${__range}])))", + "description": null, + "error": null, + "hide": 2, + "includeAll": true, + "label": null, + "multi": true, + "name": "TopVolumeCapacityTierFootprintPerc", + "options": [], + "query": { + "query": "query_result(topk($TopResources,avg_over_time(volume_capacity_tier_footprint_percent{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"}[${__range}])))", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": ".*volume=\\\"(.*?)\\\".*", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_PROMETHEUS}", + "definition": "query_result(topk($TopResources,avg_over_time(volume_performance_tier_footprint_percent{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"}[${__range}])))", + "description": null, + "error": null, + "hide": 2, + "includeAll": true, + "label": null, + "multi": true, + "name": "TopVolumePerformanceTierFootprintPerc", + "options": [], + "query": { + "query": "query_result(topk($TopResources,avg_over_time(volume_performance_tier_footprint_percent{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"}[${__range}])))", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": ".*volume=\\\"(.*?)\\\".*", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_PROMETHEUS}", + "definition": "query_result(topk($TopResources,avg_over_time(aggr_space_capacity_tier_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",aggr=~\"$Aggregate\"}[${__range}])))", + "description": null, + "error": null, + "hide": 2, + "includeAll": true, + "label": null, + "multi": true, + "name": "TopAggregateCapacityTierFootprint", + "options": [], + "query": { + "query": "query_result(topk($TopResources,avg_over_time(aggr_space_capacity_tier_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",aggr=~\"$Aggregate\"}[${__range}])))", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": ".*aggr=\\\"(.*?)\\\".*", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_PROMETHEUS}", + "definition": "query_result(topk($TopResources,avg_over_time(aggr_space_performance_tier_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", aggr=~\"$Aggregate\"}[${__range}])))", + "description": null, + "error": null, + "hide": 2, + "includeAll": true, + "label": null, + "multi": true, + "name": "TopAggregatePerformanceTierFootprint", + "options": [], + "query": { + "query": "query_result(topk($TopResources,avg_over_time(aggr_space_performance_tier_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", aggr=~\"$Aggregate\"}[${__range}])))", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": ".*aggr=\\\"(.*?)\\\".*", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_PROMETHEUS}", + "definition": "query_result(topk($TopResources,avg_over_time(aggr_space_performance_tier_used_percent{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", aggr=~\"$Aggregate\"}[${__range}])))", + "description": null, + "error": null, + "hide": 2, + "includeAll": true, + "label": null, + "multi": true, + "name": "TopAggregatePerformanceTierFootprintPerc", + "options": [], + "query": { + "query": "query_result(topk($TopResources,avg_over_time(aggr_space_performance_tier_used_percent{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", aggr=~\"$Aggregate\"}[${__range}])))", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": ".*aggr=\\\"(.*?)\\\".*", + "skipUrlSync": false, + "sort": 0, + "type": "query" } ] }, From 66d5bb1f76c6fc9361dac312752cc650c1a772d1 Mon Sep 17 00:00:00 2001 From: hardikl Date: Tue, 19 Sep 2023 16:53:28 +0530 Subject: [PATCH 05/12] feat: handling review comments --- grafana/dashboards/cmode/aggregate.json | 40 ++++++++++++------------- grafana/dashboards/cmode/volume.json | 18 +++++------ 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/grafana/dashboards/cmode/aggregate.json b/grafana/dashboards/cmode/aggregate.json index b8090864a..b5b6bc355 100644 --- a/grafana/dashboards/cmode/aggregate.json +++ b/grafana/dashboards/cmode/aggregate.json @@ -4057,8 +4057,9 @@ "mode": "off" } }, - "decimals": 2, "mappings": [], + "max": 100, + "min": 0, "thresholds": { "mode": "absolute", "steps": [ @@ -4072,7 +4073,7 @@ } ] }, - "unit": "bytes" + "unit": "percent" }, "overrides": [] }, @@ -4104,14 +4105,14 @@ "targets": [ { "exemplar": false, - "expr": "topk($TopResources, aggr_space_capacity_tier_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", aggr=~\"$TopAggregateCapacityTierFootprint\"})", + "expr": "topk($TopResources, (aggr_space_performance_tier_used_percent{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",aggr=~\"$TopAggregatePerformanceTierFootprintPerc\"}))", "hide": false, "interval": "", "legendFormat": "{{aggr}}", "refId": "A" } ], - "title": "Top $TopResources Aggregates by Capacity Tier Footprint", + "title": "Top $TopResources Aggregates by Performance Tier Footprint %", "transformations": [], "type": "timeseries" }, @@ -4151,9 +4152,8 @@ "mode": "off" } }, + "decimals": 2, "mappings": [], - "max": 100, - "min": 0, "thresholds": { "mode": "absolute", "steps": [ @@ -4167,7 +4167,7 @@ } ] }, - "unit": "percent" + "unit": "bytes" }, "overrides": [] }, @@ -4199,14 +4199,14 @@ "targets": [ { "exemplar": false, - "expr": "topk($TopResources, (aggr_space_performance_tier_used_percent{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",aggr=~\"$TopAggregatePerformanceTierFootprintPerc\"}))", + "expr": "topk($TopResources, aggr_space_capacity_tier_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", aggr=~\"$TopAggregateCapacityTierFootprint\"})", "hide": false, "interval": "", "legendFormat": "{{aggr}}", "refId": "A" } ], - "title": "Top $TopResources Aggregates by Performance Tier Footprint %", + "title": "Top $TopResources Aggregates by Capacity Tier Footprint", "transformations": [], "type": "timeseries" } @@ -4729,8 +4729,9 @@ "mode": "off" } }, - "decimals": 2, "mappings": [], + "max": 100, + "min": 0, "thresholds": { "mode": "absolute", "steps": [ @@ -4744,7 +4745,7 @@ } ] }, - "unit": "bytes" + "unit": "percent" }, "overrides": [] }, @@ -4776,14 +4777,14 @@ "targets": [ { "exemplar": false, - "expr": "topk($TopResources, volume_capacity_tier_footprint{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",volume=~\"$TopVolumeCapacityTierFootprint\"})", + "expr": "topk($TopResources, (volume_performance_tier_footprint_percent{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",volume=~\"$TopVolumePerformanceTierFootprintPerc\"}))", "hide": false, "interval": "", - "legendFormat": "{{volume}} ", + "legendFormat": "{{volume}}", "refId": "A" } ], - "title": "Top $TopResources Volumes by Capacity Tier Footprint", + "title": "Top $TopResources Volumes by Performance Tier Footprint %", "transformations": [], "type": "timeseries" }, @@ -4823,9 +4824,8 @@ "mode": "off" } }, + "decimals": 2, "mappings": [], - "max": 100, - "min": 0, "thresholds": { "mode": "absolute", "steps": [ @@ -4839,7 +4839,7 @@ } ] }, - "unit": "percent" + "unit": "bytes" }, "overrides": [] }, @@ -4871,14 +4871,14 @@ "targets": [ { "exemplar": false, - "expr": "topk($TopResources, (volume_performance_tier_footprint_percent{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",volume=~\"$TopVolumePerformanceTierFootprintPerc\"}))", + "expr": "topk($TopResources, volume_capacity_tier_footprint{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",volume=~\"$TopVolumeCapacityTierFootprint\"})", "hide": false, "interval": "", - "legendFormat": "{{volume}}", + "legendFormat": "{{volume}} ", "refId": "A" } ], - "title": "Top $TopResources Volumes by Performance Tier Footprint %", + "title": "Top $TopResources Volumes by Capacity Tier Footprint", "transformations": [], "type": "timeseries" }, diff --git a/grafana/dashboards/cmode/volume.json b/grafana/dashboards/cmode/volume.json index d760b848e..5a942a2be 100644 --- a/grafana/dashboards/cmode/volume.json +++ b/grafana/dashboards/cmode/volume.json @@ -5449,8 +5449,9 @@ "mode": "off" } }, - "decimals": 2, "mappings": [], + "max": 100, + "min": 0, "thresholds": { "mode": "absolute", "steps": [ @@ -5464,7 +5465,7 @@ } ] }, - "unit": "bytes" + "unit": "percent" }, "overrides": [] }, @@ -5496,14 +5497,14 @@ "targets": [ { "exemplar": false, - "expr": "topk($TopResources, volume_capacity_tier_footprint{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\", volume=~\"$TopVolumeCapacityTierFootprint\"})", + "expr": "topk($TopResources, (volume_performance_tier_footprint_percent{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\", volume=~\"$TopVolumePerformanceTierFootprintPerc\"}))", "hide": false, "interval": "", "legendFormat": "{{svm}} - {{volume}} ", "refId": "A" } ], - "title": "Top $TopResources Volumes by Capacity Tier Footprint", + "title": "Top $TopResources Volumes by Performance Tier Footprint %", "transformations": [], "type": "timeseries" }, @@ -5543,9 +5544,8 @@ "mode": "off" } }, + "decimals": 2, "mappings": [], - "max": 100, - "min": 0, "thresholds": { "mode": "absolute", "steps": [ @@ -5559,7 +5559,7 @@ } ] }, - "unit": "percent" + "unit": "bytes" }, "overrides": [] }, @@ -5591,14 +5591,14 @@ "targets": [ { "exemplar": false, - "expr": "topk($TopResources, (volume_performance_tier_footprint_percent{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\", volume=~\"$TopVolumePerformanceTierFootprintPerc\"}))", + "expr": "topk($TopResources, volume_capacity_tier_footprint{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\", volume=~\"$TopVolumeCapacityTierFootprint\"})", "hide": false, "interval": "", "legendFormat": "{{svm}} - {{volume}} ", "refId": "A" } ], - "title": "Top $TopResources Volumes by Performance Tier Footprint %", + "title": "Top $TopResources Volumes by Capacity Tier Footprint", "transformations": [], "type": "timeseries" }, From c98b395159237dd3b126560b7d6c49ecc0a566d1 Mon Sep 17 00:00:00 2001 From: hardikl Date: Wed, 20 Sep 2023 17:33:04 +0530 Subject: [PATCH 06/12] feat: new zapi call moved to plugin --- .../zapi/plugins/aggregate/aggregate.go | 73 +++++++++++++++++-- cmd/collectors/zapi/plugins/volume/volume.go | 72 +++++++++++++++++- conf/zapi/cdot/9.8.0/aggr_space.yaml | 13 ---- conf/zapi/cdot/9.8.0/volume_footprint.yaml | 15 ---- conf/zapi/default.yaml | 3 - 5 files changed, 137 insertions(+), 39 deletions(-) delete mode 100644 conf/zapi/cdot/9.8.0/aggr_space.yaml delete mode 100644 conf/zapi/cdot/9.8.0/volume_footprint.yaml diff --git a/cmd/collectors/zapi/plugins/aggregate/aggregate.go b/cmd/collectors/zapi/plugins/aggregate/aggregate.go index 5e50958f7..3f5c4ae6f 100644 --- a/cmd/collectors/zapi/plugins/aggregate/aggregate.go +++ b/cmd/collectors/zapi/plugins/aggregate/aggregate.go @@ -57,13 +57,42 @@ func (a *Aggregate) Run(dataMap map[string]*matrix.Matrix) ([]*matrix.Matrix, er return nil, err } + aggrFootprintMap, err := a.getAggrFootprint() + if err != nil { + a.Logger.Error().Err(err).Msg("Failed to update footprint data") + } + // update aggregate instance label with cloud stores info - if len(a.aggrCloudStoresMap) > 0 { - for aggrUUID, aggr := range data.GetInstances() { - if !aggr.IsExportable() { - continue + for aggrUUID, aggr := range data.GetInstances() { + if !aggr.IsExportable() { + continue + } + aggr.SetLabel("cloud_stores", strings.Join(a.aggrCloudStoresMap[aggrUUID], ",")) + + // Handling aggr footprint metrics + aggrName := aggr.GetLabel("aggr") + if af, ok := aggrFootprintMap[aggrName]; ok { + for afKey, afVal := range af { + vfMetric := data.GetMetric(afKey) + if vfMetric == nil { + if vfMetric, err = data.NewMetricFloat64(afKey); err != nil { + a.Logger.Error().Err(err).Str("metric", afKey).Msg("add metric") + continue + } + } + + if afVal != "" { + vfMetricVal, err := strconv.ParseFloat(afVal, 64) + if err != nil { + a.Logger.Error().Err(err).Str(afKey, afVal).Msg("parse") + continue + } + if err = vfMetric.SetValueFloat64(aggr, vfMetricVal); err != nil { + a.Logger.Error().Err(err).Str(afKey, afVal).Msg("set") + continue + } + } } - aggr.SetLabel("cloud_stores", strings.Join(a.aggrCloudStoresMap[aggrUUID], ",")) } } return nil, nil @@ -124,3 +153,37 @@ func (a *Aggregate) getCloudStores() error { } return nil } + +func (a *Aggregate) getAggrFootprint() (map[string]map[string]string, error) { + var ( + result []*node.Node + aggrFootprintMap map[string]map[string]string + footprintMatrics map[string]string + err error + ) + + aggrFootprintMap = make(map[string]map[string]string) + request := node.NewXMLS("aggr-space-get-iter") + request.NewChildS("max-records", collectors.DefaultBatchSize) + if result, err = a.client.InvokeZapiCall(request); err != nil { + return aggrFootprintMap, err + } + + if len(result) == 0 || result == nil { + return aggrFootprintMap, nil + } + + for _, footprint := range result { + footprintMatrics = make(map[string]string) + aggr := footprint.GetChildContentS("aggregate") + performanceTierUsed := footprint.GetChildContentS("volume-footprints") + performanceTierUsedPerc := footprint.GetChildContentS("volume-footprints-percent") + if performanceTierUsed != "" || performanceTierUsedPerc != "" { + footprintMatrics["space_performance_tier_used"] = performanceTierUsed + footprintMatrics["space_performance_tier_used_percent"] = performanceTierUsedPerc + aggrFootprintMap[aggr] = footprintMatrics + } + } + + return aggrFootprintMap, nil +} diff --git a/cmd/collectors/zapi/plugins/volume/volume.go b/cmd/collectors/zapi/plugins/volume/volume.go index 66a5e5ec9..bb67e007a 100644 --- a/cmd/collectors/zapi/plugins/volume/volume.go +++ b/cmd/collectors/zapi/plugins/volume/volume.go @@ -92,19 +92,23 @@ func (v *Volume) Run(dataMap map[string]*matrix.Matrix) ([]*matrix.Matrix, error } volumeCloneMap, err := v.getVolumeCloneInfo() - if err != nil { v.Logger.Error().Err(err).Msg("Failed to update clone data") } + volumeFootprintMap, err := v.getVolumeFootprint() + if err != nil { + v.Logger.Error().Err(err).Msg("Failed to update footprint data") + } + // update volume instance labels - v.updateVolumeLabels(data, volumeCloneMap) + v.updateVolumeLabels(data, volumeCloneMap, volumeFootprintMap) v.currentVal++ return nil, nil } -func (v *Volume) updateVolumeLabels(data *matrix.Matrix, volumeCloneMap map[string]volumeClone) { +func (v *Volume) updateVolumeLabels(data *matrix.Matrix, volumeCloneMap map[string]volumeClone, volumeFootprintMap map[string]map[string]string) { var err error for _, volume := range data.GetInstances() { if !volume.IsExportable() { @@ -143,6 +147,31 @@ func (v *Volume) updateVolumeLabels(data *matrix.Matrix, volumeCloneMap map[stri continue } } + + // Handling volume footprint metrics + if vf, ok := volumeFootprintMap[key]; ok { + for vfKey, vfVal := range vf { + vfMetric := data.GetMetric(vfKey) + if vfMetric == nil { + if vfMetric, err = data.NewMetricFloat64(vfKey); err != nil { + v.Logger.Error().Err(err).Str("metric", vfKey).Msg("add metric") + continue + } + } + + if vfVal != "" { + vfMetricVal, err := strconv.ParseFloat(vfVal, 64) + if err != nil { + v.Logger.Error().Err(err).Str(vfKey, vfVal).Msg("parse") + continue + } + if err = vfMetric.SetValueFloat64(volume, vfMetricVal); err != nil { + v.Logger.Error().Err(err).Str(vfKey, vfVal).Msg("set") + continue + } + } + } + } } } @@ -186,6 +215,43 @@ func (v *Volume) getVolumeCloneInfo() (map[string]volumeClone, error) { return volumeCloneMap, nil } +func (v *Volume) getVolumeFootprint() (map[string]map[string]string, error) { + var ( + result []*node.Node + volumeFootprintMap map[string]map[string]string + footprintMatrics map[string]string + err error + ) + + volumeFootprintMap = make(map[string]map[string]string) + request := node.NewXMLS("volume-footprint-get-iter") + request.NewChildS("max-records", collectors.DefaultBatchSize) + if result, err = v.client.InvokeZapiCall(request); err != nil { + return volumeFootprintMap, err + } + + if len(result) == 0 || result == nil { + return volumeFootprintMap, nil + } + + for _, footprint := range result { + footprintMatrics = make(map[string]string) + volume := footprint.GetChildContentS("volume") + svm := footprint.GetChildContentS("vserver") + performanceTierFootprint := footprint.GetChildContentS("volume-blocks-footprint-bin0") + performanceTierFootprintPerc := footprint.GetChildContentS("volume-blocks-footprint-bin0-percent") + capacityTierFootprint := footprint.GetChildContentS("volume-blocks-footprint-bin1") + capacityTierFootprintPerc := footprint.GetChildContentS("volume-blocks-footprint-bin1-percent") + footprintMatrics["performance_tier_footprint"] = performanceTierFootprint + footprintMatrics["performance_tier_footprint_percent"] = performanceTierFootprintPerc + footprintMatrics["capacity_tier_footprint"] = capacityTierFootprint + footprintMatrics["capacity_tier_footprint_percent"] = capacityTierFootprintPerc + volumeFootprintMap[volume+svm] = footprintMatrics + } + + return volumeFootprintMap, nil +} + func (v *Volume) getEncryptedDisks() ([]string, error) { var ( result []*node.Node diff --git a/conf/zapi/cdot/9.8.0/aggr_space.yaml b/conf/zapi/cdot/9.8.0/aggr_space.yaml deleted file mode 100644 index f330154eb..000000000 --- a/conf/zapi/cdot/9.8.0/aggr_space.yaml +++ /dev/null @@ -1,13 +0,0 @@ -name: AggregateSpace -query: aggr-space-get-iter -object: aggr - -counters: - space-information: - - ^^aggregate => aggr - - ^^tier-name => tier_name - - volume-footprints => space_performance_tier_used - - volume-footprints-percent => space_performance_tier_used_percent - -export_options: - include_all_labels: true \ No newline at end of file diff --git a/conf/zapi/cdot/9.8.0/volume_footprint.yaml b/conf/zapi/cdot/9.8.0/volume_footprint.yaml deleted file mode 100644 index 8c6cf84ef..000000000 --- a/conf/zapi/cdot/9.8.0/volume_footprint.yaml +++ /dev/null @@ -1,15 +0,0 @@ -name: VolumeFootprint -query: volume-footprint-get-iter -object: volume - -counters: - footprint-info: - - ^^volume => volume - - ^^vserver => svm - - volume-blocks-footprint-bin0 => performance_tier_footprint - - volume-blocks-footprint-bin0-percent => performance_tier_footprint_percent - - volume-blocks-footprint-bin1 => capacity_tier_footprint - - volume-blocks-footprint-bin1-percent => capacity_tier_footprint_percent - -export_options: - include_all_labels: true \ No newline at end of file diff --git a/conf/zapi/default.yaml b/conf/zapi/default.yaml index b7463d06d..2165775ae 100644 --- a/conf/zapi/default.yaml +++ b/conf/zapi/default.yaml @@ -7,7 +7,6 @@ schedule: objects: Aggregate: aggr.yaml - AggregateSpace: aggr_space.yaml AggregateEfficiency: aggr_efficiency.yaml CIFSSession: cifs_session.yaml ClusterPeer: clusterpeer.yaml @@ -38,5 +37,3 @@ objects: Support: support.yaml SVM: svm.yaml Volume: volume.yaml - VolumeFootprint: volume_footprint.yaml - From 461a16e75f3031bae99854729e0b8e5ae365f4c1 Mon Sep 17 00:00:00 2001 From: hardikl Date: Wed, 20 Sep 2023 18:26:20 +0530 Subject: [PATCH 07/12] feat: split dashboard panels --- grafana/dashboards/cmode/volume.json | 45 ++++++++++++++++++---------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/grafana/dashboards/cmode/volume.json b/grafana/dashboards/cmode/volume.json index 5a942a2be..44040e9c5 100644 --- a/grafana/dashboards/cmode/volume.json +++ b/grafana/dashboards/cmode/volume.json @@ -5263,7 +5263,7 @@ }, "gridPos": { "h": 12, - "w": 24, + "w": 12, "x": 0, "y": 43 }, @@ -5318,7 +5318,22 @@ } ], "type": "table" - }, + } + ], + "title": "Top Volume Object Storage Drilldown", + "type": "row" + }, + { + "collapsed": true, + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 19 + }, + "id": 99, + "panels": [ { "datasource": "${DS_PROMETHEUS}", "description": "", @@ -5378,7 +5393,7 @@ "h": 12, "w": 12, "x": 0, - "y": 67 + "y": 20 }, "id": 119, "options": { @@ -5473,7 +5488,7 @@ "h": 12, "w": 12, "x": 12, - "y": 67 + "y": 20 }, "id": 120, "options": { @@ -5567,7 +5582,7 @@ "h": 12, "w": 12, "x": 0, - "y": 79 + "y": 32 }, "id": 121, "options": { @@ -5662,7 +5677,7 @@ "h": 12, "w": 12, "x": 12, - "y": 79 + "y": 32 }, "id": 122, "options": { @@ -5708,7 +5723,7 @@ "h": 1, "w": 24, "x": 0, - "y": 19 + "y": 20 }, "id": 98, "panels": [ @@ -5769,7 +5784,7 @@ "h": 8, "w": 12, "x": 0, - "y": 20 + "y": 21 }, "id": 100, "options": { @@ -5856,7 +5871,7 @@ "h": 8, "w": 12, "x": 12, - "y": 20 + "y": 21 }, "id": 102, "options": { @@ -5944,7 +5959,7 @@ "h": 8, "w": 24, "x": 0, - "y": 28 + "y": 29 }, "id": 101, "options": { @@ -5984,7 +5999,7 @@ "h": 1, "w": 24, "x": 0, - "y": 20 + "y": 21 }, "id": 105, "panels": [ @@ -5994,7 +6009,7 @@ "h": 2, "w": 24, "x": 0, - "y": 21 + "y": 22 }, "id": 110, "options": { @@ -6065,7 +6080,7 @@ "h": 8, "w": 8, "x": 0, - "y": 23 + "y": 24 }, "id": 108, "options": { @@ -6157,7 +6172,7 @@ "h": 8, "w": 8, "x": 8, - "y": 23 + "y": 24 }, "id": 106, "options": { @@ -6249,7 +6264,7 @@ "h": 8, "w": 8, "x": 16, - "y": 23 + "y": 24 }, "id": 107, "options": { From d2bc3cad1a43855af5683c6383f90400746f4dea Mon Sep 17 00:00:00 2001 From: hardikl Date: Mon, 25 Sep 2023 17:11:32 +0530 Subject: [PATCH 08/12] feat: handle review comments --- .../zapi/plugins/aggregate/aggregate.go | 15 ++++++++++----- cmd/collectors/zapi/plugins/volume/volume.go | 16 +++++++++++++--- grafana/dashboards/cmode/aggregate.json | 8 ++++---- 3 files changed, 27 insertions(+), 12 deletions(-) diff --git a/cmd/collectors/zapi/plugins/aggregate/aggregate.go b/cmd/collectors/zapi/plugins/aggregate/aggregate.go index 3f5c4ae6f..3bdc644de 100644 --- a/cmd/collectors/zapi/plugins/aggregate/aggregate.go +++ b/cmd/collectors/zapi/plugins/aggregate/aggregate.go @@ -52,9 +52,7 @@ func (a *Aggregate) Run(dataMap map[string]*matrix.Matrix) ([]*matrix.Matrix, er if err := a.getCloudStores(); err != nil { if errors.Is(err, errs.ErrNoInstance) { a.Logger.Debug().Err(err).Msg("Failed to collect cloud store data") - return nil, nil } - return nil, err } aggrFootprintMap, err := a.getAggrFootprint() @@ -158,23 +156,30 @@ func (a *Aggregate) getAggrFootprint() (map[string]map[string]string, error) { var ( result []*node.Node aggrFootprintMap map[string]map[string]string - footprintMatrics map[string]string err error ) aggrFootprintMap = make(map[string]map[string]string) request := node.NewXMLS("aggr-space-get-iter") request.NewChildS("max-records", collectors.DefaultBatchSize) + desired := node.NewXMLS("desired-attributes") + spaceInfo := node.NewXMLS("space-information") + spaceInfo.NewChildS("aggregate", "") + spaceInfo.NewChildS("volume-footprints", "") + spaceInfo.NewChildS("volume-footprints-percent", "") + desired.AddChild(spaceInfo) + request.AddChild(desired) + if result, err = a.client.InvokeZapiCall(request); err != nil { return aggrFootprintMap, err } - if len(result) == 0 || result == nil { + if len(result) == 0 { return aggrFootprintMap, nil } for _, footprint := range result { - footprintMatrics = make(map[string]string) + footprintMatrics := make(map[string]string) aggr := footprint.GetChildContentS("aggregate") performanceTierUsed := footprint.GetChildContentS("volume-footprints") performanceTierUsedPerc := footprint.GetChildContentS("volume-footprints-percent") diff --git a/cmd/collectors/zapi/plugins/volume/volume.go b/cmd/collectors/zapi/plugins/volume/volume.go index bb67e007a..01b7f8590 100644 --- a/cmd/collectors/zapi/plugins/volume/volume.go +++ b/cmd/collectors/zapi/plugins/volume/volume.go @@ -219,23 +219,33 @@ func (v *Volume) getVolumeFootprint() (map[string]map[string]string, error) { var ( result []*node.Node volumeFootprintMap map[string]map[string]string - footprintMatrics map[string]string err error ) volumeFootprintMap = make(map[string]map[string]string) request := node.NewXMLS("volume-footprint-get-iter") request.NewChildS("max-records", collectors.DefaultBatchSize) + desired := node.NewXMLS("desired-attributes") + footprintInfo := node.NewXMLS("footprint-info") + footprintInfo.NewChildS("volume", "") + footprintInfo.NewChildS("vserver", "") + footprintInfo.NewChildS("volume-blocks-footprint-bin0", "") + footprintInfo.NewChildS("volume-blocks-footprint-bin0-percent", "") + footprintInfo.NewChildS("volume-blocks-footprint-bin1", "") + footprintInfo.NewChildS("volume-blocks-footprint-bin1-percent", "") + desired.AddChild(footprintInfo) + request.AddChild(desired) + if result, err = v.client.InvokeZapiCall(request); err != nil { return volumeFootprintMap, err } - if len(result) == 0 || result == nil { + if len(result) == 0 { return volumeFootprintMap, nil } for _, footprint := range result { - footprintMatrics = make(map[string]string) + footprintMatrics := make(map[string]string) volume := footprint.GetChildContentS("volume") svm := footprint.GetChildContentS("vserver") performanceTierFootprint := footprint.GetChildContentS("volume-blocks-footprint-bin0") diff --git a/grafana/dashboards/cmode/aggregate.json b/grafana/dashboards/cmode/aggregate.json index b5b6bc355..e99bc4b59 100644 --- a/grafana/dashboards/cmode/aggregate.json +++ b/grafana/dashboards/cmode/aggregate.json @@ -4013,7 +4013,7 @@ "expr": "topk($TopResources, (aggr_space_performance_tier_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",aggr=~\"$TopAggregatePerformanceTierFootprint\"}))", "hide": false, "interval": "", - "legendFormat": "{{aggr}}", + "legendFormat": "{{cluster}} - {{aggr}}", "refId": "A" } ], @@ -4108,7 +4108,7 @@ "expr": "topk($TopResources, (aggr_space_performance_tier_used_percent{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",aggr=~\"$TopAggregatePerformanceTierFootprintPerc\"}))", "hide": false, "interval": "", - "legendFormat": "{{aggr}}", + "legendFormat": "{{cluster}} - {{aggr}}", "refId": "A" } ], @@ -4202,7 +4202,7 @@ "expr": "topk($TopResources, aggr_space_capacity_tier_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", aggr=~\"$TopAggregateCapacityTierFootprint\"})", "hide": false, "interval": "", - "legendFormat": "{{aggr}}", + "legendFormat": "{{cluster}} - {{aggr}}", "refId": "A" } ], @@ -4211,7 +4211,7 @@ "type": "timeseries" } ], - "title": "Aggregate FabricPool Drilldown", + "title": "FabricPool Drilldown", "type": "row" }, { From 0ceb9bb81bc5f068c5cea6f3d1840c949bf5e14b Mon Sep 17 00:00:00 2001 From: hardikl Date: Mon, 25 Sep 2023 18:09:19 +0530 Subject: [PATCH 09/12] feat: handle review comments --- .../zapi/plugins/aggregate/aggregate.go | 29 ++++++++-------- cmd/collectors/zapi/plugins/volume/volume.go | 34 +++++++++---------- 2 files changed, 32 insertions(+), 31 deletions(-) diff --git a/cmd/collectors/zapi/plugins/aggregate/aggregate.go b/cmd/collectors/zapi/plugins/aggregate/aggregate.go index 3bdc644de..38023ae7c 100644 --- a/cmd/collectors/zapi/plugins/aggregate/aggregate.go +++ b/cmd/collectors/zapi/plugins/aggregate/aggregate.go @@ -17,7 +17,8 @@ import ( type Aggregate struct { *plugin.AbstractPlugin client *zapi.Client - aggrCloudStoresMap map[string][]string // aggregate-uuid -> slice of cloud stores map + aggrCloudStoresMap map[string][]string // aggregate-uuid -> slice of cloud stores map + aggrFootprintMap map[string]map[string]string // aggr -> map of footprint metric name and value } func New(p *plugin.AbstractPlugin) plugin.Plugin { @@ -42,21 +43,22 @@ func (a *Aggregate) Init() error { } a.aggrCloudStoresMap = make(map[string][]string) + a.aggrFootprintMap = make(map[string]map[string]string) return nil } func (a *Aggregate) Run(dataMap map[string]*matrix.Matrix) ([]*matrix.Matrix, error) { data := dataMap[a.Object] + var err error // invoke aggr-object-store-get-iter zapi and populate cloud stores info - if err := a.getCloudStores(); err != nil { + if err = a.getCloudStores(); err != nil { if errors.Is(err, errs.ErrNoInstance) { a.Logger.Debug().Err(err).Msg("Failed to collect cloud store data") } } - aggrFootprintMap, err := a.getAggrFootprint() - if err != nil { + if err = a.getAggrFootprint(); err != nil { a.Logger.Error().Err(err).Msg("Failed to update footprint data") } @@ -69,7 +71,7 @@ func (a *Aggregate) Run(dataMap map[string]*matrix.Matrix) ([]*matrix.Matrix, er // Handling aggr footprint metrics aggrName := aggr.GetLabel("aggr") - if af, ok := aggrFootprintMap[aggrName]; ok { + if af, ok := a.aggrFootprintMap[aggrName]; ok { for afKey, afVal := range af { vfMetric := data.GetMetric(afKey) if vfMetric == nil { @@ -152,14 +154,13 @@ func (a *Aggregate) getCloudStores() error { return nil } -func (a *Aggregate) getAggrFootprint() (map[string]map[string]string, error) { +func (a *Aggregate) getAggrFootprint() error { var ( - result []*node.Node - aggrFootprintMap map[string]map[string]string - err error + result []*node.Node + err error ) - aggrFootprintMap = make(map[string]map[string]string) + a.aggrFootprintMap = make(map[string]map[string]string) request := node.NewXMLS("aggr-space-get-iter") request.NewChildS("max-records", collectors.DefaultBatchSize) desired := node.NewXMLS("desired-attributes") @@ -171,11 +172,11 @@ func (a *Aggregate) getAggrFootprint() (map[string]map[string]string, error) { request.AddChild(desired) if result, err = a.client.InvokeZapiCall(request); err != nil { - return aggrFootprintMap, err + return err } if len(result) == 0 { - return aggrFootprintMap, nil + return nil } for _, footprint := range result { @@ -186,9 +187,9 @@ func (a *Aggregate) getAggrFootprint() (map[string]map[string]string, error) { if performanceTierUsed != "" || performanceTierUsedPerc != "" { footprintMatrics["space_performance_tier_used"] = performanceTierUsed footprintMatrics["space_performance_tier_used_percent"] = performanceTierUsedPerc - aggrFootprintMap[aggr] = footprintMatrics + a.aggrFootprintMap[aggr] = footprintMatrics } } - return aggrFootprintMap, nil + return nil } diff --git a/cmd/collectors/zapi/plugins/volume/volume.go b/cmd/collectors/zapi/plugins/volume/volume.go index 01b7f8590..be488720a 100644 --- a/cmd/collectors/zapi/plugins/volume/volume.go +++ b/cmd/collectors/zapi/plugins/volume/volume.go @@ -14,9 +14,10 @@ import ( type Volume struct { *plugin.AbstractPlugin - currentVal int - client *zapi.Client - aggrsMap map[string]string // aggregate-uuid -> aggregate-name map + currentVal int + client *zapi.Client + aggrsMap map[string]string // aggregate-uuid -> aggregate-name map + volumeFootprintMap map[string]map[string]string // volume+svm -> map of footprint metric name and value } type aggrData struct { @@ -55,6 +56,7 @@ func (v *Volume) Init() error { } v.aggrsMap = make(map[string]string) + v.volumeFootprintMap = make(map[string]map[string]string) // Assigned the value to currentVal so that plugin would be invoked first time to populate cache. v.currentVal = v.SetPluginInterval() @@ -96,19 +98,18 @@ func (v *Volume) Run(dataMap map[string]*matrix.Matrix) ([]*matrix.Matrix, error v.Logger.Error().Err(err).Msg("Failed to update clone data") } - volumeFootprintMap, err := v.getVolumeFootprint() - if err != nil { + if err := v.getVolumeFootprint(); err != nil { v.Logger.Error().Err(err).Msg("Failed to update footprint data") } // update volume instance labels - v.updateVolumeLabels(data, volumeCloneMap, volumeFootprintMap) + v.updateVolumeLabels(data, volumeCloneMap) v.currentVal++ return nil, nil } -func (v *Volume) updateVolumeLabels(data *matrix.Matrix, volumeCloneMap map[string]volumeClone, volumeFootprintMap map[string]map[string]string) { +func (v *Volume) updateVolumeLabels(data *matrix.Matrix, volumeCloneMap map[string]volumeClone) { var err error for _, volume := range data.GetInstances() { if !volume.IsExportable() { @@ -149,7 +150,7 @@ func (v *Volume) updateVolumeLabels(data *matrix.Matrix, volumeCloneMap map[stri } // Handling volume footprint metrics - if vf, ok := volumeFootprintMap[key]; ok { + if vf, ok := v.volumeFootprintMap[key]; ok { for vfKey, vfVal := range vf { vfMetric := data.GetMetric(vfKey) if vfMetric == nil { @@ -215,14 +216,13 @@ func (v *Volume) getVolumeCloneInfo() (map[string]volumeClone, error) { return volumeCloneMap, nil } -func (v *Volume) getVolumeFootprint() (map[string]map[string]string, error) { +func (v *Volume) getVolumeFootprint() error { var ( - result []*node.Node - volumeFootprintMap map[string]map[string]string - err error + result []*node.Node + err error ) - volumeFootprintMap = make(map[string]map[string]string) + v.volumeFootprintMap = make(map[string]map[string]string) request := node.NewXMLS("volume-footprint-get-iter") request.NewChildS("max-records", collectors.DefaultBatchSize) desired := node.NewXMLS("desired-attributes") @@ -237,11 +237,11 @@ func (v *Volume) getVolumeFootprint() (map[string]map[string]string, error) { request.AddChild(desired) if result, err = v.client.InvokeZapiCall(request); err != nil { - return volumeFootprintMap, err + return err } if len(result) == 0 { - return volumeFootprintMap, nil + return nil } for _, footprint := range result { @@ -256,10 +256,10 @@ func (v *Volume) getVolumeFootprint() (map[string]map[string]string, error) { footprintMatrics["performance_tier_footprint_percent"] = performanceTierFootprintPerc footprintMatrics["capacity_tier_footprint"] = capacityTierFootprint footprintMatrics["capacity_tier_footprint_percent"] = capacityTierFootprintPerc - volumeFootprintMap[volume+svm] = footprintMatrics + v.volumeFootprintMap[volume+svm] = footprintMatrics } - return volumeFootprintMap, nil + return nil } func (v *Volume) getEncryptedDisks() ([]string, error) { From 0acad2caeff298563919f451eb8be610883d62e8 Mon Sep 17 00:00:00 2001 From: hardikl Date: Tue, 26 Sep 2023 17:29:07 +0530 Subject: [PATCH 10/12] feat: handle review comments --- .../zapi/plugins/aggregate/aggregate.go | 37 +++++++-------- cmd/collectors/zapi/plugins/volume/volume.go | 46 ++++++++++--------- 2 files changed, 43 insertions(+), 40 deletions(-) diff --git a/cmd/collectors/zapi/plugins/aggregate/aggregate.go b/cmd/collectors/zapi/plugins/aggregate/aggregate.go index 38023ae7c..0a00dd61c 100644 --- a/cmd/collectors/zapi/plugins/aggregate/aggregate.go +++ b/cmd/collectors/zapi/plugins/aggregate/aggregate.go @@ -17,8 +17,7 @@ import ( type Aggregate struct { *plugin.AbstractPlugin client *zapi.Client - aggrCloudStoresMap map[string][]string // aggregate-uuid -> slice of cloud stores map - aggrFootprintMap map[string]map[string]string // aggr -> map of footprint metric name and value + aggrCloudStoresMap map[string][]string // aggregate-uuid -> slice of cloud stores map } func New(p *plugin.AbstractPlugin) plugin.Plugin { @@ -43,23 +42,24 @@ func (a *Aggregate) Init() error { } a.aggrCloudStoresMap = make(map[string][]string) - a.aggrFootprintMap = make(map[string]map[string]string) return nil } func (a *Aggregate) Run(dataMap map[string]*matrix.Matrix) ([]*matrix.Matrix, error) { data := dataMap[a.Object] - var err error // invoke aggr-object-store-get-iter zapi and populate cloud stores info - if err = a.getCloudStores(); err != nil { + if err := a.getCloudStores(); err != nil { if errors.Is(err, errs.ErrNoInstance) { a.Logger.Debug().Err(err).Msg("Failed to collect cloud store data") } } - if err = a.getAggrFootprint(); err != nil { + aggrFootprintMap, err := a.getAggrFootprint() + if err != nil { a.Logger.Error().Err(err).Msg("Failed to update footprint data") + // clean the map in case of the error + aggrFootprintMap = make(map[string]map[string]string) } // update aggregate instance label with cloud stores info @@ -71,7 +71,7 @@ func (a *Aggregate) Run(dataMap map[string]*matrix.Matrix) ([]*matrix.Matrix, er // Handling aggr footprint metrics aggrName := aggr.GetLabel("aggr") - if af, ok := a.aggrFootprintMap[aggrName]; ok { + if af, ok := aggrFootprintMap[aggrName]; ok { for afKey, afVal := range af { vfMetric := data.GetMetric(afKey) if vfMetric == nil { @@ -154,13 +154,14 @@ func (a *Aggregate) getCloudStores() error { return nil } -func (a *Aggregate) getAggrFootprint() error { +func (a *Aggregate) getAggrFootprint() (map[string]map[string]string, error) { var ( - result []*node.Node - err error + result []*node.Node + aggrFootprintMap map[string]map[string]string + err error ) - a.aggrFootprintMap = make(map[string]map[string]string) + aggrFootprintMap = make(map[string]map[string]string) request := node.NewXMLS("aggr-space-get-iter") request.NewChildS("max-records", collectors.DefaultBatchSize) desired := node.NewXMLS("desired-attributes") @@ -172,24 +173,24 @@ func (a *Aggregate) getAggrFootprint() error { request.AddChild(desired) if result, err = a.client.InvokeZapiCall(request); err != nil { - return err + return nil, err } if len(result) == 0 { - return nil + return aggrFootprintMap, nil } for _, footprint := range result { - footprintMatrics := make(map[string]string) + footprintMetrics := make(map[string]string) aggr := footprint.GetChildContentS("aggregate") performanceTierUsed := footprint.GetChildContentS("volume-footprints") performanceTierUsedPerc := footprint.GetChildContentS("volume-footprints-percent") if performanceTierUsed != "" || performanceTierUsedPerc != "" { - footprintMatrics["space_performance_tier_used"] = performanceTierUsed - footprintMatrics["space_performance_tier_used_percent"] = performanceTierUsedPerc - a.aggrFootprintMap[aggr] = footprintMatrics + footprintMetrics["space_performance_tier_used"] = performanceTierUsed + footprintMetrics["space_performance_tier_used_percent"] = performanceTierUsedPerc + aggrFootprintMap[aggr] = footprintMetrics } } - return nil + return aggrFootprintMap, nil } diff --git a/cmd/collectors/zapi/plugins/volume/volume.go b/cmd/collectors/zapi/plugins/volume/volume.go index be488720a..6fa2fd64d 100644 --- a/cmd/collectors/zapi/plugins/volume/volume.go +++ b/cmd/collectors/zapi/plugins/volume/volume.go @@ -14,10 +14,9 @@ import ( type Volume struct { *plugin.AbstractPlugin - currentVal int - client *zapi.Client - aggrsMap map[string]string // aggregate-uuid -> aggregate-name map - volumeFootprintMap map[string]map[string]string // volume+svm -> map of footprint metric name and value + currentVal int + client *zapi.Client + aggrsMap map[string]string // aggregate-uuid -> aggregate-name map } type aggrData struct { @@ -56,7 +55,6 @@ func (v *Volume) Init() error { } v.aggrsMap = make(map[string]string) - v.volumeFootprintMap = make(map[string]map[string]string) // Assigned the value to currentVal so that plugin would be invoked first time to populate cache. v.currentVal = v.SetPluginInterval() @@ -98,18 +96,21 @@ func (v *Volume) Run(dataMap map[string]*matrix.Matrix) ([]*matrix.Matrix, error v.Logger.Error().Err(err).Msg("Failed to update clone data") } - if err := v.getVolumeFootprint(); err != nil { + volumeFootprintMap, err := v.getVolumeFootprint() + if err != nil { v.Logger.Error().Err(err).Msg("Failed to update footprint data") + // clean the map in case of the error + volumeFootprintMap = make(map[string]map[string]string) } // update volume instance labels - v.updateVolumeLabels(data, volumeCloneMap) + v.updateVolumeLabels(data, volumeCloneMap, volumeFootprintMap) v.currentVal++ return nil, nil } -func (v *Volume) updateVolumeLabels(data *matrix.Matrix, volumeCloneMap map[string]volumeClone) { +func (v *Volume) updateVolumeLabels(data *matrix.Matrix, volumeCloneMap map[string]volumeClone, volumeFootprintMap map[string]map[string]string) { var err error for _, volume := range data.GetInstances() { if !volume.IsExportable() { @@ -150,7 +151,7 @@ func (v *Volume) updateVolumeLabels(data *matrix.Matrix, volumeCloneMap map[stri } // Handling volume footprint metrics - if vf, ok := v.volumeFootprintMap[key]; ok { + if vf, ok := volumeFootprintMap[key]; ok { for vfKey, vfVal := range vf { vfMetric := data.GetMetric(vfKey) if vfMetric == nil { @@ -216,13 +217,14 @@ func (v *Volume) getVolumeCloneInfo() (map[string]volumeClone, error) { return volumeCloneMap, nil } -func (v *Volume) getVolumeFootprint() error { +func (v *Volume) getVolumeFootprint() (map[string]map[string]string, error) { var ( - result []*node.Node - err error + result []*node.Node + volumeFootprintMap map[string]map[string]string + err error ) - v.volumeFootprintMap = make(map[string]map[string]string) + volumeFootprintMap = make(map[string]map[string]string) request := node.NewXMLS("volume-footprint-get-iter") request.NewChildS("max-records", collectors.DefaultBatchSize) desired := node.NewXMLS("desired-attributes") @@ -237,29 +239,29 @@ func (v *Volume) getVolumeFootprint() error { request.AddChild(desired) if result, err = v.client.InvokeZapiCall(request); err != nil { - return err + return nil, err } if len(result) == 0 { - return nil + return volumeFootprintMap, nil } for _, footprint := range result { - footprintMatrics := make(map[string]string) + footprintMetrics := make(map[string]string) volume := footprint.GetChildContentS("volume") svm := footprint.GetChildContentS("vserver") performanceTierFootprint := footprint.GetChildContentS("volume-blocks-footprint-bin0") performanceTierFootprintPerc := footprint.GetChildContentS("volume-blocks-footprint-bin0-percent") capacityTierFootprint := footprint.GetChildContentS("volume-blocks-footprint-bin1") capacityTierFootprintPerc := footprint.GetChildContentS("volume-blocks-footprint-bin1-percent") - footprintMatrics["performance_tier_footprint"] = performanceTierFootprint - footprintMatrics["performance_tier_footprint_percent"] = performanceTierFootprintPerc - footprintMatrics["capacity_tier_footprint"] = capacityTierFootprint - footprintMatrics["capacity_tier_footprint_percent"] = capacityTierFootprintPerc - v.volumeFootprintMap[volume+svm] = footprintMatrics + footprintMetrics["performance_tier_footprint"] = performanceTierFootprint + footprintMetrics["performance_tier_footprint_percent"] = performanceTierFootprintPerc + footprintMetrics["capacity_tier_footprint"] = capacityTierFootprint + footprintMetrics["capacity_tier_footprint_percent"] = capacityTierFootprintPerc + volumeFootprintMap[volume+svm] = footprintMetrics } - return nil + return volumeFootprintMap, nil } func (v *Volume) getEncryptedDisks() ([]string, error) { From 4ca9a9d0094962c7a911da4453b7ffa63bcfc7a6 Mon Sep 17 00:00:00 2001 From: hardikl Date: Fri, 29 Sep 2023 14:15:53 +0530 Subject: [PATCH 11/12] feat: handled review comments --- cmd/collectors/zapi/plugins/aggregate/aggregate.go | 2 +- cmd/collectors/zapi/plugins/volume/volume.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/collectors/zapi/plugins/aggregate/aggregate.go b/cmd/collectors/zapi/plugins/aggregate/aggregate.go index 0a00dd61c..cc4105957 100644 --- a/cmd/collectors/zapi/plugins/aggregate/aggregate.go +++ b/cmd/collectors/zapi/plugins/aggregate/aggregate.go @@ -59,7 +59,7 @@ func (a *Aggregate) Run(dataMap map[string]*matrix.Matrix) ([]*matrix.Matrix, er if err != nil { a.Logger.Error().Err(err).Msg("Failed to update footprint data") // clean the map in case of the error - aggrFootprintMap = make(map[string]map[string]string) + clear(aggrFootprintMap) } // update aggregate instance label with cloud stores info diff --git a/cmd/collectors/zapi/plugins/volume/volume.go b/cmd/collectors/zapi/plugins/volume/volume.go index 6fa2fd64d..ad9cc9b7b 100644 --- a/cmd/collectors/zapi/plugins/volume/volume.go +++ b/cmd/collectors/zapi/plugins/volume/volume.go @@ -100,7 +100,7 @@ func (v *Volume) Run(dataMap map[string]*matrix.Matrix) ([]*matrix.Matrix, error if err != nil { v.Logger.Error().Err(err).Msg("Failed to update footprint data") // clean the map in case of the error - volumeFootprintMap = make(map[string]map[string]string) + clear(volumeFootprintMap) } // update volume instance labels From 26ae8759181921987c31631b67ff1f4a8e4d0afd Mon Sep 17 00:00:00 2001 From: hardikl Date: Fri, 29 Sep 2023 21:16:46 +0530 Subject: [PATCH 12/12] feat: merge changes --- grafana/dashboards/cmode/aggregate.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grafana/dashboards/cmode/aggregate.json b/grafana/dashboards/cmode/aggregate.json index 6e5c1bf6e..d5588877c 100644 --- a/grafana/dashboards/cmode/aggregate.json +++ b/grafana/dashboards/cmode/aggregate.json @@ -4211,7 +4211,7 @@ "type": "timeseries" } ], - "title": "FabricPool Drilldown", + "title": "FabricPool", "type": "row" }, {