From 5881fa347df6c46892ab34fe0e81a5e0e5a2e009 Mon Sep 17 00:00:00 2001 From: hardikl Date: Wed, 18 Dec 2024 16:27:17 +0530 Subject: [PATCH] feat: add bucket detail in data protection dashboard --- conf/rest/9.7.0/ontap_s3.yaml | 2 + .../cmode/data_protection_snapshot.json | 546 ++++++++++++++++++ 2 files changed, 548 insertions(+) diff --git a/conf/rest/9.7.0/ontap_s3.yaml b/conf/rest/9.7.0/ontap_s3.yaml index 4b44ad31a..588279c92 100644 --- a/conf/rest/9.7.0/ontap_s3.yaml +++ b/conf/rest/9.7.0/ontap_s3.yaml @@ -11,6 +11,7 @@ counters: - ^protection_status.is_protected => is_protected - ^qos_policy.name => qos_policy_group - ^svm.name => svm + - ^type => type - ^volume.name => volume - logical_used_size - size @@ -38,4 +39,5 @@ export_options: - protected_in_cloud - protected_in_ontap - qos_policy_group + - type - url diff --git a/grafana/dashboards/cmode/data_protection_snapshot.json b/grafana/dashboards/cmode/data_protection_snapshot.json index 510ce8f30..347b445e7 100644 --- a/grafana/dashboards/cmode/data_protection_snapshot.json +++ b/grafana/dashboards/cmode/data_protection_snapshot.json @@ -1572,6 +1572,552 @@ "x": 0, "y": 2 }, + "id": 24, + "panels": [ + { + "datasource": "${DS_PROMETHEUS}", + "description": "Number of unhealthy snapmirrors.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "semi-dark-blue", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 5, + "x": 0, + "y": 3 + }, + "id": 104, + "links": [], + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "center", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "8.1.8", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "count(ontaps3_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"})", + "format": "time_series", + "hide": false, + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Total Buckets", + "type": "stat" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "Number of unhealthy snapmirrors.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 5, + "x": 5, + "y": 3 + }, + "id": 105, + "links": [], + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "center", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "8.1.8", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "count(ontaps3_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",is_protected=\"false\"})", + "format": "time_series", + "hide": false, + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Unprotected Buckets", + "type": "stat" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "Number of unhealthy snapmirrors.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 5, + "x": 10, + "y": 3 + }, + "id": 106, + "links": [], + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "center", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "8.1.8", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "count(ontaps3_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",protected_in_cloud=\"false\"})", + "format": "time_series", + "hide": false, + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Not Backed up to Cloud", + "type": "stat" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "This panel displays volumes detail with snapshot count.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "transparent", + "mode": "fixed" + }, + "custom": { + "align": "left", + "displayMode": "auto", + "filterable": true + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "cluster" + }, + "properties": [ + { + "id": "displayName", + "value": "Cluster" + }, + { + "id": "links", + "value": [ + { + "targetBlank": true, + "title": "", + "url": "/d/cdot-cluster/ontap-cluster?orgId=1&${Datacenter:queryparam}&${__url_time_range}&var-Cluster=${__value.raw}" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "datacenter" + }, + "properties": [ + { + "id": "displayName", + "value": "Datacenter" + }, + { + "id": "links", + "value": [ + { + "targetBlank": true, + "title": "", + "url": "/d/cdot-datacenter/ontap-datacenter?orgId=1&${__url_time_range}&var-Datacenter=${__value.raw}" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "svm" + }, + "properties": [ + { + "id": "displayName", + "value": "SVM" + }, + { + "id": "links", + "value": [ + { + "targetBlank": true, + "title": "", + "url": "/d/cdot-svm/ontap-svm?orgId=1&${Datacenter:queryparam}&${Cluster:queryparam}&${__url_time_range}&var-SVM=${__value.raw}" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Access Type" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "s3": { + "index": 0, + "text": "S3" + } + }, + "type": "value" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Protected" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "false": { + "color": "semi-dark-red", + "index": 1, + "text": "Not Protected" + }, + "true": { + "color": "semi-dark-green", + "index": 0, + "text": "Protected" + } + }, + "type": "value" + } + ] + }, + { + "id": "custom.displayMode", + "value": "color-background-solid" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Protected in Cloud" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "false": { + "color": "semi-dark-red", + "index": 1, + "text": "Not Backed Up" + }, + "true": { + "color": "semi-dark-green", + "index": 0, + "text": "Backed Up" + } + }, + "type": "value" + } + ] + }, + { + "id": "custom.displayMode", + "value": "color-background-solid" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Protected in Ontap" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "false": { + "color": "semi-dark-red", + "index": 1, + "text": "Not In Replication" + }, + "true": { + "color": "semi-dark-green", + "index": 0, + "text": "In Replication" + } + }, + "type": "value" + } + ] + }, + { + "id": "custom.displayMode", + "value": "color-background-solid" + } + ] + } + ] + }, + "gridPos": { + "h": 15, + "w": 24, + "x": 0, + "y": 8 + }, + "id": 103, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "8.1.8", + "targets": [ + { + "exemplar": false, + "expr": "ontaps3_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"}", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + }, + { + "exemplar": false, + "expr": "ontaps3_size{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"}", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "B" + }, + { + "exemplar": false, + "expr": "ontaps3_logical_used_size{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"}", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "C" + } + ], + "title": "Buckets", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "bucket", + "cluster", + "datacenter", + "is_protected", + "protected_in_cloud", + "protected_in_ontap", + "svm", + "Value #B", + "Value #C", + "type" + ] + } + } + }, + { + "id": "merge", + "options": {} + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "includeByName": {}, + "indexByName": { + "Value #B": 4, + "Value #C": 5, + "bucket": 2, + "cluster": 1, + "datacenter": 0, + "is_protected": 7, + "protected_in_cloud": 8, + "protected_in_ontap": 9, + "svm": 3, + "type": 6 + }, + "renameByName": { + "Value": "Snapshot Copies", + "Value #B": "Size", + "Value #C": "Used", + "bucket": "Name", + "cluster": "", + "comment": "Description", + "cron": "Schedule", + "is_protected": "Protected", + "name": "Name", + "policy_name": "Name", + "protected_in_cloud": "Protected in Cloud", + "protected_in_ontap": "Protected in Ontap", + "schedule_name": "Transfer Schedule", + "scope": "Scope", + "svm": "", + "type": "Access Type", + "url": "", + "volume": "" + } + } + } + ], + "type": "table" + } + ], + "title": "Bucket protection", + "type": "row" + }, + { + "collapsed": true, + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 3 + }, "id": 23, "panels": [ {