From 0137c3573e0b507580854a2464e0b833f2aa9e97 Mon Sep 17 00:00:00 2001 From: Georgy Moiseev Date: Thu, 8 Aug 2024 17:47:06 +0300 Subject: [PATCH 1/4] example: bump prometheus Version below 2.22 rate graphs fail due to [1]. 1. https://github.com/grafana/grafana/issues/71052 --- docker-compose.cartridge.yml | 2 +- docker-compose.localapp.yml | 2 +- docker-compose.tdg.yml | 2 +- docker-compose.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker-compose.cartridge.yml b/docker-compose.cartridge.yml index 7cb3d57..05b9f9e 100644 --- a/docker-compose.cartridge.yml +++ b/docker-compose.cartridge.yml @@ -48,7 +48,7 @@ services: - 8086:8086 prometheus: - image: prom/prometheus:v2.17.2 + image: prom/prometheus:v2.53.1 networks: tarantool_dashboard_dev: ports: diff --git a/docker-compose.localapp.yml b/docker-compose.localapp.yml index f903de2..2ee9655 100644 --- a/docker-compose.localapp.yml +++ b/docker-compose.localapp.yml @@ -25,7 +25,7 @@ services: - 8086:8086 prometheus: - image: prom/prometheus:v2.17.2 + image: prom/prometheus:v2.53.1 networks: tarantool_dashboard_dev: extra_hosts: diff --git a/docker-compose.tdg.yml b/docker-compose.tdg.yml index 197e50d..43349f9 100644 --- a/docker-compose.tdg.yml +++ b/docker-compose.tdg.yml @@ -56,7 +56,7 @@ services: - 8086:8086 prometheus: - image: prom/prometheus:v2.17.2 + image: prom/prometheus:v2.53.1 networks: tarantool_dashboard_dev: ports: diff --git a/docker-compose.yml b/docker-compose.yml index 629db73..fb8572c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -48,7 +48,7 @@ services: - 8086:8086 prometheus: - image: prom/prometheus:v2.17.2 + image: prom/prometheus:v2.53.1 networks: tarantool_dashboard_dev: ports: From 9fe4b5f00991a7f22983b03b2ee58dd1b52b1b24 Mon Sep 17 00:00:00 2001 From: Georgy Moiseev Date: Thu, 3 Oct 2024 13:59:59 +0300 Subject: [PATCH 2/4] tt: start interactive cluster --- example_cluster/tarantool3_project/app.Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example_cluster/tarantool3_project/app.Dockerfile b/example_cluster/tarantool3_project/app.Dockerfile index 89b5a4e..1d79781 100644 --- a/example_cluster/tarantool3_project/app.Dockerfile +++ b/example_cluster/tarantool3_project/app.Dockerfile @@ -17,7 +17,7 @@ RUN curl -L https://tarantool.io/release/3/installer.sh | bash RUN DEBIAN_FRONTEND=noninteractive apt install -y tarantool tarantool-dev tt RUN tt init -# Need tt log +# Need tt start -i RUN DEBIAN_FRONTEND=noninteractive apt install -y git patch RUN git clone https://github.com/magefile/mage && \ cd mage && \ @@ -25,4 +25,4 @@ RUN git clone https://github.com/magefile/mage && \ RUN tt install tt master RUN tt rocks make -ENTRYPOINT tt start && tt log -f +ENTRYPOINT tt start -i From c2f1e679d5364df769f4e49656a241756c143dc7 Mon Sep 17 00:00:00 2001 From: Georgy Moiseev Date: Thu, 3 Oct 2024 16:10:15 +0300 Subject: [PATCH 3/4] dashboard: fix cluster overview for Grafana 11 grafonnet doesn't fill up empty thresholds for hidden fields. After table code rework introduced in Grafana 11, empty thresholds result in panel crush. Thanks to @0x501D for exploring the issue. Closes #234 --- CHANGELOG.md | 6 ++++++ dashboard/panels/cluster.libsonnet | 20 ++++++++++++++++++- .../dashboard_cartridge_compiled.json | 12 +++++++++-- .../Prometheus/dashboard_custom_compiled.json | 12 +++++++++-- .../dashboard_tarantool3_compiled.json | 12 +++++++++-- tests/Prometheus/dashboard_tdg_compiled.json | 12 +++++++++-- ...dashboard_with_custom_panels_compiled.json | 12 +++++++++-- 7 files changed, 75 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0cd395..0951cd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Fixed +- Prometheus cluster overview panel not works for Grafana 11+ (#234) + + ## [3.1.0] - 2024-07-09 Grafana revisions: - Tarantool 3: diff --git a/dashboard/panels/cluster.libsonnet b/dashboard/panels/cluster.libsonnet index c282db8..dcced22 100644 --- a/dashboard/panels/cluster.libsonnet +++ b/dashboard/panels/cluster.libsonnet @@ -64,13 +64,31 @@ local prometheus = grafana.prometheus; type: 'number', unit: 's', }, + { + alias: 'job', + pattern: 'job', + thresholds: [], + type: 'hidden', + }, + { + alias: 'Time', + pattern: 'Time', + thresholds: [], + type: 'hidden', + }, + { + alias: '__name__', + pattern: '__name__', + thresholds: [], + type: 'hidden', + }, ], sort={ col: 2, desc: false, }, transform='table', - ).hideColumn('job').hideColumn('/.*/').addTarget( + ).addTarget( if cfg.type == variable.datasource_type.prometheus then prometheus.target( expr=if std.objectHas(cfg.filters, 'job') then diff --git a/tests/Prometheus/dashboard_cartridge_compiled.json b/tests/Prometheus/dashboard_cartridge_compiled.json index 3ee7713..fa81dc9 100644 --- a/tests/Prometheus/dashboard_cartridge_compiled.json +++ b/tests/Prometheus/dashboard_cartridge_compiled.json @@ -118,11 +118,19 @@ { "alias": "job", "pattern": "job", + "thresholds": [ ], + "type": "hidden" + }, + { + "alias": "Time", + "pattern": "Time", + "thresholds": [ ], "type": "hidden" }, { - "alias": "/.*/", - "pattern": "/.*/", + "alias": "__name__", + "pattern": "__name__", + "thresholds": [ ], "type": "hidden" } ], diff --git a/tests/Prometheus/dashboard_custom_compiled.json b/tests/Prometheus/dashboard_custom_compiled.json index 50270d0..f11c4f5 100644 --- a/tests/Prometheus/dashboard_custom_compiled.json +++ b/tests/Prometheus/dashboard_custom_compiled.json @@ -118,11 +118,19 @@ { "alias": "job", "pattern": "job", + "thresholds": [ ], + "type": "hidden" + }, + { + "alias": "Time", + "pattern": "Time", + "thresholds": [ ], "type": "hidden" }, { - "alias": "/.*/", - "pattern": "/.*/", + "alias": "__name__", + "pattern": "__name__", + "thresholds": [ ], "type": "hidden" } ], diff --git a/tests/Prometheus/dashboard_tarantool3_compiled.json b/tests/Prometheus/dashboard_tarantool3_compiled.json index c533903..b0b4d75 100644 --- a/tests/Prometheus/dashboard_tarantool3_compiled.json +++ b/tests/Prometheus/dashboard_tarantool3_compiled.json @@ -118,11 +118,19 @@ { "alias": "job", "pattern": "job", + "thresholds": [ ], + "type": "hidden" + }, + { + "alias": "Time", + "pattern": "Time", + "thresholds": [ ], "type": "hidden" }, { - "alias": "/.*/", - "pattern": "/.*/", + "alias": "__name__", + "pattern": "__name__", + "thresholds": [ ], "type": "hidden" } ], diff --git a/tests/Prometheus/dashboard_tdg_compiled.json b/tests/Prometheus/dashboard_tdg_compiled.json index fdf195e..13dbd67 100644 --- a/tests/Prometheus/dashboard_tdg_compiled.json +++ b/tests/Prometheus/dashboard_tdg_compiled.json @@ -118,11 +118,19 @@ { "alias": "job", "pattern": "job", + "thresholds": [ ], + "type": "hidden" + }, + { + "alias": "Time", + "pattern": "Time", + "thresholds": [ ], "type": "hidden" }, { - "alias": "/.*/", - "pattern": "/.*/", + "alias": "__name__", + "pattern": "__name__", + "thresholds": [ ], "type": "hidden" } ], diff --git a/tests/Prometheus/dashboard_with_custom_panels_compiled.json b/tests/Prometheus/dashboard_with_custom_panels_compiled.json index f80fc80..12f3e9e 100644 --- a/tests/Prometheus/dashboard_with_custom_panels_compiled.json +++ b/tests/Prometheus/dashboard_with_custom_panels_compiled.json @@ -118,11 +118,19 @@ { "alias": "job", "pattern": "job", + "thresholds": [ ], + "type": "hidden" + }, + { + "alias": "Time", + "pattern": "Time", + "thresholds": [ ], "type": "hidden" }, { - "alias": "/.*/", - "pattern": "/.*/", + "alias": "__name__", + "pattern": "__name__", + "thresholds": [ ], "type": "hidden" } ], From b564c2c0d55967a99f1d259dc156bc3e0c7e1c63 Mon Sep 17 00:00:00 2001 From: Georgy Moiseev Date: Thu, 3 Oct 2024 16:36:05 +0300 Subject: [PATCH 4/4] dashboard: use Grafana 11 color scheme in overview table Before this patch, older Grafana 6 color scheme were used for overview panel. It was fine for Grafana from 8 to 10, but don't work properly with Grafana 11. After this patch, the panel works properly with Grafana 11 and newer. For Grafana 9 and 10 everything works fine, except for row coloring: only single cell is colored [1]. For Grafana 8 and older, table column hiding no longer works properly so it's simpler for us to treat it as unsupported since it's EOLed 1 year and 3 months ago [2]. 1. https://github.com/grafana/grafana/issues/27542 2. https://endoflife.date/grafana Follows #234 --- CHANGELOG.md | 5 + dashboard/build/dashboard.libsonnet | 2 +- dashboard/panels/cluster.libsonnet | 213 +++++++++++++----- docker-compose.cartridge.yml | 2 +- docker-compose.localapp.yml | 2 +- docker-compose.tdg.yml | 2 +- docker-compose.yml | 2 +- .../dashboard_cartridge_compiled.json | 2 +- tests/InfluxDB/dashboard_custom_compiled.json | 2 +- .../dashboard_tarantool3_compiled.json | 2 +- tests/InfluxDB/dashboard_tdg_compiled.json | 2 +- ...dashboard_with_custom_panels_compiled.json | 2 +- .../dashboard_cartridge_compiled.json | 210 ++++++++++++----- .../Prometheus/dashboard_custom_compiled.json | 210 ++++++++++++----- .../dashboard_tarantool3_compiled.json | 210 ++++++++++++----- tests/Prometheus/dashboard_tdg_compiled.json | 210 ++++++++++++----- ...dashboard_with_custom_panels_compiled.json | 210 ++++++++++++----- 17 files changed, 957 insertions(+), 331 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0951cd3..a9c12aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed +- Use Grafana 11 color scheme for Prometheus cluster overview panel (#234) +- Drop Grafana 8 support (#234) +- Bump recommended requirements to Grafana 11 (#234) + ### Fixed - Prometheus cluster overview panel not works for Grafana 11+ (#234) diff --git a/dashboard/build/dashboard.libsonnet b/dashboard/build/dashboard.libsonnet index 785b84a..e636f68 100644 --- a/dashboard/build/dashboard.libsonnet +++ b/dashboard/build/dashboard.libsonnet @@ -170,7 +170,7 @@ function(cfg) std.foldl( type='grafana', id='grafana', name='Grafana', - version='8.0.0' + version='9.0.0' ).addRequired( type='panel', id='graph', diff --git a/dashboard/panels/cluster.libsonnet b/dashboard/panels/cluster.libsonnet index dcced22..abd6f2a 100644 --- a/dashboard/panels/cluster.libsonnet +++ b/dashboard/panels/cluster.libsonnet @@ -27,62 +27,17 @@ local prometheus = grafana.prometheus; Instance alias filtering is disabled here. If Prometheus job filter is not specified, displays running instances - and ignores unreachable instances (we have no specific source to fetch) + and ignores unreachable instances (we have no specific source to fetch). + + Color scheme is expected to work properly only for Grafana 11+. |||), ):: tablePanel.new( title=title, description=description, datasource=cfg.datasource, - styles=[ - { - alias: 'Instance alias', - pattern: 'alias', - thresholds: [], - type: 'string', - mappingType: 1, - }, - { - alias: 'Instance URI', - pattern: 'instance', - thresholds: [], - type: 'string', - mappingType: 1, - }, - { - alias: 'Uptime', - colorMode: 'row', - colors: [ - 'rgba(245, 54, 54, 0.9)', - 'rgba(237, 129, 40, 0.89)', - 'rgba(50, 172, 45, 0.97)', - ], - decimals: 0, - mappingType: 1, - pattern: 'Value', - thresholds: ['0.1', '0.1'], - type: 'number', - unit: 's', - }, - { - alias: 'job', - pattern: 'job', - thresholds: [], - type: 'hidden', - }, - { - alias: 'Time', - pattern: 'Time', - thresholds: [], - type: 'hidden', - }, - { - alias: '__name__', - pattern: '__name__', - thresholds: [], - type: 'hidden', - }, - ], + styles=null, + sort={ col: 2, desc: false, @@ -114,7 +69,163 @@ local prometheus = grafana.prometheus; ) else if cfg.type == variable.datasource_type.influxdb then error 'InfluxDB target is not supported yet' - ) { gridPos: { w: 12, h: 8 } }, + ) { + // Workaround is expected to be removed after migrating to + // https://github.com/tarantool/grafana-dashboard/issues/215 + fieldConfig: { + defaults: { + custom: { + cellOptions: { + type: 'auto', + }, + inspect: false, + }, + mappings: [], + thresholds: { + mode: 'absolute', + steps: [ + { + color: 'green', + value: null, + }, + { + color: 'red', + value: 80, + }, + ], + }, + }, + overrides: [ + { + matcher: { + id: 'byName', + options: 'alias', + }, + properties: [ + { + id: 'displayName', + value: 'Instance alias', + }, + { + id: 'custom.align', + }, + ], + }, + { + matcher: { + id: 'byName', + options: 'instance', + }, + properties: [ + { + id: 'displayName', + value: 'Instance URI', + }, + { + id: 'custom.align', + }, + ], + }, + { + matcher: { + id: 'byName', + options: 'Value', + }, + properties: [ + { + id: 'displayName', + value: 'Uptime', + }, + { + id: 'unit', + value: 's', + }, + { + id: 'custom.cellOptions', + value: { + applyToRow: true, + type: 'color-background', + }, + }, + { + id: 'custom.align', + }, + { + id: 'thresholds', + value: { + mode: 'absolute', + steps: [ + { + color: 'rgba(245, 54, 54, 0.9)', + value: null, + }, + { + color: 'rgba(50, 172, 45, 0.97)', + value: 0.1, + }, + ], + }, + }, + ], + }, + { + matcher: { + id: 'byName', + options: 'job', + }, + properties: [ + { + id: 'displayName', + value: 'job', + }, + { + id: 'custom.hidden', + value: true, + }, + { + id: 'custom.align', + }, + ], + }, + { + matcher: { + id: 'byName', + options: 'job', + }, + properties: [ + { + id: 'custom.hidden', + value: true, + }, + ], + }, + { + matcher: { + id: 'byName', + options: 'Time', + }, + properties: [ + { + id: 'custom.hidden', + value: true, + }, + ], + }, + { + matcher: { + id: 'byName', + options: '__name__', + }, + properties: [ + { + id: 'custom.hidden', + value: true, + }, + ], + }, + ], + }, + } { gridPos: { w: 12, h: 8 } }, local title_workaround( // Workaround for missing options.fieldOptions.defaults.title https://github.com/grafana/grafonnet-lib/pull/260 stat_panel, diff --git a/docker-compose.cartridge.yml b/docker-compose.cartridge.yml index 05b9f9e..1d883bc 100644 --- a/docker-compose.cartridge.yml +++ b/docker-compose.cartridge.yml @@ -58,7 +58,7 @@ services: - ./example_cluster/prometheus/alerts.yml:/etc/prometheus/cartridge_alerts.yml grafana: - image: grafana/grafana:8.1.3 + image: grafana/grafana:11.2.2 environment: GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION: "true" GF_AUTH_ANONYMOUS_ENABLED: "true" diff --git a/docker-compose.localapp.yml b/docker-compose.localapp.yml index 2ee9655..ed7c37a 100644 --- a/docker-compose.localapp.yml +++ b/docker-compose.localapp.yml @@ -37,7 +37,7 @@ services: - ./example_cluster/prometheus/alerts.yml:/etc/prometheus/alerts.yml grafana: - image: grafana/grafana:8.1.5 + image: grafana/grafana:11.2.2 environment: GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION: "true" GF_AUTH_ANONYMOUS_ENABLED: "true" diff --git a/docker-compose.tdg.yml b/docker-compose.tdg.yml index 43349f9..c53ee90 100644 --- a/docker-compose.tdg.yml +++ b/docker-compose.tdg.yml @@ -65,7 +65,7 @@ services: - ./example_cluster/prometheus/prometheus.tdg.yml:/etc/prometheus/prometheus.yml grafana: - image: grafana/grafana:8.1.5 + image: grafana/grafana:11.2.2 environment: GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION: "true" GF_AUTH_ANONYMOUS_ENABLED: "true" diff --git a/docker-compose.yml b/docker-compose.yml index fb8572c..2ff4c35 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -58,7 +58,7 @@ services: - ./example_cluster/prometheus/alerts.yml:/etc/prometheus/alerts.yml grafana: - image: grafana/grafana:8.1.3 + image: grafana/grafana:11.2.2 environment: GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION: "true" GF_AUTH_ANONYMOUS_ENABLED: "true" diff --git a/tests/InfluxDB/dashboard_cartridge_compiled.json b/tests/InfluxDB/dashboard_cartridge_compiled.json index 61cbb10..9c43153 100644 --- a/tests/InfluxDB/dashboard_cartridge_compiled.json +++ b/tests/InfluxDB/dashboard_cartridge_compiled.json @@ -5,7 +5,7 @@ "id": "grafana", "name": "Grafana", "type": "grafana", - "version": "8.0.0" + "version": "9.0.0" }, { "id": "graph", diff --git a/tests/InfluxDB/dashboard_custom_compiled.json b/tests/InfluxDB/dashboard_custom_compiled.json index 686a6d4..dfbcf6f 100644 --- a/tests/InfluxDB/dashboard_custom_compiled.json +++ b/tests/InfluxDB/dashboard_custom_compiled.json @@ -5,7 +5,7 @@ "id": "grafana", "name": "Grafana", "type": "grafana", - "version": "8.0.0" + "version": "9.0.0" }, { "id": "graph", diff --git a/tests/InfluxDB/dashboard_tarantool3_compiled.json b/tests/InfluxDB/dashboard_tarantool3_compiled.json index d1ca12d..3598c05 100644 --- a/tests/InfluxDB/dashboard_tarantool3_compiled.json +++ b/tests/InfluxDB/dashboard_tarantool3_compiled.json @@ -5,7 +5,7 @@ "id": "grafana", "name": "Grafana", "type": "grafana", - "version": "8.0.0" + "version": "9.0.0" }, { "id": "graph", diff --git a/tests/InfluxDB/dashboard_tdg_compiled.json b/tests/InfluxDB/dashboard_tdg_compiled.json index 4e49183..b502956 100644 --- a/tests/InfluxDB/dashboard_tdg_compiled.json +++ b/tests/InfluxDB/dashboard_tdg_compiled.json @@ -5,7 +5,7 @@ "id": "grafana", "name": "Grafana", "type": "grafana", - "version": "8.0.0" + "version": "9.0.0" }, { "id": "graph", diff --git a/tests/InfluxDB/dashboard_with_custom_panels_compiled.json b/tests/InfluxDB/dashboard_with_custom_panels_compiled.json index c57b69b..39c0be0 100644 --- a/tests/InfluxDB/dashboard_with_custom_panels_compiled.json +++ b/tests/InfluxDB/dashboard_with_custom_panels_compiled.json @@ -5,7 +5,7 @@ "id": "grafana", "name": "Grafana", "type": "grafana", - "version": "8.0.0" + "version": "9.0.0" }, { "id": "graph", diff --git a/tests/Prometheus/dashboard_cartridge_compiled.json b/tests/Prometheus/dashboard_cartridge_compiled.json index fa81dc9..9ecabd8 100644 --- a/tests/Prometheus/dashboard_cartridge_compiled.json +++ b/tests/Prometheus/dashboard_cartridge_compiled.json @@ -5,7 +5,7 @@ "id": "grafana", "name": "Grafana", "type": "grafana", - "version": "8.0.0" + "version": "9.0.0" }, { "id": "graph", @@ -69,7 +69,160 @@ { "columns": [ ], "datasource": "$prometheus", - "description": "Overview of Tarantool instances observed by Prometheus job.\n\nIf instance row is *red*, it means Prometheus can't reach\nURI specified in targets or ran into error.\nIf instance row is *green*, it means instance is up and running and\nPrometheus is successfully extracting metrics from it.\n\"Uptime\" column shows time since instant start.\n\nInstance alias filtering is disabled here.\n\nIf Prometheus job filter is not specified, displays running instances\nand ignores unreachable instances (we have no specific source to fetch)\n\nThis panel is designed to work with Prometheus client\nset up to have each Tarantool instance as a separate pull target.\n", + "description": "Overview of Tarantool instances observed by Prometheus job.\n\nIf instance row is *red*, it means Prometheus can't reach\nURI specified in targets or ran into error.\nIf instance row is *green*, it means instance is up and running and\nPrometheus is successfully extracting metrics from it.\n\"Uptime\" column shows time since instant start.\n\nInstance alias filtering is disabled here.\n\nIf Prometheus job filter is not specified, displays running instances\nand ignores unreachable instances (we have no specific source to fetch).\n\nColor scheme is expected to work properly only for Grafana 11+.\n\nThis panel is designed to work with Prometheus client\nset up to have each Tarantool instance as a separate pull target.\n", + "fieldConfig": { + "defaults": { + "custom": { + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [ ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "alias" + }, + "properties": [ + { + "id": "displayName", + "value": "Instance alias" + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "instance" + }, + "properties": [ + { + "id": "displayName", + "value": "Instance URI" + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value" + }, + "properties": [ + { + "id": "displayName", + "value": "Uptime" + }, + { + "id": "unit", + "value": "s" + }, + { + "id": "custom.cellOptions", + "value": { + "applyToRow": true, + "type": "color-background" + } + }, + { + "id": "custom.align" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(245, 54, 54, 0.9)", + "value": null + }, + { + "color": "rgba(50, 172, 45, 0.97)", + "value": 0.10000000000000001 + } + ] + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "job" + }, + "properties": [ + { + "id": "displayName", + "value": "job" + }, + { + "id": "custom.hidden", + "value": true + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "job" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "__name__" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true + } + ] + } + ] + }, "gridPos": { "h": 8, "w": 12, @@ -82,58 +235,7 @@ "col": 2, "desc": false }, - "styles": [ - { - "alias": "Instance alias", - "mappingType": 1, - "pattern": "alias", - "thresholds": [ ], - "type": "string" - }, - { - "alias": "Instance URI", - "mappingType": 1, - "pattern": "instance", - "thresholds": [ ], - "type": "string" - }, - { - "alias": "Uptime", - "colorMode": "row", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "decimals": 0, - "mappingType": 1, - "pattern": "Value", - "thresholds": [ - "0.1", - "0.1" - ], - "type": "number", - "unit": "s" - }, - { - "alias": "job", - "pattern": "job", - "thresholds": [ ], - "type": "hidden" - }, - { - "alias": "Time", - "pattern": "Time", - "thresholds": [ ], - "type": "hidden" - }, - { - "alias": "__name__", - "pattern": "__name__", - "thresholds": [ ], - "type": "hidden" - } - ], + "styles": null, "targets": [ { "expr": "up{job=~\"$job\"} * on(instance) group_left(alias) tnt_info_uptime{job=~\"$job\"} or\non(instance) label_replace(up{job=~\"$job\"}, \"alias\", \"Not available\", \"instance\", \".*\")\n", diff --git a/tests/Prometheus/dashboard_custom_compiled.json b/tests/Prometheus/dashboard_custom_compiled.json index f11c4f5..efcd4d3 100644 --- a/tests/Prometheus/dashboard_custom_compiled.json +++ b/tests/Prometheus/dashboard_custom_compiled.json @@ -5,7 +5,7 @@ "id": "grafana", "name": "Grafana", "type": "grafana", - "version": "8.0.0" + "version": "9.0.0" }, { "id": "graph", @@ -69,7 +69,160 @@ { "columns": [ ], "datasource": "$prometheus", - "description": "Overview of Tarantool instances observed by Prometheus job.\n\nIf instance row is *red*, it means Prometheus can't reach\nURI specified in targets or ran into error.\nIf instance row is *green*, it means instance is up and running and\nPrometheus is successfully extracting metrics from it.\n\"Uptime\" column shows time since instant start.\n\nInstance alias filtering is disabled here.\n\nIf Prometheus job filter is not specified, displays running instances\nand ignores unreachable instances (we have no specific source to fetch)\n\nThis panel is designed to work with Prometheus client\nset up to have each Tarantool instance as a separate pull target.\n", + "description": "Overview of Tarantool instances observed by Prometheus job.\n\nIf instance row is *red*, it means Prometheus can't reach\nURI specified in targets or ran into error.\nIf instance row is *green*, it means instance is up and running and\nPrometheus is successfully extracting metrics from it.\n\"Uptime\" column shows time since instant start.\n\nInstance alias filtering is disabled here.\n\nIf Prometheus job filter is not specified, displays running instances\nand ignores unreachable instances (we have no specific source to fetch).\n\nColor scheme is expected to work properly only for Grafana 11+.\n\nThis panel is designed to work with Prometheus client\nset up to have each Tarantool instance as a separate pull target.\n", + "fieldConfig": { + "defaults": { + "custom": { + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [ ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "alias" + }, + "properties": [ + { + "id": "displayName", + "value": "Instance alias" + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "instance" + }, + "properties": [ + { + "id": "displayName", + "value": "Instance URI" + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value" + }, + "properties": [ + { + "id": "displayName", + "value": "Uptime" + }, + { + "id": "unit", + "value": "s" + }, + { + "id": "custom.cellOptions", + "value": { + "applyToRow": true, + "type": "color-background" + } + }, + { + "id": "custom.align" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(245, 54, 54, 0.9)", + "value": null + }, + { + "color": "rgba(50, 172, 45, 0.97)", + "value": 0.10000000000000001 + } + ] + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "job" + }, + "properties": [ + { + "id": "displayName", + "value": "job" + }, + { + "id": "custom.hidden", + "value": true + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "job" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "__name__" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true + } + ] + } + ] + }, "gridPos": { "h": 8, "w": 12, @@ -82,58 +235,7 @@ "col": 2, "desc": false }, - "styles": [ - { - "alias": "Instance alias", - "mappingType": 1, - "pattern": "alias", - "thresholds": [ ], - "type": "string" - }, - { - "alias": "Instance URI", - "mappingType": 1, - "pattern": "instance", - "thresholds": [ ], - "type": "string" - }, - { - "alias": "Uptime", - "colorMode": "row", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "decimals": 0, - "mappingType": 1, - "pattern": "Value", - "thresholds": [ - "0.1", - "0.1" - ], - "type": "number", - "unit": "s" - }, - { - "alias": "job", - "pattern": "job", - "thresholds": [ ], - "type": "hidden" - }, - { - "alias": "Time", - "pattern": "Time", - "thresholds": [ ], - "type": "hidden" - }, - { - "alias": "__name__", - "pattern": "__name__", - "thresholds": [ ], - "type": "hidden" - } - ], + "styles": null, "targets": [ { "expr": "vendor_tt_tnt_info_uptime{vendor_app_label=\"MyCacheApplication\"}", diff --git a/tests/Prometheus/dashboard_tarantool3_compiled.json b/tests/Prometheus/dashboard_tarantool3_compiled.json index b0b4d75..fa7c8c4 100644 --- a/tests/Prometheus/dashboard_tarantool3_compiled.json +++ b/tests/Prometheus/dashboard_tarantool3_compiled.json @@ -5,7 +5,7 @@ "id": "grafana", "name": "Grafana", "type": "grafana", - "version": "8.0.0" + "version": "9.0.0" }, { "id": "graph", @@ -69,7 +69,160 @@ { "columns": [ ], "datasource": "$prometheus", - "description": "Overview of Tarantool instances observed by Prometheus job.\n\nIf instance row is *red*, it means Prometheus can't reach\nURI specified in targets or ran into error.\nIf instance row is *green*, it means instance is up and running and\nPrometheus is successfully extracting metrics from it.\n\"Uptime\" column shows time since instant start.\n\nInstance alias filtering is disabled here.\n\nIf Prometheus job filter is not specified, displays running instances\nand ignores unreachable instances (we have no specific source to fetch)\n\nThis panel is designed to work with Prometheus client\nset up to have each Tarantool instance as a separate pull target.\n", + "description": "Overview of Tarantool instances observed by Prometheus job.\n\nIf instance row is *red*, it means Prometheus can't reach\nURI specified in targets or ran into error.\nIf instance row is *green*, it means instance is up and running and\nPrometheus is successfully extracting metrics from it.\n\"Uptime\" column shows time since instant start.\n\nInstance alias filtering is disabled here.\n\nIf Prometheus job filter is not specified, displays running instances\nand ignores unreachable instances (we have no specific source to fetch).\n\nColor scheme is expected to work properly only for Grafana 11+.\n\nThis panel is designed to work with Prometheus client\nset up to have each Tarantool instance as a separate pull target.\n", + "fieldConfig": { + "defaults": { + "custom": { + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [ ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "alias" + }, + "properties": [ + { + "id": "displayName", + "value": "Instance alias" + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "instance" + }, + "properties": [ + { + "id": "displayName", + "value": "Instance URI" + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value" + }, + "properties": [ + { + "id": "displayName", + "value": "Uptime" + }, + { + "id": "unit", + "value": "s" + }, + { + "id": "custom.cellOptions", + "value": { + "applyToRow": true, + "type": "color-background" + } + }, + { + "id": "custom.align" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(245, 54, 54, 0.9)", + "value": null + }, + { + "color": "rgba(50, 172, 45, 0.97)", + "value": 0.10000000000000001 + } + ] + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "job" + }, + "properties": [ + { + "id": "displayName", + "value": "job" + }, + { + "id": "custom.hidden", + "value": true + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "job" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "__name__" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true + } + ] + } + ] + }, "gridPos": { "h": 8, "w": 12, @@ -82,58 +235,7 @@ "col": 2, "desc": false }, - "styles": [ - { - "alias": "Instance alias", - "mappingType": 1, - "pattern": "alias", - "thresholds": [ ], - "type": "string" - }, - { - "alias": "Instance URI", - "mappingType": 1, - "pattern": "instance", - "thresholds": [ ], - "type": "string" - }, - { - "alias": "Uptime", - "colorMode": "row", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "decimals": 0, - "mappingType": 1, - "pattern": "Value", - "thresholds": [ - "0.1", - "0.1" - ], - "type": "number", - "unit": "s" - }, - { - "alias": "job", - "pattern": "job", - "thresholds": [ ], - "type": "hidden" - }, - { - "alias": "Time", - "pattern": "Time", - "thresholds": [ ], - "type": "hidden" - }, - { - "alias": "__name__", - "pattern": "__name__", - "thresholds": [ ], - "type": "hidden" - } - ], + "styles": null, "targets": [ { "expr": "up{job=~\"$job\"} * on(instance) group_left(alias) tnt_info_uptime{job=~\"$job\"} or\non(instance) label_replace(up{job=~\"$job\"}, \"alias\", \"Not available\", \"instance\", \".*\")\n", diff --git a/tests/Prometheus/dashboard_tdg_compiled.json b/tests/Prometheus/dashboard_tdg_compiled.json index 13dbd67..5d179cd 100644 --- a/tests/Prometheus/dashboard_tdg_compiled.json +++ b/tests/Prometheus/dashboard_tdg_compiled.json @@ -5,7 +5,7 @@ "id": "grafana", "name": "Grafana", "type": "grafana", - "version": "8.0.0" + "version": "9.0.0" }, { "id": "graph", @@ -69,7 +69,160 @@ { "columns": [ ], "datasource": "$prometheus", - "description": "Overview of Tarantool instances observed by Prometheus job.\n\nIf instance row is *red*, it means Prometheus can't reach\nURI specified in targets or ran into error.\nIf instance row is *green*, it means instance is up and running and\nPrometheus is successfully extracting metrics from it.\n\"Uptime\" column shows time since instant start.\n\nInstance alias filtering is disabled here.\n\nIf Prometheus job filter is not specified, displays running instances\nand ignores unreachable instances (we have no specific source to fetch)\n\nThis panel is designed to work with Prometheus client\nset up to have each Tarantool instance as a separate pull target.\n", + "description": "Overview of Tarantool instances observed by Prometheus job.\n\nIf instance row is *red*, it means Prometheus can't reach\nURI specified in targets or ran into error.\nIf instance row is *green*, it means instance is up and running and\nPrometheus is successfully extracting metrics from it.\n\"Uptime\" column shows time since instant start.\n\nInstance alias filtering is disabled here.\n\nIf Prometheus job filter is not specified, displays running instances\nand ignores unreachable instances (we have no specific source to fetch).\n\nColor scheme is expected to work properly only for Grafana 11+.\n\nThis panel is designed to work with Prometheus client\nset up to have each Tarantool instance as a separate pull target.\n", + "fieldConfig": { + "defaults": { + "custom": { + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [ ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "alias" + }, + "properties": [ + { + "id": "displayName", + "value": "Instance alias" + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "instance" + }, + "properties": [ + { + "id": "displayName", + "value": "Instance URI" + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value" + }, + "properties": [ + { + "id": "displayName", + "value": "Uptime" + }, + { + "id": "unit", + "value": "s" + }, + { + "id": "custom.cellOptions", + "value": { + "applyToRow": true, + "type": "color-background" + } + }, + { + "id": "custom.align" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(245, 54, 54, 0.9)", + "value": null + }, + { + "color": "rgba(50, 172, 45, 0.97)", + "value": 0.10000000000000001 + } + ] + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "job" + }, + "properties": [ + { + "id": "displayName", + "value": "job" + }, + { + "id": "custom.hidden", + "value": true + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "job" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "__name__" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true + } + ] + } + ] + }, "gridPos": { "h": 8, "w": 12, @@ -82,58 +235,7 @@ "col": 2, "desc": false }, - "styles": [ - { - "alias": "Instance alias", - "mappingType": 1, - "pattern": "alias", - "thresholds": [ ], - "type": "string" - }, - { - "alias": "Instance URI", - "mappingType": 1, - "pattern": "instance", - "thresholds": [ ], - "type": "string" - }, - { - "alias": "Uptime", - "colorMode": "row", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "decimals": 0, - "mappingType": 1, - "pattern": "Value", - "thresholds": [ - "0.1", - "0.1" - ], - "type": "number", - "unit": "s" - }, - { - "alias": "job", - "pattern": "job", - "thresholds": [ ], - "type": "hidden" - }, - { - "alias": "Time", - "pattern": "Time", - "thresholds": [ ], - "type": "hidden" - }, - { - "alias": "__name__", - "pattern": "__name__", - "thresholds": [ ], - "type": "hidden" - } - ], + "styles": null, "targets": [ { "expr": "up{job=~\"$job\"} * on(instance) group_left(alias) tnt_info_uptime{job=~\"$job\"} or\non(instance) label_replace(up{job=~\"$job\"}, \"alias\", \"Not available\", \"instance\", \".*\")\n", diff --git a/tests/Prometheus/dashboard_with_custom_panels_compiled.json b/tests/Prometheus/dashboard_with_custom_panels_compiled.json index 12f3e9e..ce5c042 100644 --- a/tests/Prometheus/dashboard_with_custom_panels_compiled.json +++ b/tests/Prometheus/dashboard_with_custom_panels_compiled.json @@ -5,7 +5,7 @@ "id": "grafana", "name": "Grafana", "type": "grafana", - "version": "8.0.0" + "version": "9.0.0" }, { "id": "graph", @@ -69,7 +69,160 @@ { "columns": [ ], "datasource": "$prometheus", - "description": "Overview of Tarantool instances observed by Prometheus job.\n\nIf instance row is *red*, it means Prometheus can't reach\nURI specified in targets or ran into error.\nIf instance row is *green*, it means instance is up and running and\nPrometheus is successfully extracting metrics from it.\n\"Uptime\" column shows time since instant start.\n\nInstance alias filtering is disabled here.\n\nIf Prometheus job filter is not specified, displays running instances\nand ignores unreachable instances (we have no specific source to fetch)\n\nThis panel is designed to work with Prometheus client\nset up to have each Tarantool instance as a separate pull target.\n", + "description": "Overview of Tarantool instances observed by Prometheus job.\n\nIf instance row is *red*, it means Prometheus can't reach\nURI specified in targets or ran into error.\nIf instance row is *green*, it means instance is up and running and\nPrometheus is successfully extracting metrics from it.\n\"Uptime\" column shows time since instant start.\n\nInstance alias filtering is disabled here.\n\nIf Prometheus job filter is not specified, displays running instances\nand ignores unreachable instances (we have no specific source to fetch).\n\nColor scheme is expected to work properly only for Grafana 11+.\n\nThis panel is designed to work with Prometheus client\nset up to have each Tarantool instance as a separate pull target.\n", + "fieldConfig": { + "defaults": { + "custom": { + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [ ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "alias" + }, + "properties": [ + { + "id": "displayName", + "value": "Instance alias" + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "instance" + }, + "properties": [ + { + "id": "displayName", + "value": "Instance URI" + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value" + }, + "properties": [ + { + "id": "displayName", + "value": "Uptime" + }, + { + "id": "unit", + "value": "s" + }, + { + "id": "custom.cellOptions", + "value": { + "applyToRow": true, + "type": "color-background" + } + }, + { + "id": "custom.align" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(245, 54, 54, 0.9)", + "value": null + }, + { + "color": "rgba(50, 172, 45, 0.97)", + "value": 0.10000000000000001 + } + ] + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "job" + }, + "properties": [ + { + "id": "displayName", + "value": "job" + }, + { + "id": "custom.hidden", + "value": true + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "job" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "__name__" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true + } + ] + } + ] + }, "gridPos": { "h": 8, "w": 12, @@ -82,58 +235,7 @@ "col": 2, "desc": false }, - "styles": [ - { - "alias": "Instance alias", - "mappingType": 1, - "pattern": "alias", - "thresholds": [ ], - "type": "string" - }, - { - "alias": "Instance URI", - "mappingType": 1, - "pattern": "instance", - "thresholds": [ ], - "type": "string" - }, - { - "alias": "Uptime", - "colorMode": "row", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "decimals": 0, - "mappingType": 1, - "pattern": "Value", - "thresholds": [ - "0.1", - "0.1" - ], - "type": "number", - "unit": "s" - }, - { - "alias": "job", - "pattern": "job", - "thresholds": [ ], - "type": "hidden" - }, - { - "alias": "Time", - "pattern": "Time", - "thresholds": [ ], - "type": "hidden" - }, - { - "alias": "__name__", - "pattern": "__name__", - "thresholds": [ ], - "type": "hidden" - } - ], + "styles": null, "targets": [ { "expr": "up{job=~\"$job\"} * on(instance) group_left(alias) tnt_info_uptime{job=~\"$job\"} or\non(instance) label_replace(up{job=~\"$job\"}, \"alias\", \"Not available\", \"instance\", \".*\")\n",