From f176a6624ac7bf6c1078ddc22599c45c4de3be84 Mon Sep 17 00:00:00 2001 From: Vadim Rutkovsky Date: Mon, 23 Feb 2026 12:32:14 +0100 Subject: [PATCH] dashboards: operator dashboard should extract version from metrics (#10502) ### Describe Your Changes Use vm_app_version to determine operator version instead of static text ### Checklist The following checks are **mandatory**: - [x] My change adheres to [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/victoriametrics/contributing/#pull-request-checklist). - [x] My change adheres to [VictoriaMetrics development goals](https://docs.victoriametrics.com/victoriametrics/goals/). Signed-off-by: Vadim Rutkovsky --- dashboards/operator.json | 59 +++++++++++++++++--- dashboards/vm/operator.json | 61 ++++++++++++++++++--- docs/victoriametrics/changelog/CHANGELOG.md | 2 + 3 files changed, 105 insertions(+), 17 deletions(-) diff --git a/dashboards/operator.json b/dashboards/operator.json index 089edfcd14..dddb61d11d 100644 --- a/dashboards/operator.json +++ b/dashboards/operator.json @@ -91,8 +91,26 @@ "type": "row" }, { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, "fieldConfig": { - "defaults": {}, + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + } + ] + } + }, "overrides": [] }, "gridPos": { @@ -103,17 +121,42 @@ }, "id": 24, "options": { - "code": { - "language": "plaintext", - "showLineNumbers": false, - "showMiniMap": false + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/^short_version$/", + "values": false }, - "content": "
$version
", - "mode": "markdown" + "showPercentChange": false, + "textMode": "value", + "wideLayout": true }, "pluginVersion": "12.3.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": false, + "expr": "vm_app_version{job=~\"$job\",instance=~\"$instance\"}", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "{{short_version}}", + "range": false, + "refId": "A" + } + ], "title": "Version", - "type": "text" + "type": "stat" }, { "datasource": { diff --git a/dashboards/vm/operator.json b/dashboards/vm/operator.json index 0fed20ecfb..b61332d6d4 100644 --- a/dashboards/vm/operator.json +++ b/dashboards/vm/operator.json @@ -92,29 +92,72 @@ "type": "row" }, { + "datasource": { + "type": "victoriametrics-metrics-datasource", + "uid": "$ds" + }, "fieldConfig": { - "defaults": {}, + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + } + ] + } + }, "overrides": [] }, "gridPos": { - "h": 3, + "h": 4, "w": 4, "x": 0, "y": 1 }, "id": 24, "options": { - "code": { - "language": "plaintext", - "showLineNumbers": false, - "showMiniMap": false + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/^short_version$/", + "values": false }, - "content": "
$version
", - "mode": "markdown" + "showPercentChange": false, + "textMode": "value", + "wideLayout": true }, "pluginVersion": "12.3.0", + "targets": [ + { + "datasource": { + "type": "victoriametrics-metrics-datasource", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": false, + "expr": "vm_app_version{job=~\"$job\",instance=~\"$instance\"}", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "{{short_version}}", + "range": false, + "refId": "A" + } + ], "title": "Version", - "type": "text" + "type": "stat" }, { "datasource": { diff --git a/docs/victoriametrics/changelog/CHANGELOG.md b/docs/victoriametrics/changelog/CHANGELOG.md index 5f5ebf07b9..2219fccd18 100644 --- a/docs/victoriametrics/changelog/CHANGELOG.md +++ b/docs/victoriametrics/changelog/CHANGELOG.md @@ -31,11 +31,13 @@ See also [LTS releases](https://docs.victoriametrics.com/victoriametrics/lts-rel * FEATURE: all VictoriaMetrics components: expose `process_cpu_seconds_total`, `process_resident_memory_bytes`, and other process-level metrics when running on macOS. See [metrics#75](https://github.com/VictoriaMetrics/metrics/issues/75). * FEATURE: [dashboards/vmauth](https://grafana.com/grafana/dashboards/21394): add `Request body buffering duration` panel to the `Troubleshooting` section. This panel shows the time spent buffering incoming client request bodies, helping identify slow client uploads and potential concurrency issues. The panel is only available when `-requestBufferSize` is non-zero. See [#10309](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/10309). * FEATURE: [vmagent](https://docs.victoriametrics.com/victoriametrics/vmagent/), [vmsingle](https://docs.victoriametrics.com/victoriametrics/single-server-victoriametrics/), `vminsert` and `vmstorage` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/victoriametrics/cluster-victoriametrics/): enable [ingestion](https://docs.victoriametrics.com/victoriametrics/vmagent/#metric-metadata) and in-memory [storage](https://docs.victoriametrics.com/victoriametrics/single-server-victoriametrics/#metrics-metadata) of metrics metadata by default. Metadata ingestion can be disabled with `-enableMetadata=false`. See [#2974](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2974). +* FEATURE: [dashboards/operator](https://grafana.com/grafana/dashboards/17869): extract operator version from metrics instead of hardcoded value * BUGFIX: [vmsingle](https://docs.victoriametrics.com/victoriametrics/single-server-victoriametrics/) and `vmstorage` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/victoriametrics/cluster-victoriametrics/): prevent panic `error parsing regexp: expression nests too deeply` triggered by large repetition ranges in regex, for example `{"__name__"=~"a{0,1000}"}`. See [VictoriaLogs#1112](https://github.com/VictoriaMetrics/VictoriaLogs/issues/1112). * BUGFIX: [vmui](https://docs.victoriametrics.com/victoriametrics/single-server-victoriametrics/#vmui): fix escaping for label names with special characters. See [#10485](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/10485). * BUGFIX: `vmstorage` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/victoriametrics/cluster-victoriametrics/): properly search tenants for [multitenant](https://docs.victoriametrics.com/victoriametrics/cluster-victoriametrics/#multitenancy) query request. See [#10422](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/10422). + ## [v1.136.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.136.0) Released at 2026-02-13