Skip to content

Commit

Permalink
feat: remove hidden topk variables from dashboards (#2881)
Browse files Browse the repository at this point in the history
* feat: remove hidden topk variables from dashboards

* feat: remove hidden topk variables from dashboards

* feat: remove hidden topk variables from dashboards
  • Loading branch information
rahulguptajss authored May 9, 2024
1 parent e7b1755 commit efa3ed2
Show file tree
Hide file tree
Showing 11 changed files with 883 additions and 1,292 deletions.
3 changes: 3 additions & 0 deletions cmd/tools/grafana/dashboard_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,9 @@ func TestUnitsAndExprMatch(t *testing.T) {
"volume_space_logical_used": {"bytes", "binBps"}, // Growth rate uses bytes/sec unit
"qos_ops": {"iops", "percent"},
"qos_total_data": {"Bps", "percent"},
"aggr_space_used": {"bytes", "percent"},
"volume_size_used": {"bytes", "percent"},
"volume_num_compress_fail": {"short", "percent"},
}

// Normalize rates to their base unit
Expand Down
120 changes: 14 additions & 106 deletions grafana/dashboards/cmode/cdot.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"gnetId": null,
"graphTooltip": 1,
"id": null,
"iteration": 1705046370160,
"iteration": 1715167086280,
"links": [
{
"asDropdown": true,
Expand Down Expand Up @@ -751,7 +751,7 @@
"targets": [
{
"exemplar": false,
"expr": "topk($TopResources, (100 * sum by (cluster, svm) (volume_size_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$TopSVMUsed\"}) / sum by (cluster, svm) (volume_size_total{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$TopSVMUsed\"})))",
"expr": "(\n 100 * sum by (datacenter,cluster, svm) (\n volume_size_used{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\"}\n )\n / on(datacenter, cluster, svm)\n sum by (datacenter,cluster, svm) (\n volume_size_total{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\"}\n )\n)\nand on(datacenter,cluster, svm)\ntopk(\n $TopResources,\n (\n 100 * sum by (datacenter,cluster, svm) (\n avg_over_time(volume_size_used{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\"}[3h] @ end())\n )\n / on(datacenter,cluster, svm)\n sum by (datacenter,cluster, svm) (\n avg_over_time(volume_size_total{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\"}[3h] @ end())\n )\n )\n * on(datacenter,cluster, svm) group_left\n svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", root_svm=~\"No|$IncludeRoot\"}\n)",
"format": "table",
"instant": true,
"interval": "",
Expand Down Expand Up @@ -883,7 +883,7 @@
"targets": [
{
"exemplar": false,
"expr": "topk($TopResources, (100 * volume_size_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$TopVolumeUsed\"} / volume_size_total{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$TopVolumeUsed\"}))",
"expr": "(\n 100 * volume_size_used{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\",volume=~\"$Volume\"} \n / on(datacenter,cluster,svm,aggr,node,volume) \n volume_size_total{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\",volume=~\"$Volume\"}\n)\nand on(datacenter,cluster, svm,aggr,node, volume)\ntopk(\n $TopResources,\n (\n (100 * avg_over_time(volume_size_used{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\",volume=~\"$Volume\"}[3h] @ end())) \n / on(datacenter,cluster,svm,aggr,node,volume) \n avg_over_time(volume_size_total{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\",volume=~\"$Volume\"}[3h] @ end())\n )\n * on(datacenter,cluster, svm, aggr,node,volume) group_left\n volume_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", volume=~\"$Volume\",root_volume=~\"No|$IncludeRoot\"}\n)",
"format": "table",
"instant": true,
"interval": "",
Expand Down Expand Up @@ -1015,7 +1015,7 @@
"targets": [
{
"exemplar": false,
"expr": "topk($TopResources, (100 * aggr_space_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",aggr=~\"$TopAggrUsed\"} / aggr_space_total{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",aggr=~\"$TopAggrUsed\"}))",
"expr": "(\n 100 * aggr_space_used{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\"} \n / on(datacenter,cluster,aggr) \n aggr_space_total{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\"}\n)\nand on(datacenter,cluster, aggr)\ntopk(\n $TopResources,\n (\n (100 * avg_over_time(aggr_space_used{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\"}[3h] @ end())) \n / on(datacenter,cluster,aggr) \n avg_over_time(aggr_space_total{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\"}[3h] @ end())\n )\n)",
"format": "table",
"instant": true,
"interval": "",
Expand Down Expand Up @@ -1123,7 +1123,7 @@
"x": 0,
"y": 9
},
"id": 265,
"id": 272,
"options": {
"legend": {
"calcs": [
Expand All @@ -1144,7 +1144,7 @@
"targets": [
{
"exemplar": false,
"expr": "topk($TopResources, (100 * sum by (cluster, svm) (volume_size_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$TopSVMUsed\"}) / sum by (cluster, svm) (volume_size_total{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$TopSVMUsed\"})))",
"expr": "(\n 100 * sum by (datacenter,cluster, svm) (\n volume_size_used{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\"}\n )\n / on(datacenter, cluster, svm)\n sum by (datacenter,cluster, svm) (\n volume_size_total{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\"}\n )\n)\nand on(datacenter,cluster, svm)\ntopk(\n $TopResources,\n (\n 100 * sum by (datacenter,cluster, svm) (\n avg_over_time(volume_size_used{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\"}[3h] @ end())\n )\n / on(datacenter,cluster, svm)\n sum by (datacenter,cluster, svm) (\n avg_over_time(volume_size_total{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\"}[3h] @ end())\n )\n )\n * on(datacenter,cluster, svm) group_left\n svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", root_svm=~\"No|$IncludeRoot\"}\n)",
"interval": "",
"legendFormat": "{{cluster}} - {{svm}}",
"refId": "A"
Expand Down Expand Up @@ -1236,9 +1236,9 @@
"targets": [
{
"exemplar": false,
"expr": "topk($TopResources, (100 * volume_size_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$TopVolumeUsed\"} / volume_size_total{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$TopVolumeUsed\"}))",
"expr": "(\n 100 * volume_size_used{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\",volume=~\"$Volume\"} \n / on(datacenter,cluster,svm,aggr,node,volume) \n volume_size_total{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\",volume=~\"$Volume\"}\n)\nand on(datacenter,cluster, svm,aggr,node, volume)\ntopk(\n $TopResources,\n (\n (100 * avg_over_time(volume_size_used{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\",volume=~\"$Volume\"}[3h] @ end())) \n / on(datacenter,cluster,svm,aggr,node,volume) \n avg_over_time(volume_size_total{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\",volume=~\"$Volume\"}[3h] @ end())\n )\n * on(datacenter,cluster, svm, aggr,node,volume) group_left\n volume_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", svm=~\"$SVM\", volume=~\"$Volume\",root_volume=~\"No|$IncludeRoot\"}\n)",
"interval": "",
"legendFormat": "{{cluster}} - {{volume}}",
"legendFormat": "{{cluster}} - {{svm}} - {{volume}}",
"refId": "A"
}
],
Expand Down Expand Up @@ -1328,7 +1328,7 @@
"targets": [
{
"exemplar": false,
"expr": "topk($TopResources, (100 * aggr_space_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",aggr=~\"$TopAggrUsed\"} / aggr_space_total{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",aggr=~\"$TopAggrUsed\"}))",
"expr": "(\n 100 * aggr_space_used{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\"} \n / on(datacenter,cluster,aggr) \n aggr_space_total{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\"}\n)\nand on(datacenter,cluster, aggr)\ntopk(\n $TopResources,\n (\n (100 * avg_over_time(aggr_space_used{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\"}[3h] @ end())) \n / on(datacenter,cluster,aggr) \n avg_over_time(aggr_space_total{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\"}[3h] @ end())\n )\n)",
"interval": "",
"legendFormat": "{{cluster}} - {{aggr}}",
"refId": "A"
Expand Down Expand Up @@ -1409,7 +1409,7 @@
"h": 8,
"w": 8,
"x": 0,
"y": 18
"y": 3
},
"id": 268,
"options": {
Expand Down Expand Up @@ -1498,7 +1498,7 @@
"h": 8,
"w": 8,
"x": 8,
"y": 18
"y": 3
},
"id": 269,
"options": {
Expand All @@ -1521,7 +1521,7 @@
"targets": [
{
"exemplar": false,
"expr": "svm_vol_read_data{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\", svm=~\"$TopSVMTotalThroughput\"}+svm_vol_write_data{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$TopSVMTotalThroughput\"}",
"expr": "(\n svm_vol_read_data{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\",svm=~\"$SVM\"} \n +\n svm_vol_write_data{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\",svm=~\"$SVM\"}\n)\nand on(datacenter,cluster, svm)\ntopk(\n $TopResources,\n (\n avg_over_time(svm_vol_read_data{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\",svm=~\"$SVM\"}[3h])\n + avg_over_time(svm_vol_write_data{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\",svm=~\"$SVM\"}[3h])\n )\n * on(datacenter,cluster, svm) group_left\n svm_labels{datacenter=~\"$Datacenter\", cluster=~\"$Cluster\", root_svm=~\"No|$IncludeRoot\"}\n)",
"interval": "",
"legendFormat": "{{cluster}} - {{svm}}",
"refId": "A"
Expand Down Expand Up @@ -1588,7 +1588,7 @@
"h": 8,
"w": 8,
"x": 16,
"y": 18
"y": 3
},
"id": 270,
"options": {
Expand Down Expand Up @@ -2169,98 +2169,6 @@
"queryValue": "",
"skipUrlSync": false,
"type": "custom"
},
{
"allValue": null,
"current": {},
"datasource": "${DS_PROMETHEUS}",
"definition": "query_result(topk($TopResources, (avg_over_time(svm_vol_read_data{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"}[${__range}])+avg_over_time(svm_vol_write_data{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"}[${__range}])) * on(cluster,svm) (svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",root_svm=~\"No|$IncludeRoot\"})))",
"description": null,
"error": null,
"hide": 2,
"includeAll": true,
"label": null,
"multi": true,
"name": "TopSVMTotalThroughput",
"options": [],
"query": {
"query": "query_result(topk($TopResources, (avg_over_time(svm_vol_read_data{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"}[${__range}])+avg_over_time(svm_vol_write_data{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"}[${__range}])) * on(cluster,svm) (svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",root_svm=~\"No|$IncludeRoot\"})))",
"refId": "StandardVariableQuery"
},
"refresh": 2,
"regex": ".*svm=\\\"(.*?)\\\".*",
"skipUrlSync": false,
"sort": 0,
"type": "query"
},
{
"allValue": null,
"current": {},
"datasource": "${DS_PROMETHEUS}",
"definition": "query_result(topk($TopResources,((100 * sum by (cluster, svm) (volume_size_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\"}) / sum by (cluster, svm) (volume_size_total{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\"})) * on(cluster,svm) (svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",root_svm=~\"No|$IncludeRoot\"}))))",
"description": null,
"error": null,
"hide": 2,
"includeAll": true,
"label": null,
"multi": true,
"name": "TopSVMUsed",
"options": [],
"query": {
"query": "query_result(topk($TopResources,((100 * sum by (cluster, svm) (volume_size_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\"}) / sum by (cluster, svm) (volume_size_total{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\"})) * on(cluster,svm) (svm_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",root_svm=~\"No|$IncludeRoot\"}))))",
"refId": "StandardVariableQuery"
},
"refresh": 2,
"regex": ".*svm=\\\"(.*?)\\\".*",
"skipUrlSync": false,
"sort": 0,
"type": "query"
},
{
"allValue": null,
"current": {},
"datasource": "${DS_PROMETHEUS}",
"definition": "query_result(topk($TopResources, ((100 * volume_size_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\"} / volume_size_total{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\"}) * on(cluster,svm,volume) (volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\",root_volume=~\"No|$IncludeRoot\"}))))",
"description": null,
"error": null,
"hide": 2,
"includeAll": true,
"label": null,
"multi": true,
"name": "TopVolumeUsed",
"options": [],
"query": {
"query": "query_result(topk($TopResources, ((100 * volume_size_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\"} / volume_size_total{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\"}) * on(cluster,svm,volume) (volume_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\",root_volume=~\"No|$IncludeRoot\"}))))",
"refId": "StandardVariableQuery"
},
"refresh": 2,
"regex": ".*volume=\\\"(.*?)\\\".*",
"skipUrlSync": false,
"sort": 0,
"type": "query"
},
{
"allValue": null,
"current": {},
"datasource": "${DS_PROMETHEUS}",
"definition": "query_result(topk($TopResources, (100 * aggr_space_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"} / aggr_space_total{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"})))",
"description": null,
"error": null,
"hide": 2,
"includeAll": true,
"label": null,
"multi": true,
"name": "TopAggrUsed",
"options": [],
"query": {
"query": "query_result(topk($TopResources, (100 * aggr_space_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"} / aggr_space_total{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"})))",
"refId": "StandardVariableQuery"
},
"refresh": 2,
"regex": ".*aggr=\\\"(.*?)\\\".*",
"skipUrlSync": false,
"sort": 0,
"type": "query"
}
]
},
Expand All @@ -2284,5 +2192,5 @@
"timezone": "",
"title": "ONTAP: cDOT",
"uid": "",
"version": 3
"version": 4
}
Loading

0 comments on commit efa3ed2

Please sign in to comment.