diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f38751..da36f07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project's packages adheres to [Semantic Versioning](http://semver.org/s ## [Unreleased] +### Changed + +- Add datasource selector to sloth dashboards. + ## [1.4.4] - 2024-02-19 ### Fixed diff --git a/helm/sloth/templates/grafana-dashboard-sloth-overview.yaml b/helm/sloth/templates/grafana-dashboard-sloth-overview.yaml index 458c595..957ceeb 100644 --- a/helm/sloth/templates/grafana-dashboard-sloth-overview.yaml +++ b/helm/sloth/templates/grafana-dashboard-sloth-overview.yaml @@ -47,7 +47,7 @@ data: "collapsed": false, "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "gridPos": { "h": 1, @@ -61,7 +61,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "refId": "A" } @@ -72,7 +72,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "fieldConfig": { "defaults": { @@ -124,7 +124,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "exemplar": true, "expr": "count(sloth_slo_info)", @@ -139,7 +139,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "fieldConfig": { "defaults": { @@ -191,7 +191,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "exemplar": true, "expr": "count(max(sloth_slo_info) by (sloth_service))", @@ -206,7 +206,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "fieldConfig": { "defaults": { @@ -267,7 +267,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "editorMode": "code", "exemplar": true, @@ -284,7 +284,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "fieldConfig": { "defaults": { @@ -337,7 +337,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "editorMode": "code", "exemplar": true, @@ -354,7 +354,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "fieldConfig": { "defaults": { @@ -407,7 +407,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "exemplar": true, "expr": "max(ALERTS{sloth_id!=\"\",sloth_severity=\"page\"}) OR on() vector(0)", @@ -423,7 +423,7 @@ data: "collapsed": false, "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "gridPos": { "h": 1, @@ -437,7 +437,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "refId": "A" } @@ -448,7 +448,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "description": "The burning rate of the all the Service SLOs", "fieldConfig": { @@ -530,7 +530,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "editorMode": "code", "exemplar": true, @@ -548,7 +548,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "description": "The SLOs that currently are burning more error budget that then available", "fieldConfig": { @@ -662,7 +662,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "editorMode": "code", "exemplar": true, @@ -716,7 +716,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "description": "Shows all the SLOs at the same time burning rate state", "fieldConfig": { @@ -776,7 +776,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "editorMode": "code", "exemplar": true, @@ -794,7 +794,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "description": "", "fieldConfig": { @@ -853,7 +853,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "editorMode": "code", "exemplar": true, @@ -881,12 +881,34 @@ data: ], "templating": { "list": [ + { + "current": { + "selected": false, + "text": "default", + "value": "default" + }, + "hide": 0, + "includeAll": false, + "label": "Data source", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, { "current": { "selected": false, "text": "gaia", "value": "gaia" }, + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, "definition": "label_values(slo:period_error_budget_remaining:ratio, cluster_id)", "hide": 0, "includeAll": false, @@ -910,6 +932,10 @@ data: "text": "1", "value": "1" }, + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, "description": "The minimum burning budget rate (0-1) to show on the general SLOs block", "hide": 0, "label": "Min Burning rate", diff --git a/helm/sloth/templates/grafana-dashboard-sloth.yaml b/helm/sloth/templates/grafana-dashboard-sloth.yaml index ac1cb18..adcb74e 100644 --- a/helm/sloth/templates/grafana-dashboard-sloth.yaml +++ b/helm/sloth/templates/grafana-dashboard-sloth.yaml @@ -47,7 +47,7 @@ data: "collapsed": false, "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "gridPos": { "h": 1, @@ -61,7 +61,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "refId": "A" } @@ -72,7 +72,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "description": "The SLOs that currently are burning more error budget that then available", "fieldConfig": { @@ -175,7 +175,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "editorMode": "code", "exemplar": true, @@ -236,7 +236,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "description": "The burning rate of the all the Service SLOs", "fieldConfig": { @@ -343,7 +343,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "editorMode": "code", "exemplar": true, @@ -362,7 +362,7 @@ data: "collapsed": false, "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "gridPos": { "h": 1, @@ -378,7 +378,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "refId": "A" } @@ -389,7 +389,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "fieldConfig": { "defaults": { @@ -439,7 +439,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "exemplar": false, "expr": "slo:objective:ratio{sloth_service=\"${service}\", sloth_slo=\"${slo}\"}", @@ -456,7 +456,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "fieldConfig": { "defaults": { @@ -573,7 +573,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "editorMode": "code", "exemplar": true, @@ -587,7 +587,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "editorMode": "code", "exemplar": false, @@ -606,7 +606,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "description": "", "fieldConfig": { @@ -657,7 +657,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "exemplar": false, "expr": "sloth_slo_info{sloth_service=\"${service}\", sloth_slo=\"${slo}\"}", @@ -673,7 +673,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "description": "This moment burning % of the budget.", "fieldConfig": { @@ -732,7 +732,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "editorMode": "code", "exemplar": false, @@ -749,7 +749,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "description": "This month remaining error budget, starts the 1st of the month and ends 28th-31st (not rolling window)", "fieldConfig": { @@ -808,7 +808,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "editorMode": "code", "exemplar": false, @@ -825,7 +825,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "description": "A rolling window of the total period (30d) error budget remaining.", "fieldConfig": { @@ -884,7 +884,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "editorMode": "code", "exemplar": false, @@ -901,7 +901,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "description": "This graph shows the month error budget burn down chart (starts the 1st until the end of the month)", "fieldConfig": { @@ -1024,7 +1024,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "editorMode": "code", "exemplar": true, @@ -1039,7 +1039,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "exemplar": true, "expr": "1 - sum_over_time(\n (\n (1 / (days_in_month() * 24)) *\n (month() == bool vector(${__to:date:M}))\n )[32d:1h]\n)", @@ -1067,7 +1067,7 @@ data: "dataFormat": "timeseries", "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "description": "", "fieldConfig": { @@ -1142,7 +1142,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "editorMode": "code", "exemplar": true, @@ -1176,7 +1176,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "fieldConfig": { "defaults": { @@ -1249,7 +1249,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "editorMode": "code", "exemplar": false, @@ -1266,7 +1266,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "fieldConfig": { "defaults": { @@ -1339,7 +1339,7 @@ data: { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "editorMode": "code", "exemplar": false, @@ -1364,6 +1364,24 @@ data: ], "templating": { "list": [ + { + "current": { + "selected": false, + "text": "default", + "value": "default" + }, + "hide": 0, + "includeAll": false, + "label": "Data source", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, { "current": { "selected": true, @@ -1372,7 +1390,7 @@ data: }, "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "definition": "label_values(apiserver_request_total, cluster_id)", "hide": 0, @@ -1399,7 +1417,7 @@ data: }, "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "definition": "label_values(slo:objective:ratio, sloth_service)", "hide": 0, @@ -1428,7 +1446,7 @@ data: }, "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "$datasource" }, "definition": "label_values(slo:objective:ratio{sloth_service=\"${service}\"}, sloth_slo)", "hide": 0,