Skip to content

Commit

Permalink
fix(config/grafana): use range for HPA metrics
Browse files Browse the repository at this point in the history
Use range instead of instant for HPA current/max replicas (time based).

Right now, we are using the instant selector, which given that the panel
should be time-based (as per the title), it should use a range selector,
thus getting all metrics in a given timeframe.

Also, moved from bars to lines because bars are hard to visualize using
ranges containing several days worth of data.

Signed-off-by: Ricardo Ribeiro <j.ribeiro.fafe@gmail.com>
  • Loading branch information
jrRibeiro committed May 2, 2023
1 parent d689f58 commit 0c2eb32
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ To learn more about active deprecations, we recommend checking [GitHub Discussio
- **Azure Pipelines**: Fix for disallowing `$top` on query when using `meta.parentID` method ([#4397])
- **Azure Pipelines**: Respect all required demands ([#4404](https://github.com/kedacore/keda/issues/4404))
- **Prometheus Metrics**: Create e2e tests for all exposed Prometheus metrics ([#4127](https://github.com/kedacore/keda/issues/4127))
- **Grafana Dashboard**: Fix HPA metrics panel to use range instead of instant ([#4513](https://github.com/kedacore/keda/pull/4513))

### Deprecations

Expand Down
22 changes: 14 additions & 8 deletions config/grafana/keda-dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -735,18 +735,23 @@
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "bars",
"drawStyle": "line",
"fillOpacity": 100,
"gradientMode": "hue",
"gradientMode": "opacity",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineStyle": {
"fill": "solid"
},
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
Expand All @@ -756,7 +761,7 @@
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
Expand Down Expand Up @@ -787,7 +792,8 @@
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
Expand All @@ -804,10 +810,10 @@
"exemplar": false,
"expr": "kube_horizontalpodautoscaler_status_current_replicas{namespace=\"$namespace\",horizontalpodautoscaler=\"keda-hpa-$scaledObject\"}",
"format": "time_series",
"instant": true,
"instant": false,
"interval": "",
"legendFormat": "current_replicas",
"range": false,
"range": true,
"refId": "A"
},
{
Expand All @@ -820,9 +826,9 @@
"expr": "kube_horizontalpodautoscaler_spec_max_replicas{namespace=\"$namespace\",horizontalpodautoscaler=\"keda-hpa-$scaledObject\"}",
"format": "time_series",
"hide": false,
"instant": true,
"instant": false,
"legendFormat": "max_replicas",
"range": false,
"range": true,
"refId": "B"
}
],
Expand Down

0 comments on commit 0c2eb32

Please sign in to comment.