Dashboard Migrations: V33 Replace string-based datasource by datasource ref (#106848)
--------- Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
This commit is contained in:
@@ -0,0 +1,561 @@
|
||||
{
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "grafana",
|
||||
"uid": "-- Grafana --"
|
||||
},
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations \u0026 Alerts",
|
||||
"type": "dashboard"
|
||||
},
|
||||
{
|
||||
"datasource": "Non Default Test Datasource",
|
||||
"enable": true,
|
||||
"name": "Test Annotation by Name",
|
||||
"type": "dashboard"
|
||||
},
|
||||
{
|
||||
"datasource": "non-default-test-ds-uid",
|
||||
"enable": true,
|
||||
"name": "Test Annotation by UID",
|
||||
"type": "dashboard"
|
||||
},
|
||||
{
|
||||
"datasource": "default",
|
||||
"enable": true,
|
||||
"name": "Test Default Annotation",
|
||||
"type": "dashboard"
|
||||
},
|
||||
{
|
||||
"datasource": "non-existing-ds",
|
||||
"enable": true,
|
||||
"name": "Test Non-existing Annotation",
|
||||
"type": "dashboard"
|
||||
},
|
||||
{
|
||||
"name": "CloudWatch Annotation Single Stat",
|
||||
"enable": true,
|
||||
"iconColor": "red",
|
||||
"dimensions": {
|
||||
"InstanceId": "i-123456"
|
||||
},
|
||||
"namespace": "AWS/EC2",
|
||||
"region": "us-east-1",
|
||||
"prefixMatching": false,
|
||||
"statistics": ["Average"]
|
||||
},
|
||||
{
|
||||
"name": "CloudWatch Annotation Multiple Stats",
|
||||
"enable": true,
|
||||
"iconColor": "blue",
|
||||
"dimensions": {
|
||||
"InstanceId": "i-789012"
|
||||
},
|
||||
"namespace": "AWS/RDS",
|
||||
"region": "us-west-2",
|
||||
"prefixMatching": false,
|
||||
"statistics": ["Maximum", "Minimum", "Sum"]
|
||||
},
|
||||
{
|
||||
"datasource": "",
|
||||
"enable": true,
|
||||
"name": "Test Empty String Annotation",
|
||||
"type": "dashboard"
|
||||
},
|
||||
{
|
||||
"datasource": "another-missing-ds",
|
||||
"enable": true,
|
||||
"name": "Test Another Non-existing Annotation",
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"type": "graph",
|
||||
"options": {},
|
||||
"title": "No Legend Config",
|
||||
"id": 1,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"legend": true
|
||||
},
|
||||
"title": "Boolean Legend True",
|
||||
"id": 2,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"legend": false
|
||||
},
|
||||
"title": "Boolean Legend False",
|
||||
"id": 3,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 8
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"legend": {
|
||||
"displayMode": "hidden"
|
||||
}
|
||||
},
|
||||
"title": "Hidden DisplayMode",
|
||||
"id": 4,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 8
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"legend": {
|
||||
"showLegend": false
|
||||
}
|
||||
},
|
||||
"title": "ShowLegend False",
|
||||
"id": 5,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 16
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"legend": {
|
||||
"displayMode": "table"
|
||||
}
|
||||
},
|
||||
"title": "Visible Legend",
|
||||
"id": 6,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 16
|
||||
}
|
||||
},
|
||||
{
|
||||
"datasource": "default",
|
||||
"title": "Mixed Datasources Panel",
|
||||
"id": 7,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 24
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"datasource": "non-default-test-ds-uid"
|
||||
},
|
||||
{
|
||||
"datasource": "Non Default Test Datasource"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "-- Mixed --"
|
||||
},
|
||||
"title": "Mixed Panel with Mixed Targets",
|
||||
"id": 8,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 24
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"datasource": "non-default-test-ds-uid"
|
||||
},
|
||||
{
|
||||
"datasource": "Non Default Test Datasource"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"datasource": "non-existing-ds",
|
||||
"title": "Non-existing Datasource Panel",
|
||||
"id": 9,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 32
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"datasource": "non-existing-ds"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "Timeseries Panel with Hidden Axes",
|
||||
"id": 10,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 40
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"axisPlacement": "hidden"
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "CloudWatch Single Query Multiple Stats",
|
||||
"id": 11,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 40
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"dimensions": {
|
||||
"InstanceId": "i-123456"
|
||||
},
|
||||
"namespace": "AWS/EC2",
|
||||
"region": "us-east-1",
|
||||
"metricName": "CPUUtilization",
|
||||
"statistics": ["Average", "Maximum", "Minimum"],
|
||||
"period": "300",
|
||||
"alias": "CPU Usage"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "Mixed CloudWatch and Prometheus Queries",
|
||||
"id": 12,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 48
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"dimensions": {
|
||||
"LoadBalancer": "my-load-balancer"
|
||||
},
|
||||
"namespace": "AWS/ApplicationELB",
|
||||
"region": "us-west-2",
|
||||
"metricName": "RequestCount",
|
||||
"statistics": ["Sum", "Average"]
|
||||
},
|
||||
{
|
||||
"refId": "B",
|
||||
"expr": "up",
|
||||
"datasource": "prometheus"
|
||||
},
|
||||
{
|
||||
"refId": "C",
|
||||
"dimensions": {
|
||||
"DBInstanceIdentifier": "my-db"
|
||||
},
|
||||
"namespace": "AWS/RDS",
|
||||
"region": "us-east-1",
|
||||
"metricName": "DatabaseConnections",
|
||||
"statistics": ["Maximum"]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "row",
|
||||
"collapsed": true,
|
||||
"title": "Collapsed Row with CloudWatch",
|
||||
"id": 13,
|
||||
"gridPos": {
|
||||
"h": 1,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 56
|
||||
},
|
||||
"panels": [
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "Nested CloudWatch Panel",
|
||||
"id": 14,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"dimensions": {
|
||||
"QueueName": "my-queue"
|
||||
},
|
||||
"namespace": "AWS/SQS",
|
||||
"region": "us-east-1",
|
||||
"metricName": "ApproximateNumberOfMessages",
|
||||
"statistics": ["Average", "Maximum", "Sum"]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "stat",
|
||||
"title": "V33: Panel with Null Datasource",
|
||||
"id": 15,
|
||||
"datasource": null,
|
||||
"gridPos": {
|
||||
"h": 4,
|
||||
"w": 6,
|
||||
"x": 0,
|
||||
"y": 64
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": "non-default-test-ds-uid"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "stat",
|
||||
"title": "V33: Panel with Existing Datasource Reference",
|
||||
"id": 16,
|
||||
"datasource": {
|
||||
"uid": "existing-ref-uid",
|
||||
"type": "prometheus"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 4,
|
||||
"w": 6,
|
||||
"x": 6,
|
||||
"y": 64
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {
|
||||
"uid": "existing-target-uid",
|
||||
"type": "elasticsearch"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "table",
|
||||
"title": "V33: Panel without Targets",
|
||||
"id": 17,
|
||||
"datasource": "Non Default Test Datasource",
|
||||
"gridPos": {
|
||||
"h": 4,
|
||||
"w": 6,
|
||||
"x": 12,
|
||||
"y": 64
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "table",
|
||||
"title": "V33: Panel with Empty Targets Array",
|
||||
"id": 18,
|
||||
"datasource": "default",
|
||||
"gridPos": {
|
||||
"h": 4,
|
||||
"w": 6,
|
||||
"x": 18,
|
||||
"y": 64
|
||||
},
|
||||
"targets": []
|
||||
},
|
||||
{
|
||||
"type": "graph",
|
||||
"title": "V33: Target Datasource Edge Cases",
|
||||
"id": 19,
|
||||
"datasource": "non-default-test-ds-uid",
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 68
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": null
|
||||
},
|
||||
{
|
||||
"refId": "B",
|
||||
"datasource": "default"
|
||||
},
|
||||
{
|
||||
"refId": "C",
|
||||
"datasource": "non-existing-ds"
|
||||
},
|
||||
{
|
||||
"refId": "D"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "V33: Mixed Target References",
|
||||
"id": 20,
|
||||
"datasource": null,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 68
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {
|
||||
"uid": "existing-ref",
|
||||
"type": "prometheus"
|
||||
}
|
||||
},
|
||||
{
|
||||
"refId": "B",
|
||||
"datasource": "Non Default Test Datasource"
|
||||
},
|
||||
{
|
||||
"refId": "C",
|
||||
"datasource": "default"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "stat",
|
||||
"title": "V33: Panel with Empty String Datasource",
|
||||
"id": 21,
|
||||
"datasource": "",
|
||||
"gridPos": {
|
||||
"h": 4,
|
||||
"w": 6,
|
||||
"x": 0,
|
||||
"y": 76
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "table",
|
||||
"title": "V33: Panel with Another Non-existing Datasource",
|
||||
"id": 22,
|
||||
"datasource": "completely-missing-ds",
|
||||
"gridPos": {
|
||||
"h": 4,
|
||||
"w": 6,
|
||||
"x": 6,
|
||||
"y": 76
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": "also-missing-ds"
|
||||
},
|
||||
{
|
||||
"refId": "B",
|
||||
"datasource": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"preload": false,
|
||||
"refresh": true,
|
||||
"schemaVersion": 32,
|
||||
"tags": [],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"type": "query",
|
||||
"datasource": "default",
|
||||
"name": "default_var"
|
||||
},
|
||||
{
|
||||
"type": "query",
|
||||
"datasource": "Non Default Test Datasource",
|
||||
"name": "es_var_by_name"
|
||||
},
|
||||
{
|
||||
"type": "query",
|
||||
"datasource": "non-default-test-ds-uid",
|
||||
"name": "es_var_by_uid"
|
||||
},
|
||||
{
|
||||
"type": "query",
|
||||
"datasource": null,
|
||||
"name": "null_var"
|
||||
},
|
||||
{
|
||||
"type": "query",
|
||||
"datasource": "non-existing-ds",
|
||||
"name": "non_existing_var"
|
||||
},
|
||||
{
|
||||
"type": "query",
|
||||
"datasource": "",
|
||||
"name": "empty_string_var"
|
||||
},
|
||||
{
|
||||
"type": "query",
|
||||
"datasource": "another-non-existing-ds",
|
||||
"name": "another_non_existing_var"
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
"from": "now-6h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {
|
||||
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
|
||||
},
|
||||
"timezone": "utc",
|
||||
"title": "New dashboard",
|
||||
"version": 0,
|
||||
"weekStart": ""
|
||||
}
|
||||
Reference in New Issue
Block a user