/
githubmirror
/
grafana
Обзор
Документация
Войти
/
githubmirror
/
grafana
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
devenv/dev-dashboards/datasource-postgres/postgres_unittest.json
3 902 строки
122 KB
ismail simsek
Chore: Put externalized data source devenv back (#129314)
29 июл 2026, 17:39
Не верифицирован
29 июл 2026, 17:39
d26b064
Код
Авторство
О чём код?
{ "apiVersion": "dashboard.grafana.app/v2", "kind": "Dashboard", "metadata": { "name": "vHQdlVziz" }, "spec": { "annotations": [ { "kind": "AnnotationQuery", "spec": { "query": { "kind": "DataQuery", "group": "", "version": "v0", "spec": {} }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations \u0026 Alerts", "builtIn": true, "legacyOptions": { "type": "dashboard" } } }, { "kind": "AnnotationQuery", "spec": { "query": { "kind": "DataQuery", "group": "", "version": "v0", "spec": {} }, "enable": false, "hide": false, "iconColor": "#6ed0e0", "name": "Deploys", "legacyOptions": { "limit": 100, "rawQuery": "SELECT \"time_sec\" as time, description as text, tags FROM event WHERE $__unixEpochFilter(time_sec) AND tags='deploy' ORDER BY 1 ASC", "showIn": 0, "tags": [], "type": "tags" } } }, { "kind": "AnnotationQuery", "spec": { "query": { "kind": "DataQuery", "group": "", "version": "v0", "spec": {} }, "enable": false, "hide": false, "iconColor": "rgba(255, 96, 96, 1)", "name": "Tickets", "legacyOptions": { "limit": 100, "rawQuery": "SELECT \"time_sec\" as time, description as text, tags FROM event WHERE $__unixEpochFilter(time_sec) AND tags='ticket' ORDER BY 1 ASC", "showIn": 0, "tags": [], "type": "tags" } } }, { "kind": "AnnotationQuery", "spec": { "query": { "kind": "DataQuery", "group": "", "version": "v0", "spec": {} }, "enable": false, "hide": false, "iconColor": "#7eb26d", "name": "Metric Values timeEpoch macro", "legacyOptions": { "limit": 100, "rawQuery": "SELECT \n $__timeEpoch(time), \n measurement as text, \n '' as tags\nFROM\n metric_values \nWHERE\n $__timeFilter(time)\nORDER BY 1", "showIn": 0, "tags": [], "type": "tags" } } }, { "kind": "AnnotationQuery", "spec": { "query": { "kind": "DataQuery", "group": "", "version": "v0", "spec": {} }, "enable": false, "hide": false, "iconColor": "#1f78c1", "name": "Metric Values native time", "legacyOptions": { "limit": 100, "rawQuery": "SELECT \n time, \n measurement as text, \n '' as tags\nFROM\n metric_values \nWHERE\n $__timeFilter(time)\nORDER BY 1", "showIn": 0, "tags": [], "type": "tags" } } } ], "cursorSync": "Off", "description": "Run the postgres unit tests to generate the data backing this dashboard", "editable": true, "elements": { "panel-10": { "kind": "Panel", "spec": { "id": 10, "title": "timeGroup macro 5m with fill(10.0)", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana-testdata-datasource", "version": "v0", "datasource": { "name": "gdev-postgres-ds-tests" }, "spec": { "alias": "", "format": "time_series", "rawSql": "SELECT $__timeGroupAlias(time, '5m', 10.0), avg(value) as value FROM metric WHERE $__timeFilter(time) GROUP BY 1 ORDER BY 1" } }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "VizConfig", "group": "timeseries", "version": "", "spec": { "options": { "__angularMigration": { "autoMigrateFrom": "graph", "originalOptions": { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "fill": 2, "legend": { "avg": false, "current": false, "max": false, "min": false, "show": true, "total": false, "values": false }, "lines": true, "linewidth": 2, "nullPointMode": "null", "percentage": false, "pointradius": 3, "points": true, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": true, "thresholds": [], "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "logBase": 1, "min": "0", "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } } }, "fieldConfig": { "defaults": {}, "overrides": [] } } } } }, "panel-12": { "kind": "Panel", "spec": { "id": 12, "title": "Metrics - timeGroup macro $summarize with fill(NULL)", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana-testdata-datasource", "version": "v0", "datasource": { "name": "gdev-postgres-ds-tests" }, "spec": { "alias": "", "format": "time_series", "rawSql": "SELECT $__timeGroupAlias(time, '$summarize', NULL), sum(value) as value FROM metric WHERE $__timeFilter(time) GROUP BY 1 ORDER BY 1" } }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "VizConfig", "group": "timeseries", "version": "", "spec": { "options": { "__angularMigration": { "autoMigrateFrom": "graph", "originalOptions": { "aliasColors": {}, "bars": true, "dashLength": 10, "dashes": false, "fill": 2, "legend": { "avg": false, "current": false, "max": false, "min": false, "show": true, "total": false, "values": false }, "lines": false, "linewidth": 2, "nullPointMode": "null as zero", "percentage": false, "pointradius": 3, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": true, "thresholds": [], "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } } }, "fieldConfig": { "defaults": {}, "overrides": [] } } } } }, "panel-13": { "kind": "Panel", "spec": { "id": 13, "title": "Metrics - timeGroup macro $summarize with fill(100.0)", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana-testdata-datasource", "version": "v0", "datasource": { "name": "gdev-postgres-ds-tests" }, "spec": { "alias": "", "format": "time_series", "rawSql": "SELECT $__timeGroupAlias(time, '$summarize', 100.0), sum(value) as value FROM metric WHERE $__timeFilter(time) GROUP BY 1 ORDER BY 1" } }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "VizConfig", "group": "timeseries", "version": "", "spec": { "options": { "__angularMigration": { "autoMigrateFrom": "graph", "originalOptions": { "aliasColors": {}, "bars": true, "dashLength": 10, "dashes": false, "fill": 2, "legend": { "avg": false, "current": false, "max": false, "min": false, "show": true, "total": false, "values": false }, "lines": false, "linewidth": 2, "nullPointMode": "null", "percentage": false, "pointradius": 3, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": true, "thresholds": [], "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } } }, "fieldConfig": { "defaults": {}, "overrides": [] } } } } }, "panel-14": { "kind": "Panel", "spec": { "id": 14, "title": "Multiple series with metric column - series mode", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana-testdata-datasource", "version": "v0", "datasource": { "name": "gdev-postgres-ds-tests" }, "spec": { "alias": "", "format": "time_series", "rawSql": "SELECT $__timeEpoch(time), measurement, \"valueOne\", \"valueTwo\" FROM metric_values \nWHERE $__timeFilter(time) AND measurement in($metric) ORDER BY 1" } }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "VizConfig", "group": "bargauge", "version": "", "spec": { "options": { "__angularMigration": { "autoMigrateFrom": "graph", "originalOptions": { "aliasColors": {}, "bars": true, "dashLength": 10, "dashes": false, "fill": 1, "legend": { "alignAsTable": true, "avg": true, "current": true, "max": true, "min": true, "rightSide": true, "show": true, "total": true, "values": true }, "lines": false, "linewidth": 1, "nullPointMode": "null", "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "thresholds": [], "tooltip": { "shared": false, "sort": 0, "value_type": "individual" }, "xaxis": { "mode": "series", "show": true, "values": ["total"] }, "yaxes": [ { "format": "short", "logBase": 1, "min": "0", "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } } }, "fieldConfig": { "defaults": {}, "overrides": [] } } } } }, "panel-15": { "kind": "Panel", "spec": { "id": 15, "title": "Multiple series without metric column - series mode", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana-testdata-datasource", "version": "v0", "datasource": { "name": "gdev-postgres-ds-tests" }, "spec": { "alias": "", "format": "time_series", "rawSql": "SELECT $__timeEpoch(time), \"valueOne\", \"valueTwo\" FROM metric_values \nWHERE $__timeFilter(time) AND measurement in($metric) ORDER BY 1" } }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "VizConfig", "group": "bargauge", "version": "", "spec": { "options": { "__angularMigration": { "autoMigrateFrom": "graph", "originalOptions": { "aliasColors": {}, "bars": true, "dashLength": 10, "dashes": false, "fill": 1, "legend": { "alignAsTable": true, "avg": true, "current": true, "max": true, "min": true, "rightSide": true, "show": true, "total": true, "values": true }, "lines": false, "linewidth": 1, "nullPointMode": "null", "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "thresholds": [], "tooltip": { "shared": false, "sort": 0, "value_type": "individual" }, "xaxis": { "mode": "series", "show": true, "values": ["total"] }, "yaxes": [ { "format": "short", "logBase": 1, "min": "0", "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } } }, "fieldConfig": { "defaults": {}, "overrides": [] } } } } }, "panel-16": { "kind": "Panel", "spec": { "id": 16, "title": "Metrics - timeGroup macro $summarize without fill", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana-testdata-datasource", "version": "v0", "datasource": { "name": "gdev-postgres-ds-tests" }, "spec": { "alias": "", "format": "time_series", "rawSql": "SELECT $__timeGroupAlias(time, '$summarize'), avg(value) as value FROM metric WHERE $__timeFilter(time) GROUP BY 1 ORDER BY 1" } }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "VizConfig", "group": "timeseries", "version": "", "spec": { "options": { "__angularMigration": { "autoMigrateFrom": "graph", "originalOptions": { "aliasColors": {}, "bars": true, "dashLength": 10, "dashes": false, "fill": 2, "legend": { "avg": false, "current": false, "max": false, "min": false, "show": true, "total": false, "values": false }, "lines": false, "linewidth": 2, "nullPointMode": "null", "percentage": false, "pointradius": 3, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": true, "thresholds": [], "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } } }, "fieldConfig": { "defaults": {}, "overrides": [] } } } } }, "panel-17": { "kind": "Panel", "spec": { "id": 17, "title": "Multiple series with metric column - stacked percent", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana-testdata-datasource", "version": "v0", "datasource": { "name": "gdev-postgres-ds-tests" }, "spec": { "alias": "", "format": "time_series", "rawSql": "SELECT $__timeEpoch(time), measurement, \"valueOne\", \"valueTwo\" FROM metric_values \nWHERE $__timeFilter(time) AND measurement in($metric) ORDER BY 1" } }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "VizConfig", "group": "timeseries", "version": "", "spec": { "options": { "__angularMigration": { "autoMigrateFrom": "graph", "originalOptions": { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "fill": 2, "legend": { "alignAsTable": true, "avg": true, "current": true, "hideEmpty": false, "hideZero": false, "max": true, "min": true, "rightSide": true, "show": true, "total": true, "values": true }, "lines": true, "linewidth": 2, "nullPointMode": "null", "percentage": true, "pointradius": 3, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": true, "steppedLine": false, "thresholds": [], "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "logBase": 1, "min": "0", "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } } }, "fieldConfig": { "defaults": {}, "overrides": [] } } } } }, "panel-18": { "kind": "Panel", "spec": { "id": 18, "title": "Multiple series without metric column - stacked", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana-testdata-datasource", "version": "v0", "datasource": { "name": "gdev-postgres-ds-tests" }, "spec": { "alias": "", "format": "time_series", "rawSql": "SELECT $__timeEpoch(time), \"valueOne\", \"valueTwo\" FROM metric_values \nWHERE $__timeFilter(time) AND measurement in($metric) ORDER BY 1" } }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "VizConfig", "group": "timeseries", "version": "", "spec": { "options": { "__angularMigration": { "autoMigrateFrom": "graph", "originalOptions": { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "fill": 2, "legend": { "alignAsTable": true, "avg": true, "current": true, "max": true, "min": true, "rightSide": true, "show": true, "total": true, "values": true }, "lines": true, "linewidth": 2, "nullPointMode": "null", "percentage": false, "pointradius": 3, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": true, "steppedLine": false, "thresholds": [], "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "logBase": 1, "min": "0", "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } } }, "fieldConfig": { "defaults": {}, "overrides": [] } } } } }, "panel-19": { "kind": "Panel", "spec": { "id": 19, "title": "Multiple series with metric column - stacked", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana-testdata-datasource", "version": "v0", "datasource": { "name": "gdev-postgres-ds-tests" }, "spec": { "alias": "", "format": "time_series", "rawSql": "SELECT $__timeEpoch(time), measurement, \"valueOne\", \"valueTwo\" FROM metric_values \nWHERE $__timeFilter(time) AND measurement in($metric) ORDER BY 1" } }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "VizConfig", "group": "timeseries", "version": "", "spec": { "options": { "__angularMigration": { "autoMigrateFrom": "graph", "originalOptions": { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "fill": 2, "legend": { "alignAsTable": true, "avg": true, "current": true, "hideEmpty": false, "hideZero": false, "max": true, "min": true, "rightSide": true, "show": true, "total": true, "values": true }, "lines": true, "linewidth": 2, "nullPointMode": "null", "percentage": false, "pointradius": 3, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": true, "steppedLine": false, "thresholds": [], "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "logBase": 1, "min": "0", "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } } }, "fieldConfig": { "defaults": {}, "overrides": [] } } } } }, "panel-2": { "kind": "Panel", "spec": { "id": 2, "title": "Data types", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana-testdata-datasource", "version": "v0", "datasource": { "name": "gdev-postgres-ds-tests" }, "spec": { "alias": "", "format": "table", "rawSql": "SELECT * FROM postgres_types" } }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "VizConfig", "group": "table", "version": "", "spec": { "options": { "__angularMigration": { "autoMigrateFrom": "table-old", "originalOptions": { "columns": [], "fontSize": "100%", "scroll": true, "showHeader": true, "sort": { "col": 1, "desc": false }, "styles": [ { "alias": "", "align": "auto", "colors": ["rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)"], "decimals": 2, "pattern": "/.*/", "thresholds": [], "type": "string", "unit": "short" } ], "transform": "table" } } }, "fieldConfig": { "defaults": {}, "overrides": [] } } } } }, "panel-20": { "kind": "Panel", "spec": { "id": 20, "title": "Multiple series without metric column - stacked percent", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana-testdata-datasource", "version": "v0", "datasource": { "name": "gdev-postgres-ds-tests" }, "spec": { "alias": "", "format": "time_series", "rawSql": "SELECT $__timeEpoch(time), \"valueOne\", \"valueTwo\" FROM metric_values \nWHERE $__timeFilter(time) AND measurement in($metric) ORDER BY 1" } }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "VizConfig", "group": "timeseries", "version": "", "spec": { "options": { "__angularMigration": { "autoMigrateFrom": "graph", "originalOptions": { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "fill": 2, "legend": { "alignAsTable": true, "avg": true, "current": true, "max": true, "min": true, "rightSide": true, "show": true, "total": true, "values": true }, "lines": true, "linewidth": 2, "nullPointMode": "null", "percentage": true, "pointradius": 3, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": true, "steppedLine": false, "thresholds": [], "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "logBase": 1, "min": "0", "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } } }, "fieldConfig": { "defaults": {}, "overrides": [] } } } } }, "panel-21": { "kind": "Panel", "spec": { "id": 21, "title": "Multiple series with metric column - histogram stacked", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana-testdata-datasource", "version": "v0", "datasource": { "name": "gdev-postgres-ds-tests" }, "spec": { "alias": "", "format": "time_series", "rawSql": "SELECT $__timeEpoch(time), measurement, \"valueOne\", \"valueTwo\" FROM metric_values \nWHERE $__timeFilter(time) AND measurement in($metric) ORDER BY 1" } }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "VizConfig", "group": "histogram", "version": "", "spec": { "options": { "__angularMigration": { "autoMigrateFrom": "graph", "originalOptions": { "aliasColors": {}, "bars": true, "dashLength": 10, "dashes": false, "fill": 1, "legend": { "alignAsTable": true, "avg": true, "current": true, "max": true, "min": true, "rightSide": true, "show": false, "total": true, "values": true }, "lines": false, "linewidth": 1, "nullPointMode": "null", "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": true, "steppedLine": false, "thresholds": [], "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "xaxis": { "buckets": 20, "mode": "histogram", "show": true, "values": ["current"] }, "yaxes": [ { "format": "short", "logBase": 1, "min": "0", "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } } }, "fieldConfig": { "defaults": {}, "overrides": [] } } } } }, "panel-22": { "kind": "Panel", "spec": { "id": 22, "title": "Multiple series without metric column - histogram", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana-testdata-datasource", "version": "v0", "datasource": { "name": "gdev-postgres-ds-tests" }, "spec": { "alias": "", "format": "time_series", "rawSql": "SELECT $__timeEpoch(time), \"valueOne\", \"valueTwo\" FROM metric_values\nWHERE $__timeFilter(time) AND measurement in($metric) ORDER BY 1" } }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "VizConfig", "group": "histogram", "version": "", "spec": { "options": { "__angularMigration": { "autoMigrateFrom": "graph", "originalOptions": { "aliasColors": {}, "bars": true, "dashLength": 10, "dashes": false, "fill": 1, "legend": { "alignAsTable": true, "avg": true, "current": true, "max": true, "min": true, "rightSide": true, "show": false, "total": true, "values": true }, "lines": false, "linewidth": 1, "nullPointMode": "null", "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "thresholds": [], "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "xaxis": { "buckets": 100, "mode": "histogram", "show": true, "values": ["total"] }, "yaxes": [ { "format": "short", "logBase": 1, "min": "0", "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } } }, "fieldConfig": { "defaults": {}, "overrides": [] } } } } }, "panel-23": { "kind": "Panel", "spec": { "id": 23, "title": "Multiple series with metric column - histogram stacked percent", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana-testdata-datasource", "version": "v0", "datasource": { "name": "gdev-postgres-ds-tests" }, "spec": { "alias": "", "format": "time_series", "rawSql": "SELECT $__timeEpoch(time), measurement, \"valueOne\", \"valueTwo\" FROM metric_values \nWHERE $__timeFilter(time) AND measurement in($metric) ORDER BY 1" } }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "VizConfig", "group": "histogram", "version": "", "spec": { "options": { "__angularMigration": { "autoMigrateFrom": "graph", "originalOptions": { "aliasColors": {}, "bars": true, "dashLength": 10, "dashes": false, "fill": 1, "legend": { "alignAsTable": true, "avg": true, "current": true, "max": true, "min": true, "rightSide": true, "show": false, "total": true, "values": true }, "lines": false, "linewidth": 1, "nullPointMode": "null", "percentage": true, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": true, "steppedLine": false, "thresholds": [], "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "xaxis": { "buckets": 20, "mode": "histogram", "show": true, "values": ["current"] }, "yaxes": [ { "format": "short", "logBase": 1, "min": "0", "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } } }, "fieldConfig": { "defaults": {}, "overrides": [] } } } } }, "panel-24": { "kind": "Panel", "spec": { "id": 24, "title": "Multiple series without metric column - histogram stacked percent", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana-testdata-datasource", "version": "v0", "datasource": { "name": "gdev-postgres-ds-tests" }, "spec": { "alias": "", "format": "time_series", "rawSql": "SELECT $__timeEpoch(time), \"valueOne\", \"valueTwo\" FROM metric_values \nWHERE $__timeFilter(time) AND measurement in($metric) ORDER BY 1" } }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "VizConfig", "group": "histogram", "version": "", "spec": { "options": { "__angularMigration": { "autoMigrateFrom": "graph", "originalOptions": { "aliasColors": {}, "bars": true, "dashLength": 10, "dashes": false, "fill": 1, "legend": { "alignAsTable": true, "avg": true, "current": true, "max": true, "min": true, "rightSide": true, "show": false, "total": true, "values": true }, "lines": false, "linewidth": 1, "nullPointMode": "null", "percentage": true, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": true, "steppedLine": false, "thresholds": [], "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "xaxis": { "buckets": 20, "mode": "histogram", "show": true, "values": ["total"] }, "yaxes": [ { "format": "short", "logBase": 1, "min": "0", "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } } }, "fieldConfig": { "defaults": {}, "overrides": [] } } } } }, "panel-25": { "kind": "Panel", "spec": { "id": 25, "title": "Multiple series with metric column - histogram", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana-testdata-datasource", "version": "v0", "datasource": { "name": "gdev-postgres-ds-tests" }, "spec": { "alias": "", "format": "time_series", "rawSql": "SELECT $__timeEpoch(time), measurement, \"valueOne\", \"valueTwo\" FROM metric_values \nWHERE $__timeFilter(time) AND measurement in($metric) ORDER BY 1" } }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "VizConfig", "group": "histogram", "version": "", "spec": { "options": { "__angularMigration": { "autoMigrateFrom": "graph", "originalOptions": { "aliasColors": {}, "bars": true, "dashLength": 10, "dashes": false, "fill": 1, "legend": { "alignAsTable": true, "avg": true, "current": true, "max": true, "min": true, "rightSide": true, "show": false, "total": true, "values": true }, "lines": false, "linewidth": 1, "nullPointMode": "null", "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "thresholds": [], "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "xaxis": { "buckets": 50, "mode": "histogram", "show": true, "values": ["current"] }, "yaxes": [ { "format": "short", "logBase": 1, "min": "0", "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } } }, "fieldConfig": { "defaults": {}, "overrides": [] } } } } }, "panel-26": { "kind": "Panel", "spec": { "id": 26, "title": "Multiple series without metric column - histogram stacked", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana-testdata-datasource", "version": "v0", "datasource": { "name": "gdev-postgres-ds-tests" }, "spec": { "alias": "", "format": "time_series", "rawSql": "SELECT $__timeEpoch(time), \"valueOne\", \"valueTwo\" FROM metric_values \nWHERE $__timeFilter(time) AND measurement in($metric) ORDER BY 1" } }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "VizConfig", "group": "histogram", "version": "", "spec": { "options": { "__angularMigration": { "autoMigrateFrom": "graph", "originalOptions": { "aliasColors": {}, "bars": true, "dashLength": 10, "dashes": false, "fill": 1, "legend": { "alignAsTable": true, "avg": true, "current": true, "max": true, "min": true, "rightSide": true, "show": false, "total": true, "values": true }, "lines": false, "linewidth": 1, "nullPointMode": "null", "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": true, "steppedLine": false, "thresholds": [], "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "xaxis": { "buckets": 20, "mode": "histogram", "show": true, "values": ["total"] }, "yaxes": [ { "format": "short", "logBase": 1, "min": "0", "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } } }, "fieldConfig": { "defaults": {}, "overrides": [] } } } } }, "panel-27": { "kind": "Panel", "spec": { "id": 27, "title": "Multiple series with metric column using timeGroup macro ($summarize)", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana-testdata-datasource", "version": "v0", "datasource": { "name": "gdev-postgres-ds-tests" }, "spec": { "alias": "", "format": "time_series", "rawSql": "SELECT \n $__timeGroupAlias(time, '$summarize'), \n measurement, \n avg(\"valueOne\") as \"valueOne\",\n avg(\"valueTwo\") as \"valueTwo\"\nFROM\n metric_values \nWHERE\n $__timeFilter(time) AND\n measurement in($metric)\nGROUP BY 1, 2\nORDER BY 1" } }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "VizConfig", "group": "timeseries", "version": "", "spec": { "options": { "__angularMigration": { "autoMigrateFrom": "graph", "originalOptions": { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "fill": 2, "legend": { "alignAsTable": true, "avg": true, "current": true, "hideEmpty": false, "hideZero": false, "max": true, "min": true, "rightSide": true, "show": true, "total": true, "values": true }, "lines": true, "linewidth": 2, "nullPointMode": "null", "percentage": false, "pointradius": 3, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "thresholds": [], "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "logBase": 1, "min": "0", "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } } }, "fieldConfig": { "defaults": {}, "overrides": [] } } } } }, "panel-28": { "kind": "Panel", "spec": { "id": 28, "title": "Multiple series without metric column", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana-testdata-datasource", "version": "v0", "datasource": { "name": "gdev-postgres-ds-tests" }, "spec": { "alias": "", "format": "time_series", "rawSql": "SELECT $__timeEpoch(time), \"valueOne\", \"valueTwo\" FROM metric_values \nWHERE $__timeFilter(time) AND measurement in($metric) ORDER BY 1" } }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "VizConfig", "group": "timeseries", "version": "", "spec": { "options": { "__angularMigration": { "autoMigrateFrom": "graph", "originalOptions": { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "fill": 2, "legend": { "alignAsTable": true, "avg": true, "current": true, "max": true, "min": true, "rightSide": true, "show": true, "total": true, "values": true }, "lines": true, "linewidth": 2, "nullPointMode": "null", "percentage": false, "pointradius": 3, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "thresholds": [], "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "logBase": 1, "min": "0", "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } } }, "fieldConfig": { "defaults": {}, "overrides": [] } } } } }, "panel-32": { "kind": "Panel", "spec": { "id": 32, "title": "cast(null as bigint) as time", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana-testdata-datasource", "version": "v0", "datasource": { "name": "gdev-postgres-ds-tests" }, "spec": { "alias": "", "format": "table", "rawSql": "SELECT cast(null as bigint) as time", "target": "" } }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "VizConfig", "group": "table", "version": "", "spec": { "options": { "__angularMigration": { "autoMigrateFrom": "table-old", "originalOptions": { "columns": [], "fontSize": "100%", "scroll": true, "showHeader": true, "sort": { "col": 0, "desc": true }, "styles": [ { "alias": "Time", "align": "auto", "dateFormat": "YYYY-MM-DD HH:mm:ss", "pattern": "time", "type": "date" }, { "alias": "", "align": "auto", "colors": ["rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)"], "decimals": 2, "pattern": "/.*/", "thresholds": [], "type": "number", "unit": "short" } ], "transform": "table" } } }, "fieldConfig": { "defaults": {}, "overrides": [] } } } } }, "panel-33": { "kind": "Panel", "spec": { "id": 33, "title": "cast(null as datetime) as time", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana-testdata-datasource", "version": "v0", "datasource": { "name": "gdev-postgres-ds-tests" }, "spec": { "alias": "", "format": "table", "rawSql": "SELECT cast(null as timestamp) as time", "target": "" } }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "VizConfig", "group": "table", "version": "", "spec": { "options": { "__angularMigration": { "autoMigrateFrom": "table-old", "originalOptions": { "columns": [], "fontSize": "100%", "scroll": true, "showHeader": true, "sort": { "col": 0, "desc": true }, "styles": [ { "alias": "Time", "align": "auto", "dateFormat": "YYYY-MM-DD HH:mm:ss", "pattern": "time", "type": "date" }, { "alias": "", "align": "auto", "colors": ["rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)"], "decimals": 2, "pattern": "/.*/", "thresholds": [], "type": "number", "unit": "short" } ], "transform": "table" } } }, "fieldConfig": { "defaults": {}, "overrides": [] } } } } }, "panel-34": { "kind": "Panel", "spec": { "id": 34, "title": "localtimestamp as time", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana-testdata-datasource", "version": "v0", "datasource": { "name": "gdev-postgres-ds-tests" }, "spec": { "alias": "", "format": "table", "rawSql": "SELECT localtimestamp as time", "target": "" } }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "VizConfig", "group": "table", "version": "", "spec": { "options": { "__angularMigration": { "autoMigrateFrom": "table-old", "originalOptions": { "columns": [], "fontSize": "100%", "scroll": true, "showHeader": true, "sort": { "col": 0, "desc": true }, "styles": [ { "alias": "Time", "align": "auto", "dateFormat": "YYYY-MM-DD HH:mm:ss", "pattern": "time", "type": "date" }, { "alias": "", "align": "auto", "colors": ["rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)"], "decimals": 2, "pattern": "/.*/", "thresholds": [], "type": "number", "unit": "short" } ], "transform": "table" } } }, "fieldConfig": { "defaults": {}, "overrides": [] } } } } }, "panel-35": { "kind": "Panel", "spec": { "id": 35, "title": "NOW() as time", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana-testdata-datasource", "version": "v0", "datasource": { "name": "gdev-postgres-ds-tests" }, "spec": { "alias": "", "format": "table", "rawSql": "SELECT NOW() as time", "target": "" } }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "VizConfig", "group": "table", "version": "", "spec": { "options": { "__angularMigration": { "autoMigrateFrom": "table-old", "originalOptions": { "columns": [], "fontSize": "100%", "scroll": true, "showHeader": true, "sort": { "col": 0, "desc": true }, "styles": [ { "alias": "Time", "align": "auto", "dateFormat": "YYYY-MM-DD HH:mm:ss", "pattern": "time", "type": "date" }, { "alias": "", "align": "auto", "colors": ["rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)"], "decimals": 2, "pattern": "/.*/", "thresholds": [], "type": "number", "unit": "short" } ], "transform": "table" } } }, "fieldConfig": { "defaults": {}, "overrides": [] } } } } }, "panel-36": { "kind": "Panel", "spec": { "id": 36, "title": "timeGroup macro 5m with fill(previous)", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana-testdata-datasource", "version": "v0", "datasource": { "name": "gdev-postgres-ds-tests" }, "spec": { "alias": "", "format": "time_series", "rawSql": "SELECT $__timeGroupAlias(time, '5m', previous), avg(value) as value FROM metric WHERE $__timeFilter(time) GROUP BY 1 ORDER BY 1" } }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "VizConfig", "group": "timeseries", "version": "", "spec": { "options": { "__angularMigration": { "autoMigrateFrom": "graph", "originalOptions": { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "fill": 2, "legend": { "avg": false, "current": false, "max": false, "min": false, "show": true, "total": false, "values": false }, "lines": true, "linewidth": 2, "nullPointMode": "null", "percentage": false, "pointradius": 3, "points": true, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": true, "thresholds": [], "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "logBase": 1, "min": "0", "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } } }, "fieldConfig": { "defaults": {}, "overrides": [] } } } } }, "panel-37": { "kind": "Panel", "spec": { "id": 37, "title": "Metrics - timeGroup macro $summarize with fill(previous)", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana-testdata-datasource", "version": "v0", "datasource": { "name": "gdev-postgres-ds-tests" }, "spec": { "alias": "", "format": "time_series", "rawSql": "SELECT $__timeGroupAlias(time, '$summarize', previous), sum(value) as value FROM metric WHERE $__timeFilter(time) GROUP BY 1 ORDER BY 1" } }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "VizConfig", "group": "timeseries", "version": "", "spec": { "options": { "__angularMigration": { "autoMigrateFrom": "graph", "originalOptions": { "aliasColors": {}, "bars": true, "dashLength": 10, "dashes": false, "fill": 2, "legend": { "avg": false, "current": false, "max": false, "min": false, "show": true, "total": false, "values": false }, "lines": false, "linewidth": 2, "nullPointMode": "null", "percentage": false, "pointradius": 3, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": true, "thresholds": [], "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } } }, "fieldConfig": { "defaults": {}, "overrides": [] } } } } }, "panel-38": { "kind": "Panel", "spec": { "id": 38, "title": "Multiple series with metric column using unixEpochGroup macro ($summarize)", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana-testdata-datasource", "version": "v0", "datasource": { "name": "gdev-postgres-ds-tests" }, "spec": { "alias": "", "format": "time_series", "rawSql": "SELECT \n $__unixEpochGroupAlias(\"timeInt32\", '$summarize'), \n measurement, \n avg(\"valueOne\") as \"valueOne\",\n avg(\"valueTwo\") as \"valueTwo\"\nFROM\n metric_values \nWHERE\n $__unixEpochFilter(\"timeInt32\") AND\n measurement in($metric)\nGROUP BY 1, 2\nORDER BY 1, 2" } }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "VizConfig", "group": "timeseries", "version": "", "spec": { "options": { "__angularMigration": { "autoMigrateFrom": "graph", "originalOptions": { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "fill": 2, "legend": { "alignAsTable": true, "avg": true, "current": true, "hideEmpty": false, "hideZero": false, "max": true, "min": true, "rightSide": true, "show": true, "total": true, "values": true }, "lines": true, "linewidth": 2, "nullPointMode": "null", "percentage": false, "pointradius": 3, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "thresholds": [], "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "logBase": 1, "min": "0", "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } } }, "fieldConfig": { "defaults": {}, "overrides": [] } } } } }, "panel-39": { "kind": "Panel", "spec": { "id": 39, "title": "Multiple series without metric column using timeGroup macro ($summarize)", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana-testdata-datasource", "version": "v0", "datasource": { "name": "gdev-postgres-ds-tests" }, "spec": { "alias": "", "format": "time_series", "rawSql": "SELECT \n $__unixEpochGroupAlias(\"timeInt32\", '$summarize'), \n avg(\"valueOne\") as \"valueOne\",\n avg(\"valueTwo\") as \"valueTwo\"\nFROM\n metric_values \nWHERE\n $__unixEpochFilter(\"timeInt32\") AND\n measurement in($metric)\nGROUP BY 1\nORDER BY 1" } }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "VizConfig", "group": "timeseries", "version": "", "spec": { "options": { "__angularMigration": { "autoMigrateFrom": "graph", "originalOptions": { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "fill": 2, "legend": { "alignAsTable": true, "avg": true, "current": true, "max": true, "min": true, "rightSide": true, "show": true, "total": true, "values": true }, "lines": true, "linewidth": 2, "nullPointMode": "null", "percentage": false, "pointradius": 3, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "thresholds": [], "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "logBase": 1, "min": "0", "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } } }, "fieldConfig": { "defaults": {}, "overrides": [] } } } } }, "panel-4": { "kind": "Panel", "spec": { "id": 4, "title": "Multiple series with metric column", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana-testdata-datasource", "version": "v0", "datasource": { "name": "gdev-postgres-ds-tests" }, "spec": { "alias": "", "format": "time_series", "rawSql": "SELECT $__timeEpoch(time), measurement, \"valueOne\", \"valueTwo\" FROM metric_values \nWHERE $__timeFilter(time) AND measurement in($metric) ORDER BY 1" } }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "VizConfig", "group": "timeseries", "version": "", "spec": { "options": { "__angularMigration": { "autoMigrateFrom": "graph", "originalOptions": { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "fill": 2, "legend": { "alignAsTable": true, "avg": true, "current": true, "hideEmpty": false, "hideZero": false, "max": true, "min": true, "rightSide": true, "show": true, "total": true, "values": true }, "lines": true, "linewidth": 2, "nullPointMode": "null", "percentage": false, "pointradius": 3, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "thresholds": [], "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "logBase": 1, "min": "0", "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } } }, "fieldConfig": { "defaults": {}, "overrides": [] } } } } }, "panel-5": { "kind": "Panel", "spec": { "id": 5, "title": "Multiple series without metric column using timeGroup macro ($summarize)", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana-testdata-datasource", "version": "v0", "datasource": { "name": "gdev-postgres-ds-tests" }, "spec": { "alias": "", "format": "time_series", "rawSql": "SELECT \n $__timeGroupAlias(time, '$summarize'), \n avg(\"valueOne\") as \"valueOne\", \n avg(\"valueTwo\") as \"valueTwo\" \nFROM\n metric_values \nWHERE\n $__timeFilter(time) AND\n measurement in($metric)\nGROUP BY 1\nORDER BY 1" } }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "VizConfig", "group": "timeseries", "version": "", "spec": { "options": { "__angularMigration": { "autoMigrateFrom": "graph", "originalOptions": { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "fill": 2, "legend": { "alignAsTable": true, "avg": true, "current": true, "max": true, "min": true, "rightSide": true, "show": true, "total": true, "values": true }, "lines": true, "linewidth": 2, "nullPointMode": "null", "percentage": false, "pointradius": 3, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "thresholds": [], "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "logBase": 1, "min": "0", "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } } }, "fieldConfig": { "defaults": {}, "overrides": [] } } } } }, "panel-7": { "kind": "Panel", "spec": { "id": 7, "title": "timeGroup macro 5m without fill", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana-testdata-datasource", "version": "v0", "datasource": { "name": "gdev-postgres-ds-tests" }, "spec": { "alias": "", "format": "time_series", "rawSql": "SELECT $__timeGroupAlias(time, '5m'), avg(value) as value FROM metric WHERE $__timeFilter(time) GROUP BY 1 ORDER BY 1" } }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "VizConfig", "group": "timeseries", "version": "", "spec": { "options": { "__angularMigration": { "autoMigrateFrom": "graph", "originalOptions": { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "fill": 2, "legend": { "avg": false, "current": false, "max": false, "min": false, "show": true, "total": false, "values": false }, "lines": true, "linewidth": 2, "nullPointMode": "null", "percentage": false, "pointradius": 3, "points": true, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": true, "thresholds": [], "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "logBase": 1, "min": "0", "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } } }, "fieldConfig": { "defaults": {}, "overrides": [] } } } } }, "panel-9": { "kind": "Panel", "spec": { "id": 9, "title": "timeGroup macro 5m with fill(NULL) and null as zero", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana-testdata-datasource", "version": "v0", "datasource": { "name": "gdev-postgres-ds-tests" }, "spec": { "alias": "", "format": "time_series", "rawSql": "SELECT $__timeGroupAlias(time, '5m', NULL), avg(value) as value FROM metric WHERE $__timeFilter(time) GROUP BY 1 ORDER BY 1" } }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "VizConfig", "group": "timeseries", "version": "", "spec": { "options": { "__angularMigration": { "autoMigrateFrom": "graph", "originalOptions": { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "fill": 2, "legend": { "avg": false, "current": false, "max": false, "min": false, "show": true, "total": false, "values": false }, "lines": true, "linewidth": 2, "nullPointMode": "null as zero", "percentage": false, "pointradius": 3, "points": true, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": true, "thresholds": [], "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "logBase": 1, "min": "0", "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } } }, "fieldConfig": { "defaults": {}, "overrides": [] } } } } } }, "layout": { "kind": "GridLayout", "spec": { "items": [ { "kind": "GridLayoutItem", "spec": { "x": 0, "y": 0, "width": 24, "height": 4, "element": { "kind": "ElementReference", "name": "panel-2" } } }, { "kind": "GridLayoutItem", "spec": { "x": 0, "y": 4, "width": 6, "height": 3, "element": { "kind": "ElementReference", "name": "panel-32" } } }, { "kind": "GridLayoutItem", "spec": { "x": 6, "y": 4, "width": 6, "height": 3, "element": { "kind": "ElementReference", "name": "panel-33" } } }, { "kind": "GridLayoutItem", "spec": { "x": 12, "y": 4, "width": 6, "height": 3, "element": { "kind": "ElementReference", "name": "panel-34" } } }, { "kind": "GridLayoutItem", "spec": { "x": 18, "y": 4, "width": 6, "height": 3, "element": { "kind": "ElementReference", "name": "panel-35" } } }, { "kind": "GridLayoutItem", "spec": { "x": 0, "y": 7, "width": 6, "height": 6, "element": { "kind": "ElementReference", "name": "panel-7" } } }, { "kind": "GridLayoutItem", "spec": { "x": 6, "y": 7, "width": 6, "height": 6, "element": { "kind": "ElementReference", "name": "panel-9" } } }, { "kind": "GridLayoutItem", "spec": { "x": 12, "y": 7, "width": 6, "height": 6, "element": { "kind": "ElementReference", "name": "panel-10" } } }, { "kind": "GridLayoutItem", "spec": { "x": 18, "y": 7, "width": 6, "height": 6, "element": { "kind": "ElementReference", "name": "panel-36" } } }, { "kind": "GridLayoutItem", "spec": { "x": 0, "y": 13, "width": 6, "height": 6, "element": { "kind": "ElementReference", "name": "panel-16" } } }, { "kind": "GridLayoutItem", "spec": { "x": 6, "y": 13, "width": 6, "height": 6, "element": { "kind": "ElementReference", "name": "panel-12" } } }, { "kind": "GridLayoutItem", "spec": { "x": 12, "y": 13, "width": 6, "height": 6, "element": { "kind": "ElementReference", "name": "panel-13" } } }, { "kind": "GridLayoutItem", "spec": { "x": 18, "y": 13, "width": 6, "height": 6, "element": { "kind": "ElementReference", "name": "panel-37" } } }, { "kind": "GridLayoutItem", "spec": { "x": 0, "y": 19, "width": 12, "height": 8, "element": { "kind": "ElementReference", "name": "panel-27" } } }, { "kind": "GridLayoutItem", "spec": { "x": 12, "y": 19, "width": 12, "height": 8, "element": { "kind": "ElementReference", "name": "panel-5" } } }, { "kind": "GridLayoutItem", "spec": { "x": 0, "y": 27, "width": 12, "height": 8, "element": { "kind": "ElementReference", "name": "panel-38" } } }, { "kind": "GridLayoutItem", "spec": { "x": 12, "y": 27, "width": 12, "height": 8, "element": { "kind": "ElementReference", "name": "panel-39" } } }, { "kind": "GridLayoutItem", "spec": { "x": 0, "y": 35, "width": 12, "height": 8, "element": { "kind": "ElementReference", "name": "panel-4" } } }, { "kind": "GridLayoutItem", "spec": { "x": 12, "y": 35, "width": 12, "height": 8, "element": { "kind": "ElementReference", "name": "panel-28" } } }, { "kind": "GridLayoutItem", "spec": { "x": 0, "y": 43, "width": 12, "height": 8, "element": { "kind": "ElementReference", "name": "panel-19" } } }, { "kind": "GridLayoutItem", "spec": { "x": 12, "y": 43, "width": 12, "height": 8, "element": { "kind": "ElementReference", "name": "panel-18" } } }, { "kind": "GridLayoutItem", "spec": { "x": 0, "y": 51, "width": 12, "height": 8, "element": { "kind": "ElementReference", "name": "panel-17" } } }, { "kind": "GridLayoutItem", "spec": { "x": 12, "y": 51, "width": 12, "height": 8, "element": { "kind": "ElementReference", "name": "panel-20" } } }, { "kind": "GridLayoutItem", "spec": { "x": 0, "y": 59, "width": 12, "height": 8, "element": { "kind": "ElementReference", "name": "panel-14" } } }, { "kind": "GridLayoutItem", "spec": { "x": 12, "y": 59, "width": 12, "height": 8, "element": { "kind": "ElementReference", "name": "panel-15" } } }, { "kind": "GridLayoutItem", "spec": { "x": 0, "y": 67, "width": 12, "height": 8, "element": { "kind": "ElementReference", "name": "panel-25" } } }, { "kind": "GridLayoutItem", "spec": { "x": 12, "y": 67, "width": 12, "height": 8, "element": { "kind": "ElementReference", "name": "panel-22" } } }, { "kind": "GridLayoutItem", "spec": { "x": 0, "y": 75, "width": 12, "height": 8, "element": { "kind": "ElementReference", "name": "panel-21" } } }, { "kind": "GridLayoutItem", "spec": { "x": 12, "y": 75, "width": 12, "height": 8, "element": { "kind": "ElementReference", "name": "panel-26" } } }, { "kind": "GridLayoutItem", "spec": { "x": 0, "y": 83, "width": 12, "height": 8, "element": { "kind": "ElementReference", "name": "panel-23" } } }, { "kind": "GridLayoutItem", "spec": { "x": 12, "y": 83, "width": 12, "height": 8, "element": { "kind": "ElementReference", "name": "panel-24" } } } ] } }, "links": [], "liveNow": false, "preload": false, "tags": ["gdev", "postgres", "datasource-test"], "timeSettings": { "from": "2018-03-15T12:30:00.000Z", "to": "2018-03-15T13:55:01.000Z", "autoRefresh": "", "autoRefreshIntervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"], "hideTimepicker": false, "fiscalYearStartMonth": 0 }, "title": "Datasource tests - Postgres (unittest)", "variables": [ { "kind": "QueryVariable", "spec": { "name": "metric", "current": { "text": "All", "value": ["$__all"] }, "label": "Metric", "hide": "dontHide", "refresh": "onDashboardLoad", "skipUrlSync": false, "query": { "kind": "DataQuery", "group": "", "version": "v0", "datasource": { "name": "gdev-postgres-ds-tests" }, "spec": { "__legacyStringValue": "SELECT DISTINCT measurement FROM metric_values" } }, "regex": "", "sort": "alphabeticalAsc", "options": [], "multi": true, "includeAll": true, "allowCustomValue": true } }, { "kind": "IntervalVariable", "spec": { "name": "summarize", "query": "1s,10s,30s,1m,5m,10m", "current": { "text": "10m", "value": "10m" }, "options": [ { "selected": false, "text": "1s", "value": "1s" }, { "selected": false, "text": "10s", "value": "10s" }, { "selected": false, "text": "30s", "value": "30s" }, { "selected": false, "text": "1m", "value": "1m" }, { "selected": false, "text": "5m", "value": "5m" }, { "selected": true, "text": "10m", "value": "10m" } ], "auto": false, "auto_min": "10s", "auto_count": 30, "refresh": "onTimeRangeChanged", "label": "Interval", "hide": "dontHide", "skipUrlSync": false } } ] } }