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