{ "apiVersion": "dashboard.grafana.app/v2alpha1", "kind": "Dashboard", "metadata": { "name": "test-v2alpha1-annotations", "labels": {}, "annotations": {} }, "spec": { "annotations": [ { "kind": "AnnotationQuery", "spec": { "builtIn": true, "datasource": { "type": "grafana", "uid": "-- Grafana --" }, "enable": true, "hide": false, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "query": { "kind": "grafana", "spec": { "limit": 100, "matchAny": false, "tags": [], "type": "dashboard" } } } }, { "kind": "AnnotationQuery", "spec": { "builtIn": false, "datasource": { "type": "grafana-testdata-datasource", "uid": "PD8C576611E62080A" }, "enable": true, "hide": false, "iconColor": "blue", "name": "testdata-annos", "query": { "kind": "grafana-testdata-datasource", "spec": { "lines": 10, "refId": "Anno", "scenarioId": "annotations" } } } }, { "kind": "AnnotationQuery", "spec": { "builtIn": false, "enable": true, "hide": false, "iconColor": "blue", "name": "no-ds-testdata-annos", "query": { "kind": "prometheus", "spec": { "lines": 10, "refId": "Anno", "scenarioId": "annotations" } } } }, { "kind": "AnnotationQuery", "spec": { "builtIn": false, "datasource": { "type": "prometheus", "uid": "gdev-prometheus" }, "enable": true, "hide": false, "iconColor": "yellow", "name": "prom-annos", "query": { "kind": "prometheus", "spec": { "expr": "{action=\"add_client\"}", "interval": "", "lines": 10, "refId": "Anno", "scenarioId": "annotations" } } } }, { "kind": "AnnotationQuery", "spec": { "builtIn": false, "enable": true, "hide": false, "iconColor": "yellow", "name": "no-ds-prom-annos", "query": { "kind": "prometheus", "spec": { "expr": "{action=\"add_client\"}", "interval": "", "lines": 10, "refId": "Anno", "scenarioId": "annotations" } } } }, { "kind": "AnnotationQuery", "spec": { "builtIn": false, "datasource": { "type": "grafana-postgresql-datasource", "uid": "PBBCEC2D313BC06C3" }, "enable": true, "hide": false, "iconColor": "red", "name": "postgress-annos", "query": { "kind": "grafana-postgresql-datasource", "spec": { "editorMode": "builder", "format": "table", "lines": 10, "rawSql": "", "refId": "Anno", "scenarioId": "annotations", "sql": { "columns": [ { "parameters": [], "type": "function" } ], "groupBy": [ { "property": { "type": "string" }, "type": "groupBy" } ], "limit": 50 } } } } }, { "kind": "AnnotationQuery", "spec": { "builtIn": false, "datasource": { "type": "elasticsearch", "uid": "gdev-elasticsearch" }, "enable": true, "hide": false, "iconColor": "red", "legacyOptions": { "tagsField": "asd", "textField": "asd", "timeEndField": "asdas", "timeField": "asd" }, "name": "elastic - annos", "query": { "kind": "elasticsearch", "spec": { "lines": 10, "query": "test query", "refId": "Anno", "scenarioId": "annotations" } } } } ], "cursorSync": "Off", "editable": true, "elements": { "panel-1": { "kind": "Panel", "spec": { "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "hidden": false, "datasource": { "uid": "gdev-testdata" }, "query": { "kind": "grafana-testdata-datasource", "spec": { "scenarioId": "random_walk", "seriesCount": 3 }, "version": "v0" }, "refId": "A" } } ], "queryOptions": {}, "transformations": [] } }, "description": "", "id": 1, "links": [], "title": "Simple timeseries (WITH DS REF)", "vizConfig": { "kind": "timeseries", "spec": { "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "barWidthFactor": 0.6, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": 0 }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "hideZeros": false, "mode": "single", "sort": "none" } }, "pluginVersion": "12.1.0-pre" } } } }, "panel-2": { "kind": "Panel", "spec": { "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "hidden": false, "query": { "kind": "grafana-testdata-datasource", "spec": { "scenarioId": "random_walk", "seriesCount": 4 }, "version": "v0" }, "refId": "A" } } ], "queryOptions": {}, "transformations": [] } }, "description": "", "id": 2, "links": [], "title": "Simple stat (NO DS REF)", "vizConfig": { "kind": "stat", "spec": { "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": 0 }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "percentChangeColorMode": "standard", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "12.1.0-pre" } } } }, "panel-3": { "kind": "Panel", "spec": { "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "hidden": false, "query": { "kind": "prometheus", "spec": { "disableTextWrap": false, "editorMode": "builder", "expr": "rate(counters_requests[$__rate_interval])", "fullMetaSearch": false, "includeNullMetadata": false, "instant": false, "legendFormat": "__auto", "range": true, "useBackend": false }, "version": "v0" }, "refId": "A" } } ], "queryOptions": {}, "transformations": [] } }, "description": "", "id": 3, "links": [], "title": "Panel with NO REF to gdev-prometheus", "vizConfig": { "kind": "timeseries", "spec": { "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "barWidthFactor": 0.6, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": 0 }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "hideZeros": false, "mode": "single", "sort": "none" } }, "pluginVersion": "12.1.0-pre" } } } }, "panel-4": { "kind": "Panel", "spec": { "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "hidden": false, "datasource": { "uid": "gdev-prometheus" }, "query": { "kind": "prometheus", "spec": { "disableTextWrap": false, "editorMode": "builder", "expr": "rate(counters_requests[$__rate_interval])", "fullMetaSearch": false, "includeNullMetadata": false, "instant": false, "legendFormat": "__auto", "range": true, "useBackend": false }, "version": "v0" }, "refId": "A" } } ], "queryOptions": {}, "transformations": [] } }, "description": "", "id": 4, "links": [], "title": "Panel with ref to gdev-prometheus", "vizConfig": { "kind": "timeseries", "spec": { "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "barWidthFactor": 0.6, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": 0 }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "hideZeros": false, "mode": "single", "sort": "none" } }, "pluginVersion": "12.1.0-pre" } } } }, "panel-5": { "kind": "Panel", "spec": { "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "hidden": false, "datasource": { "uid": "gdev-prometheus" }, "query": { "kind": "prometheus", "spec": { "disableTextWrap": false, "editorMode": "builder", "expr": "rate(counters_requests{server=\"backend-01\"}[$__rate_interval])", "fullMetaSearch": false, "includeNullMetadata": false, "legendFormat": "__auto", "range": true, "useBackend": false }, "version": "v0" }, "refId": "A" } }, { "kind": "PanelQuery", "spec": { "hidden": false, "datasource": { "uid": "gdev-testdata" }, "query": { "kind": "grafana-testdata-datasource", "spec": {}, "version": "v0" }, "refId": "B" } } ], "queryOptions": {}, "transformations": [] } }, "description": "", "id": 5, "links": [], "title": "Mixed DS WITH REFS", "vizConfig": { "kind": "timeseries", "spec": { "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "barWidthFactor": 0.6, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": 0 }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "hideZeros": false, "mode": "single", "sort": "none" } }, "pluginVersion": "12.1.0-pre" } } } }, "panel-6": { "kind": "Panel", "spec": { "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "hidden": false, "query": { "kind": "prometheus", "spec": { "disableTextWrap": false, "editorMode": "builder", "expr": "rate(counters_requests{server=\"backend-01\"}[$__rate_interval])", "fullMetaSearch": false, "includeNullMetadata": false, "legendFormat": "__auto", "range": true, "useBackend": false }, "version": "v0" }, "refId": "A" } }, { "kind": "PanelQuery", "spec": { "hidden": false, "query": { "kind": "grafana-testdata-datasource", "spec": {}, "version": "v0" }, "refId": "B" } } ], "queryOptions": {}, "transformations": [] } }, "description": "", "id": 6, "links": [], "title": "Mixed DS WITHOUT REFS", "vizConfig": { "kind": "timeseries", "spec": { "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "barWidthFactor": 0.6, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": 0 }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "hideZeros": false, "mode": "single", "sort": "none" } }, "pluginVersion": "12.1.0-pre" } } } } }, "layout": { "kind": "AutoGridLayout", "spec": { "columnWidthMode": "standard", "items": [ { "kind": "AutoGridLayoutItem", "spec": { "element": { "kind": "ElementReference", "name": "panel-3" } } }, { "kind": "AutoGridLayoutItem", "spec": { "element": { "kind": "ElementReference", "name": "panel-4" } } }, { "kind": "AutoGridLayoutItem", "spec": { "element": { "kind": "ElementReference", "name": "panel-2" } } }, { "kind": "AutoGridLayoutItem", "spec": { "element": { "kind": "ElementReference", "name": "panel-1" } } }, { "kind": "AutoGridLayoutItem", "spec": { "element": { "kind": "ElementReference", "name": "panel-5" } } }, { "kind": "AutoGridLayoutItem", "spec": { "element": { "kind": "ElementReference", "name": "panel-6" } } } ], "maxColumnCount": 3, "rowHeightMode": "standard" } }, "links": [], "liveNow": false, "preload": false, "tags": [], "timeSettings": { "autoRefresh": "", "autoRefreshIntervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"], "fiscalYearStartMonth": 0, "from": "now-6h", "hideTimepicker": false, "timezone": "browser", "to": "now" }, "title": "Test: V2alpha1 dashboard with annotations", "variables": [ { "kind": "QueryVariable", "spec": { "datasource": { "uid": "gdev-prometheus" }, "enable": true, "hide": "dontHide", "name": "variable-ds-prometheus", "query": { "kind": "prometheus", "spec": { "expr": "up" } } } }, { "kind": "QueryVariable", "spec": { "enable": true, "hide": "dontHide", "name": "variable-no-ds", "query": { "kind": "grafana-testdata-datasource", "spec": { "scenarioId": "csv_metric_values", "csv": "1,2,3,4" } } } }, { "kind": "QueryVariable", "spec": { "enable": true, "hide": "dontHide", "name": "variable-no-ds-empty-query", "query": { "kind": "grafana-testdata-datasource", "spec": {} } } }, { "kind": "QueryVariable", "spec": { "enable": true, "hide": "dontHide", "name": "variable-no-default-ds", "query": { "kind": "prometheus", "spec": { "expr": "up" } } } } ] }, "status": {} }