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

feat: adding description to panels #2891

Merged
merged 3 commits into from
May 14, 2024
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
12 changes: 6 additions & 6 deletions cmd/tools/grafana/dashboard_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1468,7 +1468,8 @@ func checkDescription(t *testing.T, path string, data []byte, count *int) {
// These are from fsa
"Volume Access ($Activity) History", "Volume Access ($Activity) History By Percent", "Volume Modify ($Activity) History", "Volume Modify ($Activity) History By Percent",
// This is from workload
"Service Latency by Resources",
"Top $TopResources Workloads by Service Time from sync_repl", "Top $TopResources Workloads by Service Time from flexcache_ral", "Top $TopResources Workloads by Service Time from flexcache_spinhi",
"Top $TopResources Workloads by Latency from sync_repl", "Top $TopResources Workloads by Latency from flexcache_ral", "Top $TopResources Workloads by Latency from flexcache_spinhi", "Service Latency by Resources",
// These are from svm
"NFSv3 Latency Heatmap", "NFSv3 Read Latency Heatmap", "NFSv3 Write Latency Heatmap", "NFSv3 Latency by Op Type", "NFSv3 IOPs per Type",
"NFSv4 Latency Heatmap", "NFSv4 Read Latency Heatmap", "NFSv4 Write Latency Heatmap", "NFSv4 Latency by Op Type", "NFSv4 IOPs per Type",
Expand All @@ -1479,7 +1480,7 @@ func checkDescription(t *testing.T, path string, data []byte, count *int) {
// This is from lun
"IO Size",
// This is from nfs4storePool
"Allocations over 50%", "All nodes with 1% or more allocations in $Datacenter",
"Allocations over 50%", "All nodes with 1% or more allocations in $Datacenter", "SessionConnectionHolderAlloc", "ConnectionParentSessionReferenceAlloc", "SessionHolderAlloc", "SessionAlloc", "StateRefHistoryAlloc",
}

VisitAllPanels(data, func(_ string, _, value gjson.Result) {
Expand All @@ -1501,9 +1502,8 @@ func checkDescription(t *testing.T, path string, data []byte, count *int) {
expr := targetsSlice[0].Get("expr").String()
if strings.Contains(expr, "/") || strings.Contains(expr, "+") || strings.Contains(expr, "-") || strings.Contains(expr, " on ") {
// This indicates expressions with arithmetic operations, After adding appropriate description, this will be uncommented.
// *count++
// t.Errorf(`dashboard=%s panel="%s" has arithmetic operations %d`, dashPath, value.Get("title").String(), *count)
fmt.Printf(`dashboard=%s panel="%s" has arithmetic operations \n`, dashPath, title)
*count++
t.Errorf(`dashboard=%s panel="%s" has arithmetic operations %d`, dashPath, value.Get("title").String(), *count)
} else {
*count++
t.Errorf(`dashboard=%s panel="%s" does not have panel description %d`, dashPath, title, *count)
Expand All @@ -1519,7 +1519,7 @@ func checkDescription(t *testing.T, path string, data []byte, count *int) {
}
}
} else if !strings.HasPrefix(description, "$") && !strings.HasSuffix(description, ".") {
// Few panels have description text from variable, which would be ignored.
// Few panels have description text from variable, which would be ignored and description must end with period(.)
t.Errorf(`dashboard=%s panel="%s" description hasn't ended with period`, dashPath, title)
}
})
Expand Down
18 changes: 9 additions & 9 deletions grafana/dashboards/cmode/aggregate.json
Original file line number Diff line number Diff line change
Expand Up @@ -1490,7 +1490,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "This panel shows detail of Percentage saved by compacting the data and Percentage of space saved by storage efficiency.",
"description": "This panel displays detail of Percentage saved by compacting the data and Percentage of space saved by storage efficiency.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -1681,7 +1681,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "This panel shows detail of Number of user-visible files used in the referenced file system and Maximum number of user-visible files that this referenced file system can currently hold.",
"description": "This panel displays detail of Number of user-visible files used in the referenced file system and Maximum number of user-visible files that this referenced file system can currently hold.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -1777,7 +1777,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "This panel shows detail of number of files that can currently be stored on disk for system metadata files and number of files that can currently be stored on disk for user-visible files.",
"description": "This panel displays detail of number of files that can currently be stored on disk for system metadata files and number of files that can currently be stored on disk for user-visible files.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -1873,7 +1873,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "This panel shows detail of space used by snapshot copies and available space for Snapshot copies in bytes.",
"description": "This panel displays detail of space used by snapshot copies and available space for Snapshot copies in bytes.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -2247,7 +2247,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "This panel shows detail of total files allowed in snapshot copies and total files created in snapshot copies.",
"description": "This panel displays detail of total files allowed in snapshot copies and total files created in snapshot copies.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -2344,7 +2344,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "This panel shows detail of files in use by snapshot copies, the largest value to which the maxfiles-available parameter can be increased by reconfiguration, on the referenced file system and maximum files available for snapshot copies.",
"description": "This panel displays detail of files in use by snapshot copies, the largest value to which the maxfiles-available parameter can be increased by reconfiguration, on the referenced file system and maximum files available for snapshot copies.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -3422,7 +3422,7 @@
"panels": [
{
"datasource": "${DS_PROMETHEUS}",
"description": "This panel shows detail of percentage of HDD read operations replace by SSD and number of HDD read operations replaced by SSD reads per second.",
"description": "This panel displays detail of percentage of HDD read operations replace by SSD and number of HDD read operations replaced by SSD reads per second.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -3559,7 +3559,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "This panel shows detail of average of RAID I/O latency on read hit and average read miss latency.",
"description": "This panel displays detail of average of RAID I/O latency on read hit and average read miss latency.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -3657,7 +3657,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "This panel shows detail of total read/write/total cached SSD blocks.",
"description": "This panel displays detail of total read/write/total cached SSD blocks.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down
18 changes: 10 additions & 8 deletions grafana/dashboards/cmode/data_protection_snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "",
"description": "Total number of volumes that are protected.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -370,7 +370,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "",
"description": "Total number of volumes whose snapshot size used is breached the snapshot reserve size.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -433,7 +433,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "",
"description": "Total number of volumes that are not protected.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -507,7 +507,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "",
"description": "Total number of volumes whose snapshot size used is not breached the snapshot reserve size.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -581,6 +581,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "This panel displays volumes detail with protected status and snapshot policy.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -1004,7 +1005,7 @@
"panels": [
{
"datasource": "${DS_PROMETHEUS}",
"description": "",
"description": "Total number of volumes whose snapshot count is < 10.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -1067,7 +1068,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "",
"description": "Total number of volumes whose snapshot count is between 10 to 100.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -1130,7 +1131,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "",
"description": "Total number of volumes whose snapshot count is between 101 to 500.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -1193,7 +1194,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "",
"description": "Total number of volumes whose snapshot count is > 500.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -1256,6 +1257,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "This panel displays volumes detail with snapshot count.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down
8 changes: 4 additions & 4 deletions grafana/dashboards/cmode/datacenter.json
Original file line number Diff line number Diff line change
Expand Up @@ -1266,7 +1266,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "This panel shows error detail of disk, shelf, node, network port, license compliance, HA down and sensor failure alerts.",
"description": "This panel displays error detail of disk, shelf, node, network port, license compliance, HA down and sensor failure alerts.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -1386,7 +1386,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "This panel shows warning detail of disk, shelf, health monitor, lif, volume move and volume anti-ransomware alerts.",
"description": "This panel displays warning detail of disk, shelf, health monitor, lif, volume move and volume anti-ransomware alerts.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -2143,7 +2143,7 @@
{
"cacheTimeout": null,
"datasource": "${DS_PROMETHEUS}",
"description": "",
"description": "This panel displays total power of nodes and shelves.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -2594,7 +2594,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "This panel shows detail of power consumed by a node/shelf/total in Watts.",
"description": "This panel displays detail of power consumed by a node/shelf/total in Watts.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down
2 changes: 1 addition & 1 deletion grafana/dashboards/cmode/details/volumeBySVM.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "This panel shows volume performance detail.",
"description": "This panel displays volume performance detail.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down
12 changes: 7 additions & 5 deletions grafana/dashboards/cmode/details/volumeDeepDive.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "This panel shows volume performance details.",
"description": "This panel displays volume performance details.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -352,6 +352,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "This panel displays detail of average amount of data read per read operation.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -408,6 +409,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "This panel displays detail of average amount of data write per write operation.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -2657,7 +2659,7 @@
"panels": [
{
"datasource": "${DS_PROMETHEUS}",
"description": "This panel shows detail of physical size, physical space used, logical space used and size used of the volume, in bytes.",
"description": "This panel displays detail of physical size, physical space used, logical space used and size used of the volume, in bytes.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -2774,7 +2776,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "This panel shows detail of physical used %, logical used % and size used % of the volume.",
"description": "This panel displays detail of physical used %, logical used % and size used % of the volume.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -2888,7 +2890,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "This panel shows detail of snapshot available size, snapshot reserve size, snapshot reserve available and snapshots size used of the volume.",
"description": "This panel displays detail of snapshot available size, snapshot reserve size, snapshot reserve available and snapshots size used of the volume.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -3009,7 +3011,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "This panel shows detail of snapshot reserve %, snapshot reserve used % and size used % of the volume.",
"description": "This panel displays detail of snapshot reserve %, snapshot reserve used % and size used % of the volume.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down
10 changes: 5 additions & 5 deletions grafana/dashboards/cmode/disk.json
Original file line number Diff line number Diff line change
Expand Up @@ -2230,7 +2230,7 @@
"panels": [
{
"datasource": "${DS_PROMETHEUS}",
"description": "This panel shows detail of number of disk kilobytes (KB) read/written per second.",
"description": "This panel displays detail of number of disk kilobytes (KB) read/written per second.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -2328,7 +2328,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "This panel shows detail of bytes written/read through a host adapter.",
"description": "This panel displays detail of bytes written/read through a host adapter.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -2426,7 +2426,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "This panel shows detail of array of counts of different types of Consistency Points (CP) and average latency in microseconds for the WAFL filesystem to process write request to the volume.",
"description": "This panel displays detail of array of counts of different types of Consistency Points (CP) and average latency in microseconds for the WAFL filesystem to process write request to the volume.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -2565,7 +2565,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "This panel shows detail of external cache hit rate and estimated number of disk reads per second replaced by cache.",
"description": "This panel displays detail of external cache hit rate and estimated number of disk reads per second replaced by cache.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -2695,7 +2695,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "This panel shows detail of percentage of HDD read operations replace by SSD and number of HDD read operations replaced by SSD reads per second.",
"description": "This panel displays detail of percentage of HDD read operations replace by SSD and number of HDD read operations replaced by SSD reads per second.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down
Loading