diff --git a/CHANGELOG.md b/CHANGELOG.md index a9b7990e3c..be7fad418d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re - [#8000](https://github.com/thanos-io/thanos/pull/8000) Query: Bump promql-engine, pass partial response through options - [#7353](https://github.com/thanos-io/thanos/pull/7353) [#8045](https://github.com/thanos-io/thanos/pull/8045) Receiver/StoreGateway: Add `--matcher-cache-size` option to enable caching for regex matchers in series calls. - [#8017](https://github.com/thanos-io/thanos/pull/8017) Store Gateway: Use native histogram for binary reader load and download duration and fixed download duration metric. #8017 +- [#8062](https://github.com/thanos-io/thanos/pull/8062) Mixin: Add compact todo/backlog metrics to dashboard. ### Changed diff --git a/examples/dashboards/compact.json b/examples/dashboards/compact.json index b0f53f004a..738519eb34 100644 --- a/examples/dashboards/compact.json +++ b/examples/dashboards/compact.json @@ -1441,6 +1441,249 @@ "title": "Object Store Operations", "titleSize": "h6" }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "description": "Shows the number of blocks waiting for compaction.", + "fill": 10, + "id": 17, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ ], + "spaceLength": 10, + "span": 4, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum by (job) (thanos_compact_todo_compaction_blocks{job=~\"$job\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{job}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ ], + "timeFrom": null, + "timeShift": null, + "title": "Compaction", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "description": "Shows the number of blocks waiting for downsampling.", + "fill": 10, + "id": 18, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ ], + "spaceLength": 10, + "span": 4, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum by (job) (thanos_compact_todo_downsample_blocks{job=~\"$job\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{job}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ ], + "timeFrom": null, + "timeShift": null, + "title": "Downsampling", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "description": "Shows the number of blocks waiting for deletion.", + "fill": 10, + "id": 19, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ ], + "spaceLength": 10, + "span": 4, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum by (job) (thanos_compact_todo_deletion_blocks{job=~\"$job\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{job}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ ], + "timeFrom": null, + "timeShift": null, + "title": "Deletion", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Backlog", + "titleSize": "h6" + }, { "collapse": true, "height": "250px", @@ -1452,7 +1695,7 @@ "dashes": false, "datasource": "$datasource", "fill": 1, - "id": 17, + "id": 20, "legend": { "avg": false, "current": false, @@ -1568,7 +1811,7 @@ "dashes": false, "datasource": "$datasource", "fill": 1, - "id": 18, + "id": 21, "legend": { "avg": false, "current": false, @@ -1644,7 +1887,7 @@ "dashes": false, "datasource": "$datasource", "fill": 1, - "id": 19, + "id": 22, "legend": { "avg": false, "current": false, diff --git a/mixin/dashboards/compact.libsonnet b/mixin/dashboards/compact.libsonnet index 9018e360d1..09c5921c6a 100644 --- a/mixin/dashboards/compact.libsonnet +++ b/mixin/dashboards/compact.libsonnet @@ -169,6 +169,33 @@ local g = import '../lib/thanos-grafana-builder/builder.libsonnet'; g.latencyPanel('thanos_objstore_bucket_operation_duration_seconds', thanos.compact.dashboard.selector, thanos.compact.dashboard.dimensions) ) ) + .addRow( + g.row('Backlog') + .addPanel( + g.panel('Compaction', 'Shows the number of blocks waiting for compaction.') + + g.queryPanel( + 'sum by (%(dimensions)s) (thanos_compact_todo_compaction_blocks{%(selector)s})' % thanos.compact.dashboard, + '{{job}}' + ) + + g.stack + ) + .addPanel( + g.panel('Downsampling', 'Shows the number of blocks waiting for downsampling.') + + g.queryPanel( + 'sum by (%(dimensions)s) (thanos_compact_todo_downsample_blocks{%(selector)s})' % thanos.compact.dashboard, + '{{job}}' + ) + + g.stack + ) + .addPanel( + g.panel('Deletion', 'Shows the number of blocks waiting for deletion.') + + g.queryPanel( + 'sum by (%(dimensions)s) (thanos_compact_todo_deletion_blocks{%(selector)s})' % thanos.compact.dashboard, + '{{job}}' + ) + + g.stack + ) + ) .addRow( g.resourceUtilizationRow(thanos.compact.dashboard.selector, thanos.compact.dashboard.dimensions) ),