Files
grafana/apps/dashboard/pkg/migration/conversion/testdata/output/v1beta1.annotation-conversions.v0alpha1.json
T
Ivan Ortega Alba c8853f50cf Dashboard migration: Implement v2 to v0 conversions (#114812)
* Update docs

* Remove 406 response since now it is converted

* fix linter

---------

Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
2025-12-04 05:08:03 +00:00

242 lines
6.1 KiB
JSON

{
"kind": "Dashboard",
"apiVersion": "dashboard.grafana.app/v0alpha1",
"metadata": {
"name": "annotation-conversions-test",
"labels": {
"test": "annotation-conversions"
}
},
"spec": {
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": false,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
},
{
"builtIn": 0,
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"enable": true,
"hide": false,
"iconColor": "red",
"name": "Prometheus Annotations",
"target": {
"expr": "ALERTS{alertstate=\"firing\"}",
"interval": "1m",
"refId": "Anno",
"step": 60
},
"type": "prometheus"
},
{
"builtIn": false,
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": true,
"hide": false,
"iconColor": "blue",
"name": "TestData Annotations",
"target": {
"lines": 10,
"refId": "Anno",
"scenarioId": "annotations"
},
"type": "testdata"
},
{
"builtIn": 0,
"datasource": {
"type": "elasticsearch",
"uid": "existing-target-uid"
},
"enable": true,
"hide": false,
"iconColor": "yellow",
"name": "Elasticsearch Annotations",
"tagsField": "tags",
"target": {
"query": "tags:deployment",
"refId": "Anno",
"timeField": "@timestamp"
},
"textField": "message",
"timeEndField": "end_time",
"timeField": "@timestamp",
"type": "elasticsearch"
},
{
"builtIn": 0,
"datasource": {
"type": "loki",
"uid": "non-default-test-ds-uid"
},
"enable": true,
"hide": false,
"iconColor": "green",
"name": "SQL Annotations",
"tagsColumn": "tags",
"target": {
"format": "table",
"rawSql": "SELECT time, title, text, tags FROM annotations WHERE $__timeFilter(time)",
"refId": "Anno"
},
"textColumn": "text",
"timeColumn": "time",
"titleColumn": "title",
"type": "sql"
},
{
"builtIn": 0,
"enable": true,
"hide": false,
"iconColor": "purple",
"name": "No Datasource Annotation",
"target": {
"expr": "static_annotation_query",
"refId": "Anno"
},
"type": "manual"
},
{
"builtIn": 0,
"datasource": {
"type": "prometheus",
"uid": "existing-ref-uid"
},
"enable": false,
"hide": true,
"iconColor": "gray",
"name": "Hidden Annotation",
"target": {
"expr": "disabled_query",
"refId": "Anno"
},
"type": "prometheus"
},
{
"builtIn": 0,
"datasource": {
"type": "influxdb",
"uid": "influx-uid"
},
"enable": true,
"filter": {
"exclude": true,
"ids": [
1,
2,
3
]
},
"hide": false,
"iconColor": "#FF5722",
"mappings": {
"tags": {
"source": "field",
"value": "labels"
},
"text": {
"source": "field",
"value": "description"
},
"time": {
"source": "field",
"value": "timestamp"
},
"title": {
"source": "field",
"value": "service"
}
},
"name": "Complex Filter Annotation",
"target": {
"query": "from(bucket: \"events\") |\u003e range(start: $__timeFrom, stop: $__timeTo) |\u003e filter(fn: (r) =\u003e r._measurement == \"deployments\")",
"refId": "Anno"
},
"type": "influxdb"
},
{
"builtIn": 0,
"datasource": {
"type": "cloudwatch",
"uid": "cloudwatch-uid"
},
"enable": true,
"hide": false,
"iconColor": "orange",
"name": "CloudWatch Annotations",
"showIn": 0,
"target": {
"dimensions": {
"InstanceId": "i-1234567890abcdef"
},
"metricName": "CPUUtilization",
"namespace": "AWS/EC2",
"refId": "Anno",
"statistic": "Average"
},
"type": "cloudwatch"
},
{
"builtIn": true,
"datasource": {
"type": "prometheus",
"uid": "default-ds-uid"
},
"enable": false,
"hide": true,
"iconColor": "transparent",
"name": "Disabled Built-in Annotation",
"target": {
"expr": "ALERTS{alertstate=\"firing\"}",
"interval": "1m",
"refId": "Anno",
"step": 60
},
"type": "prometheus"
}
]
},
"description": "Testing annotation transformations",
"links": [],
"panels": [],
"tags": [
"test",
"annotations"
],
"templating": {
"list": []
},
"time": {
"from": "now-24h",
"to": "now"
},
"title": "Annotation Conversions Test Dashboard"
},
"status": {
"conversion": {
"failed": false,
"storedVersion": "v1beta1"
}
}
}