From a9c535e551d9508b18a350f774acc98644111ff8 Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Fri, 12 May 2017 11:37:23 +0200 Subject: [PATCH 1/7] mysql: add some more type mapping Decimals mapped to floats for now. No mapping for bit or any of the blob types. Tinyint not mapped to bool. --- pkg/tsdb/mysql/mysql.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/pkg/tsdb/mysql/mysql.go b/pkg/tsdb/mysql/mysql.go index 705db1e50da..4ebe467459d 100644 --- a/pkg/tsdb/mysql/mysql.go +++ b/pkg/tsdb/mysql/mysql.go @@ -184,14 +184,34 @@ func (e MysqlExecutor) getTypedRowData(types []*sql.ColumnType, rows *core.Rows) for i, stype := range types { switch stype.DatabaseTypeName() { + case mysql.FieldTypeNameTiny: + values[i] = new(int8) + case mysql.FieldTypeNameInt24: + values[i] = new(int32) + case mysql.FieldTypeNameShort: + values[i] = new(int16) case mysql.FieldTypeNameVarString: values[i] = new(string) + case mysql.FieldTypeNameVarChar: + values[i] = new(string) case mysql.FieldTypeNameLongLong: values[i] = new(int64) case mysql.FieldTypeNameDouble: values[i] = new(float64) + case mysql.FieldTypeNameDecimal: + values[i] = new(float32) + case mysql.FieldTypeNameNewDecimal: + values[i] = new(float64) + case mysql.FieldTypeNameTimestamp: + values[i] = new(time.Time) case mysql.FieldTypeNameDateTime: values[i] = new(time.Time) + case mysql.FieldTypeNameTime: + values[i] = new(time.Duration) + case mysql.FieldTypeNameYear: + values[i] = new(int16) + case mysql.FieldTypeNameNULL: + values[i] = nil default: return nil, fmt.Errorf("Database type %s not supported", stype.DatabaseTypeName()) } From 3a892727b3cf893b87e51d033fa57d7392e41ad4 Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Fri, 12 May 2017 11:45:26 +0200 Subject: [PATCH 2/7] release version bump 4.3.0-beta1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c72b93ddd1a..47102820d58 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "company": "Coding Instinct AB" }, "name": "grafana", - "version": "4.3.0-pre1", + "version": "4.3.0-beta1", "repository": { "type": "git", "url": "http://github.com/grafana/grafana.git" From a73f664d546a6fab8de1e2f6c5060c40208d9e7f Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Fri, 12 May 2017 13:26:34 +0200 Subject: [PATCH 3/7] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27b1ff2659b..f80ebcc1381 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# 4.3.0 (unreleased) +# 4.3.0-beta1 (2017-05-12) ## Enhancements From 88d4fde81598b8ea1d1e1b3c405dd8c6a0b785e3 Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Fri, 12 May 2017 13:35:52 +0200 Subject: [PATCH 4/7] docs: v4.3.0-beta1 updates --- README.md | 1 + docs/sources/guides/whats-new-in-v4-2.md | 2 +- docs/sources/guides/whats-new-in-v4-3.md | 105 +++++++++++++++++++++++ docs/sources/installation/debian.md | 9 ++ docs/sources/installation/rpm.md | 1 + docs/sources/installation/windows.md | 1 + 6 files changed, 118 insertions(+), 1 deletion(-) create mode 100644 docs/sources/guides/whats-new-in-v4-3.md diff --git a/README.md b/README.md index 9b5b02dec54..0f658f72d68 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ Graphite, Elasticsearch, OpenTSDB, Prometheus and InfluxDB. - [What's New in Grafana 4.0](http://docs.grafana.org/guides/whats-new-in-v4/) - [What's New in Grafana 4.1](http://docs.grafana.org/guides/whats-new-in-v4-1/) - [What's New in Grafana 4.2](http://docs.grafana.org/guides/whats-new-in-v4-2/) +- [What's New in Grafana 4.3](http://docs.grafana.org/guides/whats-new-in-v4-3/) ## Features diff --git a/docs/sources/guides/whats-new-in-v4-2.md b/docs/sources/guides/whats-new-in-v4-2.md index 44aa3a45dc0..4b140a9027e 100644 --- a/docs/sources/guides/whats-new-in-v4-2.md +++ b/docs/sources/guides/whats-new-in-v4-2.md @@ -12,7 +12,7 @@ weight = -1 ## Whats new in Grafana v4.2 -Grafana v4.2 Beta is now [available for download](/download/4_2_0/). +Grafana v4.2 Beta is now [available for download](https://grafana.com/grafana/download/4.2.0). Just like the last release this one contains lots bug fixes and minor improvements. We are very happy to say that 27 of 40 issues was closed by pull requests from the community. Big thumbs up! diff --git a/docs/sources/guides/whats-new-in-v4-3.md b/docs/sources/guides/whats-new-in-v4-3.md new file mode 100644 index 00000000000..ef37c56bfa0 --- /dev/null +++ b/docs/sources/guides/whats-new-in-v4-3.md @@ -0,0 +1,105 @@ ++++ +title = "What's New in Grafana v4.3" +description = "Feature & improvement highlights for Grafana v4.3" +keywords = ["grafana", "new", "documentation", "4.3.0"] +type = "docs" +[menu.docs] +name = "Version 4.3" +identifier = "v4.3" +parent = "whatsnew" +weight = -1 ++++ + +## What's New in Grafana v4.3 + +Grafana v4.3 Beta is now [available for download](https://grafana.com/grafana/download/4.3.0-beta1). + +## Release Highlights + +- New [Heatmap Panel](http://docs.grafana.org/features/panels/heatmap/) +- Graph Panel Histogram Mode +- Elasticsearch Histogram Aggregation +- Prometheus Table data format +- New [MySQL Data Source](http://docs.grafana.org/features/datasources/mysql/) (alpha version to get some early feedback) +- 60+ small fixes and improvements, most of them contributed by our fantastic community! + +Check out the [New Features in v4.3 Dashboard](http://play.grafana.org/dashboard/db/new-features-in-v4-3?orgId=1) on the Grafana Play site for a showcase of these new features. + +## Histogram Support + +A Histogram is a kind of bar chart that groups numbers into ranges, often called buckets or bins. Taller bars show that more data falls in that range. + +The Graph Panel now supports Histograms. + +![](/img/docs/v43/heatmap_histogram.png) + +## Histogram Aggregation Support for Elasticsearch + +Elasticsearch is the only supported data source that can return pre-bucketed data (data that is already grouped into ranges). With other data sources there is a risk of returning inaccurate data in a histogram due to using already aggregated data rather than raw data. This release adds support for Elasticsearch pre-bucketed data that can be visualized with the new [Heatmap Panel](http://docs.grafana.org/features/panels/heatmap/). + +## Heatmap Panel + +The Histogram support in the Graph Panel does not show changes over time - it aggregates all the data together for the chosen time range. To visualize a histogram over time, we have built a new [Heatmap Panel](http://docs.grafana.org/features/panels/heatmap/). + +Every column in a Heatmap is a histogram snapshot. Instead of visualizing higher values with higher bars, a heatmap visualizes higher values with color. The histogram shown above is equivalent to one column in the heatmap shown below. + +![](/img/docs/v43/heatmap_histogram_over_time.png) + +The Heatmap panel also works with Elasticsearch Histogram Aggregations for more accurate server side bucketing. + +![](/assets/img/blog/v4/elastic_heatmap.jpg) + +## MySQL Data Source (alpha) + +This release includes a [new core data source for MySQL](http://docs.grafana.org/features/datasources/mysql/). You can write any possible MySQL query and format it as either Time Series or Table Data allowing it be used with the Graph Panel, Table Panel and SingleStat Panel. + +We are still working on the MySQL data source. As it's missing some important features, like templating and macros and future changes could be breaking, we are +labeling the state of the data source as Alpha. Instead of holding up the release of v4.3 we are including it in its current shape to get some early feedback. So please try it out and let us know what you think on [twitter](https://twitter.com/intent/tweet?text=.%40grafana&source=4_3_beta_blog&related=blog) or on our [community forum](https://community.grafana.com/c/releases). Is this a feature that you would use? How can we make it better? + +**The query editor can show the generated and interpolated SQL that is sent to the MySQL server.** + +![](/img/docs/v43/mysql_table_query.png) + +**The query editor will also show any errors that resulted from running the query (very useful when you have a syntax error!).** + +![](/img/docs/v43/mysql_query_error.png) + +## Health Check Endpoint + +Now you can monitor the monitoring with the Health Check Endpoint! The new `/api/health` endpoint returns HTTP 200 OK if everything is up and HTTP 503 Error if the Grafana database cannot be pinged. + +## Lazy Load Panels + +Grafana now delays loading panels until they become visible (scrolled into view). This means panels out of view are not sending requests thereby reducing the load on your time series database. + +## Prometheus - Table Data (column per label) + +The Prometheus data source now supports the Table Data format by automatically assigning a column to a label. This makes it really easy to browse data in the table panel. + +![](/img/docs/v43/prom_table_cols_as_labels.png) + +## Other Highlights From The Changelog + +Changes: + +- **Table**: Support to change column header text [#3551](https://github.com/grafana/grafana/issues/3551) +- **InfluxDB**: influxdb query builder support for ORDER BY and LIMIT (allows TOPN queries) [#6065](https://github.com/grafana/grafana/issues/6065) Support influxdb's SLIMIT Feature [#7232](https://github.com/grafana/grafana/issues/7232) thx [@thuck](https://github.com/thuck) +- **Graph**: Support auto grid min/max when using log scale [#3090](https://github.com/grafana/grafana/issues/3090), thx [@bigbenhur](https://github.com/bigbenhur) +- **Prometheus**: Make Prometheus query field a textarea [#7663](https://github.com/grafana/grafana/issues/7663), thx [@hagen1778](https://github.com/hagen1778) +- **Server**: Support listening on a UNIX socket [#4030](https://github.com/grafana/grafana/issues/4030), thx [@mitjaziv](https://github.com/mitjaziv) + +Fixes: + +- **MySQL**: 4-byte UTF8 not supported when using MySQL database (allows Emojis in Dashboard Names) [#7958](https://github.com/grafana/grafana/issues/7958) +- **Dashboard**: Description tooltip is not fully displayed [#7970](https://github.com/grafana/grafana/issues/7970) + +Lots more enhancements and fixes can be found in the [Changelog](https://github.com/grafana/grafana/blob/master/CHANGELOG.md). + +## Download + +Head to the [v4.3 download page](https://grafana.com/grafana/download) for download links & instructions. + +## Thanks + +A big thanks to all the Grafana users who contribute by submitting PRs, bug reports, helping out on our [community site](https://community.grafana.com/) and providing feedback! + diff --git a/docs/sources/installation/debian.md b/docs/sources/installation/debian.md index 7bbf8c2052f..e9cb55ed36b 100644 --- a/docs/sources/installation/debian.md +++ b/docs/sources/installation/debian.md @@ -16,6 +16,7 @@ weight = 1 Description | Download ------------ | ------------- Stable for Debian-based Linux | [4.2.0 (x86-64 deb)](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_4.2.0_amd64.deb) +Beta for Debian-based Linux | [4.3.0-beta1 (x86-64 deb)](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_4.3.0-beta1_amd64.deb) Read [Upgrading Grafana]({{< relref "installation/upgrading.md" >}}) for tips and guidance on updating an existing installation. @@ -28,6 +29,14 @@ sudo apt-get install -y adduser libfontconfig sudo dpkg -i grafana_4.2.0_amd64.deb ``` +## Install Beta + +```bash +wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_4.3.0-beta1_amd64.deb +sudo apt-get install -y adduser libfontconfig +sudo dpkg -i grafana_4.3.0-beta1_amd64.deb +``` + ## APT Repository Add the following line to your `/etc/apt/sources.list` file. diff --git a/docs/sources/installation/rpm.md b/docs/sources/installation/rpm.md index 69d676d6db8..a0fbd35610a 100644 --- a/docs/sources/installation/rpm.md +++ b/docs/sources/installation/rpm.md @@ -16,6 +16,7 @@ weight = 2 Description | Download ------------ | ------------- Stable for CentOS / Fedora / OpenSuse / Redhat Linux | [4.2.0 (x86-64 rpm)](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.2.0-1.x86_64.rpm) +Beta for CentOS / Fedora / OpenSuse / Redhat Linux | [4.3.0-beta1 (x86-64 rpm)](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.3.0-beta1.x86_64.rpm) Read [Upgrading Grafana]({{< relref "installation/upgrading.md" >}}) for tips and guidance on updating an existing installation. diff --git a/docs/sources/installation/windows.md b/docs/sources/installation/windows.md index d1327d80d3e..9f020d8f61c 100644 --- a/docs/sources/installation/windows.md +++ b/docs/sources/installation/windows.md @@ -14,6 +14,7 @@ weight = 3 Description | Download ------------ | ------------- Latest stable package for Windows | [grafana.4.2.0.windows-x64.zip](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.2.0.windows-x64.zip) +Beta package for Windows | [grafana-4.3.0-beta1.windows-x64.zip](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.3.0-beta1.windows-x64.zip) Read [Upgrading Grafana]({{< relref "installation/upgrading.md" >}}) for tips and guidance on updating an existing installation. From fcbe3066286f90b27e66a9d5bd5af75a7f3e4a4a Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Fri, 12 May 2017 13:36:21 +0200 Subject: [PATCH 5/7] release: version bump for package cloud script --- packaging/publish/publish_testing.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/publish/publish_testing.sh b/packaging/publish/publish_testing.sh index 76419eb7a7e..8d27a35b826 100755 --- a/packaging/publish/publish_testing.sh +++ b/packaging/publish/publish_testing.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -deb_ver=4.2.0-beta1 -rpm_ver=4.2.0-beta1 +deb_ver=4.3.0-beta1 +rpm_ver=4.3.0-beta1 wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_${deb_ver}_amd64.deb From fd5fc0b7abc2058e61d7214634a1a4eaa1bc7ee8 Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Fri, 12 May 2017 14:19:46 +0200 Subject: [PATCH 6/7] docs: metadata change for guide post --- docs/sources/guides/whats-new-in-v4-3.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/guides/whats-new-in-v4-3.md b/docs/sources/guides/whats-new-in-v4-3.md index ef37c56bfa0..3290f3cd990 100644 --- a/docs/sources/guides/whats-new-in-v4-3.md +++ b/docs/sources/guides/whats-new-in-v4-3.md @@ -7,7 +7,7 @@ type = "docs" name = "Version 4.3" identifier = "v4.3" parent = "whatsnew" -weight = -1 +weight = -2 +++ ## What's New in Grafana v4.3 From 9566197620503742085606a2a3bad42b8fc2817d Mon Sep 17 00:00:00 2001 From: Konstantin Koniev Date: Fri, 12 May 2017 15:59:56 +0300 Subject: [PATCH 7/7] Internationalise keybindings. (#8311) --- public/app/core/services/keybindingSrv.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/core/services/keybindingSrv.ts b/public/app/core/services/keybindingSrv.ts index acf0123962b..95ad66b568a 100644 --- a/public/app/core/services/keybindingSrv.ts +++ b/public/app/core/services/keybindingSrv.ts @@ -74,7 +74,7 @@ export class KeybindingSrv { evt.stopPropagation(); evt.returnValue = false; return this.$rootScope.$apply(fn.bind(this)); - }); + }, 'keydown'); } showDashEditView(view) {