From e3dbef755ae418d2f8ff1356a2bd85eb137dae45 Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Thu, 5 Apr 2018 20:53:22 +0200 Subject: [PATCH 01/13] influxdb: Check before assuming first column to be 'time' When running queries like 'SHOW [...] CARDINALITY' introduced with InfluxDB 1.4 there is only a single column 'count'. However, the data source always assumed 'time' which threw an error because the code couldn't find a non-time column to display. This change actually checks this assumption and thereby fixes displaying the result in a Singlestat in Table mode (closes #11476). --- .../datasource/influxdb/influx_series.ts | 10 ++++++-- .../influxdb/specs/influx_series.jest.ts | 24 +++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/public/app/plugins/datasource/influxdb/influx_series.ts b/public/app/plugins/datasource/influxdb/influx_series.ts index a177ef3bb73..89e2d01b85b 100644 --- a/public/app/plugins/datasource/influxdb/influx_series.ts +++ b/public/app/plugins/datasource/influxdb/influx_series.ts @@ -151,11 +151,17 @@ export default class InfluxSeries { _.each(this.series, (series, seriesIndex) => { if (seriesIndex === 0) { - table.columns.push({ text: 'Time', type: 'time' }); + j = 0; + // Check that the first column is indeed 'time' + if (series.columns[0] === 'time') { + // Push this now before the tags and with the right type + table.columns.push({ text: 'Time', type: 'time' }); + j++; + } _.each(_.keys(series.tags), function(key) { table.columns.push({ text: key }); }); - for (j = 1; j < series.columns.length; j++) { + for (; j < series.columns.length; j++) { table.columns.push({ text: series.columns[j] }); } } diff --git a/public/app/plugins/datasource/influxdb/specs/influx_series.jest.ts b/public/app/plugins/datasource/influxdb/specs/influx_series.jest.ts index 8ae4a335828..8c8fee9ab9f 100644 --- a/public/app/plugins/datasource/influxdb/specs/influx_series.jest.ts +++ b/public/app/plugins/datasource/influxdb/specs/influx_series.jest.ts @@ -195,10 +195,34 @@ describe('when generating timeseries from influxdb response', function() { expect(table.type).toBe('table'); expect(table.columns.length).toBe(5); + expect(table.columns[0].text).toEqual('Time'); expect(table.rows[0]).toEqual([1431946625000, 'Africa', 'server2', 23, 10]); }); }); + describe('given table response from SHOW CARDINALITY', function() { + var options = { + alias: '', + series: [ + { + name: 'cpu', + columns: ['count'], + values: [[37]], + }, + ], + }; + + it('should return table', function() { + var series = new InfluxSeries(options); + var table = series.getTable(); + + expect(table.type).toBe('table'); + expect(table.columns.length).toBe(1); + expect(table.columns[0].text).toEqual('count'); + expect(table.rows[0]).toEqual([37]); + }); + }); + describe('given annotation response', function() { describe('with empty tagsColumn', function() { var options = { From dfccabab75ae6d99ba5057f4dc2c8598b697760c Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Thu, 5 Apr 2018 20:59:11 +0200 Subject: [PATCH 02/13] singlestat: Fix optimization in setTableColumnToSensibleDefault tableColumnOptions is an associative array that has no property length. Use tableData.columns as in the default case which works just fine. --- public/app/plugins/panel/singlestat/module.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/plugins/panel/singlestat/module.ts b/public/app/plugins/panel/singlestat/module.ts index 776033536dd..c7f523a9591 100644 --- a/public/app/plugins/panel/singlestat/module.ts +++ b/public/app/plugins/panel/singlestat/module.ts @@ -159,8 +159,8 @@ class SingleStatCtrl extends MetricsPanelCtrl { } setTableColumnToSensibleDefault(tableData) { - if (this.tableColumnOptions.length === 1) { - this.panel.tableColumn = this.tableColumnOptions[0]; + if (tableData.columns.length === 1) { + this.panel.tableColumn = tableData.columns[0].text; } else { this.panel.tableColumn = _.find(tableData.columns, col => { return col.type !== 'time'; From f50bcb6aae452da0970975338d34c0a4dfa1ab08 Mon Sep 17 00:00:00 2001 From: bergquist Date: Thu, 19 Apr 2018 11:20:29 +0200 Subject: [PATCH 03/13] changelog: adds note about closing #11476 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 334fa47eae9..5edc8397412 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,6 +56,7 @@ * **Dashboard**: Sizing and positioning of settings menu icons [#11572](https://github.com/grafana/grafana/pull/11572) * **Dashboard**: Add search filter/tabs to new panel control [#10427](https://github.com/grafana/grafana/issues/10427) * **Folders**: User with org viewer role should not be able to save/move dashboards in/to general folder [#11553](https://github.com/grafana/grafana/issues/11553) +* **Influxdb**: Dont assume the first column in table response is time. [#11476](https://github.com/grafana/grafana/issues/11476), thx [@hahnjo](https://github.com/hahnjo) ### Tech * Backend code simplification [#11613](https://github.com/grafana/grafana/pull/11613), thx [@knweiss](https://github.com/knweiss) From 7a622318168f2b113ef7396742f307f23db35eed Mon Sep 17 00:00:00 2001 From: bergquist Date: Thu, 19 Apr 2018 11:29:02 +0200 Subject: [PATCH 04/13] build: only lint the pkg folder --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8b6d8506800..603c5fe0720 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -31,7 +31,7 @@ jobs: command: 'gometalinter --install' - run: name: run some linters - command: 'gometalinter --vendor --deadline 6m --disable-all --enable=structcheck --enable=unconvert --enable=varcheck ./...' + command: 'gometalinter --vendor --deadline 6m --disable-all --enable=structcheck --enable=unconvert --enable=varcheck ./pkg/...' test-frontend: docker: From 250f85b9bdd23da0f7d34715015921dc65691ba9 Mon Sep 17 00:00:00 2001 From: Marcus Efraimsson Date: Fri, 13 Apr 2018 12:20:09 +0200 Subject: [PATCH 05/13] docs: what's new in v5.1 draft --- docs/sources/guides/whats-new-in-v5-1.md | 126 +++++++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 docs/sources/guides/whats-new-in-v5-1.md diff --git a/docs/sources/guides/whats-new-in-v5-1.md b/docs/sources/guides/whats-new-in-v5-1.md new file mode 100644 index 00000000000..f1fc036413a --- /dev/null +++ b/docs/sources/guides/whats-new-in-v5-1.md @@ -0,0 +1,126 @@ ++++ +title = "What's New in Grafana v5.1" +description = "Feature & improvement highlights for Grafana v5.1" +keywords = ["grafana", "new", "documentation", "5.1"] +type = "docs" +[menu.docs] +name = "Version 5.1" +identifier = "v5.1" +parent = "whatsnew" +weight = -7 ++++ + +# What's New in Grafana v5.1 + +Grafana v5.1 brings new features, many enhancements and bug fixes. This article will detail the major new features and enhancements. + +* [Scrolling]({{< relref "#scrolling" >}}) +* [Improved docker image]({{< relref "#improved-docker-image-breaking-change" >}}) with a breaking change! +* [Improved workflow for provisioned dashboards]({{< relref "#improved-workflow-for-provisioned-dashboards" >}}) +* [New template variable interpolation syntax]({{< relref "#new-template-variable-interpolation-syntax" >}}) +* [Alerting]({{< relref "#alerting" >}}) +* [Datasources]({{< relref "#datasources" >}}) Enhancements to Prometheus, Cloudwatch, PostgreSQL and MySQL. This release also adds support for [Microsft SQL Server]({{< relref "#microsoft-sql-server" >}}) as metric & table datasource! +* [Dashboard & Panels]({{< relref "#dashboard-panels" >}}) Enhancements to Graph and Table panels and improved control for adding new panels. + +## Scrolling + + + +## Improved docker image (breaking change) + +Grafana v5.1 brings an improved official docker image which should make it easier to run and use the Grafana docker image and at the same time give more control to the user how to use/run it. + +We've switched the id of the grafana user running Grafana inside a docker container. Unfortunately this means that files created prior to 5.1 won't have the correct permissions for later versions and thereby this introduces a breaking change. +We made this change so that it would be easier for you to control what user Grafana is executed as (see examples below). + +Version | User | User ID +--------|---------|--------- +< 5.1 | grafana | 104 +>= 5.1 | grafana | 472 + +Please read the [updated documentation](/installation/docker/#migration-from-a-previous-version-of-the-docker-container-to-5-1-or-later) which includes migration instructions and more information. + +## Improved workflow for provisioned dashboards + +{{< docs-imagebox img="/img/docs/v51/provisioning_cannot_save_dashboard.png" max-width="800px" class="docs-image--right" >}} + +Grafana v5.1 brings an improved workflow for provisioned dashboards: + +* A populated `id` property in JSON is now automatically removed when provisioning dashboards. +* When making changes to a provisioned dashboard you can `Save` the dashboard which now will bring up a *Cannot save provisioned dashboard* dialog like seen in the screenshot to the right. + + +Available options in the dialog will let you `Copy JSON to Clipboard` and/or `Save JSON to file` which can help you synchronize your dashboard changes back to the provisioning source. +More information in the [Provisioning documentation](/features/datasources/prometheus/). + +
+ +## New template variable interpolation syntax + + +## Alerting + +New enhancements includes support for retries on failed alert queries and updating correct state when pausing/unpausing alerts. + +## Datasources + +### Prometheus + +New enhancements includes support for Prometheus histograms in the heatmap panel and autocomplete of template variables query editor. More information in the [Prometheus data source documentation](/features/datasources/prometheus/). + +### Cloudwatch + +New enhancements includes support for high resolution metrics and dimension filtering. More information in the [Cloudwatch data source documentation](/features/datasources/cloudwatch/). + +### PostgreSQL + +New enhancement includes support for filling in values for missing intervals and better precision handling and data type support for time columns. More information in the [PostgreSQL data source documentation](/features/datasources/postgres/#time-series-queries). + +### MySQL + +New enhancements includes support for filling in values for missing intervals, better precision handling and data type support for time columns and any column except time and metric is now treated as a value column. More information in the [MySQL data source documentation](/features/datasources/mysql/#time-series-queries). + +### Microsoft SQL Server + +{{< docs-imagebox img="/img/docs/v51/mssql_query_editor_showcase.png" max-width= "800px" class="docs-image--right" >}} + +Grafana v5.1 now ships with a built-in Microsoft SQL Server (MSSQL) data source plugin that allows you to query and visualize data from any Microsoft SQL Server 2005 or newer, including Microsoft Azure SQL Database. Have logs or metric data in MSSQL? You can now visualize that data and +define alert rules on it like any of our other data sources. + +Same enhancements as described for PostgreSQL and MySQL are included in the MSSQL datasource. + +Please read [Using Microsoft SQL Server in Grafana documentation](/features/datasources/mssql/) for more detailed information on how to get started and use it. + +
+ +## Dashboard & Panels + +### Adding new panels to a dashboard + +{{< docs-imagebox img="/img/docs/v51/dashboard_add_panel.png" max-width= "800px" class="docs-image--right" >}} + +The control for adding new panels to dashboards now includes functionality to search for the type of panel +you want to add. Further, the control has tabs separating functionality for adding and pasting panels: + +* Under the `Add` tab you'll find all of the panel types that you can add. +* Under the `Paste` tab you can paste a panel that you've earlier copied. + +By copying a panel in a dashboard, see screenshot below, it will be available in the `Paste` tab in *any* dashboard. +This should make it more intuitive to copy/paste panels between dashboards. + +![Copy panel](/img/docs/v51/dashboard_panel_copy.png) + +
+ +### Graph Panel + +New enhancements includes support for multiple series stacking in histogram mode, thresholds for right Y axis, aligning left and right Y-axes to one level and additional units. More information in the [Graph panel documentation](/features/panels/graph/). + +### Table Panel + +New enhancements includes support for mapping a numeric value/range to text and additional units. More information in the [Table panel documentation](/features/panels/table_panel/#string). + +## Changelog + +Checkout the [CHANGELOG.md](https://github.com/grafana/grafana/blob/master/CHANGELOG.md) file for a complete list +of new features, changes, and bug fixes. \ No newline at end of file From 6737f79331ca280e1e3793cee080a87c8b16de7f Mon Sep 17 00:00:00 2001 From: Marcus Efraimsson Date: Thu, 19 Apr 2018 13:25:16 +0200 Subject: [PATCH 06/13] docs: improve what's new in v5.1 --- docs/sources/guides/whats-new-in-v5-1.md | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/docs/sources/guides/whats-new-in-v5-1.md b/docs/sources/guides/whats-new-in-v5-1.md index f1fc036413a..d8697e63f8d 100644 --- a/docs/sources/guides/whats-new-in-v5-1.md +++ b/docs/sources/guides/whats-new-in-v5-1.md @@ -20,7 +20,7 @@ Grafana v5.1 brings new features, many enhancements and bug fixes. This article * [New template variable interpolation syntax]({{< relref "#new-template-variable-interpolation-syntax" >}}) * [Alerting]({{< relref "#alerting" >}}) * [Datasources]({{< relref "#datasources" >}}) Enhancements to Prometheus, Cloudwatch, PostgreSQL and MySQL. This release also adds support for [Microsft SQL Server]({{< relref "#microsoft-sql-server" >}}) as metric & table datasource! -* [Dashboard & Panels]({{< relref "#dashboard-panels" >}}) Enhancements to Graph and Table panels and improved control for adding new panels. +* [Dashboards & Panels]({{< relref "#dashboards-panels" >}}) Improved adding panels to dashboards and enhancements to Graph and Table panels. ## Scrolling @@ -93,22 +93,20 @@ Please read [Using Microsoft SQL Server in Grafana documentation](/features/data
-## Dashboard & Panels +## Dashboards & Panels -### Adding new panels to a dashboard +### Adding new panels to dashboards {{< docs-imagebox img="/img/docs/v51/dashboard_add_panel.png" max-width= "800px" class="docs-image--right" >}} -The control for adding new panels to dashboards now includes functionality to search for the type of panel -you want to add. Further, the control has tabs separating functionality for adding and pasting panels: +The control for adding new panels to dashboards have got some enhancements and now includes functionality to search for the type of panel +you want to add. Further, the control has tabs separating functionality for adding new panels and pasting +copied panels. -* Under the `Add` tab you'll find all of the panel types that you can add. -* Under the `Paste` tab you can paste a panel that you've earlier copied. +By copying a panel in a dashboard it will be displayed in the `Paste` tab in *any* dashboard and allows you to paste the +copied panel into the current dashboard. -By copying a panel in a dashboard, see screenshot below, it will be available in the `Paste` tab in *any* dashboard. -This should make it more intuitive to copy/paste panels between dashboards. - -![Copy panel](/img/docs/v51/dashboard_panel_copy.png) +{{< docs-imagebox img="/img/docs/v51/dashboard_panel_copy.png" max-width= "300px" >}}
From 601a1d9b92c15cd92e26ade42823cfcd8f7888ae Mon Sep 17 00:00:00 2001 From: bergquist Date: Thu, 19 Apr 2018 13:33:33 +0200 Subject: [PATCH 07/13] docs: more info prometheus heapmap to whats new --- docs/sources/guides/whats-new-in-v5-1.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/sources/guides/whats-new-in-v5-1.md b/docs/sources/guides/whats-new-in-v5-1.md index d8697e63f8d..4d0824aba1b 100644 --- a/docs/sources/guides/whats-new-in-v5-1.md +++ b/docs/sources/guides/whats-new-in-v5-1.md @@ -66,7 +66,9 @@ New enhancements includes support for retries on failed alert queries and updati ### Prometheus -New enhancements includes support for Prometheus histograms in the heatmap panel and autocomplete of template variables query editor. More information in the [Prometheus data source documentation](/features/datasources/prometheus/). +The Prometheus datasource now support transforming Prometheus histograms to the heatmap panel. Prometheus histogram is a powerful feature, and we are really happy to finally allow our users to render those as heatmaps. + +Prometheus query editor also got support for autocomplete of template variables. More information in the [Prometheus data source documentation](/features/datasources/prometheus/). ### Cloudwatch From b4a77d49b4b0c7399cea6e7ca386f7892a631b05 Mon Sep 17 00:00:00 2001 From: bergquist Date: Thu, 19 Apr 2018 13:39:02 +0200 Subject: [PATCH 08/13] docs: whats new reduce content a little bit and highlight mssql and prom heatmap --- docs/sources/guides/whats-new-in-v5-1.md | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/docs/sources/guides/whats-new-in-v5-1.md b/docs/sources/guides/whats-new-in-v5-1.md index 4d0824aba1b..3ab792de1bf 100644 --- a/docs/sources/guides/whats-new-in-v5-1.md +++ b/docs/sources/guides/whats-new-in-v5-1.md @@ -18,8 +18,8 @@ Grafana v5.1 brings new features, many enhancements and bug fixes. This article * [Improved docker image]({{< relref "#improved-docker-image-breaking-change" >}}) with a breaking change! * [Improved workflow for provisioned dashboards]({{< relref "#improved-workflow-for-provisioned-dashboards" >}}) * [New template variable interpolation syntax]({{< relref "#new-template-variable-interpolation-syntax" >}}) -* [Alerting]({{< relref "#alerting" >}}) -* [Datasources]({{< relref "#datasources" >}}) Enhancements to Prometheus, Cloudwatch, PostgreSQL and MySQL. This release also adds support for [Microsft SQL Server]({{< relref "#microsoft-sql-server" >}}) as metric & table datasource! +* [Heatmap support for Prometehus]({{< relref "#prometheus" >}}) +* [Microsft SQL Server]({{< relref "#microsoft-sql-server" >}}) as metric & table datasource! * [Dashboards & Panels]({{< relref "#dashboards-panels" >}}) Improved adding panels to dashboards and enhancements to Graph and Table panels. ## Scrolling @@ -57,32 +57,21 @@ More information in the [Provisioning documentation](/features/datasources/prome ## New template variable interpolation syntax - -## Alerting - -New enhancements includes support for retries on failed alert queries and updating correct state when pausing/unpausing alerts. - -## Datasources - -### Prometheus +## Prometheus The Prometheus datasource now support transforming Prometheus histograms to the heatmap panel. Prometheus histogram is a powerful feature, and we are really happy to finally allow our users to render those as heatmaps. Prometheus query editor also got support for autocomplete of template variables. More information in the [Prometheus data source documentation](/features/datasources/prometheus/). -### Cloudwatch - -New enhancements includes support for high resolution metrics and dimension filtering. More information in the [Cloudwatch data source documentation](/features/datasources/cloudwatch/). - -### PostgreSQL +## PostgreSQL New enhancement includes support for filling in values for missing intervals and better precision handling and data type support for time columns. More information in the [PostgreSQL data source documentation](/features/datasources/postgres/#time-series-queries). -### MySQL +## MySQL New enhancements includes support for filling in values for missing intervals, better precision handling and data type support for time columns and any column except time and metric is now treated as a value column. More information in the [MySQL data source documentation](/features/datasources/mysql/#time-series-queries). -### Microsoft SQL Server +## Microsoft SQL Server {{< docs-imagebox img="/img/docs/v51/mssql_query_editor_showcase.png" max-width= "800px" class="docs-image--right" >}} From cc3418f6a3fa373c98cb7bbaac09ee4fbe025a3f Mon Sep 17 00:00:00 2001 From: Marcus Efraimsson Date: Thu, 19 Apr 2018 13:44:37 +0200 Subject: [PATCH 09/13] docs: what's new Improved scrolling experience --- docs/sources/guides/whats-new-in-v5-1.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/sources/guides/whats-new-in-v5-1.md b/docs/sources/guides/whats-new-in-v5-1.md index 3ab792de1bf..c113be10819 100644 --- a/docs/sources/guides/whats-new-in-v5-1.md +++ b/docs/sources/guides/whats-new-in-v5-1.md @@ -14,7 +14,7 @@ weight = -7 Grafana v5.1 brings new features, many enhancements and bug fixes. This article will detail the major new features and enhancements. -* [Scrolling]({{< relref "#scrolling" >}}) +* [Improved scrolling experience]({{< relref "#improved-scrolling-experience" >}}) * [Improved docker image]({{< relref "#improved-docker-image-breaking-change" >}}) with a breaking change! * [Improved workflow for provisioned dashboards]({{< relref "#improved-workflow-for-provisioned-dashboards" >}}) * [New template variable interpolation syntax]({{< relref "#new-template-variable-interpolation-syntax" >}}) @@ -22,9 +22,12 @@ Grafana v5.1 brings new features, many enhancements and bug fixes. This article * [Microsft SQL Server]({{< relref "#microsoft-sql-server" >}}) as metric & table datasource! * [Dashboards & Panels]({{< relref "#dashboards-panels" >}}) Improved adding panels to dashboards and enhancements to Graph and Table panels. -## Scrolling - +## Improved scrolling experience +In Grafana v5.0 we introduced a new scrollbar component. Unfortunately this introduced a lot of issues and in some scenarios removed +the native scrolling functionality. Grafana v5.1 ships with a native scrollbar for all pages together with a scrollbar component for +the dashboard grid and panels that's not overriding the native scrolling functionality. We hope that these changes and improvements should +make the Grafana user experience much better! ## Improved docker image (breaking change) From 540bde269e9e8dfb6641b6f757aff7087403f55f Mon Sep 17 00:00:00 2001 From: Marcus Efraimsson Date: Thu, 19 Apr 2018 13:49:40 +0200 Subject: [PATCH 10/13] docs: fix typos --- docs/sources/guides/whats-new-in-v5-1.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/sources/guides/whats-new-in-v5-1.md b/docs/sources/guides/whats-new-in-v5-1.md index c113be10819..3a456fec053 100644 --- a/docs/sources/guides/whats-new-in-v5-1.md +++ b/docs/sources/guides/whats-new-in-v5-1.md @@ -18,8 +18,8 @@ Grafana v5.1 brings new features, many enhancements and bug fixes. This article * [Improved docker image]({{< relref "#improved-docker-image-breaking-change" >}}) with a breaking change! * [Improved workflow for provisioned dashboards]({{< relref "#improved-workflow-for-provisioned-dashboards" >}}) * [New template variable interpolation syntax]({{< relref "#new-template-variable-interpolation-syntax" >}}) -* [Heatmap support for Prometehus]({{< relref "#prometheus" >}}) -* [Microsft SQL Server]({{< relref "#microsoft-sql-server" >}}) as metric & table datasource! +* [Heatmap support for Prometheus]({{< relref "#prometheus" >}}) +* [Microsoft SQL Server]({{< relref "#microsoft-sql-server" >}}) as metric & table datasource! * [Dashboards & Panels]({{< relref "#dashboards-panels" >}}) Improved adding panels to dashboards and enhancements to Graph and Table panels. ## Improved scrolling experience From ffb1db833c4488d73ba1efde85d80a3b834d77ce Mon Sep 17 00:00:00 2001 From: bergquist Date: Thu, 19 Apr 2018 14:22:56 +0200 Subject: [PATCH 11/13] docs: what's new add's info about new template variable interpolation --- docs/sources/guides/whats-new-in-v5-1.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/sources/guides/whats-new-in-v5-1.md b/docs/sources/guides/whats-new-in-v5-1.md index 3a456fec053..a310ff45580 100644 --- a/docs/sources/guides/whats-new-in-v5-1.md +++ b/docs/sources/guides/whats-new-in-v5-1.md @@ -60,6 +60,15 @@ More information in the [Provisioning documentation](/features/datasources/prome ## New template variable interpolation syntax +We now support a new option for rendering template variables that gives the user full control of how the value(s) should be rendered. In the table below you can see two examples and you can find all different options in the [template variable docs](http://docs.grafana.org/reference/templating/#advanced-formatting-options) + +Filter Option | Example | Raw | Interpolated | Description +------------ | ------------- | ------------- | ------------- | ------------- +`glob` | ${servers:glob} | `'test1', 'test2'` | `{test1,test2}` | (Default) Formats multi-value variable into a glob (for Graphite queries) +`csv`| ${servers:csv} | `'test1', 'test2'` | `test1,test2` | Formats multi-value variable as a comma-separated string (requires Grafana 5.1) +`lucene`| ${servers:lucene} | `'test', 'test2'` | `("test" OR "test2")` | Formats multi-value variable as a lucene expression. + + ## Prometheus The Prometheus datasource now support transforming Prometheus histograms to the heatmap panel. Prometheus histogram is a powerful feature, and we are really happy to finally allow our users to render those as heatmaps. From 886c8b823a98f07d5dc90e79eedbd4cb335c7a2a Mon Sep 17 00:00:00 2001 From: Marcus Efraimsson Date: Thu, 19 Apr 2018 14:51:33 +0200 Subject: [PATCH 12/13] docs: what's new improvements --- docs/sources/guides/whats-new-in-v5-1.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/sources/guides/whats-new-in-v5-1.md b/docs/sources/guides/whats-new-in-v5-1.md index a310ff45580..da893a95a1e 100644 --- a/docs/sources/guides/whats-new-in-v5-1.md +++ b/docs/sources/guides/whats-new-in-v5-1.md @@ -60,7 +60,7 @@ More information in the [Provisioning documentation](/features/datasources/prome ## New template variable interpolation syntax -We now support a new option for rendering template variables that gives the user full control of how the value(s) should be rendered. In the table below you can see two examples and you can find all different options in the [template variable docs](http://docs.grafana.org/reference/templating/#advanced-formatting-options) +We now support a new option for rendering template variables that gives the user full control of how the value(s) should be rendered. In the table below you can see two examples and you can find all different options in the [template variable docs](http://docs.grafana.org/reference/templating/#advanced-formatting-options). Filter Option | Example | Raw | Interpolated | Description ------------ | ------------- | ------------- | ------------- | ------------- @@ -71,10 +71,16 @@ Filter Option | Example | Raw | Interpolated | Description ## Prometheus -The Prometheus datasource now support transforming Prometheus histograms to the heatmap panel. Prometheus histogram is a powerful feature, and we are really happy to finally allow our users to render those as heatmaps. +{{< docs-imagebox img="/img/docs/v51/prometheus_heatmap.png" max-width="800px" class="docs-image--right" >}} + +The Prometheus datasource now support transforming Prometheus histograms to the heatmap panel. Prometheus histogram is a powerful feature, and we're +really happy to finally allow our users to render those as heatmaps. Please read [Heatmap panel documentation](/features/panels/heatmap/#pre-bucketed-data) +for more information on how to use it. Prometheus query editor also got support for autocomplete of template variables. More information in the [Prometheus data source documentation](/features/datasources/prometheus/). +
+ ## PostgreSQL New enhancement includes support for filling in values for missing intervals and better precision handling and data type support for time columns. More information in the [PostgreSQL data source documentation](/features/datasources/postgres/#time-series-queries). @@ -87,8 +93,9 @@ New enhancements includes support for filling in values for missing intervals, b {{< docs-imagebox img="/img/docs/v51/mssql_query_editor_showcase.png" max-width= "800px" class="docs-image--right" >}} -Grafana v5.1 now ships with a built-in Microsoft SQL Server (MSSQL) data source plugin that allows you to query and visualize data from any Microsoft SQL Server 2005 or newer, including Microsoft Azure SQL Database. Have logs or metric data in MSSQL? You can now visualize that data and -define alert rules on it like any of our other data sources. +Grafana v5.1 now ships with a built-in Microsoft SQL Server (MSSQL) data source plugin that allows you to query and visualize data from any +Microsoft SQL Server 2005 or newer, including Microsoft Azure SQL Database. Do you have metric or log data in MSSQL? You can now visualize +that data and define alert rules on it like with any of Grafana's other core datasources. Same enhancements as described for PostgreSQL and MySQL are included in the MSSQL datasource. From 727a7bf27a4765a1123e039a319192bbc50f56a0 Mon Sep 17 00:00:00 2001 From: Marcus Efraimsson Date: Thu, 19 Apr 2018 16:26:42 +0200 Subject: [PATCH 13/13] docs: what's new improvements --- docs/sources/guides/whats-new-in-v5-1.md | 67 ++++++++++-------------- 1 file changed, 29 insertions(+), 38 deletions(-) diff --git a/docs/sources/guides/whats-new-in-v5-1.md b/docs/sources/guides/whats-new-in-v5-1.md index da893a95a1e..66b04ce3d50 100644 --- a/docs/sources/guides/whats-new-in-v5-1.md +++ b/docs/sources/guides/whats-new-in-v5-1.md @@ -16,11 +16,11 @@ Grafana v5.1 brings new features, many enhancements and bug fixes. This article * [Improved scrolling experience]({{< relref "#improved-scrolling-experience" >}}) * [Improved docker image]({{< relref "#improved-docker-image-breaking-change" >}}) with a breaking change! -* [Improved workflow for provisioned dashboards]({{< relref "#improved-workflow-for-provisioned-dashboards" >}}) -* [New template variable interpolation syntax]({{< relref "#new-template-variable-interpolation-syntax" >}}) * [Heatmap support for Prometheus]({{< relref "#prometheus" >}}) * [Microsoft SQL Server]({{< relref "#microsoft-sql-server" >}}) as metric & table datasource! * [Dashboards & Panels]({{< relref "#dashboards-panels" >}}) Improved adding panels to dashboards and enhancements to Graph and Table panels. +* [New variable interpolation syntax]({{< relref "#new-variable-interpolation-syntax" >}}) +* [Improved workflow for provisioned dashboards]({{< relref "#improved-workflow-for-provisioned-dashboards" >}}) ## Improved scrolling experience @@ -43,32 +43,6 @@ Version | User | User ID Please read the [updated documentation](/installation/docker/#migration-from-a-previous-version-of-the-docker-container-to-5-1-or-later) which includes migration instructions and more information. -## Improved workflow for provisioned dashboards - -{{< docs-imagebox img="/img/docs/v51/provisioning_cannot_save_dashboard.png" max-width="800px" class="docs-image--right" >}} - -Grafana v5.1 brings an improved workflow for provisioned dashboards: - -* A populated `id` property in JSON is now automatically removed when provisioning dashboards. -* When making changes to a provisioned dashboard you can `Save` the dashboard which now will bring up a *Cannot save provisioned dashboard* dialog like seen in the screenshot to the right. - - -Available options in the dialog will let you `Copy JSON to Clipboard` and/or `Save JSON to file` which can help you synchronize your dashboard changes back to the provisioning source. -More information in the [Provisioning documentation](/features/datasources/prometheus/). - -
- -## New template variable interpolation syntax - -We now support a new option for rendering template variables that gives the user full control of how the value(s) should be rendered. In the table below you can see two examples and you can find all different options in the [template variable docs](http://docs.grafana.org/reference/templating/#advanced-formatting-options). - -Filter Option | Example | Raw | Interpolated | Description ------------- | ------------- | ------------- | ------------- | ------------- -`glob` | ${servers:glob} | `'test1', 'test2'` | `{test1,test2}` | (Default) Formats multi-value variable into a glob (for Graphite queries) -`csv`| ${servers:csv} | `'test1', 'test2'` | `test1,test2` | Formats multi-value variable as a comma-separated string (requires Grafana 5.1) -`lucene`| ${servers:lucene} | `'test', 'test2'` | `("test" OR "test2")` | Formats multi-value variable as a lucene expression. - - ## Prometheus {{< docs-imagebox img="/img/docs/v51/prometheus_heatmap.png" max-width="800px" class="docs-image--right" >}} @@ -81,14 +55,6 @@ Prometheus query editor also got support for autocomplete of template variables.
-## PostgreSQL - -New enhancement includes support for filling in values for missing intervals and better precision handling and data type support for time columns. More information in the [PostgreSQL data source documentation](/features/datasources/postgres/#time-series-queries). - -## MySQL - -New enhancements includes support for filling in values for missing intervals, better precision handling and data type support for time columns and any column except time and metric is now treated as a value column. More information in the [MySQL data source documentation](/features/datasources/mysql/#time-series-queries). - ## Microsoft SQL Server {{< docs-imagebox img="/img/docs/v51/mssql_query_editor_showcase.png" max-width= "800px" class="docs-image--right" >}} @@ -97,8 +63,6 @@ Grafana v5.1 now ships with a built-in Microsoft SQL Server (MSSQL) data source Microsoft SQL Server 2005 or newer, including Microsoft Azure SQL Database. Do you have metric or log data in MSSQL? You can now visualize that data and define alert rules on it like with any of Grafana's other core datasources. -Same enhancements as described for PostgreSQL and MySQL are included in the MSSQL datasource. - Please read [Using Microsoft SQL Server in Grafana documentation](/features/datasources/mssql/) for more detailed information on how to get started and use it.
@@ -128,6 +92,33 @@ New enhancements includes support for multiple series stacking in histogram mode New enhancements includes support for mapping a numeric value/range to text and additional units. More information in the [Table panel documentation](/features/panels/table_panel/#string). +## New variable interpolation syntax + +We now support a new option for rendering variables that gives the user full control of how the value(s) should be rendered. +In the table below you can see some examples and you can find all different options in the [Variables documentation](http://docs.grafana.org/reference/templating/#advanced-formatting-options). + +Filter Option | Example | Raw | Interpolated | Description +------------ | ------------- | ------------- | ------------- | ------------- +`glob` | ${servers:glob} | `'test1', 'test2'` | `{test1,test2}` | Formats multi-value variable into a glob +`regex` | ${servers:regex} | `'test.', 'test2'` | `(test\\.|test2)` | Formats multi-value variable into a regex string +`pipe` | ${servers:pipe} | `'test.', 'test2'` | `test.|test2` | Formats multi-value variable into a pipe-separated string +`csv`| ${servers:csv} | `'test1', 'test2'` | `test1,test2` | Formats multi-value variable as a comma-separated string + +## Improved workflow for provisioned dashboards + +{{< docs-imagebox img="/img/docs/v51/provisioning_cannot_save_dashboard.png" max-width="800px" class="docs-image--right" >}} + +Grafana v5.1 brings an improved workflow for provisioned dashboards: + +* A populated `id` property in JSON is now automatically removed when provisioning dashboards. +* When making changes to a provisioned dashboard you can `Save` the dashboard which now will bring up a *Cannot save provisioned dashboard* dialog like seen in the screenshot to the right. + + +Available options in the dialog will let you `Copy JSON to Clipboard` and/or `Save JSON to file` which can help you synchronize your dashboard changes back to the provisioning source. +More information in the [Provisioning documentation](/features/datasources/prometheus/). + +
+ ## Changelog Checkout the [CHANGELOG.md](https://github.com/grafana/grafana/blob/master/CHANGELOG.md) file for a complete list