* Dashboard migration: preserve legacy string datasource references Fix v1beta1 → v2alpha1 conversion to handle legacy string datasource references in QueryVariable, AdhocVariable, and GroupByVariable. Previously, string datasource references (both template variables like "$datasource" and direct names/UIDs like "prometheus") were being dropped during conversion, causing variable chaining to break. The frontend's DatasourceSrv.getInstanceSettings() already handles string references by trying uid → name → id lookup at runtime, so we preserve the string in the uid field and let the frontend resolve it. * trigger frontend ci tests when dashboard migration code changes * v1: if string convert to DS ref * Update migration testdata to fix template variable datasource references * update
725 lines
21 KiB
JSON
725 lines
21 KiB
JSON
{
|
|
"__requires": [
|
|
{
|
|
"id": "grafana",
|
|
"name": "Grafana",
|
|
"type": "grafana",
|
|
"version": "8.0.0"
|
|
}
|
|
],
|
|
"annotations": {
|
|
"list": [
|
|
{
|
|
"datasource": "$datasource",
|
|
"enable": true,
|
|
"expr": "up",
|
|
"hide": false,
|
|
"iconColor": "rgba(255, 96, 96, 1)",
|
|
"name": "rollouts",
|
|
"showIn": 0,
|
|
"tags": [],
|
|
"titleFormat": "Rollout was underway in {{cluster}}/{{namespace}}",
|
|
"type": "tags"
|
|
}
|
|
]
|
|
},
|
|
"editable": false,
|
|
"gnetId": null,
|
|
"graphTooltip": 1,
|
|
"hideControls": false,
|
|
"links": [
|
|
{
|
|
"asDropdown": true,
|
|
"icon": "external link",
|
|
"includeVars": true,
|
|
"keepTime": true,
|
|
"tags": ["show-in-mimir-links-dropdown"],
|
|
"targetBlank": false,
|
|
"title": "Mimir dashboards",
|
|
"type": "dashboards"
|
|
}
|
|
],
|
|
"refresh": "5m",
|
|
"rows": [
|
|
{
|
|
"collapse": false,
|
|
"height": "700px",
|
|
"panels": [
|
|
{
|
|
"datasource": "$datasource",
|
|
"description": "### Versions running\nShows the versions reported by each running pod.\n\nThe rollout will fail if any pod is not running the expected version.\n\nPods in green are running the expected version, while pods running other versions are shown in orange.\n\n",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"fixedColor": "orange",
|
|
"mode": "shades"
|
|
},
|
|
"custom": {
|
|
"axisCenteredZero": false,
|
|
"axisColorMode": "text",
|
|
"axisLabel": "",
|
|
"axisPlacement": "auto",
|
|
"fillOpacity": 80,
|
|
"gradientMode": "none",
|
|
"hideFrom": {
|
|
"legend": false,
|
|
"tooltip": false,
|
|
"viz": false
|
|
},
|
|
"lineWidth": 1,
|
|
"scaleDistribution": {
|
|
"type": "linear"
|
|
},
|
|
"thresholdsStyle": {
|
|
"mode": "off"
|
|
}
|
|
},
|
|
"mappings": [],
|
|
"max": 1,
|
|
"min": 0,
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": []
|
|
},
|
|
"unit": "short"
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byRegexp",
|
|
"options": "/.*(target)/"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "color",
|
|
"value": {
|
|
"fixedColor": "green",
|
|
"mode": "fixed"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"id": 1,
|
|
"links": [],
|
|
"options": {
|
|
"barRadius": 0,
|
|
"barWidth": 0.97,
|
|
"fullHighlight": false,
|
|
"groupWidth": 0.7,
|
|
"legend": {
|
|
"calcs": [],
|
|
"displayMode": "list",
|
|
"placement": "bottom",
|
|
"showLegend": true
|
|
},
|
|
"orientation": "horizontal",
|
|
"showValue": "auto",
|
|
"stacking": "percent",
|
|
"tooltip": {
|
|
"mode": "single",
|
|
"sort": "none"
|
|
},
|
|
"xField": "job\\version",
|
|
"xTickLabelRotation": 0,
|
|
"xTickLabelSpacing": 0
|
|
},
|
|
"span": 4,
|
|
"targets": [
|
|
{
|
|
"expr": "sum by (job, version) (up{job=~\".*\"})",
|
|
"format": "table",
|
|
"instant": true,
|
|
"intervalFactor": null,
|
|
"legendFormat": "__auto",
|
|
"legendLink": null,
|
|
"step": null
|
|
}
|
|
],
|
|
"title": "Versions running",
|
|
"transformations": [
|
|
{
|
|
"id": "groupingToMatrix",
|
|
"options": {
|
|
"columnField": "version",
|
|
"rowField": "job",
|
|
"valueField": "Value"
|
|
}
|
|
},
|
|
{
|
|
"id": "sortBy",
|
|
"options": {
|
|
"sort": [
|
|
{
|
|
"field": "job\\version"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"type": "barchart"
|
|
},
|
|
{
|
|
"datasource": "$datasource",
|
|
"description": "### Deployment rollout progress\nShows the number of pods for each `Deployment` that match the desired configuration, as a proportion of the desired number of pods.\n\nThe rollout will fail if insufficient pods match the desired configuration for any `Deployment`.\n\nPods in green match the desired configuration, while pods that do not match the desired configuration are shown in orange.\n\n",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "thresholds"
|
|
},
|
|
"custom": {
|
|
"axisCenteredZero": false,
|
|
"axisColorMode": "text",
|
|
"axisLabel": "",
|
|
"axisPlacement": "auto",
|
|
"fillOpacity": 80,
|
|
"gradientMode": "scheme",
|
|
"hideFrom": {
|
|
"legend": false,
|
|
"tooltip": false,
|
|
"viz": false
|
|
},
|
|
"lineWidth": 1,
|
|
"scaleDistribution": {
|
|
"type": "linear"
|
|
},
|
|
"thresholdsStyle": {
|
|
"mode": "off"
|
|
}
|
|
},
|
|
"mappings": [],
|
|
"max": 1,
|
|
"min": 0,
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "orange",
|
|
"value": null
|
|
},
|
|
{
|
|
"color": "green",
|
|
"value": 1
|
|
}
|
|
]
|
|
},
|
|
"unit": "percentunit"
|
|
}
|
|
},
|
|
"id": 2,
|
|
"links": [],
|
|
"options": {
|
|
"barRadius": 0,
|
|
"barWidth": 0.97,
|
|
"fullHighlight": false,
|
|
"groupWidth": 0.7,
|
|
"legend": {
|
|
"showLegend": false
|
|
},
|
|
"orientation": "horizontal",
|
|
"showValue": "auto",
|
|
"stacking": "none",
|
|
"tooltip": {
|
|
"mode": "single",
|
|
"sort": "none"
|
|
},
|
|
"xTickLabelRotation": 0,
|
|
"xTickLabelSpacing": 0
|
|
},
|
|
"span": 4,
|
|
"targets": [
|
|
{
|
|
"expr": "sum by (deployment) (up{job=\"kube-state-metrics\"})",
|
|
"format": "table",
|
|
"instant": true,
|
|
"intervalFactor": null,
|
|
"legendFormat": "__auto",
|
|
"legendLink": null,
|
|
"step": null
|
|
}
|
|
],
|
|
"title": "Deployment rollout progress",
|
|
"transformations": [
|
|
{
|
|
"id": "sortBy",
|
|
"options": {
|
|
"fields": {},
|
|
"sort": [
|
|
{
|
|
"field": "deployment"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"type": "barchart"
|
|
},
|
|
{
|
|
"datasource": "$datasource",
|
|
"description": "### StatefulSet rollout progress\nShows the number of pods for each `StatefulSet` that match the desired configuration, as a proportion of the desired number of pods.\n\nThe rollout will fail if insufficient pods match the desired configuration for any `StatefulSet`.\n\nPods in green match the desired configuration, while pods that do not match the desired configuration are shown in orange.\n\n",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "thresholds"
|
|
},
|
|
"custom": {
|
|
"axisCenteredZero": false,
|
|
"axisColorMode": "text",
|
|
"axisLabel": "",
|
|
"axisPlacement": "auto",
|
|
"fillOpacity": 80,
|
|
"gradientMode": "scheme",
|
|
"hideFrom": {
|
|
"legend": false,
|
|
"tooltip": false,
|
|
"viz": false
|
|
},
|
|
"lineWidth": 1,
|
|
"scaleDistribution": {
|
|
"type": "linear"
|
|
},
|
|
"thresholdsStyle": {
|
|
"mode": "off"
|
|
}
|
|
},
|
|
"mappings": [],
|
|
"max": 1,
|
|
"min": 0,
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "orange",
|
|
"value": null
|
|
},
|
|
{
|
|
"color": "green",
|
|
"value": 1
|
|
}
|
|
]
|
|
},
|
|
"unit": "percentunit"
|
|
}
|
|
},
|
|
"id": 3,
|
|
"links": [],
|
|
"options": {
|
|
"barRadius": 0,
|
|
"barWidth": 0.97,
|
|
"fullHighlight": false,
|
|
"groupWidth": 0.7,
|
|
"legend": {
|
|
"showLegend": false
|
|
},
|
|
"orientation": "horizontal",
|
|
"showValue": "auto",
|
|
"stacking": "none",
|
|
"tooltip": {
|
|
"mode": "single",
|
|
"sort": "none"
|
|
},
|
|
"xTickLabelRotation": 0,
|
|
"xTickLabelSpacing": 0
|
|
},
|
|
"span": 4,
|
|
"targets": [
|
|
{
|
|
"expr": "sum by (statefulset) (up{job=\"kube-state-metrics\"})",
|
|
"format": "table",
|
|
"instant": true,
|
|
"intervalFactor": null,
|
|
"legendFormat": "__auto",
|
|
"legendLink": null,
|
|
"step": null
|
|
}
|
|
],
|
|
"title": "StatefulSet rollout progress",
|
|
"transformations": [
|
|
{
|
|
"id": "sortBy",
|
|
"options": {
|
|
"fields": {},
|
|
"sort": [
|
|
{
|
|
"field": "statefulset"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"type": "barchart"
|
|
}
|
|
],
|
|
"repeat": null,
|
|
"repeatIteration": null,
|
|
"repeatRowId": null,
|
|
"showTitle": true,
|
|
"title": "Rollout progress",
|
|
"titleSize": "h6"
|
|
},
|
|
{
|
|
"collapse": false,
|
|
"height": "700px",
|
|
"panels": [
|
|
{
|
|
"datasource": "$datasource",
|
|
"description": "### Aggregator lag\nShows the consumption lag of each aggregator pod.\n\nThis panel may show no data if aggregators are not deployed to this cell.\n\nThe rollout will fail if any pod's consumption lag is both:\n* greater than 30s (red area on graph), and\n* trending upwards compared to 1 minute earlier\n\n",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {
|
|
"drawStyle": "line",
|
|
"fillOpacity": 0,
|
|
"lineWidth": 1,
|
|
"pointSize": 5,
|
|
"showPoints": "never",
|
|
"spanNulls": false,
|
|
"stacking": {
|
|
"group": "A",
|
|
"mode": "none"
|
|
},
|
|
"thresholdsStyle": {
|
|
"mode": "area"
|
|
}
|
|
},
|
|
"min": 0,
|
|
"noValue": "No data (are aggregators deployed in this cell?)",
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": null
|
|
},
|
|
{
|
|
"color": "red",
|
|
"value": 30
|
|
}
|
|
]
|
|
},
|
|
"unit": "s"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"id": 4,
|
|
"links": [],
|
|
"options": {
|
|
"legend": {
|
|
"showLegend": true
|
|
},
|
|
"tooltip": {
|
|
"mode": "multi",
|
|
"sort": "none"
|
|
}
|
|
},
|
|
"span": 4,
|
|
"targets": [
|
|
{
|
|
"expr": "max by (pod) (up{job=\"mimir-aggregator\"})",
|
|
"format": "time_series",
|
|
"legendFormat": "__auto",
|
|
"legendLink": null
|
|
}
|
|
],
|
|
"title": "Aggregator lag",
|
|
"type": "timeseries"
|
|
},
|
|
{
|
|
"datasource": "$datasource",
|
|
"description": "### Unhealthy Deployment replicas\nShows the number of unavailable pods for each `Deployment`.\n\nThe rollout will fail if any `Deployment` has an unavailable pod.\n\nBoth this panel and the rollout check ignore any `Deployment`s that require spot nodes, as these are expected to be unavailable from time to time.\n\n`Deployment`s shown in green do not have any unavailable pods, while `Deployment`s shown in orange have one or more unavailable pods.\n\n",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "thresholds"
|
|
},
|
|
"custom": {
|
|
"axisCenteredZero": false,
|
|
"axisColorMode": "text",
|
|
"axisLabel": "",
|
|
"axisPlacement": "auto",
|
|
"axisSoftMax": 10,
|
|
"fillOpacity": 80,
|
|
"gradientMode": "scheme",
|
|
"hideFrom": {
|
|
"legend": false,
|
|
"tooltip": false,
|
|
"viz": false
|
|
},
|
|
"lineWidth": 1,
|
|
"scaleDistribution": {
|
|
"type": "linear"
|
|
},
|
|
"thresholdsStyle": {
|
|
"mode": "off"
|
|
}
|
|
},
|
|
"mappings": [],
|
|
"max": null,
|
|
"min": 0,
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": null
|
|
},
|
|
{
|
|
"color": "orange",
|
|
"value": 1
|
|
}
|
|
]
|
|
},
|
|
"unit": ""
|
|
}
|
|
},
|
|
"id": 5,
|
|
"links": [],
|
|
"options": {
|
|
"barRadius": 0,
|
|
"barWidth": 0.97,
|
|
"fullHighlight": false,
|
|
"groupWidth": 0.7,
|
|
"legend": {
|
|
"showLegend": false
|
|
},
|
|
"orientation": "horizontal",
|
|
"showValue": "auto",
|
|
"stacking": "none",
|
|
"tooltip": {
|
|
"mode": "single",
|
|
"sort": "none"
|
|
},
|
|
"xTickLabelRotation": 0,
|
|
"xTickLabelSpacing": 0
|
|
},
|
|
"span": 4,
|
|
"targets": [
|
|
{
|
|
"expr": "sum by (deployment) (up{job=\"kube-state-metrics\"})",
|
|
"format": "table",
|
|
"instant": true,
|
|
"intervalFactor": null,
|
|
"legendFormat": "__auto",
|
|
"legendLink": null,
|
|
"step": null
|
|
}
|
|
],
|
|
"title": "Unhealthy Deployment replicas",
|
|
"transformations": [
|
|
{
|
|
"id": "sortBy",
|
|
"options": {
|
|
"fields": {},
|
|
"sort": [
|
|
{
|
|
"field": "deployment"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"type": "barchart"
|
|
},
|
|
{
|
|
"datasource": "$datasource",
|
|
"description": "### Unhealthy StatefulSet replicas\nShows the number of pods for each `StatefulSet` that are not ready.\n\nThe rollout will fail if any `StatefulSet` has fewer ready pods than requested.\n\nBoth this panel and the rollout check ignore any `StatefulSets`s that require spot nodes, as these are expected to be unavailable from time to time.\n\n`StatefulSets`s shown in green do not have any pods that are not ready, while `StatefulSet`s shown in orange have one or more pods that are not ready.\n\n",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "thresholds"
|
|
},
|
|
"custom": {
|
|
"axisCenteredZero": false,
|
|
"axisColorMode": "text",
|
|
"axisLabel": "",
|
|
"axisPlacement": "auto",
|
|
"axisSoftMax": 10,
|
|
"fillOpacity": 80,
|
|
"gradientMode": "scheme",
|
|
"hideFrom": {
|
|
"legend": false,
|
|
"tooltip": false,
|
|
"viz": false
|
|
},
|
|
"lineWidth": 1,
|
|
"scaleDistribution": {
|
|
"type": "linear"
|
|
},
|
|
"thresholdsStyle": {
|
|
"mode": "off"
|
|
}
|
|
},
|
|
"mappings": [],
|
|
"max": null,
|
|
"min": 0,
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": null
|
|
},
|
|
{
|
|
"color": "orange",
|
|
"value": 1
|
|
}
|
|
]
|
|
},
|
|
"unit": ""
|
|
}
|
|
},
|
|
"id": 6,
|
|
"links": [],
|
|
"options": {
|
|
"barRadius": 0,
|
|
"barWidth": 0.97,
|
|
"fullHighlight": false,
|
|
"groupWidth": 0.7,
|
|
"legend": {
|
|
"showLegend": false
|
|
},
|
|
"orientation": "horizontal",
|
|
"showValue": "auto",
|
|
"stacking": "none",
|
|
"tooltip": {
|
|
"mode": "single",
|
|
"sort": "none"
|
|
},
|
|
"xTickLabelRotation": 0,
|
|
"xTickLabelSpacing": 0
|
|
},
|
|
"span": 4,
|
|
"targets": [
|
|
{
|
|
"expr": "sum by (statefulset) (up{job=\"kube-state-metrics\"})",
|
|
"format": "table",
|
|
"instant": true,
|
|
"intervalFactor": null,
|
|
"legendFormat": "__auto",
|
|
"legendLink": null,
|
|
"step": null
|
|
}
|
|
],
|
|
"title": "Unhealthy StatefulSet replicas",
|
|
"transformations": [
|
|
{
|
|
"id": "sortBy",
|
|
"options": {
|
|
"fields": {},
|
|
"sort": [
|
|
{
|
|
"field": "statefulset"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"type": "barchart"
|
|
}
|
|
],
|
|
"repeat": null,
|
|
"repeatIteration": null,
|
|
"repeatRowId": null,
|
|
"showTitle": true,
|
|
"title": "Rollout health",
|
|
"titleSize": "h6"
|
|
}
|
|
],
|
|
"schemaVersion": 14,
|
|
"style": "dark",
|
|
"tags": [
|
|
"mimir",
|
|
"betterops-mimir",
|
|
"show-in-mimir-links-dropdown",
|
|
"as-code"
|
|
],
|
|
"templating": {
|
|
"list": [
|
|
{
|
|
"current": {
|
|
"value": "grafanacloud-prom"
|
|
},
|
|
"hide": 0,
|
|
"label": "Data source",
|
|
"name": "datasource",
|
|
"options": [],
|
|
"query": "prometheus",
|
|
"refresh": 1,
|
|
"regex": "",
|
|
"type": "datasource"
|
|
},
|
|
{
|
|
"allValue": ".*",
|
|
"current": {
|
|
"text": "prod",
|
|
"value": "prod"
|
|
},
|
|
"datasource": {
|
|
"uid": "$datasource"
|
|
},
|
|
"hide": 0,
|
|
"includeAll": true,
|
|
"label": "cluster",
|
|
"multi": false,
|
|
"name": "cluster",
|
|
"options": [],
|
|
"query": "label_values(up, job)",
|
|
"refresh": 1,
|
|
"regex": "",
|
|
"sort": 1,
|
|
"tagValuesQuery": "",
|
|
"tags": [],
|
|
"tagsQuery": "",
|
|
"type": "query",
|
|
"useTags": false
|
|
},
|
|
{
|
|
"allValue": null,
|
|
"current": {
|
|
"text": "prod",
|
|
"value": "prod"
|
|
},
|
|
"datasource": {
|
|
"uid": "$datasource"
|
|
},
|
|
"hide": 0,
|
|
"includeAll": false,
|
|
"label": "namespace",
|
|
"multi": false,
|
|
"name": "namespace",
|
|
"options": [],
|
|
"query": "label_values(up{job=~\"$cluster\"}, instance)",
|
|
"refresh": 1,
|
|
"regex": "",
|
|
"sort": 1,
|
|
"tagValuesQuery": "",
|
|
"tags": [],
|
|
"tagsQuery": "",
|
|
"type": "query",
|
|
"useTags": false
|
|
}
|
|
]
|
|
},
|
|
"time": {
|
|
"from": "now-1h",
|
|
"to": "now"
|
|
},
|
|
"timepicker": {
|
|
"refresh_intervals": [
|
|
"5s",
|
|
"10s",
|
|
"30s",
|
|
"1m",
|
|
"5m",
|
|
"15m",
|
|
"30m",
|
|
"1h",
|
|
"2h",
|
|
"1d"
|
|
],
|
|
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
|
|
},
|
|
"timezone": "utc",
|
|
"title": "Mimir / Rollout debugging"
|
|
}
|