From a64cdecbc4eead10150ea9491ded9fa8b6984a46 Mon Sep 17 00:00:00 2001 From: hardikl Date: Mon, 21 Oct 2024 13:42:45 +0530 Subject: [PATCH 1/9] feat: Adding Snapmirror Sources dashboard - 1 --- cmd/collectors/rest/plugins/volume/volume.go | 14 +- conf/rest/9.14.0/volume.yaml | 3 + .../dashboards/cmode/snapmirror_sources.json | 987 ++++++++++++++++++ 3 files changed, 1002 insertions(+), 2 deletions(-) create mode 100644 grafana/dashboards/cmode/snapmirror_sources.json diff --git a/cmd/collectors/rest/plugins/volume/volume.go b/cmd/collectors/rest/plugins/volume/volume.go index e13792870..2b481d648 100644 --- a/cmd/collectors/rest/plugins/volume/volume.go +++ b/cmd/collectors/rest/plugins/volume/volume.go @@ -40,6 +40,9 @@ type volumeInfo struct { cloneSnapshotName string cloneSplitEstimateMetric float64 isObjectStoreVolume bool + isProtected string + isDestinationOntap string + isDestinationCloud string } func New(p *plugin.AbstractPlugin) plugin.Plugin { @@ -156,6 +159,10 @@ func (v *Volume) updateVolumeLabels(data *matrix.Matrix, volumeMap map[string]vo } volume.SetLabel("anti_ransomware_start_time", vInfo.arwStartTime) volume.SetLabel("antiRansomwareState", vInfo.arwState) + volume.SetLabel("isProtected", vInfo.isProtected) + volume.SetLabel("isDestinationOntap", vInfo.isDestinationOntap) + volume.SetLabel("isDestinationCloud", vInfo.isDestinationCloud) + if volume.GetLabel("is_flexclone") == "true" { volume.SetLabel("clone_parent_snapshot", vInfo.cloneSnapshotName) if err = cloneSplitEstimateMetric.SetValueFloat64(volume, vInfo.cloneSplitEstimateMetric); err != nil { @@ -272,7 +279,7 @@ func (v *Volume) getEncryptedDisks() ([]gjson.Result, error) { func (v *Volume) getVolumeInfo() (map[string]volumeInfo, error) { volumeMap := make(map[string]volumeInfo) - fields := []string{"name", "svm.name", "clone.parent_snapshot.name", "clone.split_estimate", "is_object_store"} + fields := []string{"name", "svm.name", "clone.parent_snapshot.name", "clone.split_estimate", "is_object_store", "snapmirror.is_protected", "snapmirror.destinations.is_ontap", "snapmirror.destinations.is_cloud"} if !v.isArwSupportedVersion { return v.getVolume("", fields, volumeMap) } @@ -313,7 +320,10 @@ func (v *Volume) getVolume(field string, fields []string, volumeMap map[string]v cloneSnapshotName := volume.Get("clone.parent_snapshot.name").String() cloneSplitEstimate := volume.Get("clone.split_estimate").Float() isObjectStoreVolume := volume.Get("is_object_store").Bool() - volumeMap[volName+svmName] = volumeInfo{arwStartTime: arwStartTime, arwState: arwState, cloneSnapshotName: cloneSnapshotName, cloneSplitEstimateMetric: cloneSplitEstimate, isObjectStoreVolume: isObjectStoreVolume} + isProtected := volume.Get("snapmirror.is_protected").String() + isDestinationOntap := volume.Get("snapmirror.destinations.is_ontap").String() + isDestinationCloud := volume.Get("snapmirror.destinations.is_cloud").String() + volumeMap[volName+svmName] = volumeInfo{arwStartTime: arwStartTime, arwState: arwState, cloneSnapshotName: cloneSnapshotName, cloneSplitEstimateMetric: cloneSplitEstimate, isObjectStoreVolume: isObjectStoreVolume, isProtected: isProtected, isDestinationOntap: isDestinationOntap, isDestinationCloud: isDestinationCloud} } return volumeMap, nil } diff --git a/conf/rest/9.14.0/volume.yaml b/conf/rest/9.14.0/volume.yaml index f68b36eca..82a29b149 100644 --- a/conf/rest/9.14.0/volume.yaml +++ b/conf/rest/9.14.0/volume.yaml @@ -131,8 +131,11 @@ export_options: - clone_parent_snapshot - clone_parent_svm - clone_parent_volume + - isDestinationCloud + - isDestinationOntap - isEncrypted - isHardwareEncrypted + - isProtected - is_sis_volume - junction_path - root_volume diff --git a/grafana/dashboards/cmode/snapmirror_sources.json b/grafana/dashboards/cmode/snapmirror_sources.json new file mode 100644 index 000000000..da7287826 --- /dev/null +++ b/grafana/dashboards/cmode/snapmirror_sources.json @@ -0,0 +1,987 @@ +{ + "__inputs": [ + { + "description": "", + "label": "Prometheus", + "name": "DS_PROMETHEUS", + "pluginId": "prometheus", + "pluginName": "Prometheus", + "type": "datasource" + } + ], + "__requires": [ + { + "id": "grafana", + "name": "Grafana", + "type": "grafana", + "version": "8.1.8" + }, + { + "id": "piechart", + "name": "Pie chart", + "type": "panel", + "version": "" + }, + { + "id": "prometheus", + "name": "Prometheus", + "type": "datasource", + "version": "1.0.0" + }, + { + "id": "stat", + "name": "Stat", + "type": "panel", + "version": "" + }, + { + "id": "table", + "name": "Table", + "type": "panel", + "version": "" + }, + { + "id": "text", + "name": "Text", + "type": "panel", + "version": "" + }, + { + "id": "timeseries", + "name": "Time series", + "type": "panel", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 1, + "id": null, + "links": [ + { + "asDropdown": true, + "icon": "external link", + "includeVars": true, + "keepTime": true, + "tags": [ + "cdot" + ], + "targetBlank": false, + "title": "Related Dashboards", + "tooltip": "", + "type": "dashboards", + "url": "" + } + ], + "liveNow": false, + "panels": [ + { + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 2, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 29, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "To monitor both sides of a snapmirror relationship, both source and destination clusters must be monitored by Harvest. Both clusters need to export their metrics to the same Prometheus instance.", + "mode": "markdown" + }, + "pluginVersion": "10.3.1", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "refId": "A" + } + ], + "title": "Important Information about SnapMirror Sources dashboard", + "type": "text" + }, + { + "collapsed": false, + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 2 + }, + "id": 15, + "panels": [], + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "refId": "A" + } + ], + "title": "Highlights", + "type": "row" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "Volumes Protected With Snapmirror (Local And Remote).", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "decimals": 0, + "fieldMinMax": false, + "mappings": [], + "unitScale": true + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Protected" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Not Protected" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "yellow", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 12, + "w": 8, + "x": 0, + "y": 3 + }, + "id": 101, + "options": { + "displayLabels": [], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "value" + ] + }, + "pieType": "donut", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "count(volume_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\",type=\"rw\",snapshot_policy!=\"none\"}) or vector(0)", + "format": "time_series", + "instant": true, + "interval": "", + "legendFormat": "Protected", + "range": false, + "refId": "A" + }, + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "count(volume_labels{cluster=~\"$Cluster\",type=\"rw\",snapshot_policy!=\"\",state!=\"\",snapshot_policy=\"none\"}) or vector(0)", + "format": "time_series", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "Not Protected", + "refId": "B" + } + ], + "title": "Snapshot copies (local)", + "transformations": [], + "type": "piechart" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "Volumes Protected With Snapmirror (Local And Remote).", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "decimals": 0, + "mappings": [], + "unitScale": true + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Protected" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Unprotected" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "yellow", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 12, + "w": 8, + "x": 8, + "y": 3 + }, + "id": 135, + "options": { + "displayLabels": [], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "value" + ] + }, + "pieType": "donut", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",type=\"rw\",state!=\"\",isProtected=\"false\"})", + "format": "time_series", + "instant": true, + "interval": "", + "legendFormat": "Unprotected", + "refId": "A" + }, + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",type=\"rw\",state!=\"\",isProtected=\"true\",isDestinationOntap=\"true\"})", + "format": "time_series", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "Protected", + "refId": "B" + } + ], + "title": "SnapMirror (local or remote)", + "transformations": [], + "type": "piechart" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "Volumes Protected With Snapmirror (Local And Remote).", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "decimals": 0, + "mappings": [], + "unitScale": true + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Protected" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Unprotected" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "yellow", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 12, + "w": 8, + "x": 16, + "y": 3 + }, + "id": 136, + "options": { + "displayLabels": [], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "value" + ] + }, + "pieType": "donut", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"})", + "format": "time_series", + "instant": true, + "interval": "", + "legendFormat": "Unprotected", + "refId": "A" + }, + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",state!=\"\",isProtected=\"true\",isDestinationCloud=\"true\"}) or vector(0)", + "format": "time_series", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "Protected", + "refId": "B" + } + ], + "title": "Back up to cloud", + "transformations": [], + "type": "piechart" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "This panel displays detail of all the snapmirror relationships from destination side of view.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "left", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false + }, + "decimals": 2, + "fieldMinMax": true, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "light-purple", + "value": null + } + ] + }, + "unitScale": true + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Destination Cluster" + }, + "properties": [ + { + "id": "custom.width", + "value": 278 + }, + { + "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": "Source Cluster" + }, + "properties": [ + { + "id": "custom.width", + "value": 200 + }, + { + "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": "Group Type" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "consistencygroup": { + "index": 2, + "text": "Consistency Group" + }, + "flexgroup": { + "index": 3, + "text": "FlexGroup" + }, + "none": { + "index": 0, + "text": "Volume" + }, + "vserver": { + "index": 1, + "text": "SVM DR" + } + }, + "type": "value" + } + ] + }, + { + "id": "custom.width", + "value": 168 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Protection Policy" + }, + "properties": [ + { + "id": "custom.width", + "value": 266 + }, + { + "id": "mappings", + "value": [ + { + "options": { + "async_mirror": { + "index": 1, + "text": "Async Mirror" + }, + "automated_failover": { + "index": 4, + "text": "Automated Failover" + }, + "automated_failover_duplex": { + "index": 0, + "text": "Automated Failover Duplex" + }, + "mirror_vault": { + "index": 2, + "text": "Mirror Vault" + }, + "sync_mirror": { + "index": 5, + "text": "Sync" + }, + "vault": { + "index": 3, + "text": "Vault" + } + }, + "type": "value" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Relationship Health" + }, + "properties": [ + { + "id": "custom.width", + "value": 203 + }, + { + "id": "mappings", + "value": [ + { + "options": { + "false": { + "color": "red", + "index": 1, + "text": "Unhealthy" + }, + "true": { + "color": "green", + "index": 0, + "text": "Healthy" + } + }, + "type": "value" + } + ] + }, + { + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Source Path" + }, + "properties": [ + { + "id": "custom.width", + "value": 315 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Destination Path" + }, + "properties": [ + { + "id": "custom.width", + "value": 363 + } + ] + } + ] + }, + "gridPos": { + "h": 10, + "w": 24, + "x": 0, + "y": 15 + }, + "id": 134, + "links": [], + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": false, + "displayName": "Relationship Health" + } + ] + }, + "pluginVersion": "10.3.1", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "snapmirror_labels{source_cluster=~\"$Cluster\",source_volume=~\"$Volume\",source_vserver=~\"$SVM\",source_location=~\".*$ConsistencyGroup\",derived_relationship_type!=\"load_sharing\",relationship_id!=\"\"} ", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "D" + } + ], + "title": "Relationships", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "cluster", + "destination_location", + "group_type", + "healthy", + "policy_type", + "source_cluster", + "source_location" + ] + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "includeByName": {}, + "indexByName": { + "Value": 15, + "cluster": 2, + "derived_relationship_type": 4, + "destination_location": 3, + "group_type": 5, + "healthy": 6, + "last_transfer_type": 7, + "policy_type": 8, + "protectedBy": 9, + "protectionSourceType": 10, + "relationship_id": 11, + "relationship_status": 12, + "relationship_type": 13, + "schedule": 14, + "source_cluster": 0, + "source_location": 1 + }, + "renameByName": { + "cluster": "Destination Cluster", + "derived_relationship_type": "", + "destination_location": "Destination Path", + "group_type": "Group Type", + "healthy": "Relationship Health", + "policy_type": "Protection Policy", + "relationship_status": "", + "source_cluster": "Source Cluster", + "source_location": "Source Path" + } + } + } + ], + "type": "table" + } + ], + "refresh": "", + "schemaVersion": 39, + "tags": [ + "harvest", + "ontap", + "cdot" + ], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "Prometheus", + "value": "c6938c7d-3e1c-4ff1-9741-ef4164e5259a" + }, + "hide": 2, + "includeAll": false, + "label": "Data Source", + "multi": false, + "name": "DS_PROMETHEUS", + "options": [], + "query": "prometheus", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "datasource": "${DS_PROMETHEUS}", + "definition": "label_values(cluster_new_status{system_type!=\"7mode\"},datacenter)", + "description": "Select all the datacenters that contain the ONTAP clusters acting as source for SnapMirror relationships.", + "hide": 0, + "includeAll": false, + "multi": true, + "name": "Datacenter", + "options": [], + "query": { + "query": "label_values(cluster_new_status{system_type!=\"7mode\"},datacenter)", + "refId": "Prometheus-Datacenter-Variable-Query" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": ".*", + "current": {}, + "datasource": "${DS_PROMETHEUS}", + "definition": "query_result(snapmirror_labels{system_type!=\"7mode\"} * on (source_volume, source_vserver, source_cluster) group_left() label_replace( label_replace( label_replace( volume_labels{system_type!=\"7mode\",datacenter=~\"$Datacenter\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\"), \"source_cluster\", \"$1\", \"cluster\", \"(.*)\"))", + "hide": 0, + "includeAll": true, + "multi": true, + "name": "Cluster", + "options": [], + "query": { + "query": "query_result(snapmirror_labels{system_type!=\"7mode\"} * on (source_volume, source_vserver, source_cluster) group_left() label_replace( label_replace( label_replace( volume_labels{system_type!=\"7mode\",datacenter=~\"$Datacenter\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\"), \"source_cluster\", \"$1\", \"cluster\", \"(.*)\"))", + "refId": "Prometheus-Cluster-Variable-Query" + }, + "refresh": 2, + "regex": ".*source_cluster=\\\"(.*?)\\\".*", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": ".*", + "current": {}, + "datasource": "${DS_PROMETHEUS}", + "definition": "label_values(snapmirror_labels{source_cluster=~\"$SourceCluster\"}, source_vserver)", + "hide": 0, + "includeAll": true, + "multi": true, + "name": "SVM", + "options": [], + "query": { + "query": "label_values(snapmirror_labels{source_cluster=~\"$SourceCluster\"}, source_vserver)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": ".*", + "current": {}, + "datasource": "${DS_PROMETHEUS}", + "definition": "label_values(snapmirror_labels{source_cluster=~\"$SourceCluster\",source_vserver=~\"$SourceSVM\"}, source_volume)", + "hide": 0, + "includeAll": true, + "multi": true, + "name": "Volume", + "options": [], + "query": { + "query": "label_values(snapmirror_labels{source_cluster=~\"$SourceCluster\",source_vserver=~\"$SourceSVM\"}, source_volume)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": ".*", + "current": {}, + "datasource": "${DS_PROMETHEUS}", + "definition": "label_values(snapmirror_labels{source_cluster=~\"$SourceCluster\",source_vserver=~\"$SourceSVM\", destination_vserver=~\"$DestinationSVM\"}, source_cg_name)", + "hide": 0, + "includeAll": true, + "multi": true, + "name": "ConsistencyGroup", + "options": [], + "query": { + "query": "label_values(snapmirror_labels{source_cluster=~\"$SourceCluster\",source_vserver=~\"$SourceSVM\", destination_vserver=~\"$DestinationSVM\"}, source_cg_name)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-3h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "ONTAP: SnapMirror Sources", + "uid": "cdot-snapmirror-sources", + "version": 1, + "weekStart": "" +} From 3e7c66f53ef4f2b7e34e5ec70bf3f2513dc94061 Mon Sep 17 00:00:00 2001 From: hardikl Date: Mon, 21 Oct 2024 17:38:01 +0530 Subject: [PATCH 2/9] feat: Updating Snapmirror dashboard --- cmd/tools/grafana/grafana.go | 7 +- cmd/tools/grafana/grafana_test.go | 21 +- conf/zapi/cdot/9.8.0/volume.yaml | 7 + grafana/dashboards/cmode/snapmirror.json | 5114 ++--------------- .../dashboards/cmode/snapmirror_sources.json | 987 ---- 5 files changed, 446 insertions(+), 5690 deletions(-) delete mode 100644 grafana/dashboards/cmode/snapmirror_sources.json diff --git a/cmd/tools/grafana/grafana.go b/cmd/tools/grafana/grafana.go index be5dd7506..439097631 100644 --- a/cmd/tools/grafana/grafana.go +++ b/cmd/tools/grafana/grafana.go @@ -195,11 +195,8 @@ func exportFiles(dir string, folder *Folder) error { return nil } -func addSvmRegex(content []byte, fileName string, val string) []byte { +func addSvmRegex(content []byte, val string) []byte { svmExpression := []string{"templating.list.#(name=\"SVM\")"} - if fileName == "snapmirror.json" { - svmExpression = []string{"templating.list.#(name=\"DestinationSVM\")", "templating.list.#(name=\"SourceSVM\")"} - } for _, s := range svmExpression { var err error svm := gjson.GetBytes(content, s) @@ -514,7 +511,7 @@ func importFiles(dir string, folder *Folder) { // add svm regex if opts.svmRegex != "" { - data = addSvmRegex(data, file.Name(), opts.svmRegex) + data = addSvmRegex(data, opts.svmRegex) } // change cluster label if needed diff --git a/cmd/tools/grafana/grafana_test.go b/cmd/tools/grafana/grafana_test.go index eb6617afc..3d801d1ed 100644 --- a/cmd/tools/grafana/grafana_test.go +++ b/cmd/tools/grafana/grafana_test.go @@ -4,7 +4,6 @@ import ( "bytes" "encoding/json" "fmt" - "path/filepath" "regexp" "strings" "testing" @@ -113,22 +112,10 @@ func TestAddSvmRegex(t *testing.T) { VisitDashboards( []string{"../../../grafana/dashboards/cmode/svm.json", "../../../grafana/dashboards/cmode/snapmirror.json"}, func(path string, data []byte) { - file := filepath.Base(path) - out := addSvmRegex(data, file, regex) - if file == "svm.json" { - r := gjson.GetBytes(out, "templating.list.#(name=\"SVM\").regex") - if r.String() != regex { - t.Errorf("path: %s \nExpected: [%s]\n Got: [%s]", path, regex, r.String()) - } - } else if file == "snapmirror.json" { - r := gjson.GetBytes(out, "templating.list.#(name=\"DestinationSVM\").regex") - if r.String() != regex { - t.Errorf("path: %s \nExpected: [%s]\n Got: [%s]", path, regex, r.String()) - } - r = gjson.GetBytes(out, "templating.list.#(name=\"SourceSVM\").regex") - if r.String() != regex { - t.Errorf("path: %s \nExpected: [%s]\n Got: [%s]", path, regex, r.String()) - } + out := addSvmRegex(data, regex) + r := gjson.GetBytes(out, "templating.list.#(name=\"SVM\").regex") + if r.String() != regex { + t.Errorf("path: %s \nExpected: [%s]\n Got: [%s]", path, regex, r.String()) } }) } diff --git a/conf/zapi/cdot/9.8.0/volume.yaml b/conf/zapi/cdot/9.8.0/volume.yaml index 7ea7744df..7d5b9edea 100644 --- a/conf/zapi/cdot/9.8.0/volume.yaml +++ b/conf/zapi/cdot/9.8.0/volume.yaml @@ -26,6 +26,10 @@ counters: - volume-inode-attributes: - files-total - files-used + - volume-mirror-attributes: + - ^is-snapmirror-source => isProtected + - ^is-snapmirror-source-to-object-store => isDestinationCloud + - ^is-snapmirror-source-to-ontap => isDestinationOntap - volume-sis-attributes: - ^is-sis-volume => is_sis_volume - compression-space-saved => sis_compress_saved @@ -117,8 +121,11 @@ export_options: - clone_parent_snapshot - clone_parent_svm - clone_parent_volume + - isDestinationCloud + - isDestinationOntap - isEncrypted - isHardwareEncrypted + - isProtected - is_sis_volume - junction_path - node_root diff --git a/grafana/dashboards/cmode/snapmirror.json b/grafana/dashboards/cmode/snapmirror.json index c9fff9d52..3fa3f027c 100644 --- a/grafana/dashboards/cmode/snapmirror.json +++ b/grafana/dashboards/cmode/snapmirror.json @@ -109,7 +109,7 @@ "mode": "markdown" }, "pluginVersion": "8.1.8", - "title": "Important Information about SnapMirror dashboard", + "title": "Important Information about SnapMirror Sources dashboard", "type": "text" }, { @@ -127,629 +127,376 @@ "type": "row" }, { - "cacheTimeout": null, "datasource": "${DS_PROMETHEUS}", - "description": "Number of total snapmirrors. \n\nThere are 4 types of snapmirrors can be possible.\n\n| Type | Detail | \n|---|---|\n| `Volume` protected | Individual volume is being protected | \n| `SVM-DR` protected | Whole SVM is being protected along with volumes belongs to it |\n| `Consistency Group` protected | Consistecy Group is being protected along with mapped volumes in it |\n| `Flexgroup` protected| FlexGroup is being protected along with constituents volumes in it|.", + "description": "Volumes Protected With Snapmirror (Local And Remote).", "fieldConfig": { "defaults": { - "mappings": [ - { - "options": { - "match": "null", - "result": { - "color": "semi-dark-purple", - "text": "0" - } - }, - "type": "special" + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false } - ], - "thresholds": { - "mode": "absolute", - "steps": [ + }, + "decimals": 0, + "fieldMinMax": false, + "mappings": [], + "unitScale": true + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Protected" + }, + "properties": [ { - "color": "semi-dark-purple", - "value": null + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } } ] }, - "unit": "none" - }, - "overrides": [] + { + "matcher": { + "id": "byName", + "options": "Not Protected" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "yellow", + "mode": "fixed" + } + } + ] + } + ] }, "gridPos": { - "h": 3, - "w": 20, + "h": 12, + "w": 8, "x": 0, "y": 3 }, - "id": 18, - "links": [], + "id": 101, "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "horizontal", + "displayLabels": [], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "value" + ] + }, + "pieType": "donut", "reduceOptions": { "calcs": [ - "lastNotNull" + "last" ], "fields": "", "values": false }, - "text": {}, - "textMode": "auto" + "tooltip": { + "mode": "single", + "sort": "none" + } }, "pluginVersion": "8.1.8", "targets": [ { - "expr": "count (count by (relationship_id) (snapmirror_labels{source_cluster=~\"$SourceCluster\",relationship_id!=\"\"}))", + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "count(volume_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\",type=\"rw\",snapshot_policy!=\"none\"}) or vector(0)", "format": "time_series", - "hide": false, - "instant": false, + "instant": true, "interval": "", - "intervalFactor": 1, - "legendFormat": "", + "legendFormat": "Protected", + "range": false, "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "SnapMirrors", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "${DS_PROMETHEUS}", - "description": "Number of volume snapmirrors.", - "fieldConfig": { - "defaults": { - "mappings": [ - { - "options": { - "match": "null", - "result": { - "color": "light-purple", - "text": "0" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-purple", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 0, - "y": 6 - }, - "id": 20, - "links": [], - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "8.1.8", - "targets": [ { - "expr": "count (count by (relationship_id) (snapmirror_labels{source_cluster=~\"$SourceCluster\",group_type=\"none\",relationship_id!=\"\"}))", + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "count(volume_labels{cluster=~\"$Cluster\",type=\"rw\",snapshot_policy!=\"\",state!=\"\",snapshot_policy=\"none\"}) or vector(0)", "format": "time_series", "hide": false, - "instant": false, + "instant": true, "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" + "legendFormat": "Not Protected", + "refId": "B" } ], - "timeFrom": null, - "timeShift": null, - "title": "Volume Protection", - "type": "stat" + "title": "Snapshot copies (local)", + "transformations": [], + "type": "piechart" }, { - "cacheTimeout": null, "datasource": "${DS_PROMETHEUS}", - "description": "Number of svm-dr protected snapmirrors.", + "description": "Volumes Protected With Snapmirror (Local And Remote).", "fieldConfig": { "defaults": { - "mappings": [ - { - "options": { - "match": "null", - "result": { - "color": "light-purple", - "text": "0" - } - }, - "type": "special" + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false } - ], - "thresholds": { - "mode": "absolute", - "steps": [ + }, + "decimals": 0, + "mappings": [], + "unitScale": true + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Protected" + }, + "properties": [ { - "color": "light-purple", - "value": null + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } } ] }, - "unit": "none" - }, - "overrides": [] + { + "matcher": { + "id": "byName", + "options": "Unprotected" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "yellow", + "mode": "fixed" + } + } + ] + } + ] }, "gridPos": { - "h": 3, - "w": 5, - "x": 5, - "y": 6 + "h": 12, + "w": 8, + "x": 8, + "y": 3 }, - "id": 19, - "links": [], + "id": 135, "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "horizontal", + "displayLabels": [], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "value" + ] + }, + "pieType": "donut", "reduceOptions": { "calcs": [ - "lastNotNull" + "last" ], "fields": "", "values": false }, - "text": {}, - "textMode": "auto" + "tooltip": { + "mode": "single", + "sort": "none" + } }, "pluginVersion": "8.1.8", "targets": [ { - "expr": "count (count by (relationship_id) (snapmirror_labels{source_cluster=~\"$SourceCluster\",group_type=\"vserver\",relationship_id!=\"\"}))", + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",type=\"rw\",state!=\"\",isProtected=\"false\"})", "format": "time_series", - "hide": false, - "instant": false, + "instant": true, "interval": "", - "intervalFactor": 1, - "legendFormat": "", + "legendFormat": "Unprotected", "refId": "A" + }, + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",type=\"rw\",state!=\"\",isProtected=\"true\",isDestinationOntap=\"true\"})", + "format": "time_series", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "Protected", + "refId": "B" } ], - "timeFrom": null, - "timeShift": null, - "title": "SVM Protection (DR)", - "type": "stat" + "title": "SnapMirror (local or remote)", + "transformations": [], + "type": "piechart" }, { - "cacheTimeout": null, "datasource": "${DS_PROMETHEUS}", - "description": "Number of consistency group protected snapmirrors.", + "description": "Volumes Protected With Snapmirror (Local And Remote).", "fieldConfig": { "defaults": { - "mappings": [ - { - "options": { - "match": "null", - "result": { - "color": "light-purple", - "text": "0" - } - }, - "type": "special" + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false } - ], - "thresholds": { - "mode": "absolute", - "steps": [ + }, + "decimals": 0, + "mappings": [], + "unitScale": true + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Protected" + }, + "properties": [ { - "color": "light-purple", - "value": null + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } } ] }, - "unit": "none" - }, - "overrides": [] + { + "matcher": { + "id": "byName", + "options": "Unprotected" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "yellow", + "mode": "fixed" + } + } + ] + } + ] }, "gridPos": { - "h": 3, - "w": 5, - "x": 10, - "y": 6 + "h": 12, + "w": 8, + "x": 16, + "y": 3 }, - "id": 23, - "links": [], + "id": 136, "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "horizontal", + "displayLabels": [], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "value" + ] + }, + "pieType": "donut", "reduceOptions": { "calcs": [ - "lastNotNull" + "last" ], "fields": "", "values": false }, - "text": {}, - "textMode": "auto" + "tooltip": { + "mode": "single", + "sort": "none" + } }, "pluginVersion": "8.1.8", "targets": [ { - "expr": "count (count by (relationship_id) (snapmirror_labels{source_cluster=~\"$SourceCluster\",group_type=\"consistencygroup\",destination_cg_name=~\"$DestinationConsistencyGroup\",source_cg_name=~\"$SourceConsistencyGroup\",relationship_id!=\"\"}))", + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"})", "format": "time_series", - "hide": false, - "instant": false, + "instant": true, "interval": "", - "intervalFactor": 1, - "legendFormat": "", + "legendFormat": "Unprotected", "refId": "A" + }, + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",state!=\"\",isProtected=\"true\",isDestinationCloud=\"true\"}) or vector(0)", + "format": "time_series", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "Protected", + "refId": "B" } ], - "timeFrom": null, - "timeShift": null, - "title": "Consistency Group", - "type": "stat" + "title": "Back up to cloud", + "transformations": [], + "type": "piechart" }, { - "cacheTimeout": null, "datasource": "${DS_PROMETHEUS}", - "description": "Number of flexgroup protected snapmirrors.", + "description": "This panel displays detail of all the snapmirror relationships from destination side of view.", "fieldConfig": { "defaults": { - "mappings": [ - { - "options": { - "match": "null", - "result": { - "color": "semi-dark-purple", - "text": "0" - } - }, - "type": "special" - } - ], + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "left", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false + }, + "decimals": 2, + "fieldMinMax": true, + "links": [], + "mappings": [], + "min": 0, "thresholds": { "mode": "absolute", "steps": [ { - "color": "semi-dark-purple", + "color": "light-purple", "value": null } ] }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 15, - "y": 6 - }, - "id": 24, - "links": [], - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "8.1.8", - "targets": [ - { - "datasource": "${DS_PROMETHEUS}", - "exemplar": false, - "expr": "count (count by (relationship_id) (snapmirror_labels{source_cluster=~\"$SourceCluster\",group_type=\"flexgroup\",relationship_id!=\"\"}))", - "format": "time_series", - "hide": false, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Flexgroups", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "${DS_PROMETHEUS}", - "description": "Number of insync snapmirrors.", - "fieldConfig": { - "defaults": { - "mappings": [ - { - "options": { - "match": "null", - "result": { - "color": "light-purple", - "text": "0" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-purple", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 20, - "y": 3 - }, - "id": 22, - "links": [], - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "8.1.8", - "targets": [ - { - "expr": "count (count by (relationship_id) (snapmirror_labels{source_cluster=~\"$SourceCluster\",relationship_status=\"insync\",relationship_id!=\"\"}))", - "format": "time_series", - "hide": false, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Insync now", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "${DS_PROMETHEUS}", - "description": "Number of unhealhty snapmirrors.", - "fieldConfig": { - "defaults": { - "mappings": [ - { - "options": { - "match": "null", - "result": { - "color": "rgb(222, 113, 139)", - "text": "0" - } - }, - "type": "special" - } - ], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgb(222, 113, 139)", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 20, - "y": 6 - }, - "id": 21, - "links": [], - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "8.1.8", - "targets": [ - { - "expr": "count (count by (relationship_id) (snapmirror_labels{source_cluster=~\"$SourceCluster\",healthy=\"false\",relationship_id!=\"\"}))", - "format": "time_series", - "hide": false, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Unhealthy", - "type": "stat" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "Must select Source Volume/Destination Volume for detail of single relationship.", - "fieldConfig": { - "defaults": { - "custom": { - "align": "left", - "displayMode": "auto", - "filterable": true - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-purple", - "value": null - } - ] - } + "unitScale": true }, "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Size" - }, - "properties": [ - { - "id": "custom.displayMode", - "value": "lcd-gauge" - }, - { - "id": "unit", - "value": "bytes" - }, - { - "id": "mappings", - "value": [ - { - "options": { - "match": "null", - "result": { - "text": "0" - } - }, - "type": "special" - } - ] - }, - { - "id": "custom.width", - "value": 240 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Duration" - }, - "properties": [ - { - "id": "custom.displayMode", - "value": "lcd-gauge" - }, - { - "id": "unit", - "value": "s" - }, - { - "id": "mappings", - "value": [ - { - "options": { - "match": "null", - "result": { - "text": "0" - } - }, - "type": "special" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Lag" - }, - "properties": [ - { - "id": "unit", - "value": "s" - }, - { - "id": "custom.displayMode", - "value": "lcd-gauge" - }, - { - "id": "mappings", - "value": [ - { - "options": { - "match": "null", - "result": { - "text": "0" - } - }, - "type": "special" - } - ] - } - ] - }, { "matcher": { "id": "byName", @@ -758,7 +505,7 @@ "properties": [ { "id": "custom.width", - "value": 200 + "value": 278 }, { "id": "links", @@ -797,7 +544,7 @@ { "matcher": { "id": "byName", - "options": "Type" + "options": "Group Type" }, "properties": [ { @@ -825,18 +572,22 @@ "type": "value" } ] + }, + { + "id": "custom.width", + "value": 168 } ] }, { "matcher": { "id": "byName", - "options": "Relationship Type" + "options": "Protection Policy" }, "properties": [ { "id": "custom.width", - "value": 200 + "value": 266 }, { "id": "mappings", @@ -864,3940 +615,183 @@ "text": "Sync" }, "vault": { - "index": 3, - "text": "Vault" - } - }, - "type": "value" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 10, - "w": 24, - "x": 0, - "y": 7 - }, - "id": 28, - "links": [], - "options": { - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Size" - } - ] - }, - "pluginVersion": "8.1.8", - "targets": [ - { - "expr": "snapmirror_last_transfer_duration{source_cluster=~\"$SourceCluster\",source_volume=~\"$SourceVolume\",destination_volume=~\"$DestinationVolume\",destination_location=~\".*$DestinationConsistencyGroup\",source_location=~\".*$SourceConsistencyGroup\"}", - "format": "table", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "C" - }, - { - "exemplar": false, - "expr": "snapmirror_last_transfer_size{source_cluster=~\"$SourceCluster\",source_volume=~\"$SourceVolume\",destination_volume=~\"$DestinationVolume\",source_vserver=~\"$SourceSVM\",destination_vserver=~\"$DestinationSVM\",destination_location=~\".*$DestinationConsistencyGroup\",source_location=~\".*$SourceConsistencyGroup\",relationship_id!=\"\"}\nand\ntopk(\n $TopResources,\n avg_over_time(snapmirror_last_transfer_size{source_cluster=~\"$SourceCluster\", source_volume=~\"$SourceVolume\", destination_volume=~\"$DestinationVolume\", source_vserver=~\"$SourceSVM\", destination_vserver=~\"$DestinationSVM\",destination_location=~\".*$DestinationConsistencyGroup\",source_location=~\".*$SourceConsistencyGroup\",relationship_id!=\"\"}[3h])\n)", - "format": "table", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "A" - }, - { - "expr": "snapmirror_lag_time{source_cluster=~\"$SourceCluster\",source_volume=~\"$SourceVolume\",destination_volume=~\"$DestinationVolume\",destination_location=~\".*$DestinationConsistencyGroup\",source_location=~\".*$SourceConsistencyGroup\"}", - "format": "table", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "B" - }, - { - "exemplar": false, - "expr": "snapmirror_labels{source_cluster=~\"$SourceCluster\",source_volume=~\"$SourceVolume\",destination_volume=~\"$DestinationVolume\",destination_location=~\".*$DestinationConsistencyGroup\",source_location=~\".*$SourceConsistencyGroup\"}", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "D" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Top $TopResources Last Transfers by Transfer Data Size", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "cluster", - "destination_location", - "source_cluster", - "source_location", - "Value #C", - "Value #A", - "group_type", - "policy_type", - "Value #B" - ] - } - } - }, - { - "id": "merge", - "options": {} - }, - { - "id": "filterByValue", - "options": { - "filters": [ - { - "config": { - "id": "greaterOrEqual", - "options": { - "value": 0 - } - }, - "fieldName": "Value #A" - } - ], - "match": "any", - "type": "include" - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Time": true, - "__name__": true, - "cluster": false, - "datacenter": true, - "destination_node": true, - "destination_volume": false, - "destination_vserver": false, - "instance": true, - "job": true, - "relationship_type": true, - "schedule": true, - "source_node": true, - "source_volume": false, - "source_vserver": false - }, - "indexByName": { - "Value #A": 7, - "Value #C": 6, - "cluster": 1, - "destination_location": 3, - "group_type": 4, - "policy_type": 5, - "source_cluster": 0, - "source_location": 2 - }, - "renameByName": { - "Value #A": "Size", - "Value #B": "Lag", - "Value #C": "Duration", - "cluster": "Destination Cluster", - "destination_location": "Destination ", - "group_type": "Type", - "policy_type": "Relationship Type", - "source_cluster": "Source Cluster", - "source_location": "Source" - } - } - } - ], - "type": "table" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "Must select Source Volume/Destination Volume for detail of single relationship.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 30, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 8, - "x": 0, - "y": 17 - }, - "id": 136, - "links": [], - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.1.8", - "repeatDirection": "h", - "targets": [ - { - "datasource": "${DS_PROMETHEUS}", - "exemplar": false, - "expr": "snapmirror_last_transfer_duration{source_cluster=~\"$SourceCluster\",source_volume=~\"$SourceVolume\",destination_volume=~\"$DestinationVolume\",source_vserver=~\"$SourceSVM\",destination_vserver=~\"$DestinationSVM\",destination_location=~\".*$DestinationConsistencyGroup\",source_location=~\".*$SourceConsistencyGroup\"}\nand\ntopk($TopResources, avg_over_time(snapmirror_last_transfer_duration{source_cluster=~\"$SourceCluster\",source_volume=~\"$SourceVolume\",destination_volume=~\"$DestinationVolume\",source_vserver=~\"$SourceSVM\",destination_vserver=~\"$DestinationSVM\",destination_location=~\".*$DestinationConsistencyGroup\",source_location=~\".*$SourceConsistencyGroup\"}[3h] @ end()))", - "hide": false, - "interval": "", - "legendFormat": "{{destination_volume}} - {{source_volume}}", - "refCount": 0, - "refId": "B", - "textEditor": false - } - ], - "title": "Top $TopResources Relationships by Transfer Duration", - "type": "timeseries" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "Must select Source Volume/Destination Volume for detail of single relationship.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 30, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 8, - "x": 8, - "y": 17 - }, - "id": 134, - "links": [], - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.1.8", - "repeatDirection": "h", - "targets": [ - { - "datasource": "${DS_PROMETHEUS}", - "exemplar": false, - "expr": "snapmirror_lag_time{source_cluster=~\"$SourceCluster\",source_volume=~\"$SourceVolume\",destination_volume=~\"$DestinationVolume\",source_vserver=~\"$SourceSVM\",destination_vserver=~\"$DestinationSVM\",destination_location=~\".*$DestinationConsistencyGroup\",source_location=~\".*$SourceConsistencyGroup\"}\nand\ntopk($TopResources, avg_over_time(snapmirror_lag_time{source_cluster=~\"$SourceCluster\",source_volume=~\"$SourceVolume\",destination_volume=~\"$DestinationVolume\",source_vserver=~\"$SourceSVM\",destination_vserver=~\"$DestinationSVM\",destination_location=~\".*$DestinationConsistencyGroup\",source_location=~\".*$SourceConsistencyGroup\"}[3h] @ end()))", - "hide": false, - "interval": "", - "legendFormat": "{{destination_volume}} - {{source_volume}}", - "refCount": 0, - "refId": "B", - "textEditor": false - } - ], - "title": "Top $TopResources Relationships by Lag Time", - "type": "timeseries" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "Must select Source Volume/Destination Volume for detail of single relationship.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 30, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 8, - "x": 16, - "y": 17 - }, - "id": 135, - "links": [], - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.1.8", - "repeatDirection": "h", - "targets": [ - { - "datasource": "${DS_PROMETHEUS}", - "exemplar": false, - "expr": "snapmirror_last_transfer_size{source_cluster=~\"$SourceCluster\",source_volume=~\"$SourceVolume\",destination_volume=~\"$DestinationVolume\",source_vserver=~\"$SourceSVM\",destination_vserver=~\"$DestinationSVM\",destination_location=~\".*$DestinationConsistencyGroup\",source_location=~\".*$SourceConsistencyGroup\"}\nand\ntopk($TopResources, avg_over_time(snapmirror_last_transfer_size{source_cluster=~\"$SourceCluster\",source_volume=~\"$SourceVolume\",destination_volume=~\"$DestinationVolume\",source_vserver=~\"$SourceSVM\",destination_vserver=~\"$DestinationSVM\",destination_location=~\".*$DestinationConsistencyGroup\",source_location=~\".*$SourceConsistencyGroup\"}[3h] @ end()))", - "hide": false, - "interval": "", - "legendFormat": "{{destination_volume}} - {{source_volume}}", - "refCount": 0, - "refId": "B", - "textEditor": false - } - ], - "title": "Top $TopResources Relationships by Transfer Data", - "type": "timeseries" - }, - { - "collapsed": true, - "datasource": "${DS_PROMETHEUS}", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 26 - }, - "id": 5, - "panels": [ - { - "datasource": "${DS_PROMETHEUS}", - "description": "This panel displays count of snapmirror relationships by destination node.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 30, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "locale" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 6, - "x": 0, - "y": 27 - }, - "id": 6, - "links": [], - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.1.8", - "repeatDirection": "h", - "targets": [ - { - "expr": "count by (destination_node, relationship_status) (snapmirror_labels{source_cluster=~\"$SourceCluster\",destination_node=~\"$DestinationNode\",destination_node!=\"\",relationship_id!=\"\"})", - "hide": false, - "interval": "", - "legendFormat": "{{destination_node}} - {{relationship_status}}", - "refCount": 0, - "refId": "B", - "textEditor": false - } - ], - "title": "Destination Relationships per Node", - "type": "timeseries" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "The number of failed/successful SnapMirror break operations for the relationship.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 30, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "locale" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 6, - "x": 6, - "y": 27 - }, - "id": 31, - "links": [], - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.1.8", - "repeatDirection": "h", - "targets": [ - { - "expr": "sum by (destination_node) (snapmirror_break_failed_count{source_cluster=~\"$SourceCluster\",destination_node=~\"$DestinationNode\",destination_node!=\"\"})", - "hide": false, - "interval": "", - "legendFormat": "{{destination_node}} - FAIL", - "refCount": 0, - "refId": "B", - "textEditor": false - }, - { - "expr": "sum by (destination_node) (snapmirror_break_successful_count{source_cluster=~\"$SourceCluster\",destination_node=~\"$DestinationNode\",destination_node!=\"\"})", - "hide": false, - "instant": false, - "interval": "", - "legendFormat": "{{destination_node}} - SUCCESS", - "refCount": 0, - "refId": "A", - "textEditor": false - } - ], - "title": "Destination - Break Operations", - "type": "timeseries" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "The number of failed/successful SnapMirror resync operations for the relationship.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 30, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "locale" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 6, - "x": 12, - "y": 27 - }, - "id": 32, - "links": [], - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.1.8", - "repeatDirection": "h", - "targets": [ - { - "expr": "sum by (destination_node) (snapmirror_resync_failed_count{source_cluster=~\"$SourceCluster\",destination_node=~\"$DestinationNode\",destination_node!=\"\"})", - "hide": false, - "interval": "", - "legendFormat": "{{destination_node}} - FAIL", - "refCount": 0, - "refId": "B", - "textEditor": false - }, - { - "expr": "sum by (destination_node) (snapmirror_resync_successful_count{source_cluster=~\"$SourceCluster\",destination_node=~\"$DestinationNode\",destination_node!=\"\"})", - "hide": false, - "interval": "", - "legendFormat": "{{destination_node}} - SUCCESS", - "refCount": 0, - "refId": "A", - "textEditor": false - } - ], - "title": "Destination - Resync Operations", - "type": "timeseries" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "The number of failed/successful SnapMirror update operations for the relationship.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 30, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "locale" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 6, - "x": 18, - "y": 27 - }, - "id": 33, - "links": [], - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.1.8", - "repeatDirection": "h", - "targets": [ - { - "expr": "sum by (destination_node) (snapmirror_update_failed_count{source_cluster=~\"$SourceCluster\",destination_node=~\"$DestinationNode\",destination_node!=\"\"})", - "hide": false, - "interval": "", - "legendFormat": "{{destination_node}} - FAIL", - "refCount": 0, - "refId": "B", - "textEditor": false - }, - { - "expr": "sum by (destination_node) (snapmirror_update_successful_count{source_cluster=~\"$SourceCluster\",destination_node=~\"$DestinationNode\",destination_node!=\"\"})", - "hide": false, - "interval": "", - "legendFormat": "{{destination_node}} - SUCCESS", - "refCount": 0, - "refId": "A", - "textEditor": false - } - ], - "title": "Destination - Update Operations", - "type": "timeseries" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "This panel displays the count of snapmirror relationships by source node.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 30, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "locale" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 6, - "x": 0, - "y": 36 - }, - "id": 11, - "links": [], - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.1.8", - "repeatDirection": "h", - "targets": [ - { - "expr": "count by (source_node, relationship_status) (snapmirror_labels{source_cluster=~\"$SourceCluster\",relationship_id!=\"\"} * on (source_volume, source_vserver, source_cluster) group_left(source_node) label_replace( label_replace( label_replace( label_replace (volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$SourceCluster\",node=~\"$SourceNode\",node!=\"\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\"), \"source_node\", \"$1\", \"node\", \"(.*)\") , \"source_cluster\", \"$1\", \"cluster\", \"(.*)\") ) ", - "hide": false, - "interval": "", - "legendFormat": "{{source_node}} - {{relationship_status}}", - "refCount": 0, - "refId": "B", - "textEditor": false - } - ], - "title": "Source Relationships per Node", - "type": "timeseries" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "The number of failed/successful SnapMirror break operations for the relationship.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 30, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "locale" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 6, - "x": 6, - "y": 36 - }, - "id": 34, - "links": [], - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.1.8", - "repeatDirection": "h", - "targets": [ - { - "expr": "sum by (source_node) (snapmirror_break_failed_count{source_cluster=~\"$SourceCluster\"} * on (source_volume, source_vserver, source_cluster) group_left(source_node) label_replace( label_replace( label_replace( label_replace (volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$SourceCluster\",node=~\"$SourceNode\",node!=\"\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\"), \"source_node\", \"$1\", \"node\", \"(.*)\") , \"source_cluster\", \"$1\", \"cluster\", \"(.*)\") ) ", - "hide": false, - "interval": "", - "legendFormat": "{{source_node}} - FAIL", - "refCount": 0, - "refId": "B", - "textEditor": false - }, - { - "expr": "sum by (source_node) (snapmirror_break_successful_count{source_cluster=~\"$SourceCluster\"} * on (source_volume, source_vserver, source_cluster) group_left(source_node) label_replace( label_replace( label_replace( label_replace (volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$SourceCluster\",node=~\"$SourceNode\",node!=\"\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\"), \"source_node\", \"$1\", \"node\", \"(.*)\") , \"source_cluster\", \"$1\", \"cluster\", \"(.*)\") ) ", - "hide": false, - "interval": "", - "legendFormat": "{{source_node}} - SUCCESS", - "refCount": 0, - "refId": "A", - "textEditor": false - } - ], - "title": "Source - Break Operations", - "type": "timeseries" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "The number of failed/successful SnapMirror resync operations for the relationship.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 30, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "locale" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 6, - "x": 12, - "y": 36 - }, - "id": 35, - "links": [], - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.1.8", - "repeatDirection": "h", - "targets": [ - { - "expr": "sum by (source_node) (snapmirror_resync_failed_count{source_cluster=~\"$SourceCluster\"} * on (source_volume, source_vserver, source_cluster) group_left(source_node) label_replace( label_replace( label_replace( label_replace (volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$SourceCluster\",node=~\"$SourceNode\",node!=\"\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\"), \"source_node\", \"$1\", \"node\", \"(.*)\") , \"source_cluster\", \"$1\", \"cluster\", \"(.*)\") ) ", - "hide": false, - "interval": "", - "legendFormat": "{{source_node}} - FAIL", - "refCount": 0, - "refId": "B", - "textEditor": false - }, - { - "expr": "sum by (source_node) (snapmirror_resync_successful_count{source_cluster=~\"$SourceCluster\"} * on (source_volume, source_vserver, source_cluster) group_left(source_node) label_replace( label_replace( label_replace( label_replace (volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$SourceCluster\",node=~\"$SourceNode\",node!=\"\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\"), \"source_node\", \"$1\", \"node\", \"(.*)\") , \"source_cluster\", \"$1\", \"cluster\", \"(.*)\") ) ", - "hide": false, - "interval": "", - "legendFormat": "{{source_node}} - SUCCESS", - "refCount": 0, - "refId": "A", - "textEditor": false - } - ], - "title": "Source - Resync Operations", - "type": "timeseries" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "The number of failed/successful SnapMirror update operations for the relationship.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 30, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "locale" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 6, - "x": 18, - "y": 36 - }, - "id": 36, - "links": [], - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.1.8", - "repeatDirection": "h", - "targets": [ - { - "expr": "sum by (source_node) (snapmirror_update_failed_count{source_cluster=~\"$SourceCluster\"} * on (source_volume, source_vserver, source_cluster) group_left(source_node) label_replace( label_replace( label_replace( label_replace (volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$SourceCluster\",node=~\"$SourceNode\",node!=\"\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\"), \"source_node\", \"$1\", \"node\", \"(.*)\") , \"source_cluster\", \"$1\", \"cluster\", \"(.*)\") ) ", - "hide": false, - "interval": "", - "legendFormat": "{{source_node}} - FAIL", - "refCount": 0, - "refId": "B", - "textEditor": false - }, - { - "expr": "sum by (source_node) (snapmirror_update_successful_count{source_cluster=~\"$SourceCluster\"} * on (source_volume, source_vserver, source_cluster) group_left(source_node) label_replace( label_replace( label_replace( label_replace (volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$SourceCluster\",node=~\"$SourceNode\",node!=\"\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\"), \"source_node\", \"$1\", \"node\", \"(.*)\") , \"source_cluster\", \"$1\", \"cluster\", \"(.*)\") ) ", - "hide": false, - "interval": "", - "legendFormat": "{{source_node}} - SUCCESS", - "refCount": 0, - "refId": "A", - "textEditor": false - } - ], - "title": "Source - Update Operations", - "type": "timeseries" - } - ], - "title": "SnapMirrors per Node", - "type": "row" - }, - { - "collapsed": true, - "datasource": "${DS_PROMETHEUS}", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 27 - }, - "id": 8, - "panels": [ - { - "datasource": "${DS_PROMETHEUS}", - "description": "This panel displays count of snapmirror relationships by source SVM.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 30, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "locale" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 12, - "x": 0, - "y": 28 - }, - "id": 9, - "links": [], - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.1.8", - "repeatDirection": "h", - "targets": [ - { - "expr": "count by (source_vserver, relationship_status) (snapmirror_labels{source_cluster=~\"$SourceCluster\",source_vserver=~\"$SourceSVM\",source_vserver!=\"\",relationship_id!=\"\"})", - "hide": false, - "interval": "", - "legendFormat": "{{source_vserver}} - {{relationship_status}}", - "refCount": 0, - "refId": "B", - "textEditor": false - } - ], - "title": "Source Relationships per SVM", - "type": "timeseries" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "This panel displays count of snapmirror relationships by destination SVM.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 30, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "locale" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 12, - "x": 12, - "y": 28 - }, - "id": 10, - "links": [], - "options": { - "legend": { - "calcs": [ - "min", - "mean", - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.1.8", - "repeatDirection": "h", - "targets": [ - { - "expr": "count by (destination_vserver, relationship_status) (snapmirror_labels{source_cluster=~\"$SourceCluster\",destination_vserver=~\"$DestinationSVM\",destination_vserver!=\"\",relationship_id!=\"\"})", - "hide": false, - "interval": "", - "legendFormat": "{{destination_vserver}} - {{relationship_status}}", - "refCount": 0, - "refId": "B", - "textEditor": false - } - ], - "title": "Destination Relationships per SVM", - "type": "timeseries" - } - ], - "title": "SnapMirrors per SVM", - "type": "row" - }, - { - "collapsed": true, - "datasource": "${DS_PROMETHEUS}", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 28 - }, - "id": 45, - "panels": [ - { - "datasource": "${DS_PROMETHEUS}", - "description": "Volumes Protected With Snapmirror (Local And Remote).", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 0, - "mappings": [] - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Volume Snapmirror" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "green", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Unprotected" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "yellow", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 4, - "x": 0, - "y": 29 - }, - "id": 101, - "options": { - "legend": { - "displayMode": "hidden", - "placement": "right", - "values": [ - "value" - ] - }, - "pieType": "donut", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.1.2", - "targets": [ - { - "exemplar": false, - "expr": "count(group by (source_volume,source_vserver,source_cluster)(snapmirror_labels{source_cluster=~\"$SourceCluster\",protectedBy=~\"volume.*|cg.*\"} * on (source_volume, source_vserver, source_cluster) group_left() label_replace( label_replace( label_replace( volume_labels{datacenter=~\"$Datacenter\", cluster=~\"$SourceCluster\",volume!~\"MDV.*\",type=\"rw\",snapshot_policy!=\"\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\"), \"source_cluster\", \"$1\", \"cluster\", \"(.*)\") ) unless on (source_volume,source_vserver,source_cluster) snapmirror_labels{source_cluster=~\"$SourceCluster\",protectedBy=\"storage_vm\"} ) or vector (0)", - "format": "time_series", - "instant": true, - "interval": "", - "legendFormat": "Volume Snapmirror", - "refId": "A" - }, - { - "exemplar": false, - "expr": "count(group by (source_volume,source_vserver,source_cluster)(snapmirror_labels{source_cluster=~\"$SourceCluster\",protectedBy=\"storage_vm\"} * on (source_volume, source_vserver, source_cluster) group_left() label_replace( label_replace( label_replace( volume_labels{datacenter=~\"$Datacenter\", cluster=~\"$SourceCluster\",volume!~\"MDV.*\",type=\"rw\",snapshot_policy!=\"\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\"), \"source_cluster\", \"$1\", \"cluster\", \"(.*)\") ) unless on (source_volume,source_vserver,source_cluster) snapmirror_labels{source_cluster=~\"$SourceCluster\",protectedBy=\"volume\"} ) or vector (0)", - "format": "time_series", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "Storage VM Snapmirror", - "refId": "B" - }, - { - "exemplar": false, - "expr": "count(group by (source_volume,source_vserver,source_cluster) (snapmirror_labels{source_cluster=~\"$SourceCluster\",protectedBy=\"volume\"}) * on(source_volume,source_vserver,source_cluster) group_left() group by (source_volume,source_vserver,source_cluster) (snapmirror_labels{source_cluster=~\"$SourceCluster\",protectedBy=\"storage_vm\"} )) or vector (0)", - "format": "time_series", - "hide": false, - "interval": "", - "legendFormat": "Volume and Storage VM Snapmirror", - "refId": "C" - }, - { - "exemplar": false, - "expr": "count(volume_labels{datacenter=~\"$Datacenter\", cluster=~\"$SourceCluster\",volume!~\"MDV.*\",type=\"rw\",snapshot_policy!=\"\"} unless on (volume,svm) label_replace( label_replace( snapmirror_labels{source_cluster=~\"$SourceCluster\",relationship_id!=\"\"} , \"volume\", \"$1\", \"source_volume\", \"(.*)\") , \"svm\", \"$1\", \"source_vserver\", \"(.*)\") unless on (volume,svm) label_replace( label_replace( snapmirror_labels{source_cluster=~\"$SourceCluster\",relationship_id!=\"\"} , \"volume\", \"$1\", \"destination_volume\", \"(.*)\") , \"svm\", \"$1\", \"destination_vserver\", \"(.*)\") ) or vector (0)", - "format": "time_series", - "hide": false, - "interval": "", - "legendFormat": "Unprotected", - "refId": "D" - } - ], - "title": "Protected By Status", - "transformations": [], - "type": "piechart" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "Total number of volume snapmirror relationships.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 4, - "x": 4, - "y": 29 - }, - "id": 120, - "links": [], - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "8.4.11", - "targets": [ - { - "exemplar": false, - "expr": "count(group by (source_volume,source_vserver,source_cluster)(snapmirror_labels{source_cluster=~\"$SourceCluster\",protectedBy=~\"volume.*|cg.*\"} * on (source_volume, source_vserver, source_cluster) group_left() label_replace( label_replace( label_replace( volume_labels{datacenter=~\"$Datacenter\", cluster=~\"$SourceCluster\",volume!~\"MDV.*\",type=\"rw\",snapshot_policy!=\"\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\"), \"source_cluster\", \"$1\", \"cluster\", \"(.*)\") ) unless on (source_volume,source_vserver,source_cluster) snapmirror_labels{source_cluster=~\"$SourceCluster\",protectedBy=\"storage_vm\"} ) or vector (0)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Volume Snapmirror", - "type": "stat" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "Total number of snapmirror relationships that are protected by both volume and Storage VM.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-blue", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 4, - "x": 8, - "y": 29 - }, - "id": 122, - "links": [], - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "8.4.11", - "targets": [ - { - "exemplar": false, - "expr": "count(group by (source_volume,source_vserver,source_cluster) (snapmirror_labels{source_cluster=~\"$SourceCluster\",protectedBy=\"volume\"}) * on (source_volume,source_vserver,source_cluster) group_left() group by (source_volume,source_vserver,source_cluster) (snapmirror_labels{source_cluster=~\"$SourceCluster\",protectedBy=\"storage_vm\"} )) or vector (0)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Volume & Storage VM Snapmirror", - "type": "stat" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "Volume Relationships Experiencing Lag.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 0, - "mappings": [] - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Volume Snapmirror" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "green", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Unprotected" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "yellow", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 4, - "x": 12, - "y": 29 - }, - "id": 125, - "options": { - "legend": { - "displayMode": "hidden", - "placement": "right", - "values": [ - "value" - ] - }, - "pieType": "donut", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.1.2", - "targets": [ - { - "exemplar": false, - "expr": "count((1 < snapmirror_lag_time{source_cluster=~\"$SourceCluster\", source_volume!=\"\"} * on (source_volume, source_vserver, cluster) group_left() label_replace( label_replace(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$SourceCluster\",volume!~\"MDV.*\",type=\"rw\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\") <= 900))", - "instant": true, - "interval": "", - "legendFormat": "<=15 minutes", - "refId": "A" - }, - { - "exemplar": false, - "expr": "count((900 < snapmirror_lag_time{source_cluster=~\"$SourceCluster\", source_volume!=\"\"} * on (source_volume, source_vserver, cluster) group_left() label_replace( label_replace(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$SourceCluster\",volume!~\"MDV.*\",type=\"rw\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\") <= 1800))", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "16-30 minutes", - "refId": "B" - }, - { - "exemplar": false, - "expr": "count((1800 < snapmirror_lag_time{source_cluster=~\"$SourceCluster\", source_volume!=\"\"} * on (source_volume, source_vserver, cluster) group_left() label_replace( label_replace(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$SourceCluster\",volume!~\"MDV.*\",type=\"rw\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\") <= 3600))", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "31-60 minutes", - "refId": "C" - }, - { - "exemplar": false, - "expr": "count((snapmirror_lag_time{ source_cluster=~\"$SourceCluster\",source_volume!=\"\"} * on (source_volume, source_vserver, cluster) group_left() label_replace( label_replace(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$SourceCluster\",volume!~\"MDV.*\",type=\"rw\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\") > 3600))", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": ">= 60 minutes", - "refId": "D" - } - ], - "title": "Lag Status", - "transformations": [], - "type": "piechart" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "Total number of snapmirror relationships with a lag time of 15 minutes or less.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgb(31, 176, 196)", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 4, - "x": 16, - "y": 29 - }, - "id": 116, - "links": [], - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "8.4.11", - "targets": [ - { - "exemplar": false, - "expr": "count((1 < snapmirror_lag_time{source_cluster=~\"$SourceCluster\", source_volume!=\"\"} * on (source_volume, source_vserver, cluster) group_left() label_replace( label_replace(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$SourceCluster\",volume!~\"MDV.*\",type=\"rw\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\") <= 900))", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "<=15 minutes", - "type": "stat" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "Total number of snapmirror relationships having lag time between 16 minutes to 30 minutes.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgb(31, 176, 196)", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 4, - "x": 20, - "y": 29 - }, - "id": 117, - "links": [], - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "8.4.11", - "targets": [ - { - "exemplar": false, - "expr": "count((900 < snapmirror_lag_time{source_cluster=~\"$SourceCluster\", source_volume!=\"\"} * on (source_volume, source_vserver, cluster) group_left() label_replace( label_replace(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$SourceCluster\",volume!~\"MDV.*\",type=\"rw\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\") <= 1800))", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "16-30 minutes", - "type": "stat" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "Total number of Storage VM snapmirror relationships.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-purple", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 4, - "x": 4, - "y": 35 - }, - "id": 121, - "links": [], - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "8.4.11", - "targets": [ - { - "exemplar": false, - "expr": "count(group by (source_volume,source_vserver,source_cluster)(snapmirror_labels{source_cluster=~\"$SourceCluster\",protectedBy=\"storage_vm\"} * on (source_volume, source_vserver, source_cluster) group_left() label_replace( label_replace( label_replace( volume_labels{datacenter=~\"$Datacenter\", cluster=~\"$SourceCluster\",volume!~\"MDV.*\",type=\"rw\",snapshot_policy!=\"\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\"), \"source_cluster\", \"$1\", \"cluster\", \"(.*)\") ) unless on (source_volume,source_vserver,source_cluster) snapmirror_labels{source_cluster=~\"$SourceCluster\",protectedBy=\"volume\"} ) or vector (0)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Storage VM Snapmirror", - "type": "stat" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "Total number of volumes that are not protected.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "color": "rgb(21, 118, 171)", - "text": "0" - } - }, - "type": "special" - } - ], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-yellow", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 4, - "x": 8, - "y": 35 - }, - "id": 124, - "links": [], - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "8.4.11", - "targets": [ - { - "exemplar": false, - "expr": "count(volume_labels{datacenter=~\"$Datacenter\", cluster=~\"$SourceCluster\",volume!~\"MDV.*\",type=\"rw\",snapshot_policy!=\"\"} unless on (volume,svm) label_replace( label_replace( snapmirror_labels{source_cluster=~\"$SourceCluster\",relationship_id!=\"\"} , \"volume\", \"$1\", \"source_volume\", \"(.*)\") , \"svm\", \"$1\", \"source_vserver\", \"(.*)\") unless on (volume,svm) label_replace( label_replace( snapmirror_labels{source_cluster=~\"$SourceCluster\",relationship_id!=\"\"} , \"volume\", \"$1\", \"destination_volume\", \"(.*)\") , \"svm\", \"$1\", \"destination_vserver\", \"(.*)\") ) or vector (0)", - "format": "time_series", - "hide": false, - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Unprotected", - "type": "stat" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "Total number of snapmirror relationships having lag time between 31 minutes to 60 minutes.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgb(31, 176, 196)", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 4, - "x": 16, - "y": 35 - }, - "id": 118, - "links": [], - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "8.4.11", - "targets": [ - { - "exemplar": false, - "expr": "count((1800 < snapmirror_lag_time{source_cluster=~\"$SourceCluster\", source_volume!=\"\"} * on (source_volume, source_vserver, cluster) group_left() label_replace( label_replace(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$SourceCluster\",volume!~\"MDV.*\",type=\"rw\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\") <= 3600))", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "31-60 minutes", - "type": "stat" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "Total number of snapmirror relationships with a lag time of 60 minutes or more.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgb(31, 176, 196)", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 4, - "x": 20, - "y": 35 - }, - "id": 119, - "links": [], - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "8.4.11", - "targets": [ - { - "exemplar": false, - "expr": "count((snapmirror_lag_time{ source_cluster=~\"$SourceCluster\",source_volume!=\"\"} * on (source_volume, source_vserver, cluster) group_left() label_replace( label_replace(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$SourceCluster\",volume!~\"MDV.*\",type=\"rw\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\") > 3600))", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": ">60 minutes", - "type": "stat" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "This panel displays local & remote snapmirrors with protected by details.", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "transparent", - "mode": "fixed" - }, - "custom": { - "align": "left", - "displayMode": "auto", - "filterable": true - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Protected By" - }, - "properties": [ - { - "id": "custom.filterable", - "value": true - }, - { - "id": "custom.width", - "value": 150 - }, - { - "id": "displayName", - "value": "Protected By" - }, - { - "id": "mappings", - "value": [ - { - "options": { - "cg": { - "index": 2, - "text": "CG" - }, - "storage_vm": { - "index": 0, - "text": "SVM DR" - }, - "volume": { - "index": 1, - "text": "SnapMirror" - } - }, - "type": "value" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Local/Remote" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "true": { - "index": 0, - "text": "Local" - } - }, - "type": "value" - }, - { - "options": { - "match": "empty", - "result": { - "index": 1, - "text": "Remote" - } - }, - "type": "special" - } - ] - }, - { - "id": "custom.filterable", - "value": true - }, - { - "id": "custom.width", - "value": 130 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Source Volume" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "", - "url": "/d/cdot-volume/ontap-volume?orgId=1&${Datacenter:queryparam}&${Cluster:queryparam}&${SVM:queryparam}&${__url_time_range}&var-Volume=${__value.raw}" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Destination Volume" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "", - "url": "/d/cdot-volume/ontap-volume?orgId=1&${Datacenter:queryparam}&${Cluster:queryparam}&${SVM:queryparam}&${__url_time_range}&var-Volume=${__value.raw}" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 12, - "x": 0, - "y": 41 - }, - "id": 126, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.4.11", - "targets": [ - { - "exemplar": false, - "expr": "snapmirror_labels{source_cluster=~\"$SourceCluster\",protectedBy=~\"volume.*|cg.*|storage_vm.*\"} * on (source_volume, source_vserver, source_cluster) group_left() label_replace( label_replace( label_replace( volume_labels{datacenter=~\"$Datacenter\", cluster=~\"$SourceCluster\",volume!~\"MDV.*\",type=\"rw\",snapshot_policy!=\"\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\"), \"source_cluster\", \"$1\", \"cluster\", \"(.*)\") ", - "format": "table", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "SnapMirror (local and remote) Protected by", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "destination_volume", - "local", - "protectedBy", - "source_volume" - ] - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "cluster": true, - "destination_vserver": true, - "protectedBy": false, - "source_cluster": true, - "source_vserver": true - }, - "indexByName": { - "destination_volume": 1, - "protectedBy": 2, - "source_volume": 0 - }, - "renameByName": { - "destination_volume": "Destination Volume", - "local": "Local/Remote", - "protectedBy": "Protected By", - "source_volume": "Source Volume" - } - } - } - ], - "type": "table" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "This panel displays snapmirror relationships with lag duration details.", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "transparent", - "mode": "fixed" - }, - "custom": { - "align": "left", - "displayMode": "auto", - "filterable": true - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Lag Duration Bucket" - }, - "properties": [ - { - "id": "custom.filterable", - "value": true - }, - { - "id": "mappings", - "value": [ - { - "options": { - "from": 1, - "result": { - "index": 0, - "text": "<= 15 Minutes" - }, - "to": 900 - }, - "type": "range" - }, - { - "options": { - "from": 901, - "result": { - "index": 1, - "text": "16-30 Minutes" - }, - "to": 1800 - }, - "type": "range" - }, - { - "options": { - "from": 1801, - "result": { - "index": 2, - "text": "31-60 Minutes" - }, - "to": 3600 - }, - "type": "range" - }, - { - "options": { - "from": 3600, - "result": { - "index": 3, - "text": ">60 Minutes" - }, - "to": 1e+24 - }, - "type": "range" - } - ] - }, - { - "id": "custom.width", - "value": 190 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Source Volume" - }, - "properties": [ - { - "id": "custom.width", - "value": 270 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "", - "url": "/d/cdot-volume/ontap-volume?orgId=1&${Datacenter:queryparam}&${Cluster:queryparam}&${SVM:queryparam}&${__url_time_range}&var-Volume=${__value.raw}" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Destination Volume" - }, - "properties": [ - { - "id": "custom.width", - "value": 300 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "", - "url": "/d/cdot-volume/ontap-volume?orgId=1&${Datacenter:queryparam}&${Cluster:queryparam}&${SVM:queryparam}&${__url_time_range}&var-Volume=${__value.raw}" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Lag Duration (seconds)" - }, - "properties": [ - { - "id": "custom.width", - "value": 180 - }, - { - "id": "unit", - "value": "s" - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 12, - "x": 12, - "y": 41 - }, - "id": 127, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.4.11", - "targets": [ - { - "exemplar": false, - "expr": "snapmirror_lag_time{ source_cluster=~\"$SourceCluster\",source_volume!=\"\"} * on (source_volume, source_vserver, cluster) group_left() label_replace( label_replace(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$SourceCluster\",volume!~\"MDV.*\",type=\"rw\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\") > 0", - "format": "table", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "Volume Relationships Experiencing Lag", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "destination_volume", - "source_volume", - "Value" - ] - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": {}, - "indexByName": { - "Value": 2, - "destination_volume": 1, - "source_volume": 0 - }, - "renameByName": { - "Value": "Lag Duration (seconds)", - "destination_volume": "Destination Volume", - "source_volume": "Source Volume", - "volume": "" - } - } - }, - { - "id": "calculateField", - "options": { - "alias": "Lag Duration Bucket", - "mode": "reduceRow", - "reduce": { - "include": [ - "Lag Duration (seconds)" - ], - "reducer": "last" - }, - "replaceFields": false - } - } - ], - "type": "table" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "This panel displays details of volumes that are not protected.", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "transparent", - "mode": "fixed" - }, - "custom": { - "align": "left", - "displayMode": "auto", - "filterable": true - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "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": "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": "volume" - }, - "properties": [ - { - "id": "displayName", - "value": "Volume" - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "", - "url": "/d/cdot-volume/ontap-volume?orgId=1&${Datacenter:queryparam}&${Cluster:queryparam}&${SVM:queryparam}&${__url_time_range}&var-Volume=${__value.raw}" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 12, - "x": 0, - "y": 54 - }, - "id": 133, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.4.11", - "targets": [ - { - "exemplar": false, - "expr": "volume_labels{datacenter=~\"$Datacenter\", cluster=~\"$SourceCluster\",volume!~\"MDV.*\",type=\"rw\",snapshot_policy!=\"\"} unless on (volume,svm) label_replace( label_replace( snapmirror_labels{source_cluster=~\"$SourceCluster\",relationship_id!=\"\"} , \"volume\", \"$1\", \"source_volume\", \"(.*)\") , \"svm\", \"$1\", \"source_vserver\", \"(.*)\") unless on (volume,svm) label_replace( label_replace( snapmirror_labels{source_cluster=~\"$SourceCluster\",relationship_id!=\"\"} , \"volume\", \"$1\", \"destination_volume\", \"(.*)\") , \"svm\", \"$1\", \"destination_vserver\", \"(.*)\") ", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "Unprotected Volumes", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "cluster", - "svm", - "volume" - ] - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": {}, - "indexByName": { - "cluster": 2, - "svm": 1, - "volume": 0 - }, - "renameByName": {} - } - } - ], - "type": "table" - } - ], - "title": "SnapMirror Data Protection Overview per Cluster", - "type": "row" - }, - { - "collapsed": true, - "datasource": "${DS_PROMETHEUS}", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 29 - }, - "id": 42, - "panels": [ - { - "datasource": "${DS_PROMETHEUS}", - "description": "This panel displays volume relationship count based on the relationship type.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 0, - "mappings": [] - }, - "overrides": [] - }, - "gridPos": { - "h": 12, - "w": 13, - "x": 0, - "y": 7 - }, - "id": 111, - "options": { - "displayLabels": [], - "legend": { - "displayMode": "table", - "placement": "right", - "values": [ - "value" - ] - }, - "pieType": "donut", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.1.2", - "targets": [ - { - "exemplar": false, - "expr": "count(snapmirror_labels{source_cluster=~\"$SourceCluster\",derived_relationship_type=\"extended_data_protection\"} * on (source_volume, source_vserver, source_cluster) group_left() label_replace( label_replace( label_replace( volume_labels{datacenter=~\"$Datacenter\", cluster=~\"$SourceCluster\",volume!~\"MDV.*\",type=\"rw\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\"), \"source_cluster\", \"$1\", \"cluster\", \"(.*)\")) or vector(0)", - "instant": true, - "interval": "", - "legendFormat": "Asynchronous Mirror", - "refId": "A" - }, - { - "exemplar": false, - "expr": "count(snapmirror_labels{source_cluster=~\"$SourceCluster\",derived_relationship_type=\"mirror_vault\"} * on (source_volume, source_vserver, source_cluster) group_left() label_replace( label_replace( label_replace( volume_labels{datacenter=~\"$Datacenter\", cluster=~\"$SourceCluster\",volume!~\"MDV.*\",type=\"rw\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\"), \"source_cluster\", \"$1\", \"cluster\", \"(.*)\")) or vector(0)", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "Asynchronous Mirror and Vault", - "refId": "B" - }, - { - "exemplar": false, - "expr": "count(snapmirror_labels{source_cluster=~\"$SourceCluster\",derived_relationship_type=\"vault\"} * on (source_volume, source_vserver, source_cluster) group_left() label_replace( label_replace( label_replace( volume_labels{datacenter=~\"$Datacenter\", cluster=~\"$SourceCluster\",volume!~\"MDV.*\",type=\"rw\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\"), \"source_cluster\", \"$1\", \"cluster\", \"(.*)\")) or vector(0)", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "Asynchronous Vault", - "refId": "C" - }, - { - "exemplar": false, - "expr": "count(snapmirror_labels{source_cluster=~\"$SourceCluster\",derived_relationship_type=\"sync_mirror_strict\"} * on (source_volume, source_vserver, source_cluster) group_left() label_replace( label_replace( label_replace( volume_labels{datacenter=~\"$Datacenter\", cluster=~\"$SourceCluster\",volume!~\"MDV.*\",type=\"rw\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\"), \"source_cluster\", \"$1\", \"cluster\", \"(.*)\")) or vector(0)", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "StrictSync", - "refId": "D" - }, - { - "exemplar": false, - "expr": "count(snapmirror_labels{source_cluster=~\"$SourceCluster\",derived_relationship_type=\"sync_mirror\"} * on (source_volume, source_vserver, source_cluster) group_left() label_replace( label_replace( label_replace( volume_labels{datacenter=~\"$Datacenter\", cluster=~\"$SourceCluster\",volume!~\"MDV.*\",type=\"rw\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\"), \"source_cluster\", \"$1\", \"cluster\", \"(.*)\")) or vector(0)", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "Sync", - "refId": "E" - }, - { - "exemplar": false, - "expr": "count(snapmirror_labels{source_cluster=~\"$SourceCluster\",derived_relationship_type=\"automated_failover\"} * on (source_volume, source_vserver, source_cluster) group_left() label_replace( label_replace( label_replace( volume_labels{datacenter=~\"$Datacenter\", cluster=~\"$SourceCluster\",volume!~\"MDV.*\",type=\"rw\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\"), \"source_cluster\", \"$1\", \"cluster\", \"(.*)\")) or vector(0)", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "Automated Failover", - "refId": "F" - }, - { - "exemplar": false, - "expr": "count(snapmirror_labels{source_cluster=~\"$SourceCluster\",derived_relationship_type=\"automated_failover_duplex\"} * on (source_volume, source_vserver, source_cluster) group_left() label_replace( label_replace( label_replace( volume_labels{datacenter=~\"$Datacenter\", cluster=~\"$SourceCluster\",volume!~\"MDV.*\",type=\"rw\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\"), \"source_cluster\", \"$1\", \"cluster\", \"(.*)\")) or vector(0)", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "Automated Failover Duplex", - "refId": "G" - } - ], - "title": "Volume relationship count by relationship type", - "transformations": [], - "type": "piechart" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "This panel displays volume relationship count based on the relationship health.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 0, - "mappings": [] - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Healthy" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "green", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Unhealthy" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-yellow", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 11, - "x": 13, - "y": 7 - }, - "id": 112, - "options": { - "legend": { - "displayMode": "table", - "placement": "right", - "values": [ - "value" - ] - }, - "pieType": "donut", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.1.2", - "targets": [ - { - "exemplar": false, - "expr": "count((snapmirror_labels{source_cluster=~\"$SourceCluster\",healthy=\"true\"} * on (source_volume, source_vserver, source_cluster) group_left() label_replace( label_replace( label_replace( volume_labels{datacenter=~\"$Datacenter\", cluster=~\"$SourceCluster\",volume!~\"MDV.*\", type=\"rw\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\"), \"source_cluster\", \"$1\", \"cluster\", \"(.*)\") )) or vector (0)", - "format": "time_series", - "instant": true, - "interval": "", - "legendFormat": "Healthy", - "refId": "A" - }, - { - "exemplar": false, - "expr": "count(group by (source_volume,source_vserver,source_cluster)(snapmirror_labels{source_cluster=~\"$SourceCluster\",healthy=\"false\"} * on (source_volume, source_vserver, source_cluster) group_left() label_replace( label_replace( label_replace( volume_labels{datacenter=~\"$Datacenter\", cluster=~\"$SourceCluster\",volume!~\"MDV.*\", type=\"rw\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\"), \"source_cluster\", \"$1\", \"cluster\", \"(.*)\") ) ) or vector (0)", - "format": "time_series", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "Unhealthy", - "refId": "B" - } - ], - "title": "Volume relationship count by relationship health", - "type": "piechart" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "This panel displays volume relationship count based on the relationship type.", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "transparent", - "mode": "fixed" - }, - "custom": { - "align": "left", - "displayMode": "auto", - "filterable": true - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Source Volume" - }, - "properties": [ - { - "id": "custom.width", - "value": 410 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "", - "url": "/d/cdot-volume/ontap-volume?orgId=1&${Datacenter:queryparam}&${Cluster:queryparam}&${SVM:queryparam}&${__url_time_range}&var-Volume=${__value.raw}" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Protection Policy" - }, - "properties": [ - { - "id": "custom.filterable", - "value": true - }, - { - "id": "custom.width", - "value": 290 - }, - { - "id": "mappings", - "value": [ - { - "options": { - "automated_failover": { - "index": 5, - "text": "Automated Failover" - }, - "automated_failover_duplex": { - "index": 6, - "text": "Automated Failover Duplex" - }, - "data_protection": { - "index": 7, - "text": "Data Protection" - }, - "extended_data_protection": { - "index": 2, - "text": "Asynchronous Mirror" - }, - "mirror_vault": { - "index": 0, - "text": "Asynchronous Mirror and Vault" - }, - "sync_mirror": { - "index": 1, - "text": "Sync" - }, - "sync_mirror_strict": { - "index": 4, - "text": "StrictSync" - }, - "vault": { - "index": 3, - "text": "Asynchronous Vault" - } - }, - "type": "value" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Destination Volume" - }, - "properties": [ - { - "id": "custom.width", - "value": 410 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "", - "url": "/d/cdot-volume/ontap-volume?orgId=1&${Datacenter:queryparam}&${Cluster:queryparam}&${SVM:queryparam}&${__url_time_range}&var-Volume=${__value.raw}" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Healthy Status" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "false": { - "index": 1, - "text": "Unhealthy" - }, - "true": { - "index": 0, - "text": "Healthy" - } - }, - "type": "value" - } - ] - }, - { - "id": "custom.width", - "value": 120 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Destination Cluster" - }, - "properties": [ - { - "id": "custom.width", - "value": 240 - }, - { - "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": "Source Cluster" - }, - "properties": [ - { - "id": "custom.width", - "value": 240 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "", - "url": "/d/cdot-cluster/ontap-cluster?orgId=1&${Datacenter:queryparam}&${__url_time_range}&var-Cluster=${__value.raw}" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 14, - "w": 24, - "x": 0, - "y": 42 - }, - "id": 129, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.4.11", - "targets": [ - { - "exemplar": false, - "expr": "snapmirror_labels{source_cluster=~\"$SourceCluster\"} * on (source_volume, source_vserver, source_cluster) group_left() label_replace( label_replace( label_replace( volume_labels{datacenter=~\"$Datacenter\", cluster=~\"$SourceCluster\",volume!~\"MDV.*\",type=\"rw\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\"), \"source_cluster\", \"$1\", \"cluster\", \"(.*)\") ", - "format": "table", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "Volume relationship count by Relationship type & Health", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "derived_relationship_type", - "destination_volume", - "healthy", - "source_volume", - "source_cluster", - "cluster" - ] - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": {}, - "indexByName": { - "cluster": 3, - "derived_relationship_type": 4, - "destination_volume": 1, - "healthy": 5, - "source_cluster": 2, - "source_volume": 0 - }, - "renameByName": { - "cluster": "Destination Cluster", - "derived_relationship_type": "Protection Policy", - "destination_volume": "Destination Volume", - "healthy": "Healthy Status", - "source_cluster": "Source Cluster", - "source_volume": "Source Volume" - } - } - } - ], - "type": "table" - } - ], - "title": "SnapMirror Data Protection Analysis per Cluster", - "type": "row" - }, - { - "collapsed": true, - "datasource": "${DS_PROMETHEUS}", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 30 - }, - "id": 43, - "panels": [ - { - "datasource": "${DS_PROMETHEUS}", - "description": "This panel displays consistency group relationship count based on the relationship type.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 0, - "mappings": [] - }, - "overrides": [] - }, - "gridPos": { - "h": 12, - "w": 13, - "x": 0, - "y": 7 - }, - "id": 113, - "options": { - "displayLabels": [], - "legend": { - "displayMode": "table", - "placement": "right", - "values": [ - "value" - ] - }, - "pieType": "donut", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.1.2", - "targets": [ - { - "exemplar": false, - "expr": "count(snapmirror_labels{source_cluster=~\"$SourceCluster\",group_type=\"consistencygroup\",destination_cg_name=~\"$DestinationConsistencyGroup\",source_cg_name=~\"$SourceConsistencyGroup\",derived_relationship_type=\"extended_data_protection\",relationship_id=\"\"}) or vector(0)", - "instant": true, - "interval": "", - "legendFormat": "Asynchronous Mirror", - "refId": "A" - }, - { - "exemplar": false, - "expr": "count(snapmirror_labels{source_cluster=~\"$SourceCluster\",group_type=\"consistencygroup\",destination_cg_name=~\"$DestinationConsistencyGroup\",source_cg_name=~\"$SourceConsistencyGroup\",derived_relationship_type=\"mirror_vault\",relationship_id=\"\"}) or vector(0)", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "Asynchronous Mirror and Vault", - "refId": "B" - }, - { - "exemplar": false, - "expr": "count(snapmirror_labels{source_cluster=~\"$SourceCluster\",group_type=\"consistencygroup\",destination_cg_name=~\"$DestinationConsistencyGroup\",source_cg_name=~\"$SourceConsistencyGroup\",derived_relationship_type=\"vault\",relationship_id=\"\"}) or vector(0)", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "Asynchronous Vault", - "refId": "C" - }, - { - "exemplar": false, - "expr": "count(snapmirror_labels{source_cluster=~\"$SourceCluster\",group_type=\"consistencygroup\",destination_cg_name=~\"$DestinationConsistencyGroup\",source_cg_name=~\"$SourceConsistencyGroup\",derived_relationship_type=\"sync_mirror_strict\",relationship_id=\"\"}) or vector(0)", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "StrictSync", - "refId": "D" - }, - { - "exemplar": false, - "expr": "count(snapmirror_labels{source_cluster=~\"$SourceCluster\",group_type=\"consistencygroup\",destination_cg_name=~\"$DestinationConsistencyGroup\",source_cg_name=~\"$SourceConsistencyGroup\",derived_relationship_type=\"sync_mirror\",relationship_id=\"\"}) or vector(0)", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "Sync", - "refId": "E" - }, - { - "exemplar": false, - "expr": "count(snapmirror_labels{source_cluster=~\"$SourceCluster\",group_type=\"consistencygroup\",destination_cg_name=~\"$DestinationConsistencyGroup\",source_cg_name=~\"$SourceConsistencyGroup\",derived_relationship_type=\"automated_failover\",relationship_id=\"\"}) or vector(0)", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "Automated Failover", - "refId": "F" - }, - { - "exemplar": false, - "expr": "count(snapmirror_labels{source_cluster=~\"$SourceCluster\",group_type=\"consistencygroup\",destination_cg_name=~\"$DestinationConsistencyGroup\",source_cg_name=~\"$SourceConsistencyGroup\",derived_relationship_type=\"automated_failover_duplex\",relationship_id=\"\"}) or vector(0)", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "Automated Failover Duplex", - "refId": "G" - } - ], - "title": "Consistency Group relationship count by relationship type", - "transformations": [], - "type": "piechart" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "This panel displays consistency group relationship count based on the relationship health.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 0, - "mappings": [] - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Healthy" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "green", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Unhealthy" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-yellow", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 11, - "x": 13, - "y": 7 - }, - "id": 114, - "options": { - "legend": { - "displayMode": "table", - "placement": "right", - "values": [ - "value" - ] - }, - "pieType": "donut", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.1.2", - "targets": [ - { - "exemplar": false, - "expr": "count(snapmirror_labels{source_cluster=~\"$SourceCluster\",group_type=\"consistencygroup\",healthy=\"true\",destination_cg_name=~\"$DestinationConsistencyGroup\",source_cg_name=~\"$SourceConsistencyGroup\",relationship_id=\"\"}) or vector (0)", - "format": "time_series", - "instant": true, - "interval": "", - "legendFormat": "Healthy", - "refId": "A" - }, - { - "exemplar": false, - "expr": "count(snapmirror_labels{source_cluster=~\"$SourceCluster\",group_type=\"consistencygroup\",healthy=\"false\",destination_cg_name=~\"$DestinationConsistencyGroup\",source_cg_name=~\"$SourceConsistencyGroup\",relationship_id=\"\"}) or vector (0)", - "format": "time_series", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "Unhealthy", - "refId": "B" - } - ], - "title": "Consistency Group relationship count by relationship health", - "type": "piechart" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "This panel displays volume relationship count based on the relationship health.", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "transparent", - "mode": "fixed" - }, - "custom": { - "align": "left", - "displayMode": "auto", - "filterable": true - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Source Volume" - }, - "properties": [ - { - "id": "custom.width", - "value": 220 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "", - "url": "/d/cdot-volume/ontap-volume?orgId=1&${Datacenter:queryparam}&${Cluster:queryparam}&${SVM:queryparam}&${__url_time_range}&var-Volume=${__value.raw}" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Protection Policy" - }, - "properties": [ - { - "id": "custom.filterable", - "value": true - }, - { - "id": "custom.width", - "value": 290 - }, - { - "id": "mappings", - "value": [ - { - "options": { - "automated_failover": { - "index": 5, - "text": "Automated Failover" - }, - "automated_failover_duplex": { - "index": 6, - "text": "Automated Failover Duplex" - }, - "extended_data_protection": { - "index": 2, - "text": "Asynchronous Mirror" - }, - "mirror_vault": { - "index": 0, - "text": "Asynchronous Mirror and Vault" - }, - "sync_mirror": { - "index": 1, - "text": "Sync" - }, - "sync_mirror_strict": { - "index": 4, - "text": "StrictSync" - }, - "vault": { - "index": 3, - "text": "Asynchronous Vault" - } - }, - "type": "value" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Destination Volume" - }, - "properties": [ - { - "id": "custom.width", - "value": 210 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "", - "url": "/d/cdot-volume/ontap-volume?orgId=1&${Datacenter:queryparam}&${Cluster:queryparam}&${SVM:queryparam}&${__url_time_range}&var-Volume=${__value.raw}" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Destination CG" - }, - "properties": [ - { - "id": "custom.width", - "value": 170 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Source CG" - }, - "properties": [ - { - "id": "custom.width", - "value": 170 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Healthy Status" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "false": { - "index": 1, - "text": "Unhealthy" - }, - "true": { - "index": 0, - "text": "Healthy" - } - }, - "type": "value" + "index": 3, + "text": "Vault" } - ] - }, - { - "id": "custom.width", - "value": 140 + }, + "type": "value" } ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Relationship Health" + }, + "properties": [ + { + "id": "custom.width", + "value": 203 }, { - "matcher": { - "id": "byName", - "options": "Source Cluster" - }, - "properties": [ - { - "id": "custom.width", - "value": 240 - }, + "id": "mappings", + "value": [ { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "", - "url": "/d/cdot-cluster/ontap-cluster?orgId=1&${Datacenter:queryparam}&${__url_time_range}&var-Cluster=${__value.raw}" + "options": { + "false": { + "color": "red", + "index": 1, + "text": "Unhealthy" + }, + "true": { + "color": "green", + "index": 0, + "text": "Healthy" } - ] + }, + "type": "value" } ] }, { - "matcher": { - "id": "byName", - "options": "Destination Cluster" - }, - "properties": [ - { - "id": "custom.width", - "value": 240 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "", - "url": "/d/cdot-cluster/ontap-cluster?orgId=1&${Datacenter:queryparam}&${__url_time_range}&var-Cluster=${__value.raw}" - } - ] - } - ] + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } } ] }, - "gridPos": { - "h": 14, - "w": 24, - "x": 0, - "y": 42 - }, - "id": 132, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false + { + "matcher": { + "id": "byName", + "options": "Source Path" }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.4.11", - "targets": [ - { - "exemplar": false, - "expr": "snapmirror_labels{source_cluster=~\"$SourceCluster\",group_type=\"consistencygroup\",destination_cg_name=~\"$DestinationConsistencyGroup\",source_cg_name=~\".*$SourceConsistencyGroup\",relationship_id=\"\"}", - "format": "table", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "Consistency Group relationship count by Relationship type & Health", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "destination_cg_name", - "derived_relationship_type", - "destination_volume", - "healthy", - "source_volume", - "cluster", - "source_cluster", - "source_cg_name" - ] - } + "properties": [ + { + "id": "custom.width", + "value": 315 } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Destination Path" }, - { - "id": "organize", - "options": { - "excludeByName": {}, - "indexByName": { - "cluster": 5, - "derived_relationship_type": 6, - "destination_cg_name": 1, - "destination_volume": 3, - "healthy": 7, - "source_cg_name": 0, - "source_cluster": 4, - "source_volume": 2 - }, - "renameByName": { - "cluster": "Destination Cluster", - "derived_relationship_type": "Protection Policy", - "destination_cg_name": "Destination CG", - "destination_volume": "Destination Volume", - "healthy": "Healthy Status", - "source_cg_name": "Source CG", - "source_cluster": "Source Cluster", - "source_volume": "Source Volume" - } + "properties": [ + { + "id": "custom.width", + "value": 363 } - } + ] + } + ] + }, + "gridPos": { + "h": 10, + "w": 24, + "x": 0, + "y": 15 + }, + "id": 134, + "links": [], + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" ], - "type": "table" + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": false, + "displayName": "Relationship Health" + } + ] + }, + "pluginVersion": "10.3.1", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "snapmirror_labels{source_cluster=~\"$Cluster\",source_volume=~\"$Volume\",source_vserver=~\"$SVM\",source_location=~\".*$ConsistencyGroup\",derived_relationship_type!=\"load_sharing\",relationship_id!=\"\"} ", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "D" } ], - "title": "Consistency Group Data Protection Analysis per Cluster", - "type": "row" + "title": "Relationships", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "cluster", + "destination_location", + "group_type", + "healthy", + "policy_type", + "source_cluster", + "source_location" + ] + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "includeByName": {}, + "indexByName": { + "Value": 15, + "cluster": 2, + "derived_relationship_type": 4, + "destination_location": 3, + "group_type": 5, + "healthy": 6, + "last_transfer_type": 7, + "policy_type": 8, + "protectedBy": 9, + "protectionSourceType": 10, + "relationship_id": 11, + "relationship_status": 12, + "relationship_type": 13, + "schedule": 14, + "source_cluster": 0, + "source_location": 1 + }, + "renameByName": { + "cluster": "Destination Cluster", + "derived_relationship_type": "", + "destination_location": "Destination Path", + "group_type": "Group Type", + "healthy": "Relationship Health", + "policy_type": "Protection Policy", + "relationship_status": "", + "source_cluster": "Source Cluster", + "source_location": "Source Path" + } + } + } + ], + "type": "table" } ], "refresh": "", - "schemaVersion": 30, - "style": "dark", + "schemaVersion": 39, "tags": [ "harvest", "ontap", @@ -4811,8 +805,6 @@ "text": "Prometheus", "value": "Prometheus" }, - "description": null, - "error": null, "hide": 2, "includeAll": false, "label": "Data Source", @@ -4831,10 +823,8 @@ "datasource": "${DS_PROMETHEUS}", "definition": "label_values(cluster_new_status{system_type!=\"7mode\"},datacenter)", "description": "Select all the datacenters that contain the ONTAP clusters acting as source for SnapMirror relationships.", - "error": null, "hide": 0, "includeAll": false, - "label": null, "multi": true, "name": "Datacenter", "options": [], @@ -4852,17 +842,14 @@ "useTags": false }, { - "allValue": null, + "allValue": ".*", "current": {}, "datasource": "${DS_PROMETHEUS}", "definition": "query_result(snapmirror_labels{system_type!=\"7mode\"} * on (source_volume, source_vserver, source_cluster) group_left() label_replace( label_replace( label_replace( volume_labels{system_type!=\"7mode\",datacenter=~\"$Datacenter\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\"), \"source_cluster\", \"$1\", \"cluster\", \"(.*)\"))", - "description": null, - "error": null, "hide": 0, "includeAll": true, - "label": null, "multi": true, - "name": "SourceCluster", + "name": "Cluster", "options": [], "query": { "query": "query_result(snapmirror_labels{system_type!=\"7mode\"} * on (source_volume, source_vserver, source_cluster) group_left() label_replace( label_replace( label_replace( volume_labels{system_type!=\"7mode\",datacenter=~\"$Datacenter\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\"), \"source_cluster\", \"$1\", \"cluster\", \"(.*)\"))", @@ -4878,95 +865,14 @@ "useTags": false }, { - "allValue": null, - "current": {}, - "datasource": "${DS_PROMETHEUS}", - "definition": "label_values(snapmirror_labels{system_type!=\"7mode\", source_cluster=~\"$SourceCluster\"}, destination_node)", - "description": null, - "error": null, - "hide": 2, - "includeAll": true, - "label": null, - "multi": true, - "name": "DestinationNode", - "options": [], - "query": { - "query": "label_values(snapmirror_labels{system_type!=\"7mode\", source_cluster=~\"$SourceCluster\"}, destination_node)", - "refId": "StandardVariableQuery" - }, - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": {}, - "datasource": "${DS_PROMETHEUS}", - "definition": "query_result((snapmirror_labels{system_type!=\"7mode\",source_cluster=~\"$SourceCluster\"} * on (source_volume, source_vserver, source_cluster) group_left(source_node) label_replace( label_replace( label_replace( label_replace (volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$SourceCluster\",node!=\"\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\"), \"source_node\", \"$1\", \"node\", \"(.*)\") , \"source_cluster\", \"$1\", \"cluster\", \"(.*)\") ) ) \n\n\n", - "description": null, - "error": null, - "hide": 2, - "includeAll": true, - "label": null, - "multi": true, - "name": "SourceNode", - "options": [], - "query": { - "query": "query_result((snapmirror_labels{system_type!=\"7mode\",source_cluster=~\"$SourceCluster\"} * on (source_volume, source_vserver, source_cluster) group_left(source_node) label_replace( label_replace( label_replace( label_replace (volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$SourceCluster\",node!=\"\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\"), \"source_node\", \"$1\", \"node\", \"(.*)\") , \"source_cluster\", \"$1\", \"cluster\", \"(.*)\") ) ) \n\n\n", - "refId": "StandardVariableQuery" - }, - "refresh": 2, - "regex": ".*source_node=\\\"(.*?)\\\".*", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": {}, - "datasource": "${DS_PROMETHEUS}", - "definition": "label_values(snapmirror_labels{source_cluster=~\"$SourceCluster\"}, destination_vserver)", - "description": null, - "error": null, - "hide": 0, - "includeAll": true, - "label": null, - "multi": true, - "name": "DestinationSVM", - "options": [], - "query": { - "query": "label_values(snapmirror_labels{source_cluster=~\"$SourceCluster\"}, destination_vserver)", - "refId": "StandardVariableQuery" - }, - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, + "allValue": ".*", "current": {}, "datasource": "${DS_PROMETHEUS}", "definition": "label_values(snapmirror_labels{source_cluster=~\"$SourceCluster\"}, source_vserver)", - "description": null, - "error": null, "hide": 0, "includeAll": true, - "label": null, "multi": true, - "name": "SourceSVM", + "name": "SVM", "options": [], "query": { "query": "label_values(snapmirror_labels{source_cluster=~\"$SourceCluster\"}, source_vserver)", @@ -4982,43 +888,14 @@ "useTags": false }, { - "allValue": null, - "current": {}, - "datasource": "${DS_PROMETHEUS}", - "definition": "label_values(snapmirror_labels{source_cluster=~\"$SourceCluster\",destination_vserver=~\"$DestinationSVM\"}, destination_volume)", - "description": null, - "error": null, - "hide": 0, - "includeAll": true, - "label": null, - "multi": true, - "name": "DestinationVolume", - "options": [], - "query": { - "query": "label_values(snapmirror_labels{source_cluster=~\"$SourceCluster\",destination_vserver=~\"$DestinationSVM\"}, destination_volume)", - "refId": "StandardVariableQuery" - }, - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, + "allValue": ".*", "current": {}, "datasource": "${DS_PROMETHEUS}", "definition": "label_values(snapmirror_labels{source_cluster=~\"$SourceCluster\",source_vserver=~\"$SourceSVM\"}, source_volume)", - "description": null, - "error": null, "hide": 0, "includeAll": true, - "label": null, "multi": true, - "name": "SourceVolume", + "name": "Volume", "options": [], "query": { "query": "label_values(snapmirror_labels{source_cluster=~\"$SourceCluster\",source_vserver=~\"$SourceSVM\"}, source_volume)", @@ -5033,114 +910,15 @@ "type": "query", "useTags": false }, - { - "allValue": "1000000000000", - "current": { - "selected": true, - "text": "5", - "value": "5" - }, - "description": null, - "error": null, - "hide": 0, - "includeAll": true, - "label": null, - "multi": false, - "name": "TopResources", - "options": [ - { - "selected": false, - "text": "All", - "value": "$__all" - }, - { - "selected": false, - "text": "1", - "value": "1" - }, - { - "selected": false, - "text": "2", - "value": "2" - }, - { - "selected": false, - "text": "3", - "value": "3" - }, - { - "selected": false, - "text": "4", - "value": "4" - }, - { - "selected": true, - "text": "5", - "value": "5" - }, - { - "selected": false, - "text": "6", - "value": "6" - }, - { - "selected": false, - "text": "8", - "value": "8" - }, - { - "selected": false, - "text": "10", - "value": "10" - }, - { - "selected": false, - "text": "15", - "value": "15" - }, - { - "selected": false, - "text": "25", - "value": "25" - }, - { - "selected": false, - "text": "50", - "value": "50" - }, - { - "selected": false, - "text": "100", - "value": "100" - }, - { - "selected": false, - "text": "250", - "value": "250" - }, - { - "selected": false, - "text": "500", - "value": "500" - } - ], - "query": "1,2,3,4,5,6,8,10,15,25,50,100,250,500", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - }, { "allValue": ".*", "current": {}, "datasource": "${DS_PROMETHEUS}", "definition": "label_values(snapmirror_labels{source_cluster=~\"$SourceCluster\",source_vserver=~\"$SourceSVM\", destination_vserver=~\"$DestinationSVM\"}, source_cg_name)", - "description": null, - "error": null, "hide": 0, "includeAll": true, - "label": null, "multi": true, - "name": "SourceConsistencyGroup", + "name": "ConsistencyGroup", "options": [], "query": { "query": "label_values(snapmirror_labels{source_cluster=~\"$SourceCluster\",source_vserver=~\"$SourceSVM\", destination_vserver=~\"$DestinationSVM\"}, source_cg_name)", @@ -5154,32 +932,6 @@ "tagsQuery": "", "type": "query", "useTags": false - }, - { - "allValue": ".*", - "current": {}, - "datasource": "${DS_PROMETHEUS}", - "definition": "label_values(snapmirror_labels{source_cluster=~\"$SourceCluster\",source_vserver=~\"$SourceSVM\", destination_vserver=~\"$DestinationSVM\"}, destination_cg_name)", - "description": null, - "error": null, - "hide": 0, - "includeAll": true, - "label": null, - "multi": true, - "name": "DestinationConsistencyGroup", - "options": [], - "query": { - "query": "label_values(snapmirror_labels{source_cluster=~\"$SourceCluster\",source_vserver=~\"$SourceSVM\", destination_vserver=~\"$DestinationSVM\"}, destination_cg_name)", - "refId": "StandardVariableQuery" - }, - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false } ] }, @@ -5214,5 +966,5 @@ "timezone": "", "title": "ONTAP: SnapMirror", "uid": "cdot-snapmirror", - "version": 6 + "version": 1 } diff --git a/grafana/dashboards/cmode/snapmirror_sources.json b/grafana/dashboards/cmode/snapmirror_sources.json deleted file mode 100644 index da7287826..000000000 --- a/grafana/dashboards/cmode/snapmirror_sources.json +++ /dev/null @@ -1,987 +0,0 @@ -{ - "__inputs": [ - { - "description": "", - "label": "Prometheus", - "name": "DS_PROMETHEUS", - "pluginId": "prometheus", - "pluginName": "Prometheus", - "type": "datasource" - } - ], - "__requires": [ - { - "id": "grafana", - "name": "Grafana", - "type": "grafana", - "version": "8.1.8" - }, - { - "id": "piechart", - "name": "Pie chart", - "type": "panel", - "version": "" - }, - { - "id": "prometheus", - "name": "Prometheus", - "type": "datasource", - "version": "1.0.0" - }, - { - "id": "stat", - "name": "Stat", - "type": "panel", - "version": "" - }, - { - "id": "table", - "name": "Table", - "type": "panel", - "version": "" - }, - { - "id": "text", - "name": "Text", - "type": "panel", - "version": "" - }, - { - "id": "timeseries", - "name": "Time series", - "type": "panel", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "description": "", - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "asDropdown": true, - "icon": "external link", - "includeVars": true, - "keepTime": true, - "tags": [ - "cdot" - ], - "targetBlank": false, - "title": "Related Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": "${DS_PROMETHEUS}", - "gridPos": { - "h": 2, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 29, - "options": { - "code": { - "language": "plaintext", - "showLineNumbers": false, - "showMiniMap": false - }, - "content": "To monitor both sides of a snapmirror relationship, both source and destination clusters must be monitored by Harvest. Both clusters need to export their metrics to the same Prometheus instance.", - "mode": "markdown" - }, - "pluginVersion": "10.3.1", - "targets": [ - { - "datasource": "${DS_PROMETHEUS}", - "refId": "A" - } - ], - "title": "Important Information about SnapMirror Sources dashboard", - "type": "text" - }, - { - "collapsed": false, - "datasource": "${DS_PROMETHEUS}", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 2 - }, - "id": 15, - "panels": [], - "targets": [ - { - "datasource": "${DS_PROMETHEUS}", - "refId": "A" - } - ], - "title": "Highlights", - "type": "row" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "Volumes Protected With Snapmirror (Local And Remote).", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 0, - "fieldMinMax": false, - "mappings": [], - "unitScale": true - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Protected" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "green", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Not Protected" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "yellow", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 8, - "x": 0, - "y": 3 - }, - "id": 101, - "options": { - "displayLabels": [], - "legend": { - "displayMode": "table", - "placement": "right", - "showLegend": true, - "values": [ - "value" - ] - }, - "pieType": "donut", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.1.2", - "targets": [ - { - "datasource": "${DS_PROMETHEUS}", - "editorMode": "code", - "exemplar": false, - "expr": "count(volume_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\",type=\"rw\",snapshot_policy!=\"none\"}) or vector(0)", - "format": "time_series", - "instant": true, - "interval": "", - "legendFormat": "Protected", - "range": false, - "refId": "A" - }, - { - "datasource": "${DS_PROMETHEUS}", - "editorMode": "code", - "exemplar": false, - "expr": "count(volume_labels{cluster=~\"$Cluster\",type=\"rw\",snapshot_policy!=\"\",state!=\"\",snapshot_policy=\"none\"}) or vector(0)", - "format": "time_series", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "Not Protected", - "refId": "B" - } - ], - "title": "Snapshot copies (local)", - "transformations": [], - "type": "piechart" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "Volumes Protected With Snapmirror (Local And Remote).", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 0, - "mappings": [], - "unitScale": true - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Protected" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "green", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Unprotected" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "yellow", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 8, - "x": 8, - "y": 3 - }, - "id": 135, - "options": { - "displayLabels": [], - "legend": { - "displayMode": "table", - "placement": "right", - "showLegend": true, - "values": [ - "value" - ] - }, - "pieType": "donut", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.1.2", - "targets": [ - { - "datasource": "${DS_PROMETHEUS}", - "editorMode": "code", - "exemplar": false, - "expr": "count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",type=\"rw\",state!=\"\",isProtected=\"false\"})", - "format": "time_series", - "instant": true, - "interval": "", - "legendFormat": "Unprotected", - "refId": "A" - }, - { - "datasource": "${DS_PROMETHEUS}", - "editorMode": "code", - "exemplar": false, - "expr": "count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",type=\"rw\",state!=\"\",isProtected=\"true\",isDestinationOntap=\"true\"})", - "format": "time_series", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "Protected", - "refId": "B" - } - ], - "title": "SnapMirror (local or remote)", - "transformations": [], - "type": "piechart" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "Volumes Protected With Snapmirror (Local And Remote).", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 0, - "mappings": [], - "unitScale": true - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Protected" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "green", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Unprotected" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "yellow", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 8, - "x": 16, - "y": 3 - }, - "id": 136, - "options": { - "displayLabels": [], - "legend": { - "displayMode": "table", - "placement": "right", - "showLegend": true, - "values": [ - "value" - ] - }, - "pieType": "donut", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.1.2", - "targets": [ - { - "datasource": "${DS_PROMETHEUS}", - "editorMode": "code", - "exemplar": false, - "expr": "count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"})", - "format": "time_series", - "instant": true, - "interval": "", - "legendFormat": "Unprotected", - "refId": "A" - }, - { - "datasource": "${DS_PROMETHEUS}", - "editorMode": "code", - "exemplar": false, - "expr": "count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",state!=\"\",isProtected=\"true\",isDestinationCloud=\"true\"}) or vector(0)", - "format": "time_series", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "Protected", - "refId": "B" - } - ], - "title": "Back up to cloud", - "transformations": [], - "type": "piechart" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "This panel displays detail of all the snapmirror relationships from destination side of view.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "left", - "cellOptions": { - "type": "auto" - }, - "filterable": true, - "inspect": false - }, - "decimals": 2, - "fieldMinMax": true, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-purple", - "value": null - } - ] - }, - "unitScale": true - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Destination Cluster" - }, - "properties": [ - { - "id": "custom.width", - "value": 278 - }, - { - "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": "Source Cluster" - }, - "properties": [ - { - "id": "custom.width", - "value": 200 - }, - { - "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": "Group Type" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "consistencygroup": { - "index": 2, - "text": "Consistency Group" - }, - "flexgroup": { - "index": 3, - "text": "FlexGroup" - }, - "none": { - "index": 0, - "text": "Volume" - }, - "vserver": { - "index": 1, - "text": "SVM DR" - } - }, - "type": "value" - } - ] - }, - { - "id": "custom.width", - "value": 168 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Protection Policy" - }, - "properties": [ - { - "id": "custom.width", - "value": 266 - }, - { - "id": "mappings", - "value": [ - { - "options": { - "async_mirror": { - "index": 1, - "text": "Async Mirror" - }, - "automated_failover": { - "index": 4, - "text": "Automated Failover" - }, - "automated_failover_duplex": { - "index": 0, - "text": "Automated Failover Duplex" - }, - "mirror_vault": { - "index": 2, - "text": "Mirror Vault" - }, - "sync_mirror": { - "index": 5, - "text": "Sync" - }, - "vault": { - "index": 3, - "text": "Vault" - } - }, - "type": "value" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Relationship Health" - }, - "properties": [ - { - "id": "custom.width", - "value": 203 - }, - { - "id": "mappings", - "value": [ - { - "options": { - "false": { - "color": "red", - "index": 1, - "text": "Unhealthy" - }, - "true": { - "color": "green", - "index": 0, - "text": "Healthy" - } - }, - "type": "value" - } - ] - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "color-background" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Source Path" - }, - "properties": [ - { - "id": "custom.width", - "value": 315 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Destination Path" - }, - "properties": [ - { - "id": "custom.width", - "value": 363 - } - ] - } - ] - }, - "gridPos": { - "h": 10, - "w": 24, - "x": 0, - "y": 15 - }, - "id": 134, - "links": [], - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "enablePagination": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": false, - "displayName": "Relationship Health" - } - ] - }, - "pluginVersion": "10.3.1", - "targets": [ - { - "datasource": "${DS_PROMETHEUS}", - "editorMode": "code", - "exemplar": false, - "expr": "snapmirror_labels{source_cluster=~\"$Cluster\",source_volume=~\"$Volume\",source_vserver=~\"$SVM\",source_location=~\".*$ConsistencyGroup\",derived_relationship_type!=\"load_sharing\",relationship_id!=\"\"} ", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "D" - } - ], - "title": "Relationships", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "cluster", - "destination_location", - "group_type", - "healthy", - "policy_type", - "source_cluster", - "source_location" - ] - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": {}, - "includeByName": {}, - "indexByName": { - "Value": 15, - "cluster": 2, - "derived_relationship_type": 4, - "destination_location": 3, - "group_type": 5, - "healthy": 6, - "last_transfer_type": 7, - "policy_type": 8, - "protectedBy": 9, - "protectionSourceType": 10, - "relationship_id": 11, - "relationship_status": 12, - "relationship_type": 13, - "schedule": 14, - "source_cluster": 0, - "source_location": 1 - }, - "renameByName": { - "cluster": "Destination Cluster", - "derived_relationship_type": "", - "destination_location": "Destination Path", - "group_type": "Group Type", - "healthy": "Relationship Health", - "policy_type": "Protection Policy", - "relationship_status": "", - "source_cluster": "Source Cluster", - "source_location": "Source Path" - } - } - } - ], - "type": "table" - } - ], - "refresh": "", - "schemaVersion": 39, - "tags": [ - "harvest", - "ontap", - "cdot" - ], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "Prometheus", - "value": "c6938c7d-3e1c-4ff1-9741-ef4164e5259a" - }, - "hide": 2, - "includeAll": false, - "label": "Data Source", - "multi": false, - "name": "DS_PROMETHEUS", - "options": [], - "query": "prometheus", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "type": "datasource" - }, - { - "current": {}, - "datasource": "${DS_PROMETHEUS}", - "definition": "label_values(cluster_new_status{system_type!=\"7mode\"},datacenter)", - "description": "Select all the datacenters that contain the ONTAP clusters acting as source for SnapMirror relationships.", - "hide": 0, - "includeAll": false, - "multi": true, - "name": "Datacenter", - "options": [], - "query": { - "query": "label_values(cluster_new_status{system_type!=\"7mode\"},datacenter)", - "refId": "Prometheus-Datacenter-Variable-Query" - }, - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": ".*", - "current": {}, - "datasource": "${DS_PROMETHEUS}", - "definition": "query_result(snapmirror_labels{system_type!=\"7mode\"} * on (source_volume, source_vserver, source_cluster) group_left() label_replace( label_replace( label_replace( volume_labels{system_type!=\"7mode\",datacenter=~\"$Datacenter\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\"), \"source_cluster\", \"$1\", \"cluster\", \"(.*)\"))", - "hide": 0, - "includeAll": true, - "multi": true, - "name": "Cluster", - "options": [], - "query": { - "query": "query_result(snapmirror_labels{system_type!=\"7mode\"} * on (source_volume, source_vserver, source_cluster) group_left() label_replace( label_replace( label_replace( volume_labels{system_type!=\"7mode\",datacenter=~\"$Datacenter\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\"), \"source_cluster\", \"$1\", \"cluster\", \"(.*)\"))", - "refId": "Prometheus-Cluster-Variable-Query" - }, - "refresh": 2, - "regex": ".*source_cluster=\\\"(.*?)\\\".*", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": ".*", - "current": {}, - "datasource": "${DS_PROMETHEUS}", - "definition": "label_values(snapmirror_labels{source_cluster=~\"$SourceCluster\"}, source_vserver)", - "hide": 0, - "includeAll": true, - "multi": true, - "name": "SVM", - "options": [], - "query": { - "query": "label_values(snapmirror_labels{source_cluster=~\"$SourceCluster\"}, source_vserver)", - "refId": "StandardVariableQuery" - }, - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": ".*", - "current": {}, - "datasource": "${DS_PROMETHEUS}", - "definition": "label_values(snapmirror_labels{source_cluster=~\"$SourceCluster\",source_vserver=~\"$SourceSVM\"}, source_volume)", - "hide": 0, - "includeAll": true, - "multi": true, - "name": "Volume", - "options": [], - "query": { - "query": "label_values(snapmirror_labels{source_cluster=~\"$SourceCluster\",source_vserver=~\"$SourceSVM\"}, source_volume)", - "refId": "StandardVariableQuery" - }, - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": ".*", - "current": {}, - "datasource": "${DS_PROMETHEUS}", - "definition": "label_values(snapmirror_labels{source_cluster=~\"$SourceCluster\",source_vserver=~\"$SourceSVM\", destination_vserver=~\"$DestinationSVM\"}, source_cg_name)", - "hide": 0, - "includeAll": true, - "multi": true, - "name": "ConsistencyGroup", - "options": [], - "query": { - "query": "label_values(snapmirror_labels{source_cluster=~\"$SourceCluster\",source_vserver=~\"$SourceSVM\", destination_vserver=~\"$DestinationSVM\"}, source_cg_name)", - "refId": "StandardVariableQuery" - }, - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-3h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "ONTAP: SnapMirror Sources", - "uid": "cdot-snapmirror-sources", - "version": 1, - "weekStart": "" -} From 239b97416b3a9cf2b0484a2c393fece7f3f383db Mon Sep 17 00:00:00 2001 From: hardikl Date: Mon, 21 Oct 2024 18:49:07 +0530 Subject: [PATCH 3/9] feat: correct the counts --- grafana/dashboards/cmode/snapmirror.json | 118 ++++++++++++++++++++--- 1 file changed, 102 insertions(+), 16 deletions(-) diff --git a/grafana/dashboards/cmode/snapmirror.json b/grafana/dashboards/cmode/snapmirror.json index 3fa3f027c..6c709026d 100644 --- a/grafana/dashboards/cmode/snapmirror.json +++ b/grafana/dashboards/cmode/snapmirror.json @@ -227,17 +227,45 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "count(volume_labels{cluster=~\"$Cluster\",type=\"rw\",snapshot_policy!=\"\",state!=\"\",snapshot_policy=\"none\"}) or vector(0)", + "expr": "count(volume_labels{cluster=~\"$Cluster\",type=\"rw\",snapshot_policy!=\"\",state!=\"\"}) or vector(0)", "format": "time_series", "hide": false, "instant": true, "interval": "", - "legendFormat": "Not Protected", + "legendFormat": "Total", "refId": "B" } ], "title": "Snapshot copies (local)", - "transformations": [], + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Not Protected", + "binary": { + "left": "Total", + "operator": "-", + "right": "Protected" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Total": true + }, + "includeByName": {}, + "indexByName": {}, + "renameByName": {} + } + } + ], "type": "piechart" }, { @@ -328,18 +356,18 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",type=\"rw\",state!=\"\",isProtected=\"false\"})", + "expr": "count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",type=\"rw\",state!=\"\"}) or vector(0)", "format": "time_series", "instant": true, "interval": "", - "legendFormat": "Unprotected", + "legendFormat": "Total", "refId": "A" }, { "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",type=\"rw\",state!=\"\",isProtected=\"true\",isDestinationOntap=\"true\"})", + "expr": "count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",type=\"rw\",state!=\"\",isProtected=\"true\",isDestinationOntap=\"true\", svm_root=\"false\"}) or vector(0)", "format": "time_series", "hide": false, "instant": true, @@ -349,7 +377,38 @@ } ], "title": "SnapMirror (local or remote)", - "transformations": [], + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Not Protected", + "binary": { + "left": "Total", + "operator": "-", + "right": "Protected" + }, + "mode": "binary", + "reduce": { + "include": [ + "Protected" + ], + "reducer": "sum" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Total": true + }, + "includeByName": {}, + "indexByName": {}, + "renameByName": {} + } + } + ], "type": "piechart" }, { @@ -375,7 +434,7 @@ { "matcher": { "id": "byName", - "options": "Protected" + "options": "Backed Up" }, "properties": [ { @@ -390,7 +449,7 @@ { "matcher": { "id": "byName", - "options": "Unprotected" + "options": "Not Backed Up" }, "properties": [ { @@ -440,11 +499,11 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"})", + "expr": "count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"}) or vector(0)", "format": "time_series", "instant": true, "interval": "", - "legendFormat": "Unprotected", + "legendFormat": "Total", "refId": "A" }, { @@ -456,12 +515,40 @@ "hide": false, "instant": true, "interval": "", - "legendFormat": "Protected", + "legendFormat": "Backed Up", "refId": "B" } ], "title": "Back up to cloud", - "transformations": [], + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Not Backed Up", + "binary": { + "left": "Total", + "operator": "-", + "right": "Backed Up" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Total": true + }, + "includeByName": {}, + "indexByName": {}, + "renameByName": {} + } + } + ], "type": "piechart" }, { @@ -818,7 +905,6 @@ "type": "datasource" }, { - "allValue": null, "current": {}, "datasource": "${DS_PROMETHEUS}", "definition": "label_values(cluster_new_status{system_type!=\"7mode\"},datacenter)", @@ -964,7 +1050,7 @@ ] }, "timezone": "", - "title": "ONTAP: SnapMirror", + "title": "ONTAP: SnapMirror Sources", "uid": "cdot-snapmirror", - "version": 1 + "version": 7 } From 41848d2e0064babcc58ed2247052c6a7706d32b9 Mon Sep 17 00:00:00 2001 From: hardikl Date: Mon, 21 Oct 2024 19:29:28 +0530 Subject: [PATCH 4/9] feat: changes in tests --- integration/test/dashboard_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration/test/dashboard_test.go b/integration/test/dashboard_test.go index 634651fad..bb3deec5d 100644 --- a/integration/test/dashboard_test.go +++ b/integration/test/dashboard_test.go @@ -75,7 +75,7 @@ func TestCModeDashboardCount(t *testing.T) { "ONTAP: NFS Clients", "ONTAP: Node", "ONTAP: Shelf", - "ONTAP: SnapMirror", + "ONTAP: SnapMirror Sources", "ONTAP: SVM", "ONTAP: Volume", "ONTAP: MetroCluster", From 85c40d85409fb2f91d60a285886925d67f542936 Mon Sep 17 00:00:00 2001 From: hardikl Date: Wed, 30 Oct 2024 20:21:15 +0530 Subject: [PATCH 5/9] feat: SM source dashboard - 2 --- grafana/dashboards/cmode/snapmirror.json | 2710 +++++++++++++++++----- 1 file changed, 2192 insertions(+), 518 deletions(-) diff --git a/grafana/dashboards/cmode/snapmirror.json b/grafana/dashboards/cmode/snapmirror.json index 6c709026d..eda42fa80 100644 --- a/grafana/dashboards/cmode/snapmirror.json +++ b/grafana/dashboards/cmode/snapmirror.json @@ -95,23 +95,6 @@ } ], "panels": [ - { - "datasource": "${DS_PROMETHEUS}", - "gridPos": { - "h": 2, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 29, - "options": { - "content": "To monitor both sides of a snapmirror relationship, both source and destination clusters must be monitored by Harvest. Both clusters need to export their metrics to the same Prometheus instance.", - "mode": "markdown" - }, - "pluginVersion": "8.1.8", - "title": "Important Information about SnapMirror Sources dashboard", - "type": "text" - }, { "collapsed": false, "datasource": "${DS_PROMETHEUS}", @@ -119,7 +102,7 @@ "h": 1, "w": 24, "x": 0, - "y": 2 + "y": 0 }, "id": 15, "panels": [], @@ -128,86 +111,52 @@ }, { "datasource": "${DS_PROMETHEUS}", - "description": "Volumes Protected With Snapmirror (Local And Remote).", + "description": "Total number of volumes that are protected.", "fieldConfig": { "defaults": { "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } + "mode": "thresholds" }, - "decimals": 0, - "fieldMinMax": false, "mappings": [], - "unitScale": true - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Protected" - }, - "properties": [ + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ { - "id": "color", - "value": { - "fixedColor": "green", - "mode": "fixed" - } + "color": "semi-dark-green", + "value": null } ] }, - { - "matcher": { - "id": "byName", - "options": "Not Protected" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "yellow", - "mode": "fixed" - } - } - ] - } - ] + "unit": "short", + "unitScale": true + }, + "overrides": [] }, "gridPos": { - "h": 12, - "w": 8, + "h": 5, + "w": 6, "x": 0, - "y": 3 + "y": 1 }, - "id": 101, + "id": 137, + "links": [], "options": { - "displayLabels": [], - "legend": { - "displayMode": "table", - "placement": "right", - "showLegend": true, - "values": [ - "value" - ] - }, - "pieType": "donut", + "colorMode": "value", + "graphMode": "none", + "justifyMode": "center", + "orientation": "horizontal", "reduceOptions": { "calcs": [ - "last" + "lastNotNull" ], "fields": "", "values": false }, - "tooltip": { - "mode": "single", - "sort": "none" - } + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true }, "pluginVersion": "8.1.8", "targets": [ @@ -215,140 +164,136 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "count(volume_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\",type=\"rw\",snapshot_policy!=\"none\"}) or vector(0)", - "format": "time_series", + "expr": "sum(snapmirror_break_successful_count{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\"})+sum(snapmirror_resync_successful_count{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\"})+sum(snapmirror_update_successful_count{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\"})OR on() vector(0)", + "format": "table", + "hide": false, "instant": true, "interval": "", - "legendFormat": "Protected", + "intervalFactor": 1, + "legendFormat": "", "range": false, "refId": "A" + } + ], + "title": "Total Successful Count", + "type": "stat" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "Total number of volumes that are protected.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + } + ] + }, + "unit": "short", + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 6, + "x": 6, + "y": 1 + }, + "id": 138, + "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(volume_labels{cluster=~\"$Cluster\",type=\"rw\",snapshot_policy!=\"\",state!=\"\"}) or vector(0)", - "format": "time_series", + "expr": "sum(snapmirror_break_failed_count{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\"})+sum(snapmirror_resync_failed_count{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\"})+sum(snapmirror_update_failed_count{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\"}) OR on() vector(0)", + "format": "table", "hide": false, "instant": true, "interval": "", - "legendFormat": "Total", - "refId": "B" - } - ], - "title": "Snapshot copies (local)", - "transformations": [ - { - "id": "calculateField", - "options": { - "alias": "Not Protected", - "binary": { - "left": "Total", - "operator": "-", - "right": "Protected" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Time": true, - "Total": true - }, - "includeByName": {}, - "indexByName": {}, - "renameByName": {} - } + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" } ], - "type": "piechart" + "title": "Total Failed Count", + "type": "stat" }, { "datasource": "${DS_PROMETHEUS}", - "description": "Volumes Protected With Snapmirror (Local And Remote).", + "description": "Number of unhealhty snapmirrors.", "fieldConfig": { "defaults": { "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } + "mode": "thresholds" }, - "decimals": 0, "mappings": [], - "unitScale": true - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Protected" - }, - "properties": [ + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ { - "id": "color", - "value": { - "fixedColor": "green", - "mode": "fixed" - } + "color": "red", + "value": null } ] }, - { - "matcher": { - "id": "byName", - "options": "Unprotected" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "yellow", - "mode": "fixed" - } - } - ] - } - ] + "unit": "short", + "unitScale": true + }, + "overrides": [] }, "gridPos": { - "h": 12, - "w": 8, - "x": 8, - "y": 3 + "h": 5, + "w": 6, + "x": 12, + "y": 1 }, - "id": 135, + "id": 139, + "links": [], "options": { - "displayLabels": [], - "legend": { - "displayMode": "table", - "placement": "right", - "showLegend": true, - "values": [ - "value" - ] - }, - "pieType": "donut", + "colorMode": "value", + "graphMode": "none", + "justifyMode": "center", + "orientation": "horizontal", "reduceOptions": { "calcs": [ - "last" + "lastNotNull" ], "fields": "", "values": false }, - "tooltip": { - "mode": "single", - "sort": "none" - } + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true }, "pluginVersion": "8.1.8", "targets": [ @@ -356,60 +301,157 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",type=\"rw\",state!=\"\"}) or vector(0)", + "expr": "count (count by (relationship_id) (snapmirror_labels{source_cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\",healthy=\"false\",relationship_id!=\"\"}))", "format": "time_series", + "hide": false, "instant": true, "interval": "", - "legendFormat": "Total", + "intervalFactor": 1, + "legendFormat": "", "refId": "A" + } + ], + "title": "Unhealthy Count", + "type": "stat" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "Number of unhealhty snapmirrors.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "yellow", + "value": null + } + ] + }, + "unit": "short", + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 6, + "x": 18, + "y": 1 + }, + "id": 148, + "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(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",type=\"rw\",state!=\"\",isProtected=\"true\",isDestinationOntap=\"true\", svm_root=\"false\"}) or vector(0)", + "expr": "count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\",type=\"rw\",state!=\"\"}) - count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\",type=\"rw\",state!=\"\",isProtected=\"true\",isDestinationOntap=\"true\", svm_root=\"false\"}) or vector(0)", "format": "time_series", "hide": false, "instant": true, "interval": "", - "legendFormat": "Protected", - "refId": "B" + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" } ], - "title": "SnapMirror (local or remote)", - "transformations": [ - { - "id": "calculateField", - "options": { - "alias": "Not Protected", - "binary": { - "left": "Total", - "operator": "-", - "right": "Protected" - }, - "mode": "binary", - "reduce": { - "include": [ - "Protected" - ], - "reducer": "sum" - } - } + "title": "Unprotected volumes count", + "type": "stat" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "Number of unhealhty snapmirrors.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "max": 100, + "min": 0, + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "percent", + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 4, + "x": 0, + "y": 6 + }, + "id": 145, + "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": [ { - "id": "organize", - "options": { - "excludeByName": { - "Time": true, - "Total": true - }, - "includeByName": {}, - "indexByName": {}, - "renameByName": {} - } + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "100 * count(volume_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\",type=\"rw\",snapshot_policy!=\"none\"}) / count(volume_labels{cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\",type=\"rw\",snapshot_policy!=\"\",state!=\"\"}) or vector(0)", + "format": "time_series", + "hide": false, + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" } ], - "type": "piechart" + "title": "Snapshot copies (local)", + "type": "stat" }, { "datasource": "${DS_PROMETHEUS}", @@ -417,31 +459,39 @@ "fieldConfig": { "defaults": { "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } + "mode": "thresholds" }, - "decimals": 0, + "fieldMinMax": false, "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, "unitScale": true }, "overrides": [ { "matcher": { "id": "byName", - "options": "Backed Up" + "options": "Scheduled Snapshot policy" }, "properties": [ { - "id": "color", + "id": "thresholds", "value": { - "fixedColor": "green", - "mode": "fixed" + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] } } ] @@ -449,14 +499,19 @@ { "matcher": { "id": "byName", - "options": "Not Backed Up" + "options": "Not Scheduled Snapshot policy" }, "properties": [ { - "id": "color", + "id": "thresholds", "value": { - "fixedColor": "yellow", - "mode": "fixed" + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + } + ] } } ] @@ -464,34 +519,29 @@ ] }, "gridPos": { - "h": 12, - "w": 8, - "x": 16, - "y": 3 + "h": 5, + "w": 20, + "x": 4, + "y": 6 }, - "id": 136, + "id": 101, "options": { - "displayLabels": [], - "legend": { - "displayMode": "table", - "placement": "right", - "showLegend": true, - "values": [ - "value" - ] - }, - "pieType": "donut", + "displayMode": "basic", + "maxVizHeight": 300, + "minVizHeight": 16, + "minVizWidth": 8, + "namePlacement": "top", + "orientation": "horizontal", "reduceOptions": { "calcs": [ - "last" + "lastNotNull" ], "fields": "", "values": false }, - "tooltip": { - "mode": "single", - "sort": "none" - } + "showUnfilled": true, + "sizing": "manual", + "valueMode": "color" }, "pluginVersion": "8.1.8", "targets": [ @@ -499,36 +549,37 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"}) or vector(0)", + "expr": "count(volume_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\",type=\"rw\",snapshot_policy!=\"none\"}) or vector(0)", "format": "time_series", "instant": true, "interval": "", - "legendFormat": "Total", + "legendFormat": "Scheduled Snapshot policy", + "range": false, "refId": "A" }, { "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",state!=\"\",isProtected=\"true\",isDestinationCloud=\"true\"}) or vector(0)", + "expr": "count(volume_labels{cluster=~\"$Cluster\",type=\"rw\",svm=~\"$SVM\",volume=~\"$Volume\",snapshot_policy!=\"\",state!=\"\"}) or vector(0)", "format": "time_series", "hide": false, "instant": true, "interval": "", - "legendFormat": "Backed Up", + "legendFormat": "Total", "refId": "B" } ], - "title": "Back up to cloud", + "title": "Snapshot copies (local)", "transformations": [ { "id": "calculateField", "options": { - "alias": "Not Backed Up", + "alias": "Not Scheduled Snapshot policy", "binary": { "left": "Total", "operator": "-", - "right": "Backed Up" + "right": "Scheduled Snapshot policy" }, "mode": "binary", "reduce": { @@ -549,332 +600,1859 @@ } } ], - "type": "piechart" + "type": "bargauge" }, { "datasource": "${DS_PROMETHEUS}", - "description": "This panel displays detail of all the snapmirror relationships from destination side of view.", + "description": "Number of unhealhty snapmirrors.", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": { - "align": "left", - "cellOptions": { - "type": "auto" - }, - "filterable": true, - "inspect": false - }, - "decimals": 2, - "fieldMinMax": true, - "links": [], + "decimals": 0, "mappings": [], + "max": 100, "min": 0, + "noValue": "0", "thresholds": { "mode": "absolute", "steps": [ { - "color": "light-purple", + "color": "green", "value": null } ] }, + "unit": "percent", "unitScale": true }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Destination Cluster" - }, - "properties": [ + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 4, + "x": 0, + "y": 11 + }, + "id": 146, + "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": "100 * count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\",type=\"rw\",state!=\"\",isProtected=\"true\",isDestinationOntap=\"true\", svm_root=\"false\"}) / count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\",type=\"rw\",state!=\"\"}) or vector(0)", + "format": "time_series", + "hide": false, + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "SnapMirror (local or remote)", + "type": "stat" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "Volumes Protected With Snapmirror (Local And Remote).", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ { - "id": "custom.width", - "value": 278 + "color": "green", + "value": null }, { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "", - "url": "/d/cdot-cluster/ontap-cluster?orgId=1&${Datacenter:queryparam}&${__url_time_range}&var-Cluster=${__value.raw}" - } - ] + "color": "red", + "value": 80 } ] }, + "unitScale": true + }, + "overrides": [ { "matcher": { "id": "byName", - "options": "Source Cluster" + "options": "Protected" }, "properties": [ { - "id": "custom.width", - "value": 200 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "", - "url": "/d/cdot-cluster/ontap-cluster?orgId=1&${Datacenter:queryparam}&${__url_time_range}&var-Cluster=${__value.raw}" - } - ] + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } } ] }, { "matcher": { "id": "byName", - "options": "Group Type" + "options": "Not Protected" }, "properties": [ { - "id": "mappings", - "value": [ - { - "options": { - "consistencygroup": { - "index": 2, - "text": "Consistency Group" - }, - "flexgroup": { - "index": 3, - "text": "FlexGroup" - }, - "none": { - "index": 0, - "text": "Volume" - }, - "vserver": { - "index": 1, - "text": "SVM DR" - } - }, - "type": "value" + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 5, + "w": 20, + "x": 4, + "y": 11 + }, + "id": 135, + "options": { + "displayMode": "basic", + "maxVizHeight": 300, + "minVizHeight": 16, + "minVizWidth": 8, + "namePlacement": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true, + "sizing": "auto", + "valueMode": "color" + }, + "pluginVersion": "8.1.8", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\",type=\"rw\",state!=\"\"}) or vector(0)", + "format": "time_series", + "instant": true, + "interval": "", + "legendFormat": "Total", + "refId": "A" + }, + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\",type=\"rw\",state!=\"\",isProtected=\"true\",isDestinationOntap=\"true\", svm_root=\"false\"}) or vector(0)", + "format": "time_series", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "Protected", + "refId": "B" + } + ], + "title": "SnapMirror (local or remote)", + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Not Protected", + "binary": { + "left": "Total", + "operator": "-", + "right": "Protected" + }, + "mode": "binary", + "reduce": { + "include": [ + "Protected" + ], + "reducer": "sum" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Total": true + }, + "includeByName": {}, + "indexByName": {}, + "renameByName": {} + } + } + ], + "type": "bargauge" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "Number of unhealhty snapmirrors.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "max": 100, + "min": 0, + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "percent", + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 4, + "x": 0, + "y": 16 + }, + "id": 147, + "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": "100 * count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\",state!=\"\",isProtected=\"true\",isDestinationCloud=\"true\"}) / count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"}) or vector(0)", + "format": "time_series", + "hide": false, + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Back up to cloud", + "type": "stat" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "Volumes Protected With Snapmirror (Local And Remote).", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unitScale": true + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Backed Up" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Not Backed Up" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 5, + "w": 20, + "x": 4, + "y": 16 + }, + "id": 136, + "options": { + "displayMode": "basic", + "maxVizHeight": 300, + "minVizHeight": 16, + "minVizWidth": 8, + "namePlacement": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true, + "sizing": "auto", + "valueMode": "color" + }, + "pluginVersion": "8.1.8", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\"}) or vector(0)", + "format": "time_series", + "instant": true, + "interval": "", + "legendFormat": "Total", + "refId": "A" + }, + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\",state!=\"\",isProtected=\"true\",isDestinationCloud=\"true\"}) or vector(0)", + "format": "time_series", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "Backed Up", + "refId": "B" + } + ], + "title": "Back up to cloud", + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Not Backed Up", + "binary": { + "left": "Total", + "operator": "-", + "right": "Backed Up" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Total": true + }, + "includeByName": {}, + "indexByName": {}, + "renameByName": {} + } + } + ], + "type": "bargauge" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "This panel displays detail of all the snapmirror relationships from destination side of view.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "left", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false + }, + "decimals": 2, + "fieldMinMax": true, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "light-purple", + "value": null + } + ] + }, + "unitScale": true + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Destination Cluster" + }, + "properties": [ + { + "id": "custom.width", + "value": 200 + }, + { + "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": "Source Cluster" + }, + "properties": [ + { + "id": "custom.width", + "value": 200 + }, + { + "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": "Group Type" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "consistencygroup": { + "index": 2, + "text": "Consistency Group" + }, + "flexgroup": { + "index": 3, + "text": "FlexGroup" + }, + "none": { + "index": 0, + "text": "Volume" + }, + "vserver": { + "index": 1, + "text": "SVM DR" + } + }, + "type": "value" + } + ] + }, + { + "id": "custom.width", + "value": 130 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Protection Policy" + }, + "properties": [ + { + "id": "custom.width", + "value": 150 + }, + { + "id": "mappings", + "value": [ + { + "options": { + "async_mirror": { + "index": 1, + "text": "Async Mirror" + }, + "automated_failover": { + "index": 4, + "text": "Automated Failover" + }, + "automated_failover_duplex": { + "index": 0, + "text": "Automated Failover Duplex" + }, + "mirror_vault": { + "index": 2, + "text": "Mirror Vault" + }, + "sync_mirror": { + "index": 5, + "text": "Sync" + }, + "vault": { + "index": 3, + "text": "Vault" + } + }, + "type": "value" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Health" + }, + "properties": [ + { + "id": "custom.width", + "value": 120 + }, + { + "id": "mappings", + "value": [ + { + "options": { + "false": { + "color": "red", + "index": 1, + "text": "Unhealthy" + }, + "true": { + "color": "green", + "index": 0, + "text": "Healthy" + } + }, + "type": "value" + } + ] + }, + { + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Source Path" + }, + "properties": [ + { + "id": "custom.width", + "value": 250 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Destination Path" + }, + "properties": [ + { + "id": "custom.width", + "value": 250 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Size" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "mode": "lcd", + "type": "gauge" + } + }, + { + "id": "unit", + "value": "bytes" + }, + { + "id": "mappings", + "value": [ + { + "options": { + "match": "null", + "result": { + "index": 0, + "text": "0 B" + } + }, + "type": "special" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Duration" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "mode": "lcd", + "type": "gauge" + } + }, + { + "id": "unit", + "value": "s" + }, + { + "id": "mappings", + "value": [ + { + "options": { + "match": "null", + "result": { + "index": 0, + "text": "0 s" + } + }, + "type": "special" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Lag" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "mode": "lcd", + "type": "gauge" + } + }, + { + "id": "mappings", + "value": [ + { + "options": { + "match": "null", + "result": { + "index": 0, + "text": "0" + } + }, + "type": "special" + } + ] + }, + { + "id": "unit", + "value": "s" + } + ] + } + ] + }, + "gridPos": { + "h": 10, + "w": 24, + "x": 0, + "y": 21 + }, + "id": 134, + "links": [], + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": false, + "displayName": "Health" + } + ] + }, + "pluginVersion": "8.1.8", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "snapmirror_labels{source_cluster=~\"$Cluster\",source_volume=~\"$Volume\",source_vserver=~\"$SVM\",source_location=~\".*$ConsistencyGroup\",derived_relationship_type!=\"load_sharing\",relationship_id!=\"\"} ", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + }, + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "snapmirror_last_transfer_duration{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",source_volume=~\"$Volume\",source_vserver=~\"$SVM\",source_location=~\".*$ConsistencyGroup\",relationship_id!=\"\"}", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "B" + }, + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "snapmirror_last_transfer_size{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", source_volume=~\"$Volume\",source_vserver=~\"$SVM\",source_location=~\".*$ConsistencyGroup\",relationship_id!=\"\"}", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "C" + }, + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "snapmirror_lag_time{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",source_volume=~\"$Volume\",source_vserver=~\"$SVM\",source_location=~\".*$ConsistencyGroup\",relationship_id!=\"\"}", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "D" + } + ], + "title": "Relationships", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "cluster", + "destination_location", + "group_type", + "healthy", + "policy_type", + "source_cluster", + "source_location", + "Value #B", + "Value #C", + "Value #D" + ] + } + } + }, + { + "id": "merge", + "options": {} + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "includeByName": {}, + "indexByName": { + "Value": 15, + "cluster": 2, + "derived_relationship_type": 4, + "destination_location": 3, + "group_type": 5, + "healthy": 6, + "last_transfer_type": 7, + "policy_type": 8, + "protectedBy": 9, + "protectionSourceType": 10, + "relationship_id": 11, + "relationship_status": 12, + "relationship_type": 13, + "schedule": 14, + "source_cluster": 0, + "source_location": 1 + }, + "renameByName": { + "Value #B": "Duration", + "Value #C": "Size", + "Value #D": "Lag", + "cluster": "Destination Cluster", + "derived_relationship_type": "", + "destination_location": "Destination Path", + "group_type": "Group Type", + "healthy": "Health", + "policy_type": "Protection Policy", + "relationship_status": "", + "source_cluster": "Source Cluster", + "source_location": "Source Path" + } + } + } + ], + "type": "table" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "Must select Source Volume/Destination Volume for detail of single relationship.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 30, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s", + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 8, + "x": 0, + "y": 31 + }, + "id": 140, + "options": { + "legend": { + "calcs": [ + "min", + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.1.8", + "repeatDirection": "h", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "snapmirror_last_transfer_duration{source_cluster=~\"$Cluster\",source_volume=~\"$Volume\",source_vserver=~\"$SVM\",source_location=~\".*$ConsistencyGroup\"}\nand\ntopk($TopResources, avg_over_time(snapmirror_last_transfer_duration{source_cluster=~\"$Cluster\",source_volume=~\"$Volume\",source_vserver=~\"$SVM\",source_location=~\".*$ConsistencyGroup\"}[3h] @ end()))", + "hide": false, + "interval": "", + "legendFormat": "{{source_location}} -> {{destination_location}}", + "range": true, + "refCount": 0, + "refId": "B", + "textEditor": false + } + ], + "title": "Top $TopResources Relationships by Transfer Duration", + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "Must select Source Volume/Destination Volume for detail of single relationship.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 30, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s", + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 8, + "x": 8, + "y": 31 + }, + "id": 141, + "options": { + "legend": { + "calcs": [ + "min", + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.1.8", + "repeatDirection": "h", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "snapmirror_lag_time{source_cluster=~\"$Cluster\",source_volume=~\"$Volume\",source_vserver=~\"$SVM\",source_location=~\".*$ConsistencyGroup\"}\nand\ntopk($TopResources, avg_over_time(snapmirror_lag_time{source_cluster=~\"$Cluster\",source_volume=~\"$Volume\",source_vserver=~\"$SVM\",source_location=~\".*$ConsistencyGroup\"}[3h] @ end()))", + "hide": false, + "interval": "", + "legendFormat": "{{source_location}} -> {{destination_location}}", + "range": true, + "refCount": 0, + "refId": "B", + "textEditor": false + } + ], + "title": "Top $TopResources Relationships by Lag Time", + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "Must select Source Volume/Destination Volume for detail of single relationship.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 30, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes", + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 8, + "x": 16, + "y": 31 + }, + "id": 142, + "options": { + "legend": { + "calcs": [ + "min", + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.1.8", + "repeatDirection": "h", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "snapmirror_last_transfer_size{source_cluster=~\"$Cluster\",source_volume=~\"$Volume\",source_vserver=~\"$SVM\",source_location=~\".*$ConsistencyGroup\"}\nand\ntopk($TopResources, avg_over_time(snapmirror_last_transfer_size{source_cluster=~\"$Cluster\",source_volume=~\"$Volume\",source_vserver=~\"$SVM\",source_location=~\".*$ConsistencyGroup\"}[3h] @ end()))", + "hide": false, + "interval": "", + "legendFormat": "{{source_location}} -> {{destination_location}}", + "range": true, + "refCount": 0, + "refId": "B", + "textEditor": false + } + ], + "title": "Top $TopResources Relationships by Transfer Data", + "type": "timeseries" + }, + { + "collapsed": true, + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 40 + }, + "id": 45, + "panels": [ + { + "datasource": "${DS_PROMETHEUS}", + "description": "This panel displays volume relationship count based on the relationship type.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "decimals": 0, + "mappings": [], + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 12, + "w": 12, + "x": 0, + "y": 41 + }, + "id": 144, + "options": { + "displayLabels": [], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "value" + ] + }, + "pieType": "donut", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "count(snapmirror_labels{source_cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\",derived_relationship_type=\"extended_data_protection\"}) or vector(0)", + "instant": true, + "interval": "", + "legendFormat": "Asynchronous Mirror", + "refId": "A" + }, + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "count(snapmirror_labels{source_cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\",derived_relationship_type=\"mirror_vault\"}) or vector(0)", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "Asynchronous Mirror and Vault", + "refId": "B" + }, + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "count(snapmirror_labels{source_cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\",derived_relationship_type=\"vault\"}) or vector(0)", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "Asynchronous Vault", + "refId": "C" + }, + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "count(snapmirror_labels{source_cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\",derived_relationship_type=\"sync_mirror_strict\"}) or vector(0)", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "StrictSync", + "refId": "D" + }, + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "count(snapmirror_labels{source_cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\",derived_relationship_type=\"sync_mirror\"}) or vector(0)", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "Sync", + "refId": "E" + }, + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "count(snapmirror_labels{source_cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\",derived_relationship_type=\"automated_failover\"}) or vector(0)", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "Automated Failover", + "refId": "F" + }, + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "count(snapmirror_labels{source_cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\",derived_relationship_type=\"automated_failover_duplex\"}) or vector(0)", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "Automated Failover Duplex", + "refId": "G" + } + ], + "title": "Count by Protection Policy", + "transformations": [], + "type": "piechart" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "Volume Relationships Experiencing Lag.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "decimals": 0, + "mappings": [], + "unitScale": true + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "<=15 minutes" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-yellow", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "16-30 minutes" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "light-yellow", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "31-60 minutes" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "orange", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": ">= 60 minutes" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 12, + "w": 12, + "x": 12, + "y": 41 + }, + "id": 125, + "options": { + "displayLabels": [], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "value" + ] + }, + "pieType": "donut", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "count((1 < snapmirror_lag_time{source_cluster=~\"$Cluster\", source_volume!=\"\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\"} <= 900)) or vector(0)", + "instant": true, + "interval": "", + "legendFormat": "<=15 minutes", + "refId": "A" + }, + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "count((900 < snapmirror_lag_time{source_cluster=~\"$Cluster\", source_volume!=\"\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\"} <= 1800)) or vector(0)", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "16-30 minutes", + "refId": "B" + }, + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "count((1800 < snapmirror_lag_time{source_cluster=~\"$Cluster\", source_volume!=\"\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\"} <= 3600)) or vector(0)", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "31-60 minutes", + "refId": "C" + }, + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "count((snapmirror_lag_time{ source_cluster=~\"$Cluster\",source_volume!=\"\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\"} > 3600)) or vector(0)", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": ">= 60 minutes", + "refId": "D" + } + ], + "title": "Lag Status", + "transformations": [], + "type": "piechart" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "This panel displays snapmirror relationships with lag duration details.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "transparent", + "mode": "fixed" + }, + "custom": { + "align": "left", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null } ] }, - { - "id": "custom.width", - "value": 168 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Protection Policy" + "unitScale": true }, - "properties": [ - { - "id": "custom.width", - "value": 266 - }, + "overrides": [ { - "id": "mappings", - "value": [ + "matcher": { + "id": "byName", + "options": "Lag Duration Bucket" + }, + "properties": [ { - "options": { - "async_mirror": { - "index": 1, - "text": "Async Mirror" - }, - "automated_failover": { - "index": 4, - "text": "Automated Failover" - }, - "automated_failover_duplex": { - "index": 0, - "text": "Automated Failover Duplex" + "id": "custom.filterable", + "value": true + }, + { + "id": "mappings", + "value": [ + { + "options": { + "from": 1, + "result": { + "color": "dark-yellow", + "index": 0, + "text": "<= 15 Minutes" + }, + "to": 900 + }, + "type": "range" }, - "mirror_vault": { - "index": 2, - "text": "Mirror Vault" + { + "options": { + "from": 901, + "result": { + "color": "light-yellow", + "index": 1, + "text": "16-30 Minutes" + }, + "to": 1800 + }, + "type": "range" }, - "sync_mirror": { - "index": 5, - "text": "Sync" + { + "options": { + "from": 1801, + "result": { + "color": "orange", + "index": 2, + "text": "31-60 Minutes" + }, + "to": 3600 + }, + "type": "range" }, - "vault": { - "index": 3, - "text": "Vault" + { + "options": { + "from": 3600, + "result": { + "color": "red", + "index": 3, + "text": ">60 Minutes" + }, + "to": 1e+24 + }, + "type": "range" } - }, - "type": "value" + ] + }, + { + "id": "custom.width", + "value": 275 + }, + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } } ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Relationship Health" - }, - "properties": [ + }, { - "id": "custom.width", - "value": 203 + "matcher": { + "id": "byName", + "options": "Source Volume" + }, + "properties": [ + { + "id": "custom.width", + "value": 297 + }, + { + "id": "links", + "value": [ + { + "targetBlank": true, + "title": "", + "url": "/d/cdot-volume/ontap-volume?orgId=1&${Datacenter:queryparam}&${Cluster:queryparam}&${SVM:queryparam}&${__url_time_range}&var-Volume=${__value.raw}" + } + ] + } + ] }, { - "id": "mappings", - "value": [ + "matcher": { + "id": "byName", + "options": "Destination Volume" + }, + "properties": [ { - "options": { - "false": { - "color": "red", - "index": 1, - "text": "Unhealthy" - }, - "true": { - "color": "green", - "index": 0, - "text": "Healthy" + "id": "custom.width", + "value": 320 + }, + { + "id": "links", + "value": [ + { + "targetBlank": true, + "title": "", + "url": "/d/cdot-volume/ontap-volume?orgId=1&${Datacenter:queryparam}&${Cluster:queryparam}&${SVM:queryparam}&${__url_time_range}&var-Volume=${__value.raw}" } - }, - "type": "value" + ] } ] }, { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "color-background" - } + "matcher": { + "id": "byName", + "options": "Lag Duration (seconds)" + }, + "properties": [ + { + "id": "custom.width", + "value": 311 + }, + { + "id": "unit", + "value": "s" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Protection Policy" + }, + "properties": [ + { + "id": "custom.width", + "value": 322 + }, + { + "id": "mappings", + "value": [ + { + "options": { + "async_mirror": { + "index": 1, + "text": "Async Mirror" + }, + "automated_failover": { + "index": 4, + "text": "Automated Failover" + }, + "automated_failover_duplex": { + "index": 0, + "text": "Automated Failover Duplex" + }, + "mirror_vault": { + "index": 2, + "text": "Mirror Vault" + }, + "sync_mirror": { + "index": 5, + "text": "Sync" + }, + "vault": { + "index": 3, + "text": "Vault" + } + }, + "type": "value" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Source Path" + }, + "properties": [ + { + "id": "custom.width", + "value": 382 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Destination Path " + }, + "properties": [ + { + "id": "custom.width", + "value": 445 + } + ] } ] }, - { - "matcher": { - "id": "byName", - "options": "Source Path" + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 53 + }, + "id": 127, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false }, - "properties": [ - { - "id": "custom.width", - "value": 315 - } - ] + "showHeader": true, + "sortBy": [] }, - { - "matcher": { - "id": "byName", - "options": "Destination Path" + "pluginVersion": "8.1.8", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "snapmirror_lag_time{source_cluster=~\"$Cluster\",source_volume!=\"\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\"} * on(relationship_id) group_left(derived_relationship_type) snapmirror_labels{source_cluster=~\"$Cluster\",source_volume!=\"\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\"} > 0", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Protection Policy and Lag detail", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "derived_relationship_type", + "Value", + "destination_location", + "source_location" + ] + } + } }, - "properties": [ - { - "id": "custom.width", - "value": 363 + { + "id": "organize", + "options": { + "excludeByName": {}, + "includeByName": {}, + "indexByName": { + "Value": 3, + "derived_relationship_type": 2, + "destination_location": 1, + "source_location": 0 + }, + "renameByName": { + "Value": "Lag Duration (seconds)", + "derived_relationship_type": "Protection Policy", + "destination_location": "Destination Path ", + "destination_volume": "Destination Volume", + "source_location": "Source Path", + "source_volume": "Source Volume", + "volume": "" + } } - ] - } - ] - }, - "gridPos": { - "h": 10, - "w": 24, - "x": 0, - "y": 15 - }, - "id": 134, - "links": [], - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "enablePagination": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": false, - "displayName": "Relationship Health" - } - ] - }, - "pluginVersion": "10.3.1", - "targets": [ - { - "datasource": "${DS_PROMETHEUS}", - "editorMode": "code", - "exemplar": false, - "expr": "snapmirror_labels{source_cluster=~\"$Cluster\",source_volume=~\"$Volume\",source_vserver=~\"$SVM\",source_location=~\".*$ConsistencyGroup\",derived_relationship_type!=\"load_sharing\",relationship_id!=\"\"} ", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "D" - } - ], - "title": "Relationships", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "cluster", - "destination_location", - "group_type", - "healthy", - "policy_type", - "source_cluster", - "source_location" - ] - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": {}, - "includeByName": {}, - "indexByName": { - "Value": 15, - "cluster": 2, - "derived_relationship_type": 4, - "destination_location": 3, - "group_type": 5, - "healthy": 6, - "last_transfer_type": 7, - "policy_type": 8, - "protectedBy": 9, - "protectionSourceType": 10, - "relationship_id": 11, - "relationship_status": 12, - "relationship_type": 13, - "schedule": 14, - "source_cluster": 0, - "source_location": 1 }, - "renameByName": { - "cluster": "Destination Cluster", - "derived_relationship_type": "", - "destination_location": "Destination Path", - "group_type": "Group Type", - "healthy": "Relationship Health", - "policy_type": "Protection Policy", - "relationship_status": "", - "source_cluster": "Source Cluster", - "source_location": "Source Path" + { + "id": "calculateField", + "options": { + "alias": "Lag Duration Bucket", + "mode": "reduceRow", + "reduce": { + "include": [ + "Lag Duration (seconds)" + ], + "reducer": "last" + }, + "replaceFields": false + } } - } + ], + "type": "table" } ], - "type": "table" + "title": "Policy and Lag details", + "type": "row" } ], "refresh": "", @@ -890,7 +2468,7 @@ "current": { "selected": false, "text": "Prometheus", - "value": "Prometheus" + "value": "c6938c7d-3e1c-4ff1-9741-ef4164e5259a" }, "hide": 2, "includeAll": false, @@ -954,15 +2532,16 @@ "allValue": ".*", "current": {}, "datasource": "${DS_PROMETHEUS}", - "definition": "label_values(snapmirror_labels{source_cluster=~\"$SourceCluster\"}, source_vserver)", + "definition": "label_values(snapmirror_labels{source_cluster=~\"$Cluster\"},source_vserver)", "hide": 0, "includeAll": true, "multi": true, "name": "SVM", "options": [], "query": { - "query": "label_values(snapmirror_labels{source_cluster=~\"$SourceCluster\"}, source_vserver)", - "refId": "StandardVariableQuery" + "qryType": 1, + "query": "label_values(snapmirror_labels{source_cluster=~\"$Cluster\"},source_vserver)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 2, "regex": "", @@ -977,15 +2556,16 @@ "allValue": ".*", "current": {}, "datasource": "${DS_PROMETHEUS}", - "definition": "label_values(snapmirror_labels{source_cluster=~\"$SourceCluster\",source_vserver=~\"$SourceSVM\"}, source_volume)", + "definition": "label_values(snapmirror_labels{source_cluster=~\"$Cluster\", source_vserver=~\"$SVM\"},source_volume)", "hide": 0, "includeAll": true, "multi": true, "name": "Volume", "options": [], "query": { - "query": "label_values(snapmirror_labels{source_cluster=~\"$SourceCluster\",source_vserver=~\"$SourceSVM\"}, source_volume)", - "refId": "StandardVariableQuery" + "qryType": 1, + "query": "label_values(snapmirror_labels{source_cluster=~\"$Cluster\", source_vserver=~\"$SVM\"},source_volume)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 2, "regex": "", @@ -1000,15 +2580,16 @@ "allValue": ".*", "current": {}, "datasource": "${DS_PROMETHEUS}", - "definition": "label_values(snapmirror_labels{source_cluster=~\"$SourceCluster\",source_vserver=~\"$SourceSVM\", destination_vserver=~\"$DestinationSVM\"}, source_cg_name)", + "definition": "label_values(snapmirror_labels{source_cluster=~\"$Cluster\", source_vserver=~\"$SVM\"},source_cg_name)", "hide": 0, "includeAll": true, "multi": true, "name": "ConsistencyGroup", "options": [], "query": { - "query": "label_values(snapmirror_labels{source_cluster=~\"$SourceCluster\",source_vserver=~\"$SourceSVM\", destination_vserver=~\"$DestinationSVM\"}, source_cg_name)", - "refId": "StandardVariableQuery" + "qryType": 1, + "query": "label_values(snapmirror_labels{source_cluster=~\"$Cluster\", source_vserver=~\"$SVM\"},source_cg_name)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 2, "regex": "", @@ -1018,6 +2599,99 @@ "tagsQuery": "", "type": "query", "useTags": false + }, + { + "allValue": "1000000000000", + "current": { + "selected": false, + "text": "5", + "value": "5" + }, + "hide": 0, + "includeAll": true, + "multi": false, + "name": "TopResources", + "options": [ + { + "selected": false, + "text": "All", + "value": "$__all" + }, + { + "selected": false, + "text": "1", + "value": "1" + }, + { + "selected": false, + "text": "2", + "value": "2" + }, + { + "selected": false, + "text": "3", + "value": "3" + }, + { + "selected": false, + "text": "4", + "value": "4" + }, + { + "selected": true, + "text": "5", + "value": "5" + }, + { + "selected": false, + "text": "6", + "value": "6" + }, + { + "selected": false, + "text": "8", + "value": "8" + }, + { + "selected": false, + "text": "10", + "value": "10" + }, + { + "selected": false, + "text": "15", + "value": "15" + }, + { + "selected": false, + "text": "25", + "value": "25" + }, + { + "selected": false, + "text": "50", + "value": "50" + }, + { + "selected": false, + "text": "100", + "value": "100" + }, + { + "selected": false, + "text": "250", + "value": "250" + }, + { + "selected": false, + "text": "500", + "value": "500" + } + ], + "query": "1,2,3,4,5,6,8,10,15,25,50,100,250,500", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" } ] }, From 5cb1b2da798359f7e19725b39ba26d618c44c8c4 Mon Sep 17 00:00:00 2001 From: hardikl Date: Wed, 30 Oct 2024 20:51:20 +0530 Subject: [PATCH 6/9] feat: minor changes --- grafana/dashboards/cmode/snapmirror.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grafana/dashboards/cmode/snapmirror.json b/grafana/dashboards/cmode/snapmirror.json index eda42fa80..ed6f4693e 100644 --- a/grafana/dashboards/cmode/snapmirror.json +++ b/grafana/dashboards/cmode/snapmirror.json @@ -2468,7 +2468,7 @@ "current": { "selected": false, "text": "Prometheus", - "value": "c6938c7d-3e1c-4ff1-9741-ef4164e5259a" + "value": "Prometheus" }, "hide": 2, "includeAll": false, From 754c1f071e01d5f8ad69c8972cfa58b21f80d493 Mon Sep 17 00:00:00 2001 From: hardikl Date: Mon, 4 Nov 2024 14:45:04 +0530 Subject: [PATCH 7/9] feat: minor changes --- cmd/tools/grafana/dashboard_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/tools/grafana/dashboard_test.go b/cmd/tools/grafana/dashboard_test.go index a7a1f418f..2e730c4f3 100644 --- a/cmd/tools/grafana/dashboard_test.go +++ b/cmd/tools/grafana/dashboard_test.go @@ -1647,6 +1647,7 @@ func checkVariablesAreFSxFriendly(t *testing.T, path string, data []byte) { exceptionValues := map[string]bool{ "cmode/metadata.json": true, "cmode/snapmirror_destinations.json": true, + "cmode/snapmirror.json": true, } gjson.GetBytes(data, "templating.list").ForEach(func(key, value gjson.Result) bool { From 2426a59dcad224d11eb235db8139462bc4239362 Mon Sep 17 00:00:00 2001 From: hardikl Date: Mon, 4 Nov 2024 18:26:47 +0530 Subject: [PATCH 8/9] feat: handled review comments --- grafana/dashboards/cmode/snapmirror.json | 850 ++++-------------- .../cmode/snapmirror_destinations.json | 18 +- 2 files changed, 159 insertions(+), 709 deletions(-) diff --git a/grafana/dashboards/cmode/snapmirror.json b/grafana/dashboards/cmode/snapmirror.json index ed6f4693e..81b8dd260 100644 --- a/grafana/dashboards/cmode/snapmirror.json +++ b/grafana/dashboards/cmode/snapmirror.json @@ -111,144 +111,7 @@ }, { "datasource": "${DS_PROMETHEUS}", - "description": "Total number of volumes that are protected.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "short", - "unitScale": true - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 6, - "x": 0, - "y": 1 - }, - "id": 137, - "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": "sum(snapmirror_break_successful_count{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\"})+sum(snapmirror_resync_successful_count{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\"})+sum(snapmirror_update_successful_count{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\"})OR on() vector(0)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "Total Successful Count", - "type": "stat" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "Total number of volumes that are protected.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - } - ] - }, - "unit": "short", - "unitScale": true - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 6, - "x": 6, - "y": 1 - }, - "id": 138, - "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": "sum(snapmirror_break_failed_count{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\"})+sum(snapmirror_resync_failed_count{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\"})+sum(snapmirror_update_failed_count{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\"}) OR on() vector(0)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Total Failed Count", - "type": "stat" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "Number of unhealhty snapmirrors.", + "description": "Number of unhealthy snapmirrors.", "fieldConfig": { "defaults": { "color": { @@ -272,8 +135,8 @@ }, "gridPos": { "h": 5, - "w": 6, - "x": 12, + "w": 5, + "x": 0, "y": 1 }, "id": 139, @@ -290,352 +153,61 @@ "fields": "", "values": false }, - "showPercentChange": false, - "text": {}, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "8.1.8", - "targets": [ - { - "datasource": "${DS_PROMETHEUS}", - "editorMode": "code", - "exemplar": false, - "expr": "count (count by (relationship_id) (snapmirror_labels{source_cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\",healthy=\"false\",relationship_id!=\"\"}))", - "format": "time_series", - "hide": false, - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Unhealthy Count", - "type": "stat" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "Number of unhealhty snapmirrors.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "yellow", - "value": null - } - ] - }, - "unit": "short", - "unitScale": true - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 6, - "x": 18, - "y": 1 - }, - "id": 148, - "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(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\",type=\"rw\",state!=\"\"}) - count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\",type=\"rw\",state!=\"\",isProtected=\"true\",isDestinationOntap=\"true\", svm_root=\"false\"}) or vector(0)", - "format": "time_series", - "hide": false, - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Unprotected volumes count", - "type": "stat" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "Number of unhealhty snapmirrors.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "percent", - "unitScale": true - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 4, - "x": 0, - "y": 6 - }, - "id": 145, - "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": "100 * count(volume_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\",type=\"rw\",snapshot_policy!=\"none\"}) / count(volume_labels{cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\",type=\"rw\",snapshot_policy!=\"\",state!=\"\"}) or vector(0)", - "format": "time_series", - "hide": false, - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Snapshot copies (local)", - "type": "stat" - }, - { - "datasource": "${DS_PROMETHEUS}", - "description": "Volumes Protected With Snapmirror (Local And Remote).", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "fieldMinMax": false, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unitScale": true - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Scheduled Snapshot policy" - }, - "properties": [ - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Not Scheduled Snapshot policy" - }, - "properties": [ - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - } - ] - } - } - ] - } - ] - }, - "gridPos": { - "h": 5, - "w": 20, - "x": 4, - "y": 6 - }, - "id": 101, - "options": { - "displayMode": "basic", - "maxVizHeight": 300, - "minVizHeight": 16, - "minVizWidth": 8, - "namePlacement": "top", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showUnfilled": true, - "sizing": "manual", - "valueMode": "color" - }, - "pluginVersion": "8.1.8", - "targets": [ - { - "datasource": "${DS_PROMETHEUS}", - "editorMode": "code", - "exemplar": false, - "expr": "count(volume_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\",type=\"rw\",snapshot_policy!=\"none\"}) or vector(0)", - "format": "time_series", - "instant": true, - "interval": "", - "legendFormat": "Scheduled Snapshot policy", - "range": false, - "refId": "A" - }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "8.1.8", + "targets": [ { "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "count(volume_labels{cluster=~\"$Cluster\",type=\"rw\",svm=~\"$SVM\",volume=~\"$Volume\",snapshot_policy!=\"\",state!=\"\"}) or vector(0)", + "expr": "count (count by (relationship_id) (snapmirror_labels{source_cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\",healthy=\"false\",relationship_id!=\"\"}))", "format": "time_series", "hide": false, "instant": true, "interval": "", - "legendFormat": "Total", - "refId": "B" - } - ], - "title": "Snapshot copies (local)", - "transformations": [ - { - "id": "calculateField", - "options": { - "alias": "Not Scheduled Snapshot policy", - "binary": { - "left": "Total", - "operator": "-", - "right": "Scheduled Snapshot policy" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Time": true, - "Total": true - }, - "includeByName": {}, - "indexByName": {}, - "renameByName": {} - } + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" } ], - "type": "bargauge" + "title": "Unhealthy Relationships", + "type": "stat" }, { "datasource": "${DS_PROMETHEUS}", - "description": "Number of unhealhty snapmirrors.", + "description": "Total number of snapmirror transfers that have failed.", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "decimals": 0, "mappings": [], - "max": 100, - "min": 0, "noValue": "0", "thresholds": { "mode": "absolute", "steps": [ { - "color": "green", + "color": "red", "value": null } ] }, - "unit": "percent", + "unit": "short", "unitScale": true }, "overrides": [] }, "gridPos": { "h": 5, - "w": 4, - "x": 0, - "y": 11 + "w": 5, + "x": 5, + "y": 1 }, - "id": 146, + "id": 138, "links": [], "options": { "colorMode": "value", @@ -660,8 +232,8 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "100 * count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\",type=\"rw\",state!=\"\",isProtected=\"true\",isDestinationOntap=\"true\", svm_root=\"false\"}) / count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\",type=\"rw\",state!=\"\"}) or vector(0)", - "format": "time_series", + "expr": "sum(snapmirror_break_failed_count{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\".*$Volume.*\"})+sum(snapmirror_resync_failed_count{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\".*$Volume.*\"})+sum(snapmirror_update_failed_count{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\".*$Volume.*\"}) OR on() vector(0)", + "format": "table", "hide": false, "instant": true, "interval": "", @@ -670,80 +242,45 @@ "refId": "A" } ], - "title": "SnapMirror (local or remote)", + "title": "Failed SnapMirror Transfers", "type": "stat" }, { "datasource": "${DS_PROMETHEUS}", - "description": "Volumes Protected With Snapmirror (Local And Remote).", + "description": "Total number of snapmirror transfers that have been successfully completed without any errors or issues.", "fieldConfig": { "defaults": { "color": { - "mode": "continuous-GrYlRd" + "mode": "thresholds" }, "mappings": [], - "min": 0, + "noValue": "0", "thresholds": { "mode": "absolute", "steps": [ { - "color": "green", + "color": "semi-dark-green", "value": null - }, - { - "color": "red", - "value": 80 } ] }, + "unit": "short", "unitScale": true }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Protected" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "green", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Not Protected" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "red", - "mode": "fixed" - } - } - ] - } - ] + "overrides": [] }, "gridPos": { "h": 5, - "w": 20, - "x": 4, - "y": 11 + "w": 5, + "x": 10, + "y": 1 }, - "id": 135, + "id": 137, + "links": [], "options": { - "displayMode": "basic", - "maxVizHeight": 300, - "minVizHeight": 16, - "minVizWidth": 8, - "namePlacement": "auto", + "colorMode": "value", + "graphMode": "none", + "justifyMode": "center", "orientation": "horizontal", "reduceOptions": { "calcs": [ @@ -752,9 +289,10 @@ "fields": "", "values": false }, - "showUnfilled": true, - "sizing": "auto", - "valueMode": "color" + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true }, "pluginVersion": "8.1.8", "targets": [ @@ -762,95 +300,51 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\",type=\"rw\",state!=\"\"}) or vector(0)", - "format": "time_series", - "instant": true, - "interval": "", - "legendFormat": "Total", - "refId": "A" - }, - { - "datasource": "${DS_PROMETHEUS}", - "editorMode": "code", - "exemplar": false, - "expr": "count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\",type=\"rw\",state!=\"\",isProtected=\"true\",isDestinationOntap=\"true\", svm_root=\"false\"}) or vector(0)", - "format": "time_series", + "expr": "sum(snapmirror_break_successful_count{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\".*$Volume.*\"})+sum(snapmirror_resync_successful_count{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\".*$Volume.*\"})+sum(snapmirror_update_successful_count{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\".*$Volume.*\"})OR on() vector(0)", + "format": "table", "hide": false, "instant": true, "interval": "", - "legendFormat": "Protected", - "refId": "B" - } - ], - "title": "SnapMirror (local or remote)", - "transformations": [ - { - "id": "calculateField", - "options": { - "alias": "Not Protected", - "binary": { - "left": "Total", - "operator": "-", - "right": "Protected" - }, - "mode": "binary", - "reduce": { - "include": [ - "Protected" - ], - "reducer": "sum" - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Time": true, - "Total": true - }, - "includeByName": {}, - "indexByName": {}, - "renameByName": {} - } + "intervalFactor": 1, + "legendFormat": "", + "range": false, + "refId": "A" } ], - "type": "bargauge" + "title": "Successful SnapMirror Transfers", + "type": "stat" }, { "datasource": "${DS_PROMETHEUS}", - "description": "Number of unhealhty snapmirrors.", + "description": "Number of unprotected volumes.", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "decimals": 0, "mappings": [], - "max": 100, - "min": 0, "noValue": "0", "thresholds": { "mode": "absolute", "steps": [ { - "color": "green", + "color": "yellow", "value": null } ] }, - "unit": "percent", + "unit": "short", "unitScale": true }, "overrides": [] }, "gridPos": { "h": 5, - "w": 4, - "x": 0, - "y": 16 + "w": 5, + "x": 15, + "y": 1 }, - "id": 147, + "id": 148, "links": [], "options": { "colorMode": "value", @@ -875,7 +369,7 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "100 * count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\",state!=\"\",isProtected=\"true\",isDestinationCloud=\"true\"}) / count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"}) or vector(0)", + "expr": "count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\",type=\"rw\",state!=\"\"}) - count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\".*$Volume.*\",type=\"rw\",state!=\"\",isProtected=\"true\",isDestinationOntap=\"true\", svm_root=\"false\"}) or vector(0)", "format": "time_series", "hide": false, "instant": true, @@ -885,19 +379,19 @@ "refId": "A" } ], - "title": "Back up to cloud", + "title": "Unprotected Volumes", "type": "stat" }, { "datasource": "${DS_PROMETHEUS}", - "description": "Volumes Protected With Snapmirror (Local And Remote).", + "description": "Number of protected volumes.", "fieldConfig": { "defaults": { "color": { - "mode": "continuous-GrYlRd" + "mode": "thresholds" }, "mappings": [], - "min": 0, + "noValue": "0", "thresholds": { "mode": "absolute", "steps": [ @@ -911,13 +405,14 @@ } ] }, + "unit": "short", "unitScale": true }, "overrides": [ { "matcher": { "id": "byName", - "options": "Backed Up" + "options": "Protected" }, "properties": [ { @@ -928,37 +423,21 @@ } } ] - }, - { - "matcher": { - "id": "byName", - "options": "Not Backed Up" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "red", - "mode": "fixed" - } - } - ] } ] }, "gridPos": { "h": 5, - "w": 20, - "x": 4, - "y": 16 + "w": 4, + "x": 20, + "y": 1 }, - "id": 136, + "id": 145, + "links": [], "options": { - "displayMode": "basic", - "maxVizHeight": 300, - "minVizHeight": 16, - "minVizWidth": 8, - "namePlacement": "auto", + "colorMode": "value", + "graphMode": "none", + "justifyMode": "center", "orientation": "horizontal", "reduceOptions": { "calcs": [ @@ -967,9 +446,10 @@ "fields": "", "values": false }, - "showUnfilled": true, - "sizing": "auto", - "valueMode": "color" + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true }, "pluginVersion": "8.1.8", "targets": [ @@ -977,7 +457,7 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\"}) or vector(0)", + "expr": "count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\",type=\"rw\",state!=\"\"}) or vector(0)", "format": "time_series", "instant": true, "interval": "", @@ -988,28 +468,32 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\",state!=\"\",isProtected=\"true\",isDestinationCloud=\"true\"}) or vector(0)", + "expr": "count(volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\",type=\"rw\",state!=\"\",isProtected=\"true\",isDestinationOntap=\"true\", svm_root=\"false\"}) or vector(0)", "format": "time_series", "hide": false, "instant": true, "interval": "", - "legendFormat": "Backed Up", + "legendFormat": "Protected", "refId": "B" } ], - "title": "Back up to cloud", + "title": "Protected Volumes", "transformations": [ { "id": "calculateField", "options": { - "alias": "Not Backed Up", + "alias": "Not Protected", "binary": { "left": "Total", "operator": "-", - "right": "Backed Up" + "reducer": "sum", + "right": "Protected" }, "mode": "binary", "reduce": { + "include": [ + "Protected" + ], "reducer": "sum" } } @@ -1017,21 +501,28 @@ { "id": "organize", "options": { + "colorMode": "value", "excludeByName": { + "Not Protected": true, "Time": true, "Total": true }, + "graphMode": "area", "includeByName": {}, "indexByName": {}, - "renameByName": {} + "justifyMode": "auto", + "orientation": "horizontal", + "renameByName": {}, + "text": {}, + "textMode": "auto" } } ], - "type": "bargauge" + "type": "stat" }, { "datasource": "${DS_PROMETHEUS}", - "description": "This panel displays detail of all the snapmirror relationships from destination side of view.", + "description": "This panel displays detail of all the snapmirror relationships from source side of view.", "fieldConfig": { "defaults": { "color": { @@ -1039,11 +530,8 @@ }, "custom": { "align": "left", - "cellOptions": { - "type": "auto" - }, - "filterable": true, - "inspect": false + "displayMode": "auto", + "filterable": true }, "decimals": 2, "fieldMinMax": true, @@ -1221,11 +709,8 @@ ] }, { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "color-background" - } + "id": "custom.displayMode", + "value": "color-background" } ] }, @@ -1260,11 +745,8 @@ }, "properties": [ { - "id": "custom.cellOptions", - "value": { - "mode": "lcd", - "type": "gauge" - } + "id": "custom.displayMode", + "value": "lcd-gauge" }, { "id": "unit", @@ -1294,11 +776,8 @@ }, "properties": [ { - "id": "custom.cellOptions", - "value": { - "mode": "lcd", - "type": "gauge" - } + "id": "custom.displayMode", + "value": "lcd-gauge" }, { "id": "unit", @@ -1328,11 +807,8 @@ }, "properties": [ { - "id": "custom.cellOptions", - "value": { - "mode": "lcd", - "type": "gauge" - } + "id": "custom.displayMode", + "value": "lcd-gauge" }, { "id": "mappings", @@ -1361,7 +837,7 @@ "h": 10, "w": 24, "x": 0, - "y": 21 + "y": 6 }, "id": 134, "links": [], @@ -1390,49 +866,49 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "snapmirror_labels{source_cluster=~\"$Cluster\",source_volume=~\"$Volume\",source_vserver=~\"$SVM\",source_location=~\".*$ConsistencyGroup\",derived_relationship_type!=\"load_sharing\",relationship_id!=\"\"} ", + "expr": "snapmirror_last_transfer_duration{source_cluster=~\"$Cluster\",source_volume=~\".*$Volume.*\",source_vserver=~\"$SVM\",relationship_id!=\"\"}", "format": "table", "hide": false, "instant": true, - "interval": "", - "legendFormat": "", - "refId": "A" + "legendFormat": "__auto", + "range": false, + "refId": "B" }, { "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "snapmirror_last_transfer_duration{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",source_volume=~\"$Volume\",source_vserver=~\"$SVM\",source_location=~\".*$ConsistencyGroup\",relationship_id!=\"\"}", + "expr": "snapmirror_last_transfer_size{source_cluster=~\"$Cluster\", source_volume=~\".*$Volume.*\",source_vserver=~\"$SVM\",relationship_id!=\"\"}", "format": "table", "hide": false, "instant": true, "legendFormat": "__auto", "range": false, - "refId": "B" + "refId": "C" }, { "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "snapmirror_last_transfer_size{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", source_volume=~\"$Volume\",source_vserver=~\"$SVM\",source_location=~\".*$ConsistencyGroup\",relationship_id!=\"\"}", + "expr": "snapmirror_lag_time{source_cluster=~\"$Cluster\",source_volume=~\".*$Volume.*\",source_vserver=~\"$SVM\",relationship_id!=\"\"}", "format": "table", "hide": false, "instant": true, "legendFormat": "__auto", "range": false, - "refId": "C" + "refId": "D" }, { "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "snapmirror_lag_time{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",source_volume=~\"$Volume\",source_vserver=~\"$SVM\",source_location=~\".*$ConsistencyGroup\",relationship_id!=\"\"}", + "expr": "snapmirror_labels{source_cluster=~\"$Cluster\",source_volume=~\".*$Volume.*\",source_vserver=~\"$SVM\",derived_relationship_type!=\"load_sharing\",relationship_id!=\"\"} ", "format": "table", "hide": false, "instant": true, - "legendFormat": "__auto", - "range": false, - "refId": "D" + "interval": "", + "legendFormat": "", + "refId": "A" } ], "title": "Relationships", @@ -1504,7 +980,7 @@ }, { "datasource": "${DS_PROMETHEUS}", - "description": "Must select Source Volume/Destination Volume for detail of single relationship.", + "description": "This panel displays duration of the last SnapMirror transfer in seconds.", "fieldConfig": { "defaults": { "color": { @@ -1567,7 +1043,7 @@ "h": 9, "w": 8, "x": 0, - "y": 31 + "y": 16 }, "id": 140, "options": { @@ -1594,7 +1070,7 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "snapmirror_last_transfer_duration{source_cluster=~\"$Cluster\",source_volume=~\"$Volume\",source_vserver=~\"$SVM\",source_location=~\".*$ConsistencyGroup\"}\nand\ntopk($TopResources, avg_over_time(snapmirror_last_transfer_duration{source_cluster=~\"$Cluster\",source_volume=~\"$Volume\",source_vserver=~\"$SVM\",source_location=~\".*$ConsistencyGroup\"}[3h] @ end()))", + "expr": "snapmirror_last_transfer_duration{source_cluster=~\"$Cluster\",source_volume=~\".*$Volume.*\",source_vserver=~\"$SVM\"}\nand\ntopk($TopResources, avg_over_time(snapmirror_last_transfer_duration{source_cluster=~\"$Cluster\",source_volume=~\".*$Volume.*\",source_vserver=~\"$SVM\"}[3h] @ end()))", "hide": false, "interval": "", "legendFormat": "{{source_location}} -> {{destination_location}}", @@ -1609,7 +1085,7 @@ }, { "datasource": "${DS_PROMETHEUS}", - "description": "Must select Source Volume/Destination Volume for detail of single relationship.", + "description": "This panel displays amount of time since the last snapmirror transfer in seconds.", "fieldConfig": { "defaults": { "color": { @@ -1673,7 +1149,7 @@ "h": 9, "w": 8, "x": 8, - "y": 31 + "y": 16 }, "id": 141, "options": { @@ -1700,7 +1176,7 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "snapmirror_lag_time{source_cluster=~\"$Cluster\",source_volume=~\"$Volume\",source_vserver=~\"$SVM\",source_location=~\".*$ConsistencyGroup\"}\nand\ntopk($TopResources, avg_over_time(snapmirror_lag_time{source_cluster=~\"$Cluster\",source_volume=~\"$Volume\",source_vserver=~\"$SVM\",source_location=~\".*$ConsistencyGroup\"}[3h] @ end()))", + "expr": "snapmirror_lag_time{source_cluster=~\"$Cluster\",source_volume=~\".*$Volume.*\",source_vserver=~\"$SVM\"}\nand\ntopk($TopResources, avg_over_time(snapmirror_lag_time{source_cluster=~\"$Cluster\",source_volume=~\".*$Volume.*\",source_vserver=~\"$SVM\"}[3h] @ end()))", "hide": false, "interval": "", "legendFormat": "{{source_location}} -> {{destination_location}}", @@ -1715,7 +1191,7 @@ }, { "datasource": "${DS_PROMETHEUS}", - "description": "Must select Source Volume/Destination Volume for detail of single relationship.", + "description": "This panel displays size in kilobytes (1024 bytes) of the last transfer.", "fieldConfig": { "defaults": { "color": { @@ -1778,7 +1254,7 @@ "h": 9, "w": 8, "x": 16, - "y": 31 + "y": 16 }, "id": 142, "options": { @@ -1805,7 +1281,7 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "snapmirror_last_transfer_size{source_cluster=~\"$Cluster\",source_volume=~\"$Volume\",source_vserver=~\"$SVM\",source_location=~\".*$ConsistencyGroup\"}\nand\ntopk($TopResources, avg_over_time(snapmirror_last_transfer_size{source_cluster=~\"$Cluster\",source_volume=~\"$Volume\",source_vserver=~\"$SVM\",source_location=~\".*$ConsistencyGroup\"}[3h] @ end()))", + "expr": "snapmirror_last_transfer_size{source_cluster=~\"$Cluster\",source_volume=~\".*$Volume.*\",source_vserver=~\"$SVM\"}\nand\ntopk($TopResources, avg_over_time(snapmirror_last_transfer_size{source_cluster=~\"$Cluster\",source_volume=~\".*$Volume.*\",source_vserver=~\"$SVM\"}[3h] @ end()))", "hide": false, "interval": "", "legendFormat": "{{source_location}} -> {{destination_location}}", @@ -1825,7 +1301,7 @@ "h": 1, "w": 24, "x": 0, - "y": 40 + "y": 25 }, "id": 45, "panels": [ @@ -1886,7 +1362,7 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "count(snapmirror_labels{source_cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\",derived_relationship_type=\"extended_data_protection\"}) or vector(0)", + "expr": "count(snapmirror_labels{source_cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\".*$Volume.*\",derived_relationship_type=\"extended_data_protection\",relationship_id!=\"\"}) or vector(0)", "instant": true, "interval": "", "legendFormat": "Asynchronous Mirror", @@ -1896,7 +1372,7 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "count(snapmirror_labels{source_cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\",derived_relationship_type=\"mirror_vault\"}) or vector(0)", + "expr": "count(snapmirror_labels{source_cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\".*$Volume.*\",derived_relationship_type=\"mirror_vault\",relationship_id!=\"\"}) or vector(0)", "hide": false, "instant": true, "interval": "", @@ -1907,7 +1383,7 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "count(snapmirror_labels{source_cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\",derived_relationship_type=\"vault\"}) or vector(0)", + "expr": "count(snapmirror_labels{source_cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\".*$Volume.*\",derived_relationship_type=\"vault\",relationship_id!=\"\"}) or vector(0)", "hide": false, "instant": true, "interval": "", @@ -1918,7 +1394,7 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "count(snapmirror_labels{source_cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\",derived_relationship_type=\"sync_mirror_strict\"}) or vector(0)", + "expr": "count(snapmirror_labels{source_cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\".*$Volume.*\",derived_relationship_type=\"sync_mirror_strict\",relationship_id!=\"\"}) or vector(0)", "hide": false, "instant": true, "interval": "", @@ -1929,7 +1405,7 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "count(snapmirror_labels{source_cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\",derived_relationship_type=\"sync_mirror\"}) or vector(0)", + "expr": "count(snapmirror_labels{source_cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\".*$Volume.*\",derived_relationship_type=\"sync_mirror\",relationship_id!=\"\"}) or vector(0)", "hide": false, "instant": true, "interval": "", @@ -1940,7 +1416,7 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "count(snapmirror_labels{source_cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\",derived_relationship_type=\"automated_failover\"}) or vector(0)", + "expr": "count(snapmirror_labels{source_cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\".*$Volume.*\",derived_relationship_type=\"automated_failover\",relationship_id!=\"\"}) or vector(0)", "hide": false, "instant": true, "interval": "", @@ -1951,7 +1427,7 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "count(snapmirror_labels{source_cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\",derived_relationship_type=\"automated_failover_duplex\"}) or vector(0)", + "expr": "count(snapmirror_labels{source_cluster=~\"$Cluster\",source_vserver=~\"$SVM\",source_volume=~\".*$Volume.*\",derived_relationship_type=\"automated_failover_duplex\",relationship_id!=\"\"}) or vector(0)", "hide": false, "instant": true, "interval": "", @@ -1959,13 +1435,13 @@ "refId": "G" } ], - "title": "Count by Protection Policy", + "title": "Relationships by Protection Policy", "transformations": [], "type": "piechart" }, { "datasource": "${DS_PROMETHEUS}", - "description": "Volume Relationships Experiencing Lag.", + "description": "This panel displays volume relationship count based on the lag time bucket.", "fieldConfig": { "defaults": { "color": { @@ -2081,7 +1557,7 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "count((1 < snapmirror_lag_time{source_cluster=~\"$Cluster\", source_volume!=\"\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\"} <= 900)) or vector(0)", + "expr": "count((1 < snapmirror_lag_time{source_cluster=~\"$Cluster\", source_volume!=\"\",source_vserver=~\"$SVM\",source_volume=~\".*$Volume.*\",relationship_id!=\"\"} <= 900)) or vector(0)", "instant": true, "interval": "", "legendFormat": "<=15 minutes", @@ -2091,7 +1567,7 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "count((900 < snapmirror_lag_time{source_cluster=~\"$Cluster\", source_volume!=\"\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\"} <= 1800)) or vector(0)", + "expr": "count((900 < snapmirror_lag_time{source_cluster=~\"$Cluster\", source_volume!=\"\",source_vserver=~\"$SVM\",source_volume=~\".*$Volume.*\",relationship_id!=\"\"} <= 1800)) or vector(0)", "hide": false, "instant": true, "interval": "", @@ -2102,7 +1578,7 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "count((1800 < snapmirror_lag_time{source_cluster=~\"$Cluster\", source_volume!=\"\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\"} <= 3600)) or vector(0)", + "expr": "count((1800 < snapmirror_lag_time{source_cluster=~\"$Cluster\", source_volume!=\"\",source_vserver=~\"$SVM\",source_volume=~\".*$Volume.*\",relationship_id!=\"\"} <= 3600)) or vector(0)", "hide": false, "instant": true, "interval": "", @@ -2113,7 +1589,7 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "count((snapmirror_lag_time{ source_cluster=~\"$Cluster\",source_volume!=\"\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\"} > 3600)) or vector(0)", + "expr": "count((snapmirror_lag_time{ source_cluster=~\"$Cluster\",source_volume!=\"\",source_vserver=~\"$SVM\",source_volume=~\".*$Volume.*\",relationship_id!=\"\"} > 3600)) or vector(0)", "hide": false, "instant": true, "interval": "", @@ -2121,13 +1597,13 @@ "refId": "D" } ], - "title": "Lag Status", + "title": "Relationships by Lag time", "transformations": [], "type": "piechart" }, { "datasource": "${DS_PROMETHEUS}", - "description": "This panel displays snapmirror relationships with lag duration details.", + "description": "This panel displays snapmirror relationships with protection policy and lag duration details.", "fieldConfig": { "defaults": { "color": { @@ -2223,10 +1699,8 @@ "value": 275 }, { - "id": "custom.cellOptions", - "value": { - "type": "color-background" - } + "id": "custom.displayMode", + "value": "color-background-solid" } ] }, @@ -2388,7 +1862,7 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "snapmirror_lag_time{source_cluster=~\"$Cluster\",source_volume!=\"\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\"} * on(relationship_id) group_left(derived_relationship_type) snapmirror_labels{source_cluster=~\"$Cluster\",source_volume!=\"\",source_vserver=~\"$SVM\",source_volume=~\"$Volume\"} > 0", + "expr": "snapmirror_lag_time{source_cluster=~\"$Cluster\",source_volume!=\"\",source_vserver=~\"$SVM\",source_volume=~\".*$Volume.*\"} * on(source_cluster,source_vserver,source_volume) group_left(derived_relationship_type) snapmirror_labels{source_cluster=~\"$Cluster\",source_volume!=\"\",source_vserver=~\"$SVM\",source_volume=~\".*$Volume.*\"} > 0", "format": "table", "instant": true, "interval": "", @@ -2568,31 +2042,7 @@ "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": ".*", - "current": {}, - "datasource": "${DS_PROMETHEUS}", - "definition": "label_values(snapmirror_labels{source_cluster=~\"$Cluster\", source_vserver=~\"$SVM\"},source_cg_name)", - "hide": 0, - "includeAll": true, - "multi": true, - "name": "ConsistencyGroup", - "options": [], - "query": { - "qryType": 1, - "query": "label_values(snapmirror_labels{source_cluster=~\"$Cluster\", source_vserver=~\"$SVM\"},source_cg_name)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "refresh": 2, - "regex": "", + "regex": "^[a-zA-Z0-9~@#$^*()_+=[\\]{}|\\\\.?: -]*$", "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", diff --git a/grafana/dashboards/cmode/snapmirror_destinations.json b/grafana/dashboards/cmode/snapmirror_destinations.json index 3ed00e7bc..d3799022c 100644 --- a/grafana/dashboards/cmode/snapmirror_destinations.json +++ b/grafana/dashboards/cmode/snapmirror_destinations.json @@ -185,7 +185,7 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "count(snapmirror_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",destination_volume=~\".*$Volume.*\",destination_vserver=~\"$SVM\",healthy=\"false\",relationship_id!=\"\"}) or vector (0)", + "expr": "count(snapmirror_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",destination_volume=~\".*$Volume.*\",destination_vserver=~\"$SVM\",destination_location=~\".*$ConsistencyGroup\",healthy=\"false\",relationship_id!=\"\"}) or vector (0)", "format": "time_series", "hide": false, "instant": true, @@ -254,7 +254,7 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "count(snapmirror_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",destination_vserver=~\"$SVM\",destination_volume=~\".*$Volume.*\",derived_relationship_type=\"extended_data_protection\",relationship_id!=\"\"}) or vector(0)", + "expr": "count(snapmirror_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",destination_vserver=~\"$SVM\",destination_volume=~\".*$Volume.*\",destination_location=~\".*$ConsistencyGroup\",derived_relationship_type=\"extended_data_protection\",relationship_id!=\"\"}) or vector(0)", "instant": true, "interval": "", "legendFormat": "Asynchronous Mirror", @@ -264,7 +264,7 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "count(snapmirror_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",destination_vserver=~\"$SVM\",destination_volume=~\".*$Volume.*\",derived_relationship_type=\"mirror_vault\",relationship_id!=\"\"}) or vector(0)", + "expr": "count(snapmirror_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",destination_vserver=~\"$SVM\",destination_volume=~\".*$Volume.*\",destination_location=~\".*$ConsistencyGroup\",derived_relationship_type=\"mirror_vault\",relationship_id!=\"\"}) or vector(0)", "hide": false, "instant": true, "interval": "", @@ -275,7 +275,7 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "count(snapmirror_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",destination_vserver=~\"$SVM\",destination_volume=~\".*$Volume.*\",derived_relationship_type=\"vault\",relationship_id!=\"\"}) or vector(0)", + "expr": "count(snapmirror_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",destination_vserver=~\"$SVM\",destination_volume=~\".*$Volume.*\",destination_location=~\".*$ConsistencyGroup\",derived_relationship_type=\"vault\",relationship_id!=\"\"}) or vector(0)", "hide": false, "instant": true, "interval": "", @@ -286,7 +286,7 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "count(snapmirror_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",destination_vserver=~\"$SVM\",destination_volume=~\".*$Volume.*\",derived_relationship_type=\"sync_mirror_strict\",relationship_id!=\"\"}) or vector(0)", + "expr": "count(snapmirror_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",destination_vserver=~\"$SVM\",destination_volume=~\".*$Volume.*\",destination_location=~\".*$ConsistencyGroup\",derived_relationship_type=\"sync_mirror_strict\",relationship_id!=\"\"}) or vector(0)", "hide": false, "instant": true, "interval": "", @@ -297,7 +297,7 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "count(snapmirror_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",destination_vserver=~\"$SVM\",destination_volume=~\".*$Volume.*\",derived_relationship_type=\"sync_mirror\",relationship_id!=\"\"}) or vector(0)", + "expr": "count(snapmirror_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",destination_vserver=~\"$SVM\",destination_volume=~\".*$Volume.*\",destination_location=~\".*$ConsistencyGroup\",derived_relationship_type=\"sync_mirror\",relationship_id!=\"\"}) or vector(0)", "hide": false, "instant": true, "interval": "", @@ -308,7 +308,7 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "count(snapmirror_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",destination_vserver=~\"$SVM\",destination_volume=~\".*$Volume.*\",derived_relationship_type=\"automated_failover\",relationship_id!=\"\"}) or vector(0)", + "expr": "count(snapmirror_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",destination_vserver=~\"$SVM\",destination_volume=~\".*$Volume.*\",destination_location=~\".*$ConsistencyGroup\",derived_relationship_type=\"automated_failover\",relationship_id!=\"\"}) or vector(0)", "hide": false, "instant": true, "interval": "", @@ -319,7 +319,7 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "count(snapmirror_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",destination_vserver=~\"$SVM\",destination_volume=~\".*$Volume.*\",derived_relationship_type=\"automated_failover_duplex\",relationship_id!=\"\"}) or vector(0)", + "expr": "count(snapmirror_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",destination_vserver=~\"$SVM\",destination_volume=~\".*$Volume.*\",destination_location=~\".*$ConsistencyGroup\",derived_relationship_type=\"automated_failover_duplex\",relationship_id!=\"\"}) or vector(0)", "hide": false, "instant": true, "interval": "", @@ -385,7 +385,7 @@ "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "count(snapmirror_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",destination_volume=~\".*$Volume.*\",destination_vserver=~\"$SVM\",healthy=\"true\",relationship_id!=\"\"}) or vector (0)", + "expr": "count(snapmirror_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",destination_volume=~\".*$Volume.*\",destination_vserver=~\"$SVM\",healthy=\"true\",destination_location=~\".*$ConsistencyGroup\",relationship_id!=\"\"}) or vector (0)", "format": "time_series", "hide": false, "instant": true, From 1b93f77bc9234d128c5123289ff6f5fadc85448c Mon Sep 17 00:00:00 2001 From: hardikl Date: Mon, 4 Nov 2024 20:10:07 +0530 Subject: [PATCH 9/9] feat: handled schema version --- grafana/dashboards/cmode/snapmirror.json | 59 +++++++++++------------- 1 file changed, 27 insertions(+), 32 deletions(-) diff --git a/grafana/dashboards/cmode/snapmirror.json b/grafana/dashboards/cmode/snapmirror.json index 81b8dd260..59046e3f5 100644 --- a/grafana/dashboards/cmode/snapmirror.json +++ b/grafana/dashboards/cmode/snapmirror.json @@ -128,8 +128,7 @@ } ] }, - "unit": "short", - "unitScale": true + "unit": "short" }, "overrides": [] }, @@ -196,8 +195,7 @@ } ] }, - "unit": "short", - "unitScale": true + "unit": "short" }, "overrides": [] }, @@ -264,8 +262,7 @@ } ] }, - "unit": "short", - "unitScale": true + "unit": "short" }, "overrides": [] }, @@ -333,8 +330,7 @@ } ] }, - "unit": "short", - "unitScale": true + "unit": "short" }, "overrides": [] }, @@ -405,8 +401,7 @@ } ] }, - "unit": "short", - "unitScale": true + "unit": "short" }, "overrides": [ { @@ -534,7 +529,6 @@ "filterable": true }, "decimals": 2, - "fieldMinMax": true, "links": [], "mappings": [], "min": 0, @@ -546,8 +540,7 @@ "value": null } ] - }, - "unitScale": true + } }, "overrides": [ { @@ -987,9 +980,6 @@ "mode": "palette-classic" }, "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -1001,7 +991,6 @@ "tooltip": false, "viz": false }, - "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -1034,8 +1023,7 @@ } ] }, - "unit": "s", - "unitScale": true + "unit": "s" }, "overrides": [] }, @@ -1092,9 +1080,6 @@ "mode": "palette-classic" }, "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -1106,7 +1091,6 @@ "tooltip": false, "viz": false }, - "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -1140,8 +1124,7 @@ } ] }, - "unit": "s", - "unitScale": true + "unit": "s" }, "overrides": [] }, @@ -1198,9 +1181,6 @@ "mode": "palette-classic" }, "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -1212,7 +1192,6 @@ "tooltip": false, "viz": false }, - "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -1245,8 +1224,7 @@ } ] }, - "unit": "bytes", - "unitScale": true + "unit": "bytes" }, "overrides": [] }, @@ -1930,7 +1908,7 @@ } ], "refresh": "", - "schemaVersion": 39, + "schemaVersion": 30, "tags": [ "harvest", "ontap", @@ -1944,6 +1922,8 @@ "text": "Prometheus", "value": "Prometheus" }, + "description": null, + "error": null, "hide": 2, "includeAll": false, "label": "Data Source", @@ -1957,12 +1937,15 @@ "type": "datasource" }, { + "allValue": null, "current": {}, "datasource": "${DS_PROMETHEUS}", "definition": "label_values(cluster_new_status{system_type!=\"7mode\"},datacenter)", "description": "Select all the datacenters that contain the ONTAP clusters acting as source for SnapMirror relationships.", + "error": null, "hide": 0, "includeAll": false, + "label": null, "multi": true, "name": "Datacenter", "options": [], @@ -1984,8 +1967,11 @@ "current": {}, "datasource": "${DS_PROMETHEUS}", "definition": "query_result(snapmirror_labels{system_type!=\"7mode\"} * on (source_volume, source_vserver, source_cluster) group_left() label_replace( label_replace( label_replace( volume_labels{system_type!=\"7mode\",datacenter=~\"$Datacenter\"}, \"source_volume\", \"$1\", \"volume\", \"(.*)\") , \"source_vserver\", \"$1\", \"svm\", \"(.*)\"), \"source_cluster\", \"$1\", \"cluster\", \"(.*)\"))", + "description": null, + "error": null, "hide": 0, "includeAll": true, + "label": null, "multi": true, "name": "Cluster", "options": [], @@ -2007,8 +1993,11 @@ "current": {}, "datasource": "${DS_PROMETHEUS}", "definition": "label_values(snapmirror_labels{source_cluster=~\"$Cluster\"},source_vserver)", + "description": null, + "error": null, "hide": 0, "includeAll": true, + "label": null, "multi": true, "name": "SVM", "options": [], @@ -2031,8 +2020,11 @@ "current": {}, "datasource": "${DS_PROMETHEUS}", "definition": "label_values(snapmirror_labels{source_cluster=~\"$Cluster\", source_vserver=~\"$SVM\"},source_volume)", + "description": null, + "error": null, "hide": 0, "includeAll": true, + "label": null, "multi": true, "name": "Volume", "options": [], @@ -2057,8 +2049,11 @@ "text": "5", "value": "5" }, + "description": null, + "error": null, "hide": 0, "includeAll": true, + "label": null, "multi": false, "name": "TopResources", "options": [