From d316a39ddc4846e574c16aacddbdf9343f9bb219 Mon Sep 17 00:00:00 2001 From: Sebastian Gaiser Date: Mon, 6 May 2024 09:06:53 +0000 Subject: [PATCH] fix(examples,grafana): correct dashboards for Grafana 10.X Signed-off-by: Sebastian Gaiser --- examples/grafana/detail.json | 118 +++++++++++++---------------------- examples/grafana/list.json | 56 +++-------------- 2 files changed, 55 insertions(+), 119 deletions(-) diff --git a/examples/grafana/detail.json b/examples/grafana/detail.json index c84857b4..80da5b35 100644 --- a/examples/grafana/detail.json +++ b/examples/grafana/detail.json @@ -1,41 +1,4 @@ { - "__inputs": [ - { - "name": "DS_PROMETHEUS", - "label": "prometheus", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } - ], - "__elements": {}, - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "9.1.5" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "timeseries", - "name": "Time series", - "version": "" - } - ], "annotations": { "list": [ { @@ -62,14 +25,13 @@ "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 1, - "id": null, "links": [], "liveNow": false, "panels": [ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${datasource}" }, "description": "", "fieldConfig": { @@ -112,15 +74,17 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "9.1.5", + "pluginVersion": "10.4.1", "targets": [ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${datasource}" }, "editorMode": "code", "exemplar": false, @@ -137,7 +101,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${datasource}" }, "description": "", "fieldConfig": { @@ -179,15 +143,17 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "9.1.5", + "pluginVersion": "10.4.1", "targets": [ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${datasource}" }, "editorMode": "code", "exemplar": false, @@ -204,7 +170,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${datasource}" }, "description": "", "fieldConfig": { @@ -251,15 +217,17 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "9.1.5", + "pluginVersion": "10.4.1", "targets": [ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${datasource}" }, "editorMode": "code", "exemplar": false, @@ -276,7 +244,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${datasource}" }, "description": "", "fieldConfig": { @@ -323,15 +291,17 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "9.1.5", + "pluginVersion": "10.4.1", "targets": [ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${datasource}" }, "editorMode": "code", "exemplar": false, @@ -348,7 +318,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${datasource}" }, "description": "", "fieldConfig": { @@ -358,6 +328,7 @@ "seriesBy": "last" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", @@ -372,6 +343,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 0, "pointSize": 5, @@ -430,7 +402,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${datasource}" }, "editorMode": "code", "expr": "((pyrra_availability{slo=\"$slo\"} - pyrra_objective{slo=\"$slo\"})) / (1 - pyrra_objective{slo=\"$slo\"})", @@ -445,7 +417,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${datasource}" }, "description": "", "fieldConfig": { @@ -454,6 +426,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", @@ -468,6 +441,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 2, "pointSize": 5, @@ -526,7 +500,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${datasource}" }, "editorMode": "code", "expr": "sum(rate(pyrra_requests_total{slo=\"$slo\"}[$__rate_interval]))", @@ -542,7 +516,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${datasource}" }, "description": "", "fieldConfig": { @@ -551,6 +525,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", @@ -566,6 +541,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 2, "pointSize": 5, @@ -641,7 +617,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${datasource}" }, "editorMode": "builder", "expr": "sum(rate(pyrra_errors_total{slo=\"$slo\"}[$__rate_interval]))", @@ -656,22 +632,17 @@ } ], "refresh": "10s", - "schemaVersion": 37, - "style": "dark", + "schemaVersion": 39, "tags": [], "templating": { "list": [ { - "current": { - "selected": false, - "text": "prometheus", - "value": "prometheus" - }, + "current": {}, "hide": 0, "includeAll": false, - "label": "Prometheus", + "label": "Data source", "multi": false, - "name": "prometheus", + "name": "datasource", "options": [], "query": "prometheus", "queryValue": "", @@ -684,9 +655,9 @@ "current": {}, "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${datasource}" }, - "definition": "label_values(pyrra_objective, slo)", + "definition": "label_values(pyrra_objective,slo)", "hide": 0, "includeAll": false, "label": "SLO", @@ -694,8 +665,9 @@ "name": "slo", "options": [], "query": { - "query": "label_values(pyrra_objective, slo)", - "refId": "StandardVariableQuery" + "qryType": 1, + "query": "label_values(pyrra_objective,slo)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, "regex": "", diff --git a/examples/grafana/list.json b/examples/grafana/list.json index 7f77df26..806213d3 100644 --- a/examples/grafana/list.json +++ b/examples/grafana/list.json @@ -1,35 +1,4 @@ { - "__inputs": [ - { - "name": "DS_PROMETHEUS", - "label": "prometheus", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } - ], - "__elements": {}, - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "9.1.5" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - } - ], "annotations": { "list": [ { @@ -62,7 +31,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${datasource}" }, "description": "", "fieldConfig": { @@ -256,12 +225,12 @@ } ] }, - "pluginVersion": "9.1.5", + "pluginVersion": "10.4.1", "targets": [ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${datasource}" }, "editorMode": "code", "exemplar": false, @@ -276,7 +245,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${datasource}" }, "editorMode": "code", "exemplar": false, @@ -292,7 +261,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${datasource}" }, "editorMode": "code", "exemplar": false, @@ -307,7 +276,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${datasource}" }, "editorMode": "code", "exemplar": false, @@ -334,22 +303,17 @@ "type": "table" } ], - "schemaVersion": 37, - "style": "dark", + "schemaVersion": 39, "tags": [], "templating": { "list": [ { - "current": { - "selected": true, - "text": "prometheus", - "value": "prometheus" - }, + "current": {}, "hide": 0, "includeAll": false, - "label": "Prometheus", + "label": "Data source", "multi": false, - "name": "prometheus", + "name": "datasource", "options": [], "query": "prometheus", "queryValue": "",