From 2c5ef0bbb9bae83762d70b7e79264e669736410a Mon Sep 17 00:00:00 2001 From: vprashar2929 Date: Fri, 6 Dec 2024 23:06:57 +0530 Subject: [PATCH] fix(dashboard): replace hardcoded UID with datasource variable This commit resolves the issue where the dashboard failed to load due to hardcoded UID value. Instead of using a fixed UID the UID is now dynamically set to `${datasource}` Grafana variable. Signed-off-by: vprashar2929 --- .../assets/prometheus/dashboard.json | 94 +++++++++---------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/hack/dashboard/assets/prometheus/dashboard.json b/hack/dashboard/assets/prometheus/dashboard.json index dee842a5..70171929 100644 --- a/hack/dashboard/assets/prometheus/dashboard.json +++ b/hack/dashboard/assets/prometheus/dashboard.json @@ -22,7 +22,7 @@ { "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "enable": true, "expr": "sum(changes(prometheus_config_last_reload_success_timestamp_seconds{instance=~\"$instance\"}[10m])) by (instance)", @@ -37,7 +37,7 @@ { "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "enable": true, "expr": "count(sum(up{instance=\"$instance\"}) by (instance) < 1)", @@ -65,7 +65,7 @@ "collapsed": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "gridPos": { "h": 1, @@ -81,7 +81,7 @@ { "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "description": "Percentage of uptime during the most recent $interval period. Change the period with the 'interval' dropdown above.", "fieldConfig": { @@ -163,7 +163,7 @@ "columns": [], "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "description": "Servers which are DOWN RIGHT NOW! \nFIX THEM!!", "fontSize": "100%", @@ -244,7 +244,7 @@ { "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "description": "Total number of time series in prometheus", "fieldConfig": { @@ -323,7 +323,7 @@ { "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "fieldConfig": { "defaults": { @@ -399,7 +399,7 @@ "collapsed": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "gridPos": { "h": 1, @@ -415,7 +415,7 @@ { "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "description": "The total number of rule group evaluations missed due to slow rule group evaluation.", "fieldConfig": { @@ -494,7 +494,7 @@ { "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "description": "The total number of rule group evaluations skipped due to throttled metric storage.", "fieldConfig": { @@ -573,7 +573,7 @@ { "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "description": "Total number of scrapes that hit the sample limit and were rejected.", "fieldConfig": { @@ -652,7 +652,7 @@ { "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "description": "Number of times the database failed to reload block data from disk.", "fieldConfig": { @@ -731,7 +731,7 @@ { "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "description": "Sum of all skipped scrapes", "fieldConfig": { @@ -811,7 +811,7 @@ "collapsed": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "gridPos": { "h": 1, @@ -831,7 +831,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "description": "All non-zero failures and errors", "fill": 1, @@ -1067,7 +1067,7 @@ "collapsed": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "gridPos": { "h": 1, @@ -1087,7 +1087,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "fill": 1, "fillGradient": 0, @@ -1175,7 +1175,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "fill": 1, "fillGradient": 0, @@ -1258,7 +1258,7 @@ "collapsed": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "gridPos": { "h": 1, @@ -1278,7 +1278,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "fill": 1, "fillGradient": 0, @@ -1364,7 +1364,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "fill": 1, "fillGradient": 0, @@ -1459,7 +1459,7 @@ "collapsed": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "gridPos": { "h": 1, @@ -1481,7 +1481,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "description": "Rate of total number of appended samples", "fill": 1, @@ -1565,7 +1565,7 @@ "collapsed": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "gridPos": { "h": 1, @@ -1585,7 +1585,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "description": "Total number of syncs that were executed on a scrape pool.", "fill": 1, @@ -1673,7 +1673,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "description": "Actual interval to sync the scrape pool.", "fill": 1, @@ -1757,7 +1757,7 @@ "collapsed": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "gridPos": { "h": 1, @@ -1777,7 +1777,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "fill": 1, "fillGradient": 0, @@ -1862,7 +1862,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "description": "Total number of rejected scrapes", "fill": 1, @@ -1974,7 +1974,7 @@ "collapsed": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "gridPos": { "h": 1, @@ -1994,7 +1994,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "description": "The duration of rule group evaluations", "fill": 1, @@ -2081,7 +2081,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "fill": 1, "fillGradient": 0, @@ -2166,7 +2166,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "fill": 1, "fillGradient": 0, @@ -2252,7 +2252,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "description": "Rule-group evaluations \n - total\n - missed due to slow rule group evaluation\n - skipped due to throttled metric storage", "fill": 1, @@ -2352,7 +2352,7 @@ "collapsed": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "gridPos": { "h": 1, @@ -2372,7 +2372,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "fill": 1, "fillGradient": 0, @@ -2455,7 +2455,7 @@ "collapsed": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "gridPos": { "h": 1, @@ -2475,7 +2475,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "fill": 1, "fillGradient": 0, @@ -2561,7 +2561,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "fill": 1, "fillGradient": 0, @@ -2646,7 +2646,7 @@ "collapsed": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "gridPos": { "h": 1, @@ -2666,7 +2666,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "description": "GC invocation durations", "fill": 1, @@ -2748,7 +2748,7 @@ "collapsed": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "gridPos": { "h": 1, @@ -2768,7 +2768,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "description": "This is probably wrong! Please help.", "fill": 1, @@ -2997,7 +2997,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "fill": 1, "fillGradient": 0, @@ -3083,7 +3083,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "fill": 1, "fillGradient": 0, @@ -3181,7 +3181,7 @@ }, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "definition": "", "hide": 0, @@ -3210,7 +3210,7 @@ }, "datasource": { "type": "prometheus", - "uid": "P1809F7CD0C75ACF3" + "uid": "${datasource}" }, "definition": "", "hide": 0,