diff --git a/CHANGELOG.md b/CHANGELOG.md index 02d1e84ee88..22932b249a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -468,7 +468,7 @@ * [CHANGE] Enabled resources dashboards by default. Can be disabled setting `resources_dashboards_enabled` config field to `false`. #920 * [FEATURE] Added `Cortex / Overrides` dashboard, displaying default limits and per-tenant overrides applied to Mimir. #673 * [FEATURE] Added `Mimir / Tenants` and `Mimir / Top tenants` dashboards, displaying user-based metrics. #776 -* [FEATURE] Added querier autoscaling panels and alerts. #1006 +* [FEATURE] Added querier autoscaling panels and alerts. #1006 #1016 * [ENHANCEMENT] cortex-mixin: Make `cluster_namespace_deployment:kube_pod_container_resource_requests_{cpu_cores,memory_bytes}:sum` backwards compatible with `kube-state-metrics` v2.0.0. [#317](https://github.com/grafana/cortex-jsonnet/pull/317) * [ENHANCEMENT] Cortex-mixin: Include `cortex-gw-internal` naming variation in default `gateway` job names. [#328](https://github.com/grafana/cortex-jsonnet/pull/328) * [ENHANCEMENT] Ruler dashboard: added object storage metrics. [#354](https://github.com/grafana/cortex-jsonnet/pull/354) diff --git a/operations/mimir-mixin-compiled/dashboards/mimir-reads.json b/operations/mimir-mixin-compiled/dashboards/mimir-reads.json index d03a828b77c..2ef50dc4c33 100644 --- a/operations/mimir-mixin-compiled/dashboards/mimir-reads.json +++ b/operations/mimir-mixin-compiled/dashboards/mimir-reads.json @@ -1571,22 +1571,6 @@ "dashes": false, "datasource": "$datasource", "description": "### Scaling metric\nThis panel shows the result of the query used as scaling metric and target/threshold used.\nThe desired number of replicas is computed by HPA as: / .\n\n", - "fieldConfig": { - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Target per replica" - }, - "properties": [ - { - "id": "custom.axisPlacement", - "value": "right" - } - ] - } - ] - }, "fill": 1, "id": 20, "legend": { @@ -1606,7 +1590,12 @@ "pointradius": 5, "points": false, "renderer": "flot", - "seriesOverrides": [ ], + "seriesOverrides": [ + { + "alias": "Target per replica", + "yaxis": 2 + } + ], "spaceLength": 10, "span": 4, "stack": false, @@ -1663,7 +1652,7 @@ "logBase": 1, "max": null, "min": null, - "show": false + "show": true } ] }, @@ -1700,7 +1689,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(rate(keda_metrics_adapter_scaler_errors[$__rate_interval])) +\non(metric) group_left\nlabel_replace(\n kube_horizontalpodautoscaler_spec_target_metric{cluster=~\"$cluster\", namespace=~\"$namespace\", horizontalpodautoscaler=\"keda-hpa-querier\"}\n * 0, \"metric\", \"$1\", \"metric_name\", \"(.+)\"\n)\n", + "expr": "sum by(metric) (rate(keda_metrics_adapter_scaler_errors[$__rate_interval])) +\non(metric) group_left\nlabel_replace(\n kube_horizontalpodautoscaler_spec_target_metric{cluster=~\"$cluster\", namespace=~\"$namespace\", horizontalpodautoscaler=\"keda-hpa-querier\"}\n * 0, \"metric\", \"$1\", \"metric_name\", \"(.+)\"\n)\n", "format": "time_series", "interval": "15s", "intervalFactor": 2, diff --git a/operations/mimir-mixin/dashboards/dashboard-utils.libsonnet b/operations/mimir-mixin/dashboards/dashboard-utils.libsonnet index f2fbf9f774d..cf646ab0815 100644 --- a/operations/mimir-mixin/dashboards/dashboard-utils.libsonnet +++ b/operations/mimir-mixin/dashboards/dashboard-utils.libsonnet @@ -575,24 +575,21 @@ local utils = import 'mixin-utils/utils.libsonnet'; namespace: $.namespaceMatcher(), }, - panelAxisPlacement(seriesName, placement):: { - fieldConfig+: { - overrides+: [ + // panelAxisPlacement allows to place a series on the right axis. + // This function supports the old Graph panel. + panelAxisPlacement(seriesName, placement):: + if placement != 'right' then {} else { + seriesOverrides+: [ { - matcher: { - id: 'byName', - options: seriesName, - }, - properties: [ - { - id: 'custom.axisPlacement', - value: placement, - }, - ], + alias: seriesName, + yaxis: 2, }, ], + // Ensure all Y-axis are displayed (default is that right axis is hidden). + yaxes: std.map(function(entry) entry { + show: true, + }, super.yaxes), }, - }, panelDescription(title, description):: { description: ||| diff --git a/operations/mimir-mixin/dashboards/reads.libsonnet b/operations/mimir-mixin/dashboards/reads.libsonnet index e5ca2b78f5a..48a2794f0c9 100644 --- a/operations/mimir-mixin/dashboards/reads.libsonnet +++ b/operations/mimir-mixin/dashboards/reads.libsonnet @@ -248,7 +248,7 @@ local utils = import 'mixin-utils/utils.libsonnet'; local title = 'Autoscaler failures rate'; $.panel(title) + $.queryPanel( - $.filterKedaMetricByHPA('sum(rate(keda_metrics_adapter_scaler_errors[$__rate_interval]))', $._config.autoscaling.querier_hpa_name), + $.filterKedaMetricByHPA('sum by(metric) (rate(keda_metrics_adapter_scaler_errors[$__rate_interval]))', $._config.autoscaling.querier_hpa_name), 'Failures per second' ) + $.panelDescription(