Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: topk in table and info expanded as default in fsa dashboard #1722

Merged
merged 2 commits into from
Feb 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmd/tools/grafana/dashboard_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,7 @@ func TestOnlyHighlightsExpanded(t *testing.T) {
exceptions := map[string]int{
"cmode/shelf.json": 2,
"cmode/security.json": 3,
"cmode/fsa.json": 2,
}
// count number of expanded sections in dashboard and ensure num expanded = 1
visitDashboards(
Expand Down
59 changes: 27 additions & 32 deletions grafana/dashboards/cmode/fsa.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,36 +102,34 @@
],
"panels": [
{
"collapsed": true,
"datasource": null,
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"id": 101,
"panels": [
{
"datasource": "${DS_PROMETHEUS}",
"gridPos": {
"h": 2,
"w": 24,
"x": 0,
"y": 1
},
"id": 99,
"options": {
"content": "This dashboard requires ONTAP 9.8+ and the APIs are only available via REST. Please enable the REST collector in your harvest config.",
"mode": "markdown"
},
"pluginVersion": "8.1.8",
"type": "text"
}
],
"panels": [],
"title": "Important Information about FSA dashboard",
"type": "row"
},
{
"datasource": "${DS_PROMETHEUS}",
"gridPos": {
"h": 2,
"w": 24,
"x": 0,
"y": 1
},
"id": 99,
"options": {
"content": "This dashboard requires ONTAP 9.8+ and the APIs are only available via REST. Please enable the REST collector in your harvest config.",
"mode": "markdown"
},
"pluginVersion": "8.4.11",
"type": "text"
},
{
"collapsed": false,
"datasource": "${DS_PROMETHEUS}",
Expand Down Expand Up @@ -524,7 +522,7 @@
"targets": [
{
"exemplar": true,
"expr": "topk($TopResources,volume_analytics_dir_bytes_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$TopVolumeDirUsed\",dir_name!=\".\"})",
"expr": "topk($TopResources,volume_analytics_dir_bytes_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\",dir_name=~\"$TopDirUsed\"})",
"interval": "",
"legendFormat": "{{svm}}-{{volume}}-{{dir_name}}",
"refId": "A"
Expand Down Expand Up @@ -668,7 +666,7 @@
"targets": [
{
"exemplar": true,
"expr": "volume_analytics_dir_bytes_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",volume=~\"$Volume\",dir_name!=\".\"}",
"expr": "topk($TopResources,volume_analytics_dir_bytes_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",volume=~\"$Volume\",dir_name=~\"$TopDirUsed\"})",
"format": "table",
"instant": true,
"interval": "",
Expand All @@ -677,7 +675,7 @@
},
{
"exemplar": true,
"expr": "volume_analytics_dir_file_count{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",volume=~\"$Volume\",dir_name!=\".\"}",
"expr": "topk($TopResources,volume_analytics_dir_file_count{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",volume=~\"$Volume\",dir_name=~\"$TopDirUsed\"})",
"format": "table",
"hide": false,
"instant": true,
Expand All @@ -687,7 +685,7 @@
},
{
"exemplar": true,
"expr": "volume_analytics_dir_subdir_count{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",volume=~\"$Volume\",dir_name!=\".\"}",
"expr": "topk($TopResources,volume_analytics_dir_subdir_count{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",volume=~\"$Volume\",dir_name=~\"$TopDirUsed\"})",
"format": "table",
"hide": false,
"instant": true,
Expand Down Expand Up @@ -1643,21 +1641,18 @@
"allValue": null,
"current": {},
"datasource": "${DS_PROMETHEUS}",
"definition": "query_result(topk($TopResources, avg_over_time(volume_analytics_dir_bytes_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\"}[${__range}])))",
"description": null,
"error": null,
"definition": "query_result(topk($TopResources, avg_over_time(volume_analytics_dir_bytes_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\",dir_name!=\".\",}[${__range}])))",
"hide": 2,
"includeAll": false,
"label": null,
"includeAll": true,
"multi": false,
"name": "TopVolumeDirUsed",
"name": "TopDirUsed",
"options": [],
"query": {
"query": "query_result(topk($TopResources, avg_over_time(volume_analytics_dir_bytes_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\"}[${__range}])))",
"query": "query_result(topk($TopResources, avg_over_time(volume_analytics_dir_bytes_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\",dir_name!=\".\",}[${__range}])))",
"refId": "StandardVariableQuery"
},
"refresh": 1,
"regex": ".*volume=\\\"(.*?)\\\".*",
"regex": ".*dir_name=\\\"(.*?)\\\".*",
"skipUrlSync": false,
"sort": 0,
"type": "query"
Expand Down