Skip to content

Commit

Permalink
fix: replace DS_PROMETHEUS with datasource variable (#4119)
Browse files Browse the repository at this point in the history
Signed-off-by: oliviermichaelis <38879457+oliviermichaelis@users.noreply.github.com>
  • Loading branch information
oliviermichaelis committed Jun 23, 2023
1 parent 29d8de2 commit c662e41
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 89 deletions.
Original file line number Diff line number Diff line change
@@ -1,45 +1,12 @@
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "8.1.6"
},
{
"type": "panel",
"id": "heatmap",
"name": "Heatmap",
"version": ""
},
{
"type": "datasource",
"id": "prometheus",
"name": "Prometheus",
"version": "1.0.0"
},
{
"type": "panel",
"id": "text",
"name": "Text",
"version": ""
}
],
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
Expand Down Expand Up @@ -77,6 +44,7 @@
"pluginVersion": "8.1.6",
"targets": [
{
"datasource": {},
"queryType": "randomWalk",
"refId": "A"
}
Expand All @@ -100,7 +68,9 @@
"mode": "spectrum"
},
"dataFormat": "tsbuckets",
"datasource": "${DS_PROMETHEUS}",
"datasource": {
"uid": "${datasource}"
},
"description": "Aggregates the duration of all bind operations of the Allocation controller.\n\nThe color of each \"bucket\" is a visual clue to the number of bind operations that completed within that duration range.\n\nMouse-over a bucket to display exact values.",
"gridPos": {
"h": 8,
Expand All @@ -120,6 +90,9 @@
"reverseYBuckets": false,
"targets": [
{
"datasource": {
"uid": "${datasource}"
},
"exemplar": true,
"expr": "sum(increase(karpenter_allocation_controller_bind_duration_seconds_bucket[$__interval])) by (le)",
"format": "heatmap",
Expand Down Expand Up @@ -167,7 +140,9 @@
"mode": "spectrum"
},
"dataFormat": "tsbuckets",
"datasource": "${DS_PROMETHEUS}",
"datasource": {
"uid": "${datasource}"
},
"description": "Aggregates the duration of all binpack operations of the Allocation controller.\n\nThe color of each \"bucket\" is a visual clue to the number of binpack operations that completed within that duration range.\n\nMouse-over a bucket to display exact values.",
"gridPos": {
"h": 8,
Expand All @@ -187,6 +162,9 @@
"reverseYBuckets": false,
"targets": [
{
"datasource": {
"uid": "${datasource}"
},
"exemplar": true,
"expr": "sum(increase(karpenter_allocation_controller_binpacking_duration_seconds_bucket[$__interval])) by (le)",
"format": "heatmap",
Expand Down Expand Up @@ -233,7 +211,9 @@
"mode": "spectrum"
},
"dataFormat": "tsbuckets",
"datasource": "${DS_PROMETHEUS}",
"datasource": {
"uid": "${datasource}"
},
"description": "Aggregates the duration of all scheduling operations of the Allocation controller for provisioner $provisioner.\n\nThe color of each \"bucket\" is a visual clue to the number of scheduling operations that completed within that duration range.\n\nMouse-over a bucket to display exact values.",
"gridPos": {
"h": 8,
Expand All @@ -253,6 +233,9 @@
"reverseYBuckets": false,
"targets": [
{
"datasource": {
"uid": "${datasource}"
},
"exemplar": true,
"expr": "sum(increase(karpenter_allocation_controller_scheduling_duration_seconds_bucket{provisioner=\"$provisioner\"}[$__interval])) by (le)",
"format": "heatmap",
Expand Down Expand Up @@ -296,7 +279,9 @@
{
"allValue": null,
"current": {},
"datasource": "${DS_PROMETHEUS}",
"datasource": {
"uid": "${datasource}"
},
"definition": "label_values(karpenter_allocation_controller_scheduling_duration_seconds_bucket, provisioner)",
"description": "Karpenter provisioner",
"error": null,
Expand All @@ -315,6 +300,24 @@
"skipUrlSync": false,
"sort": 1,
"type": "query"
},
{
"current": {
"selected": false,
"text": "Prometheus",
"value": "Prometheus"
},
"hide": 2,
"includeAll": false,
"label": "Data Source",
"multi": false,
"name": "datasource",
"options": [],
"query": "prometheus",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"type": "datasource"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,51 +1,12 @@
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "8.1.6"
},
{
"type": "panel",
"id": "graph",
"name": "Graph (old)",
"version": ""
},
{
"type": "panel",
"id": "heatmap",
"name": "Heatmap",
"version": ""
},
{
"type": "datasource",
"id": "prometheus",
"name": "Prometheus",
"version": "1.0.0"
},
{
"type": "panel",
"id": "text",
"name": "Text",
"version": ""
}
],
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
Expand Down Expand Up @@ -92,7 +53,9 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_PROMETHEUS}",
"datasource": {
"uid": "${datasource}"
},
"description": "",
"fill": 1,
"fillGradient": 2,
Expand Down Expand Up @@ -130,6 +93,9 @@
"steppedLine": false,
"targets": [
{
"datasource": {
"uid": "${datasource}"
},
"exemplar": true,
"expr": "workqueue_depth{name=\"$controller\"}",
"interval": "",
Expand Down Expand Up @@ -190,7 +156,9 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_PROMETHEUS}",
"datasource": {
"uid": "${datasource}"
},
"description": "The rate of completed reconciliations per minute broken out by result status.",
"fill": 1,
"fillGradient": 1,
Expand Down Expand Up @@ -228,6 +196,9 @@
"steppedLine": false,
"targets": [
{
"datasource": {
"uid": "${datasource}"
},
"exemplar": true,
"expr": "rate(controller_runtime_reconcile_total{controller=\"$controller\"}[$trailing]) * 60",
"interval": "",
Expand Down Expand Up @@ -292,7 +263,9 @@
"mode": "spectrum"
},
"dataFormat": "tsbuckets",
"datasource": "${DS_PROMETHEUS}",
"datasource": {
"uid": "${datasource}"
},
"description": "Aggregates the duration of the reconciliation process.\n\nThe color of each \"bucket\" is a visual clue to the number of reconciliations that completed within that time range.\n\nMouse-over a bucket to display exact values.",
"gridPos": {
"h": 8,
Expand All @@ -312,6 +285,9 @@
"reverseYBuckets": false,
"targets": [
{
"datasource": {
"uid": "${datasource}"
},
"exemplar": true,
"expr": "sum(increase(controller_runtime_reconcile_time_seconds_bucket{controller=\"$controller\"}[$__interval])) by (le)",
"format": "heatmap",
Expand Down Expand Up @@ -350,15 +326,17 @@
}
],
"refresh": "1m",
"schemaVersion": 30,
"schemaVersion": 31,
"style": "dark",
"tags": [],
"templating": {
"list": [
{
"allValue": "",
"current": {},
"datasource": "${DS_PROMETHEUS}",
"datasource": {
"uid": "${datasource}"
},
"definition": "label_values(controller_runtime_reconcile_errors_total, controller)",
"description": "Kubernetes controller",
"error": null,
Expand Down Expand Up @@ -431,6 +409,20 @@
"queryValue": "",
"skipUrlSync": false,
"type": "custom"
},
{
"current": {},
"hide": 2,
"includeAll": false,
"label": "Data Source",
"multi": false,
"name": "datasource",
"options": [],
"query": "prometheus",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"type": "datasource"
}
]
},
Expand Down

0 comments on commit c662e41

Please sign in to comment.