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 svm panels #2861

Merged
merged 1 commit into from
May 2, 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: 8 additions & 4 deletions cmd/tools/grafana/dashboard_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1483,6 +1483,7 @@ func checkDescription(t *testing.T, path string, data []byte, count *int) {
description := value.Get("description").String()
targetsSlice := value.Get("targets").Array()
title := value.Get("title").String()
panelType := value.Get("type").String()
if slices.Contains(ignoreList, title) {
fmt.Printf(`dashboard=%s panel="%s" has different description\n`, dashPath, title)
return
Expand All @@ -1493,16 +1494,19 @@ 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.
// t.Errorf(`dashboard=%s panel="%s" has many expressions`, dashPath, value.Get("title").String())
fmt.Printf(`dashboard=%s panel="%s" has many expressions \n`, dashPath, title)
// t.Errorf(`dashboard=%s panel="%s" has arithmetic operations`, dashPath, value.Get("title").String())
fmt.Printf(`dashboard=%s panel="%s" has arithmetic operations \n`, dashPath, title)
} else {
*count++
t.Errorf(`dashboard=%s panel="%s" does not have panel description %d`, dashPath, title, *count)
}
} else {
// This indicates table/timeseries with more than 1 expression, After deciding next steps, this will be uncommented.
// t.Errorf(`dashboard=%s panel="%s" has many expressions`, dashPath, value.Get("title").String())
fmt.Printf(`dashboard=%s panel="%s" has many expressions \n`, dashPath, title)
if panelType == "table" {
fmt.Printf(`dashboard=%s panel="%s" has table with multiple expression \n`, dashPath, title)
} else {
fmt.Printf(`dashboard=%s panel="%s" has many expressions \n`, dashPath, title)
}
}
} else if !strings.HasPrefix(description, "$") && !strings.HasSuffix(description, ".") {
// Few panels have description text from variable, which would be ignored.
Expand Down
12 changes: 6 additions & 6 deletions grafana/dashboards/cmode/snapmirror.json
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "",
"description": "The number of failed/successful SnapMirror break operations for the relationship.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -1327,7 +1327,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "",
"description": "The number of failed/successful SnapMirror resync operations for the relationship.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -1433,7 +1433,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "",
"description": "The number of failed/successful SnapMirror update operations for the relationship.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -1634,7 +1634,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "",
"description": "The number of failed/successful SnapMirror break operations for the relationship.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -1740,7 +1740,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "",
"description": "The number of failed/successful SnapMirror resync operations for the relationship.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -1846,7 +1846,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "",
"description": "The number of failed/successful SnapMirror update operations for the relationship.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down
40 changes: 28 additions & 12 deletions grafana/dashboards/cmode/svm.json
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "",
"description": "Average latency in microseconds for the WAFL filesystem to process read/write/other request to the volume; not including request processing or network communication time.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -757,7 +757,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "",
"description": "Bytes read/written per second.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -855,7 +855,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "",
"description": "Number of read/write/other operations per second from the volume.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -4395,7 +4395,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "",
"description": "Average latency for CIFS read/write/average operations.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -5542,7 +5542,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "",
"description": "Average latency for read/write/other/average operations.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -5656,7 +5656,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "",
"description": "Amount of data read from the storage system/written to the storage system.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -5755,7 +5755,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "",
"description": "Number of read/write/other operations.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -6788,7 +6788,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "",
"description": "Average latency for read/write/other operations.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -6895,7 +6895,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "",
"description": "Amount of data read from the storage system/written to the storage system in bytes.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -7807,6 +7807,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "Average latency of NFSv3 Read/Write procedure requests. The counter keeps track of the average response time of Read/Write requests.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -7899,6 +7900,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "Rate of NFSv3 read/write/total data transfers per second.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -7999,6 +8001,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "Total observed NFSv3 read/write/total operations per second.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -9101,6 +9104,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "Average latency of NFSv4 Read/Write procedure requests. The counter keeps track of the average response time of Read/Write requests.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -9200,6 +9204,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "Rate of NFSv4 read/write data transfers per second.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -9299,6 +9304,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "Total observed NFSv4 read/write/total operations per second.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -10412,6 +10418,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "Average latency of NFSv4.1 Read/Write procedure requests. The counter keeps track of the average response time of Read/Write requests.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -10511,6 +10518,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "Rate of NFSv4.1 read/write data transfers per second.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -10610,6 +10618,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "Total observed NFSv4.1 read/write/total operations per second.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -11731,6 +11740,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "Average latency of NFSv4.2 Read/Write procedure requests. The counter keeps track of the average response time of Read/Write requests.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -11830,6 +11840,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "Rate of NFSv4.2 read/write data transfers per second.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -11929,6 +11940,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "Total observed NFSv4.2 read/write/total operations per second.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -12799,7 +12811,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "",
"description": "Average latency for read/write/other/average operations.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -12914,7 +12926,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "",
"description": "Amount of data read from the storage system/written to the storage system.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -13013,7 +13025,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "",
"description": "Number of read/write/other operations.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -14113,6 +14125,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "This is the average response time for read/write requests that were initiated by the workload.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -14211,6 +14224,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "This is the amount of data read/written per second from the filer by the workload.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -14308,6 +14322,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "This is the rate of this workload's read/write operations that completed during the measurement interval.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -14407,6 +14422,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "This is the percentage of reads/writes, performed on behalf of the workload, that were sequential.",
"fieldConfig": {
"defaults": {
"color": {
Expand Down