The Observe > Dashboards page doesn't handle the `$__range`, `$__range_s` or `$__range_ms` variables. This causes the Thanos API to return an error if any dashboard panel uses one of these variables.
tested with 4.11.0-0.nightly-2022-04-16-163450 and used the attached dashboard file, create configmap under openshift-config-managed, dashboard name: testing definition: ******************* "repeat": null, "repeatIteration": null, "repeatRowId": null, "showTitle": true, "title": "HTTP Request Total", "titleSize": "h6", "type": "row" }, { "aliasColors": { }, "bars": true, "dashLength": 10, "dashes": false, "datasource": "$datasource", "fill": 2, "fillGradient": 0, "gridPos": { "h": 9, "w": 12, "x": 0, "y": 1 }, "id": 3, "legend": { "alignAsTable": true, "avg": false, "current": true, "hideEmpty": true, "hideZero": true, "max": false, "min": false, "rightSide": true, "show": true, "sideWidth": null, "sort": "current", "sortDesc": true, "total": false, "values": true }, "lines": false, "linewidth": 1, "links": [ ], "minSpan": 24, "nullPointMode": "null", "paceLength": 10, "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "repeat": null, "seriesOverrides": [ ], "spaceLength": 10, "span": 24, "stack": false, "steppedLine": false, "targets": [ { "expr": "(topk(5, sum(rate(http_requests_total[$__range])) by (instance)))", "format": "time_series", "legendFormat": "{{instance}}", "refId": "A" } ], ******************* go to "Observe -> Dashboards", choose dashboard testing, select any value from "Time Range" drop-down list, for example "Last 15 minutes", "HTTP Request Total" section, click Inspect, prometheus expr is: (topk(5, sum(rate(http_requests_total[900s])) by (instance))) $__range is parsed right, 15*60=900s
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: OpenShift Container Platform 4.11.0 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:5069