Skip to content

Commit

Permalink
feat: Adding volume growth rate panels in volume dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
Hardikl authored and cgrinds committed Mar 26, 2024
1 parent 467a92e commit 7269218
Show file tree
Hide file tree
Showing 2 changed files with 235 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/tools/grafana/dashboard_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ func TestUnitsAndExprMatch(t *testing.T) {
"_lag_time": {"", "s", "short"},
"qos_detail_service_time_latency": {"µs", "percent"},
"qos_detail_resource_latency": {"µs", "percent"},
"volume_space_physical_used": {"bytes", "binBps"}, // Growth rate uses bytes/sec unit
"volume_space_logical_used": {"bytes", "binBps"}, // Growth rate uses bytes/sec unit
}

// Normalize rates to their base unit
Expand Down
233 changes: 233 additions & 0 deletions grafana/dashboards/cmode/volume.json
Original file line number Diff line number Diff line change
Expand Up @@ -7131,6 +7131,239 @@
],
"title": "Volume Sis Stat",
"type": "row"
},
{
"collapsed": true,
"datasource": "${DS_PROMETHEUS}",
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 23
},
"id": 135,
"panels": [
{
"datasource": "${DS_PROMETHEUS}",
"description": "Physical space used growth rate per second in the volume.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "Physical Used Growth Rate",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineStyle": {
"fill": "solid"
},
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": true,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"decimals": 2,
"mappings": [],
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "binBps",
"unitScale": true
},
"overrides": []
},
"gridPos": {
"h": 12,
"w": 12,
"x": 0,
"y": 12
},
"hideTimeOverride": false,
"id": 137,
"options": {
"legend": {
"calcs": [
"mean",
"lastNotNull",
"max"
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "8.1.8",
"targets": [
{
"datasource": "${DS_PROMETHEUS}",
"editorMode": "code",
"exemplar": false,
"expr": "rate(volume_space_physical_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\"}[$__range]) and topk($TopResources, avg_over_time(volume_space_physical_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\"}[$__range] @ end()))",
"hide": false,
"interval": "",
"legendFormat": "{{svm}} - {{volume}}",
"range": true,
"refId": "B"
}
],
"title": "Top $TopResources Volumes Per Growth Rate of Physical Used",
"transformations": [],
"type": "timeseries"
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "Logical space used growth rate per second in the volume.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "Logical Used Growth Rate",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineStyle": {
"fill": "solid"
},
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": true,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"decimals": 2,
"mappings": [],
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "binBps",
"unitScale": true
},
"overrides": []
},
"gridPos": {
"h": 12,
"w": 12,
"x": 12,
"y": 12
},
"hideTimeOverride": false,
"id": 138,
"options": {
"legend": {
"calcs": [
"mean",
"lastNotNull",
"max"
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "8.1.8",
"targets": [
{
"datasource": "${DS_PROMETHEUS}",
"editorMode": "code",
"exemplar": false,
"expr": "rate(volume_space_logical_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\"}[$__range]) and topk($TopResources, avg_over_time(volume_space_logical_used{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",svm=~\"$SVM\",volume=~\"$Volume\"}[$__range] @ end()))",
"hide": false,
"interval": "",
"legendFormat": "{{svm}} - {{volume}}",
"range": true,
"refId": "B"
}
],
"title": "Top $TopResources Volumes Per Growth Rate of Logical Used",
"transformations": [],
"type": "timeseries"
}
],
"targets": [
{
"datasource": "${DS_PROMETHEUS}",
"refId": "A"
}
],
"title": "Volume Growth Rate",
"type": "row"
}
],
"refresh": "",
Expand Down

0 comments on commit 7269218

Please sign in to comment.