Compare commits

...

1486 Commits

Author SHA1 Message Date
Marcus Efraimsson
f76cafa68e Merge pull request #12357 from grafana/cp-5.2.0-beta2
Cherry-picks for v5.2.0-beta2
2018-06-20 15:21:50 +02:00
Marcus Efraimsson
cdae9126ed release v5.2.0-beta2 2018-06-20 14:58:30 +02:00
Marcus Efraimsson
b4c1df11f6 make sure to process panels in collapsed rows when exporting dashboard
(cherry picked from commit a2e08dc4e8)
2018-06-20 14:56:13 +02:00
Alexander Zobnin
7c94d5cd1a graph: fix legend decimals precision calculation
(cherry picked from commit 24f6d34abd)
2018-06-20 14:55:38 +02:00
Marcus Efraimsson
74d6b5fc1c dashboard: fix drop down links
(cherry picked from commit 4ef4a4d3a7)
2018-06-20 14:55:04 +02:00
Marcus Efraimsson
af42e0836a fix regressions after save modal changes of not storing time and variables per default
Fix problem with adhoc variable filters not handled.
Fix problem with saving variables and time per default when saving a
dashboard as/first time.
Fix updating dashboard model after save with saving time/variables
enabled so that next time you save you won't get checkboxes for save
time/variables unless any values changed.
Tests validating correctness if time/variable values has changed.

(cherry picked from commit 41ac8d4cd5)
2018-06-20 14:54:13 +02:00
Martin Molnar
f453fbe8ef feat(ldap): Allow use of DN in user attribute filter (#3132)
(cherry picked from commit be2fa54459)
2018-06-20 14:53:36 +02:00
Marcus Efraimsson
8d635efda0 snapshot: copy correct props when creating a snapshot
(cherry picked from commit a738347957)
2018-06-20 14:52:59 +02:00
Marcus Efraimsson
0f2e879339 set current org when adding/removing user to org
To not get into a situation where a user has a current organization assign which he is
not a member of we try to always make sure that a user has a valid current organization
assigned.

(cherry picked from commit 6d48d0a80c)
2018-06-20 14:52:11 +02:00
Marcus Efraimsson
e51dd88260 Merge pull request #12340 from grafana/apikey-permission-fix-cherry-pick2
v5.2.x cherry pick fix
2018-06-19 12:37:26 +02:00
Torkel Ödegaard
984293cc52 fix: fixed permission issue with api key with viewer role in dashboards with default permissions
(cherry picked from commit 24d0b43e62)
2018-06-19 11:14:33 +02:00
Marcus Efraimsson
9a1a9584b7 Merge pull request #12316 from grafana/v52_merge_master
Merge master to v5.2.x release branch
2018-06-18 11:50:48 +02:00
Marcus Efraimsson
8a69ffb007 Merge branch 'master' into v52_merge_master 2018-06-18 09:44:39 +02:00
Marcus Efraimsson
ab9f0e8edd changelog: add notes about closing #10707
[skip ci]
2018-06-18 09:03:30 +02:00
Marcus Efraimsson
18167f1c18 Merge pull request #12299 from grafana/10707_whitelist
auth proxy: whitelist proxy ip instead of client ip
2018-06-18 09:00:41 +02:00
Tim Heckman
a2ff7629e0 Include the vendor directory when copying source in to Docker (#12305)
This change updates the `.dockerignore` file to no longer contain the `vendor/`
directory. When a Go project provides a `vendor/` directory within the
repository, the best practice is to build that project using their vendored
dependencies. By putting it in the `.dockerignore` file we prevent consumers
from easily doing that.

The `vendor/` directory is used to include all of the dependencies needed to
build a project. This makes it so that we can reproducibly build the project, at
any given commit, because the dependencies will always be present. Also, using
the vendor directory avoids us needing to continually re-download all the
dependencies, and it protects us from build failures if GitHub is down or a
dependency gets removed or renamed.

In addition to the change above, this also removes an extra `/tmp` entry from
the `.dockerignore` file.

Fixes #12304

Signed-off-by: Tim Heckman <t@heckman.io>
2018-06-17 22:38:37 -07:00
bergquist
6782be80fd changelog: adds note about closing #12199 2018-06-16 16:59:15 +02:00
Carl Bergquist
e2adb4ced5 Merge pull request #12302 from grafana/12199_cloudwatch_panic
cloudwatch: handle invalid time range
2018-06-16 16:57:23 +02:00
Marcus Efraimsson
c02dd7462a cloudwatch: handle invalid time range 2018-06-15 15:48:25 +02:00
Marcus Efraimsson
b418e14bd9 make sure to use real ip when validating white listed ip's 2018-06-15 15:29:43 +02:00
bergquist
4be6ef4ab3 changelog: adds note about closing #12286 2018-06-15 12:47:53 +02:00
Carl Bergquist
e33d18701d Merge pull request #12287 from bergquist/fix_12286
Influxdb: add mode functions
2018-06-15 12:43:47 +02:00
Marcus Efraimsson
f0254c201a Merge pull request #12215 from ryantxu/use-ng-if-for-time
use ng-if for the panel timeInfo
2018-06-15 12:16:48 +02:00
Marcus Efraimsson
a02306bc75 Merge pull request #12295 from bergquist/docker_master
docs: adds info about grafana-dev container
2018-06-15 11:32:24 +02:00
bergquist
10d840b1cc docs: adds info about grafana-dev container 2018-06-15 11:07:23 +02:00
Marcus Efraimsson
551957fc4d changelog: add notes about closing #12282
[skip ci]
2018-06-15 10:57:19 +02:00
flopp999
2d1f59a9cc Added Litre/min and milliLitre/min in Flow (#12282)
units: Litre/min and milliLitre/min in Flow
2018-06-15 10:54:38 +02:00
Marcus Efraimsson
5f78ad583f remove papaparse dependency 2018-06-15 10:49:57 +02:00
Marcus Efraimsson
22c7c741eb Merge pull request #12252 from grafana/davkal/ifql-query
Internal Influx Flux plugin cleanup
2018-06-15 10:43:34 +02:00
Marcus Efraimsson
b62322b128 Merge pull request #12288 from mlclmj/master
docs: HTTP Endpoint for Deleting an Organization
2018-06-15 10:37:51 +02:00
Marcus Efraimsson
96287a9061 Merge pull request #12294 from vincent-fuchs/patch-1
docs: delete_datasources -> deleteDatasources in provisioning
2018-06-15 10:33:03 +02:00
Vincent Fuchs
c8becf57fa list name is deleteDatasources, not delete_datasources
fixes https://github.com/grafana/grafana/issues/12293
2018-06-15 12:19:53 +05:30
David Kaltschmidt
d5196ab322 remove internal influx ifql datasource 2018-06-14 20:42:33 +01:00
Malcolm Jones
2765afc830 Document the endpoint for deleting an org 2018-06-14 15:28:54 -04:00
bergquist
c63533f004 tests: rewrite into table tests 2018-06-14 20:33:36 +02:00
bergquist
bf4ee9bcc6 influxdb: adds mode func to backend
closes #12286
2018-06-14 20:33:22 +02:00
Marcus Efraimsson
56628996b7 Merge pull request #12280 from dehrax/12224-elastic-response
karma to jest: 6 test files
2018-06-14 17:24:36 +02:00
Marcus Efraimsson
0107491195 changelog: add notes about closing #11484
[skip ci]
2018-06-14 15:59:31 +02:00
Marcus Efraimsson
81d34137a8 Merge pull request #11484 from manacker/master
alerting: fix mobile notifications for microsoft teams notifier
2018-06-14 15:56:18 +02:00
Marcus Efraimsson
e6135ffd4f changelog: add notes about closing #11233
[skip ci]
2018-06-14 15:39:32 +02:00
Marcus Efraimsson
9dd38031e4 Merge pull request #11233 from flopp999/patch-2
units: W/m2(energy), l/h(flow) and kPa(pressure)
2018-06-14 15:36:38 +02:00
Tobias Skarhed
dbbd6b9b66 Remove import 2018-06-14 15:27:11 +02:00
Marcus Efraimsson
1626a66bab Merge pull request #12275 from dehrax/12224-exporter
karma to jest: exporter, playlist_edit_ctrl
2018-06-14 15:10:06 +02:00
Marcus Efraimsson
25e1d723c6 Merge pull request #12276 from grafana/davkal/expose-react-slate
Expose react and slate to external plugins
2018-06-14 14:41:30 +02:00
Tobias Skarhed
23abf044ff Fix PR feedback 2018-06-14 14:37:48 +02:00
David Kaltschmidt
5ec7d60e5f Removed papaparse from external plugin exports 2018-06-14 13:22:16 +01:00
Tobias Skarhed
ef0586acab Karma to Jest: query_builder 2018-06-14 14:20:42 +02:00
Marcus Efraimsson
284045748c Merge pull request #12243 from grafana/12236-ds-proxy-tokens
dsproxy: allow multiple access tokens per datasource
2018-06-14 14:03:08 +02:00
Marcus Efraimsson
99c188f626 Merge pull request #12273 from grafana/12247-link-icon
fix panel link icon positioning
2018-06-14 13:54:08 +02:00
Daniel Lee
10d30f0b73 dsproxy: move http client variable back
After refactoring to be able to mock the client in
a test, the client wasn't a global variable anymore.
This change moves the client back to being a package-
level variable.
2018-06-14 13:39:46 +02:00
Tobias Skarhed
283b39c397 Karma to Jest: threshold_mapper 2018-06-14 13:38:03 +02:00
David Kaltschmidt
eb686c06f2 Expose react and slate to external plugins
Experimental support for react in external plugins

- react
- slate (editor)
- papaparse (csv parsing)
- prismjs (syntax highlighting)

This is needed for new external datasource plugins like Flux
2018-06-14 12:32:57 +01:00
Tobias Skarhed
155ff06cbe Karma to Jest: threshold_manager 2018-06-14 13:22:17 +02:00
Tobias Skarhed
2465f53324 Karma to Jest: query_def, index_pattern 2018-06-14 12:18:11 +02:00
Tobias Skarhed
a911d36dea Remove import 2018-06-14 12:00:54 +02:00
Tobias Skarhed
04029a94cd Karma to Jest: elastic_response 2018-06-14 11:56:03 +02:00
Marcus Efraimsson
71b0326769 Merge pull request #12237 from dehrax/12224-version-panel
Convert tests from Karma to Jest
2018-06-14 10:13:46 +02:00
Patrick O'Carroll
8345e83bd6 changelog: notes about closing #12189 2018-06-14 10:05:11 +02:00
Patrick O'Carroll
9802d86783 Merge pull request #12189 from ryantxu/focus-panel-search
autoFocus the add-panel search filter, and add on enter
2018-06-14 09:54:41 +02:00
Tobias Skarhed
a3552a60e1 Improve test readability 2018-06-14 09:46:36 +02:00
Patrick O'Carroll
a0aa0b55e7 moved link icon in panel header 2018-06-14 09:24:51 +02:00
Tobias Skarhed
4dd9b8f324 Karma to Jest: playlist_edit_ctrl 2018-06-13 16:29:50 +02:00
Tobias Skarhed
94b8cbdc6a Karma to Jest: exporter 2018-06-13 15:15:36 +02:00
nikoalch
0cc8ccdaa5 Update graphite.md 2018-06-13 08:40:15 -04:00
Marcus Efraimsson
ff3db60e2e changelog: add notes about closing #10796
[skip ci]
2018-06-13 13:13:57 +02:00
Marcus Efraimsson
2288e01752 Merge pull request #12169 from alexanderzobnin/feat-10796
Import dashboard to folder
2018-06-13 13:10:52 +02:00
Marcus Efraimsson
c39979a557 Merge pull request #12255 from dehrax/docs-dev-grafana
Update "Building from source" docs
2018-06-13 12:46:45 +02:00
Alexander Zobnin
25504e84ed dashboard import to folder: minor fixes 2018-06-13 10:44:37 +03:00
Tobias Skarhed
c650b50c37 Docs: output location from build script 2018-06-13 09:37:14 +02:00
Carl Bergquist
d3a3e7cfd1 Merge pull request #12222 from PrincipalsOffice/remove-QueryOptionsCtrl-references
removed QueryOptionsCtrl references
2018-06-13 09:34:02 +02:00
Marcus Efraimsson
3b824a5e00 Merge pull request #12244 from kdombeck/patch-1
docs: correct provisioning link
2018-06-13 09:14:32 +02:00
Ken Dombeck
110522307a Correct Provisioning documentation link
It was pointing to Prometheus documentation instead.
2018-06-12 09:01:25 -07:00
Daniel Lee
719ebdc24d dsproxy: allow multiple access tokens per datasource
Changes the cache key for tokens to cache on datasource id +
route path + http method instead of just datasource id.
2018-06-12 17:39:38 +02:00
Daniel Lee
610a90b79a Merge pull request #12231 from dehrax/12224-graph-tooltip
Karma to Jest: graph-tooltip
2018-06-12 16:32:14 +02:00
Tobias Skarhed
72ecf72c45 Mock core in jest-setup 2018-06-12 16:14:22 +02:00
Tobias Skarhed
8155ce9804 Docs: Update Build from Source 2018-06-12 15:06:17 +02:00
Tobias Skarhed
d91e9ddd22 Convert tests from Karma to Jest 2018-06-12 13:54:07 +02:00
Marcus Efraimsson
d8f269954a changelog: add notes about closing #11963
[skip ci]
2018-06-12 13:10:48 +02:00
Patrick O'Carroll
0bb30b146c save-modal save button (#12047)
Disable save dashboard button when saving
2018-06-12 11:54:50 +02:00
Tobias Skarhed
da9a28f37d Karma to Jest: graph-tooltip 2018-06-11 15:59:20 +02:00
Jiang Ye
c92874875c removed QueryOptionsCtrl references 2018-06-09 16:06:03 -04:00
bergquist
dbaa45e51e update latest.json to 5.1.3 2018-06-09 21:26:07 +02:00
ryan
0a3ec93347 use ng-if 2018-06-08 15:49:30 +02:00
David Kaltschmidt
ab76864e61 hot-fix ifql testdatasource() 2018-06-08 14:56:48 +02:00
Carl Bergquist
5ed2880a8b Merge pull request #12202 from grafana/11486_sqlite
Upgrade mattn/go-sqlite3 to v1.7.0
2018-06-08 13:11:46 +02:00
Carl Bergquist
38864d74bd Merge pull request #12180 from grafana/deploy
Propagate specific git-sha into tarball and docker builds
2018-06-08 13:02:07 +02:00
bergquist
484d9e3f9d triggers grafana-docker master build 2018-06-08 12:44:01 +02:00
Patrick O'Carroll
77403b0dc1 changed som variables to values so it's the same for dark and light theme, added special styling for login text, link and input (#12196) 2018-06-07 11:03:58 -07:00
Marcus Efraimsson
c0830e9cde mattn/go-sqlite3 v1.6.0 to v1.7.0 2018-06-07 16:53:39 +02:00
Marcus Efraimsson
7d508df1b4 changelog: add notes about closing #11074
[skip ci]
2018-06-07 16:24:45 +02:00
Patrick O'Carroll
25f2960717 fixed so panel title doesn't wrap and (#12142)
dashboard: fix so panel titles doesn't wrap
2018-06-07 16:20:55 +02:00
Ryan McKinley
1f32871f70 Use Passive eventListener for 'wheel' (#12106)
* make wheel passive

* remove console
2018-06-07 03:41:50 -07:00
Marcus Efraimsson
3fb4eb7322 Merge pull request #12175 from grafana/davkal/12168-fix-explore-setting
Respect explore settings in config ini
2018-06-07 12:08:42 +02:00
ryan
09dbb52423 Merge remote-tracking branch 'grafana/master' into focus-panel-search
* grafana/master:
  nicer collapsed row behaviour (#12186)
  remove DashboardRowCtrl (#12187)
  Annotations support for ifql datasource
  Template variable support for ifql datasource
  Query helpers for IFQL datasource
2018-06-07 10:31:46 +02:00
David
82ae7c6eee Merge pull request #12167 from grafana/davkal/ifql-helpers
Query helpers, Annotations, and Template Variables for IFQL datasource
2018-06-07 10:24:21 +02:00
Ryan McKinley
17a2ce13f0 nicer collapsed row behaviour (#12186)
* nicer collapsed row behavior

* don't block events

* use a div to toggle

* use singular name
2018-06-06 21:58:42 -07:00
Ryan McKinley
415ad8fbf3 remove DashboardRowCtrl (#12187) 2018-06-06 21:57:30 -07:00
ryan
c71608aae8 add panel on enter 2018-06-07 03:08:39 +02:00
ryan
37c45a81a9 autoFocus the search filter 2018-06-07 02:48:54 +02:00
bergquist
f93d83befe adds missing return statement 2018-06-06 22:17:19 +02:00
Sławek Piotrowski
9db964bf35 Fix typo: eleasticsearch -> elasticsearch (#12184) 2018-06-06 13:09:16 -07:00
David Kaltschmidt
cdba2bd184 Annotations support for ifql datasource 2018-06-06 16:11:40 +02:00
Alexander Zobnin
8fd3015e52 dashboard: improve import UX for non-editor users
validate folderId, import only into available folders
2018-06-06 15:35:19 +03:00
David Kaltschmidt
2c86484e54 Template variable support for ifql datasource
* Implements findMetricQuery()
* Macros for template queries: measurements(), tags(), tag_values(),
 field_keys()
* Tests for macro expansion
2018-06-06 14:11:48 +02:00
Tom Wilkie
c47f40d99c Use cut to trim down the SHA1.
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
2018-06-06 12:07:47 +01:00
Alexander Zobnin
9460063ab5 show import menu in sidenav, dashboard search and manage dashboards page
if user has editor permissions for at least one folder
2018-06-06 13:55:00 +03:00
David Kaltschmidt
3bd58446d6 Fix metrics panel test by adding config mock 2018-06-06 11:15:24 +02:00
David Kaltschmidt
661503f828 Respect explore settings in config ini
Previous explore restrictions only took permissions into consideration.

* add `exploreEnabled` to global settings
* only bind `x` if enabled
* only show explore in panel menu if enabled
2018-06-06 10:50:47 +02:00
David Kaltschmidt
56fc82151b Add .html to webpack.hot resolve extensions 2018-06-06 09:12:06 +02:00
Tom Wilkie
681326140d Version the tarball uploaded to s3 and tell the next step about it.
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
2018-06-05 20:02:51 +01:00
Alexander Zobnin
4ff4ac1d5f dashboard: import into current folder from manage folder page 2018-06-05 20:01:48 +03:00
Alexander Zobnin
393f41cd14 dashboard: add Import button to manage page 2018-06-05 19:37:47 +03:00
Alexander Zobnin
4063ae37a4 dashboard: import to folder 2018-06-05 19:23:09 +03:00
David Kaltschmidt
d7379912c1 Query helpers for IFQL datasource
* raw CSV preview next to query field (query inspector is not that
 useful here)
* added result table and record counts
2018-06-05 17:15:35 +02:00
David
45a156577c Merge pull request #12143 from grafana/davkal/ifql-datasource
InfluxDB IFQL datasource (beta)
2018-06-05 14:23:21 +02:00
Leonard Gram
9e7651a1b3 docs: docker secrets available in v5.2.0 2018-06-05 13:54:23 +02:00
David Kaltschmidt
64f5874778 Remove round-robin urls in ifql DS 2018-06-05 13:49:35 +02:00
David Kaltschmidt
1d587450b3 IFQL range variable expansion 2018-06-05 13:42:32 +02:00
Leonard Gram
eb66266629 changelog: release v5.2.0-beta1. 2018-06-05 10:57:18 +02:00
Leonard Gram
faa5e699d2 Release v5.2.0-beta1. 2018-06-05 10:43:14 +02:00
Marcus Efraimsson
cb9fc3f6b4 changelog: add notes about closing #11657
[skip ci]
2018-06-05 09:35:24 +02:00
Carl Bergquist
6d27c3d0c5 Merge pull request #12154 from grafana/11657_server_admin
Always show server admin link in sidenav if grafana admin
2018-06-05 08:02:05 +02:00
Marcus Efraimsson
962f996799 always show server admin link in sidenav if grafana admin 2018-06-04 19:28:01 +02:00
Marcus Efraimsson
d09749eaaa Merge pull request #12153 from grafana/googleOAuthDocs
update google auth config docs
2018-06-04 18:50:28 +02:00
Dan Cech
9b29a19609 update google auth config docs 2018-06-04 12:32:35 -04:00
Marcus Efraimsson
58406707f9 changelog: add notes about closing #11525
[skip ci]
2018-06-04 18:10:28 +02:00
Marcus Efraimsson
38c94bb633 Merge pull request #12117 from grafana/11525-dashlist-folder-picker
Fix search by folder in dashboard list panel
2018-06-04 18:08:38 +02:00
Torkel Ödegaard
9e59751c07 fix: fixed problem with expanding access mode help in ds settings 2018-06-04 18:05:16 +02:00
Torkel Ödegaard
ae82112c2e dep: use master branch for plugin model 2018-06-04 17:47:38 +02:00
David
95aef8241c Merge pull request #12146 from grafana/12144-new-variable-save
added if to check if new variable has been added
2018-06-04 17:26:48 +02:00
Patrick O'Carroll
d650dc94c9 fixed so default is all and general only show dashboards 2018-06-04 17:25:20 +02:00
Marcus Efraimsson
09a0a49c52 changelog: add notes about closing #11882
[skip ci]
2018-06-04 16:32:42 +02:00
Patrick O'Carroll
937b26f3fd added s to folderId in params 2018-06-04 16:28:24 +02:00
Patrick O'Carroll
89238b4a04 renamed variable in tests 2018-06-04 16:23:36 +02:00
Patrick O'Carroll
b122f53085 added comment, variableChange -> variableValueChange 2018-06-04 16:23:36 +02:00
Patrick O'Carroll
609b0fa498 added a test 2018-06-04 16:23:36 +02:00
Patrick O'Carroll
5e484e8393 added if to check if new variable has been added 2018-06-04 16:23:36 +02:00
Marcus Efraimsson
6281910591 Merge pull request #12037 from grafana/login-change-password
change admin password after first login
2018-06-04 16:21:45 +02:00
pari-
9680a3d44d Gravatar fallback does not respect 'AppSubUrl'-setting (#12149)
Closes #12148
2018-06-04 16:03:59 +02:00
David
b5c53aae97 Merge pull request #12108 from grafana/davkal/12001-explore-permissions
Restrict Explore UI to Editor and Admin roles
2018-06-04 16:01:39 +02:00
Patrick O'Carroll
cb6c6c8172 change admin password after first login 2018-06-04 16:01:09 +02:00
bergquist
574e92e1d8 changelog: adds note about closing #11958
[skip ci]
2018-06-04 16:00:44 +02:00
Carl Bergquist
7214ee9024 Merge pull request #12007 from bergquist/provisioning_symlinked_folders
Add support for symlinked folders in dashboard provisioning
2018-06-04 16:00:32 +02:00
Torkel Ödegaard
829af9425f revert: reverted singlestat panel position change PR #12004 2018-06-04 15:45:29 +02:00
bergquist
cd4026da6b Revert "provisioning: turn relative symlinked path into absolut paths"
This reverts commit d089b5e05d.
2018-06-04 15:38:37 +02:00
bergquist
d089b5e05d provisioning: turn relative symlinked path into absolut paths 2018-06-04 15:20:26 +02:00
Marcus Efraimsson
33ee1fba30 Merge pull request #12150 from grafana/12120_whats_new
Draft: What's new in v5.2
2018-06-04 15:17:31 +02:00
bergquist
c138ff2c90 changelog: adds note about closing #11670 2018-06-04 15:16:34 +02:00
Marcus Efraimsson
38906acda9 elasticsearch: sort bucket keys to fix issue wth response parser tests 2018-06-04 15:15:47 +02:00
Carl Bergquist
49d9235433 Merge pull request #12122 from grafana/provisioning_ha
Support provisioning in HA setup where modtime differs
2018-06-04 15:12:46 +02:00
Marcus Efraimsson
0d5579b4c0 docs: what's new in v5.2 2018-06-04 14:31:43 +02:00
David Kaltschmidt
08ee1da6b1 InfluxDB IFQL datasource 2018-06-04 12:24:47 +02:00
Marcus Efraimsson
7453df2662 changelog: add notes about closing #11167
[skip ci]
2018-06-04 11:57:13 +02:00
Marcus Efraimsson
e258f30704 Merge pull request #12129 from alexanderzobnin/fix-11167
alert list panel: show alerts for user with viewer role
2018-06-04 11:54:51 +02:00
Leonard Gram
e562ae753b docs: docker secrets support. (#12141)
Closes #12132
2018-06-04 11:49:12 +02:00
Alexander Zobnin
13c6f37ea5 alerting: show alerts for user with Viewer role
changelog: add notes about closing #11167

remove changelog note

reformat alert_test.go
2018-06-04 12:34:30 +03:00
Torkel Ödegaard
feb5e20779 datasource: added option no-direct-access to ds-http-settings diretive, closes #12138 2018-06-04 11:17:50 +02:00
bergquist
f606654c50 provisioning: adds fallback if evalsymlink/abs fails 2018-06-04 09:04:33 +02:00
bergquist
3f5078339c tests: uses different paths depending on os 2018-06-04 08:27:03 +02:00
bergquist
75ee1e9208 renames intervalSeconds to updateIntervalSeconds 2018-06-04 08:13:20 +02:00
Marcus Efraimsson
f5cf926364 changelog: add notes about closing #5893
[skip ci]
2018-06-01 15:23:26 +02:00
Marcus Efraimsson
b6afe5f2e8 Merge pull request #11380 from WPH95/feature/add_es_alerting
elasticsearch: alerting support
2018-06-01 15:17:28 +02:00
Marcus Efraimsson
b67872bc35 changelog: add notes about closing #11500, #8168, #6541
[skip ci]
2018-06-01 14:49:14 +02:00
Patrick O'Carroll
0c269d64d0 Alert panel filters (#11712)
alert list panel: filter alerts by name, dashboard, folder, tags
2018-06-01 14:36:40 +02:00
Marcus Efraimsson
ce75afa413 docs: update alerting docs with alerting support for elasticsearch 2018-06-01 12:26:20 +02:00
David
13a9701581 Update CHANGELOG.md
- added Prometheus query date alignment
2018-06-01 10:13:48 +02:00
bergquist
333af6fd9b provisioning: makes the interval for polling for changes configurable 2018-05-31 21:07:34 +02:00
bergquist
c817aecd66 provisioning: only update dashboard if hash of json changed 2018-05-31 21:05:52 +02:00
Marcus Efraimsson
b8ff3b1e3f remove dead code 2018-05-31 19:05:32 +02:00
Marcus Efraimsson
dcac63936b elasticsearch: minor refactor
Handle all replacements if interval template variables in the client.
Fix issue with client and different versions.
Adds better tests of the client
2018-05-31 19:02:20 +02:00
Marcus Efraimsson
28f0acd854 Merge branch 'master' into feature/add_es_alerting 2018-05-31 16:33:07 +02:00
Marcus Efraimsson
a2cd05f6db changelog: update
[skip ci]
2018-05-31 16:31:53 +02:00
Marcus Efraimsson
67410f7a4d changelog: add notes about closing #10748, #8805
[skip ci]
2018-05-31 15:48:19 +02:00
Patrick O'Carroll
37f9bdfc8c save modal ux improvements (#11822)
changes to save modal when saving an updated dashboard

Changed time range and variables are now not saved by default, 
you'll need to actively choose if you want to save updated time 
range and or variables.
2018-05-31 15:40:57 +02:00
Marcus Efraimsson
938deae4b4 changelog: add notes about closing #11515
[skip ci]
2018-05-31 15:24:01 +02:00
Marcus Efraimsson
a1b20bf69a Merge pull request #12092 from grafana/11515_import_uid
Validate uid when importing dashboards
2018-05-31 15:18:24 +02:00
bergquist
44f5b92fbc provisioning: only provision if json file is newer then db 2018-05-31 11:38:29 +02:00
David Kaltschmidt
0c45ee63a9 Guard /explore by editor role on the backend 2018-05-31 11:26:24 +02:00
bergquist
2bd4c14e5f make path absolute before following symlink 2018-05-31 09:53:15 +02:00
bergquist
47d3884377 provisioning: follow symlinked folders
fixes #11958
2018-05-31 09:38:09 +02:00
bergquist
d5aeae3a90 test: fixes broken test on windows 2018-05-31 08:27:29 +02:00
Carl Bergquist
5c30643f6e Merge pull request #12101 from bergquist/devenv
devenv: initial scripts for setting up devenv
2018-05-30 21:49:17 +02:00
Marcus Efraimsson
82ba27b5f2 changelog: add notes about closing #11771
[skip ci]
2018-05-30 21:31:31 +02:00
Marcus Efraimsson
d2296d332e Merge pull request #12107 from grafana/davkal/11771-hide-gridcontrols
Fix CSS to hide grid controls in fullscreen/low-activity views
2018-05-30 21:29:24 +02:00
Marcus Efraimsson
a4b1dd036d changelog: add notes about closing #11971
[skip ci]
2018-05-30 18:11:47 +02:00
Patrick O'Carroll
b894b5e669 Fix singlestat threshold tooltip (#12109)
fix singlestat threshold tooltip
2018-05-30 18:09:57 +02:00
Leonard Gram
b379b28337 build: only runs db related tests on db. 2018-05-30 16:27:47 +02:00
Leonard Gram
e33b17fac6 build: integration testing postegres on ci. 2018-05-30 16:27:47 +02:00
Leonard Gram
50d1519a91 build: mysql integration testing on ci. 2018-05-30 16:27:47 +02:00
David Kaltschmidt
827fb7e8de Fix karma tests that rely on MetricsPanelCtrl 2018-05-30 15:24:47 +02:00
Leonard Gram
21ecaae6ff changelog: Second epochs are now correctly converted to ms. 2018-05-30 14:30:01 +02:00
David Kaltschmidt
7224ca6c62 Fix panel menu test 2018-05-30 13:24:09 +02:00
David Kaltschmidt
f69654fcd5 Restrict Explore UI to Editor and Admin roles
Access is restricted via not showing in the following places:

* hide from sidemenu
* hide from panel header menu
* disable keybinding `x`

Also adds a `roles` property to reactContainer routes that will be
checked if `roles` is set, and on failure redirects to `/`.
2018-05-30 13:13:29 +02:00
David
7a3c1e162c Merge pull request #11942 from grafana/davkal/design-integration
Explore: Time selector, split view, design integration
2018-05-30 12:27:24 +02:00
David Kaltschmidt
ac1dda3b3a Fix CSS to hide grid controls in fullscreen/low-activity views
* there was a comma missing to hide the handles, fixed now
* added new styles to hide header interaction in full screen panels
2018-05-30 12:07:51 +02:00
David
40844614bf Merge pull request #12096 from grafana/davkal/11446-fix-systemjs-cachebust
Fix cache busting for systemjs imports for plugins
2018-05-30 10:05:46 +02:00
Marcus Efraimsson
f2942d94a5 changelog: add notes about closing #11645
[skip ci]
2018-05-30 09:26:15 +02:00
Kim Christensen
48fc5edda1 Support InfluxDB count distinct aggregation (#11658)
influxdb: support count distinct aggregation
2018-05-30 09:22:16 +02:00
bergquist
c7acbcdaf5 provisioning: enable relative path's
this commit enable relatives path for provisioning dashboards.
this enables easier dev setups
2018-05-30 08:46:44 +02:00
bergquist
f32e3a2960 changelog: note about closing #11858 2018-05-29 17:22:52 +02:00
Carl Bergquist
813a9a975f Merge pull request #12090 from grafana/11858_create_dashboard_link
Show create dashboard link if at least editor in one folder
2018-05-29 17:18:41 +02:00
bergquist
b253284acc devenv: improve readme 2018-05-29 16:52:02 +02:00
bergquist
1411709db1 provisioning: place testfiles within testdata folder 2018-05-29 16:30:12 +02:00
David
9b9e3962c5 Merge pull request #12072 from grafana/davkal/12024-fix-alignment
Changed Prometheus interval-alignment to cover whole panel range
2018-05-29 15:03:06 +02:00
Marcus Efraimsson
048ac3089b Merge branch 'master' into feature/add_es_alerting 2018-05-29 14:36:52 +02:00
Marcus Efraimsson
79575ea124 changelog: add notes about closing #11494
[skip ci]
2018-05-29 14:29:00 +02:00
Christophe Le Guern
3ba3fd9a59 Add new regions to handleGetRegions function (#12082)
As public/app/plugins/datasource/cloudwatch/partials/config.html and this file differ between the AWS regions available, I've updated the latest so they share the same data.
In that way, the regions() method in dashboards returns the same list as the frontend does.
2018-05-29 14:26:33 +02:00
Torkel Ödegaard
6e145ad32d Merge branch 'master' of github.com:grafana/grafana 2018-05-29 14:11:36 +02:00
Torkel Ödegaard
4c9b146bda PR: minor change to PR #12004 before merge 2018-05-29 14:11:05 +02:00
Marcus Efraimsson
2c8571a686 Merge pull request #12089 from bergquist/graphite_header
graphite: avoid distributed tracing headers in direct/browser mode
2018-05-29 14:07:18 +02:00
Torkel Ödegaard
249e682511 Merge branch 'master' of https://github.com/mammuthus/grafana 2018-05-29 14:04:54 +02:00
Torkel Ödegaard
be34417b3a fix: refactoring PR #11996 and fixing issue #11551 16706hashkey in json editors 2018-05-29 14:02:52 +02:00
bergquist
a1e6c31ec1 devenv: script for setting up default datasources 2018-05-29 14:00:46 +02:00
Torkel Ödegaard
634a26d2eb Merge branch 'remove_hash' of https://github.com/eMerzh/grafana 2018-05-29 13:25:44 +02:00
Torkel Ödegaard
ddd5e5ae70 tech: updated react-grid-layout to latest official release, closes #12100 2018-05-29 13:23:07 +02:00
David
c67d72db63 Merge pull request #12041 from grafana/davkal/11931-table-docs
Document table row merge for multiple queries
2018-05-29 12:08:55 +02:00
David Kaltschmidt
8bcd55d221 Fix cache busting for systemjs imports for plugins
* everything imported via systemjs in the path `plugin/` will get a
 timestamp appended for cache busting
* timestamp is set once on page load
* plugin css loader gets cache buster too
2018-05-29 12:01:10 +02:00
bergquist
6a82098ddf devenv: scripts for generating many unique dashboards 2018-05-29 11:52:00 +02:00
Marcus Efraimsson
e80f54c243 Merge pull request #12094 from grafana/elastic6-docker
docker: new block for elasticsearch6
2018-05-29 11:22:42 +02:00
Daniel Lee
fb41048dd7 docker: new block for elasticsearch6 2018-05-29 11:04:16 +02:00
Marcus Efraimsson
2d5ec9b9e4 changelog: add notes about closing #12087
[skip ci]
2018-05-29 10:50:13 +02:00
Marcus Efraimsson
1bc94c7d5a Merge pull request #12088 from thurt/12087-better-error-when-smtp-not-configured
inviting users: show friendlier error message when smtp is not configured
2018-05-29 10:46:46 +02:00
Leonard Gram
e6f2811b21 sql: seconds epochs are now correctly converted to ms.
Closes #12061
2018-05-29 08:44:03 +02:00
Marcus Efraimsson
7c3e8afd82 add validation of uid when importing dashboards 2018-05-28 22:34:40 +02:00
Brice Maron
01f80950de fix: add track by name in annotation list to avoid $$hashKey in json 2018-05-28 21:11:32 +02:00
bergquist
83b7bbd60b changelog: adds note about closing #9703 2018-05-28 20:55:11 +02:00
bergquist
add791b2cc Merge branch '9703-auth-proxy'
* 9703-auth-proxy:
  go fmt fixes
  configure proxy environments for Transport property
2018-05-28 20:49:40 +02:00
bergquist
d7b5fb4604 go fmt fixes 2018-05-28 20:48:01 +02:00
iyeonok
bafe25fbd9 configure proxy environments for Transport property
related issue: https://github.com/grafana/grafana/issues/9703
2018-05-28 20:48:01 +02:00
Marcus Efraimsson
7548d6f6d1 Show create dashboard link if at least editor in one folder 2018-05-28 20:37:39 +02:00
bergquist
e708e9ac3c graphite: avoid dtracing headers in direct mode
closes #11494
2018-05-28 20:35:19 +02:00
David Kaltschmidt
6d8d6cdb57 Fix sourcemaps for webpack hot config 2018-05-28 20:32:33 +02:00
thurt
b487aa3e6a return better error message when err is ErrSmtpNotEnabled
fixes #12087
2018-05-28 17:49:31 +00:00
Marcus Efraimsson
7cb0403faa elasticsearch: handle if alert query contains template variable
If datasource handles targetContainsTemplate function it can evaluate if a certain
query contains template variables and this is used for show an error message that
template variables not is supported in alert queries.
2018-05-28 19:45:18 +02:00
Marcus Efraimsson
e5e1683840 Merge branch 'master' into feature/add_es_alerting 2018-05-28 18:10:34 +02:00
bergquist
8d400b8f7b changelog: adds note about closing #9847 2018-05-28 17:50:36 +02:00
Ryan McKinley
17b9609209 Sparklines should scale to the data range (#12010)
* Add a full range option to sparklines

* line zero=false
2018-05-28 16:30:44 +02:00
Torkel Ödegaard
7b09dfe9a0 Merge branch 'davkal/split-webpack-config-hot' 2018-05-28 14:18:35 +02:00
David Kaltschmidt
ebe8e62bd5 Split webpack dev config into dev and hot
Motivation:

* too many conditionals for config, better to be explicit
* different priorities: faster build for hot mode
* working SCSS sources for styles in hot mode

The biggest differences:

* removed linter from TS loader in hot (should be editor or precommit
 or responsibility)
* simplified styles loading
* hot needs more extensions to resolve
* removed commons chunking for hot
* removed devServer from dev

Reduced HMR time from 8s to 4s on my machine.
2018-05-28 13:49:15 +02:00
David
ced8c5f0e4 Upgrade webpack loaders (#12081)
* upgrade all webpack loaders to recent version
* keep TS loader at 4.0.0 (5.0.0 requires webpack 4)
* remove unused json-loader
2018-05-28 13:46:57 +02:00
Marcus Efraimsson
5a96863eed pin versions of xorm to resolve sql tests
Resolves issue with postgres tests.
Also sets timezone of test instance and database to utc to resolve
mysql tests.
Closes #12065
2018-05-28 13:07:41 +02:00
Carl Bergquist
519e58a267 Merge pull request #12071 from grafana/12056_usage_stats
Additional anonymous usage stats
2018-05-28 11:23:16 +02:00
bergquist
a2ed0b15da build: fixes broken path for bra run
removes os and arch from binary path
when building in dev mode
2018-05-28 10:39:42 +02:00
Marcus Efraimsson
c9e9f25699 use sql builder for the get system stats sql query 2018-05-28 10:37:17 +02:00
Carl Bergquist
6c259eb04d Merge pull request #12077 from roidelapluie/logout
Fix #9847 Add a generic signout_redirect_url to enable oauth logout
2018-05-28 08:06:00 +02:00
Daniel Lee
de295af231 Merge pull request #12003 from mageo/master
Added Swiss franc currency
2018-05-28 01:13:21 +02:00
Julien Pivotto
a5e6cb9a02 Fix #9847 Add a generic signout_redirect_url to enable oauth logout
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2018-05-27 14:52:50 +02:00
David Kaltschmidt
750ea9bbdd Changed Prometheus interval-alignment to cover whole panel range
* the existing query date alignment shifts the range forward to match
a multiple epoch of the interval, but keeps the range length the same,
the result is that the start date is shifted forward as well, leaving a
gap in the graph (or a zero-line when null-as-zero was set, issue #12024)
* this pr extends the aligned range to cover the original start date as
well
2018-05-25 16:46:38 +02:00
bergquist
238139fad6 alerting: refactor tests 2018-05-25 16:12:34 +02:00
Marcus Efraimsson
fbc44025dc add usage stats for datasource access mode 2018-05-25 16:06:35 +02:00
David Kaltschmidt
27e7a28b37 Review feedback (heading, typos)
* iff and therefor
* mention merge in heading
* add note about checking query inspector
2018-05-25 14:47:46 +02:00
Marcus Efraimsson
2ea5b6fe33 add additional usage stats metrics
nr of folders
nr of folder permissions
nr of dashboard permissions
nr of snapshots
nr of teams
nr of provisioned dashboards
2018-05-25 14:33:37 +02:00
Marcus Efraimsson
a6a12d36d7 add tests for sending usage stats 2018-05-25 13:32:55 +02:00
David Kaltschmidt
448b1cbc15 Integrated dark theme for explore UI 2018-05-25 12:51:27 +02:00
Marcus Efraimsson
4752d7884a elasticsearch: adds some more/better debug logging to client 2018-05-25 10:31:56 +02:00
bergquist
21ade3f64f changelog: fix broken link to contributor 2018-05-25 10:14:13 +02:00
bergquist
94ee9c63a8 changelog: adds note about closing #11788 2018-05-25 07:41:15 +02:00
balyn
fac0333f47 The old code for centering removed
Old code removed
2018-05-24 19:35:04 +03:00
Torkel Ödegaard
80d694d205 Backend image rendering as plugin (#11966)
* rendering: headless chrome progress

* renderer: minor change

* grpc: version hell

* updated grpc libs

* wip: minor progess

* rendering: new image rendering plugin is starting to work

* feat: now phantomjs works as well and updated alerting to use new rendering service

* refactor: renamed renderer package and service to rendering to make renderer name less confusing (rendering is internal service that handles the renderer plugin now)

* rendering: now render key is passed and render auth is working in plugin mode

* removed unneeded lines from gitignore

* rendering: now plugin mode supports waiting for all panels to complete rendering

* fix: LastSeenAt fix for render calls, was not set which causes a lot of updates to Last Seen at during rendering, this should fix sqlite db locked issues in seen in previous releases

* change: changed render tz url parameter to use proper timezone name as chrome does not handle UTC offset TZ values

* fix: another update to tz param generation

* renderer: added http mode to renderer service, new ini setting [rendering] server_url
2018-05-24 15:26:27 +02:00
Carl Bergquist
ca7bbc44c0 Merge pull request #12050 from aarongarciah/patch-1
Fix typo in README.md
2018-05-24 15:18:56 +02:00
Aarón García Hervás
4c5e1cacfe Fix typo in README.md 2018-05-24 12:39:11 +02:00
Leonard Gram
f80810081b build: updates publisher to support arm archs for deb and rpm. 2018-05-24 11:12:10 +02:00
David Kaltschmidt
f5e351af8b Explore split view
* button to bring a up a duplicate explore area to compare
* side by side rendering of two explore components
* right component has close button
* left component has page title
2018-05-24 10:55:01 +02:00
David Kaltschmidt
23c9da6162 Fixed custom dates for react timepicker
* added jest tests for timepicker component
2018-05-24 10:55:01 +02:00
David Kaltschmidt
eadaff6191 Explore: Design integration
* style header like other grafana components
* use panel container for graph and same styles for query field
* fix typeahead CSS selector (was created outside of .explore)
* use navbar buttons for +/- of rows
* moved elapsed time under run query button
* fix JS error on multiple timeseries being returned
* fix color for graph lines
* show prometheus query errors
2018-05-24 10:55:00 +02:00
David Kaltschmidt
0d3f24ce54 Explore: time selector
* time selector for explore section
* mostly ported the angular time selector, but left out the timepicker
 (3rd-party angular component)
* can be initialised via url parameters (jump from panels to explore)
* refreshing not implemented for now
* moved the forward/backward nav buttons around the time selector
2018-05-24 10:55:00 +02:00
Leonard Gram
7a30f72902 Merge pull request #12046 from fg2it/package
fix names of foreign arch packages
2018-05-24 09:34:15 +02:00
Dan Cech
417db13efb Fix dashboard snapshot deletion (#12025)
* fix issue deleting dashboard snapshots by deleteKey, add dedicated endopoint for authenticated requests, update frontend, tests & docs.
2018-05-24 08:55:16 +02:00
fg2it
22638db532 fix names of foreign arch packages 2018-05-23 23:53:59 +02:00
Marcus Efraimsson
16c3566a87 elasticsearch: handle NaN values 2018-05-23 22:57:46 +02:00
Marcus Efraimsson
688f5b830c elasticsearch: metric and pipeline agg setting json encoding fix 2018-05-23 22:21:41 +02:00
Marcus Efraimsson
4436b8da12 elasticsearch: query interval override fix 2018-05-23 22:07:52 +02:00
Marcus Efraimsson
8870e3e85b elasticsearch: default interval fix
5s instead of 15s
2018-05-23 21:44:09 +02:00
Marcus Efraimsson
ed110bc312 Merge pull request #11967 from grafana/migrate-jquery-lodash-extended-to-ts
chore: migrate files to ts
2018-05-23 17:58:37 +02:00
David Kaltschmidt
61b296afad Document table row merge for multiple queries
* added section to table feature docs
* marked as 5.0+ feature
* concrete examples of what works and the limits
2018-05-23 17:08:54 +02:00
Leonard Gram
0bfbb1c161 Merge pull request #11920 from grafana/crosscompile
Crosscompile and packages Grafana on arm, windows, linux and darwin
2018-05-23 17:03:25 +02:00
Marcus Efraimsson
242689abe2 elasticsearch: pipeline aggregation fix for json encoding 2018-05-23 16:46:26 +02:00
Leonard Gram
bea4741a12 build: always build for all platforms. 2018-05-23 16:03:21 +02:00
Marcus Efraimsson
dce59ccff2 fix: remove deadcode to make gometalinter happy 2018-05-23 15:28:36 +02:00
Marcus Efraimsson
4840adff00 elasticsearch: refactor query handling and use new es simple client
Removes moment dependency.
Adds response parser tests (based on frontend tests).
Adds time series query tests (based on frontend tests).
Fixes various issues related to response parsing and building search request queries.
Added support for extended stats metrics and geo hash grid aggregations.
2018-05-23 15:09:58 +02:00
Marcus Efraimsson
e171ed8910 elasticsearch: new simple client for communicating with elasticsearch
Handles minor differences of es 2, 5 and 5.6.
Implements index pattern logic.
Exposes builders for building search requests.
2018-05-23 14:59:12 +02:00
Marcus Efraimsson
77400cef08 elasticsearch: refactor and cleanup
Move time series query logic to specific file.
Remove model parser and move to time series query file, adds parser test.
2018-05-23 14:36:41 +02:00
Marcus Efraimsson
1324a67cbd Merge branch 'master' into WPH95-feature/add_es_alerting 2018-05-23 14:35:45 +02:00
Carl Bergquist
64053e1954 Merge pull request #11788 from mtanda/prom_query_timeout
add query timeout option for Prometheus
2018-05-22 09:40:29 +02:00
Leonard Gram
1b85b2fca7 build: removes deploy from nightly while testing it. 2018-05-22 09:07:52 +02:00
Daniel Lee
6d6b509d27 Merge pull request #12020 from xginn8/patch-1
update provisioning.md
2018-05-21 18:14:33 +02:00
xginn8
68bc9dd9dc update provisioning.md
stylize & name datasources properly
2018-05-21 11:19:44 -04:00
Leonard Gram
5f98982a09 build: clean up the workflow filters. 2018-05-21 15:57:57 +02:00
Daniel Lee
de7a880d66 Revert "Conditionally select a field to return in ResponseParser for InfluxDB"
This reverts commit a101177b55.

Ref #12009
2018-05-21 15:47:29 +02:00
Daniel Lee
80f8fb1e02 Revert "Fix ResponseParser for InfluxDB to return only string values"
This reverts commit 92e5968f91.

Ref #12009
2018-05-21 15:46:23 +02:00
Mitsuhiro Tanda
067ceb178e Revert "move queryTimeout option to common setting"
This reverts commit 3ba59a1d66a2a3c07ccd04a48c403f0772fbef31.
2018-05-21 21:45:51 +09:00
Mitsuhiro Tanda
12ace5ab65 move queryTimeout option to common setting 2018-05-21 21:45:51 +09:00
Mitsuhiro Tanda
8ddcd67080 add query timeout option for Prometheus 2018-05-21 21:45:51 +09:00
Carl Bergquist
a376de56f2 Merge pull request #11934 from liquidm/improve_alert_docs
Improve alert docs
2018-05-21 14:34:58 +02:00
Leonard Gram
7b1e41abc6 build: crosscompilation for nightlies and releases. 2018-05-21 14:06:01 +02:00
Marcus Efraimsson
cebae40468 Merge pull request #11973 from grafana/11953-explore-metricpanel
explore: fixes #11953
2018-05-21 11:13:22 +02:00
mammuthus
0cfdd726f7 Singlestat value: vertical alignment fix
There is a problem with vertical alignment of Singlestat value - it's a bit lower then it has to be.
This hack fix it.
2018-05-20 21:28:53 +03:00
Alexandre Georges
2e67e3ba63 Added Swiss franc currency 2018-05-20 14:07:40 +02:00
bergquist
c40b0ea1df test: moves test files to testdata folder 2018-05-18 23:23:13 +02:00
Carl Bergquist
dd8c50e140 Merge pull request #11988 from bergquist/tag_release_script
build: script for tagging and pushing a release
2018-05-18 16:37:11 +02:00
Leonard Gram
7ca346e9f0 build: downloads and bundles phantomjs for darwin and windows. 2018-05-18 14:39:25 +02:00
Leonard Gram
3933cb6bf6 build: publisher updated to support more architectures and OSs. 2018-05-18 14:39:25 +02:00
Leonard Gram
803694f41b build: saves artifacts with the build 2018-05-18 14:39:25 +02:00
Leonard Gram
9123e0fca8 build: crossplatform build with packages.
Big thanks to @fg2it who created a POC as
well as the build container that this work
is based on.
2018-05-18 14:38:04 +02:00
Daniel Lee
5de2c99c32 Merge pull request #11976 from steakunderscore/master
Adds constant description for units
2018-05-18 13:29:10 +02:00
bergquist
f565800a51 build: script for tagging and pushing a release 2018-05-18 13:07:26 +02:00
Torkel Ödegaard
a73365c3fe codespell: fixes 2018-05-18 11:49:00 +02:00
Torkel Ödegaard
d0c17100cb fix: fixed some minor startup logging issues 2018-05-18 11:17:31 +02:00
Torkel Ödegaard
6c0752473a Sqlstore refactor (#11908)
* refactor: tracing service refactoring

* refactor: sqlstore to instance service

* refactor: sqlstore & registory priority

* refactor: sqlstore refactor wip

* sqlstore: progress on getting tests to work again

* sqlstore: progress on refactoring and getting tests working

* sqlstore: connection string fix

* fix: not sure why this test is not working and required changing expires

* fix: updated grafana-cli
2018-05-18 11:10:10 +02:00
Henry Jenkins
f7c9fe6abc Adds constant description for units
Makes `km/h` constant with distances
2018-05-17 17:55:13 +01:00
bergquist
78e837cf39 test: increase expire time to avoid tz issues in tests 2018-05-17 14:59:50 +02:00
Daniel Lee
f15919555b explore: fixes #11953 2018-05-17 14:56:15 +02:00
Patrick O'Carroll
1ab2928f9d migrated files to ts, removed unused functions from lodash_extended 2018-05-17 14:24:49 +02:00
Daniel Lee
75993971c6 docs: installation pages for 5.1.3 2018-05-16 21:48:26 +02:00
Daniel Lee
66c4a04dec changelog: add note for #11830 2018-05-16 17:46:32 +02:00
Daniel Lee
b086981e15 Merge pull request #11954 from grafana/11830-firefox-legend
legend: fixes Firefox/baron scroll bug
2018-05-16 16:49:42 +02:00
Daniel Lee
574baa7151 Merge pull request #11719 from mtanda/annotation_on_non_editable_dashboard
create annotation on non-editable dashboard
2018-05-16 15:18:32 +02:00
Daniel Lee
3305ac1f36 Merge pull request #11946 from grafana/11937-panel-content
scroll: temporary fix for double scrollbar issue
2018-05-16 15:16:44 +02:00
Daniel Lee
50026fad2e legend: fixes Firefox/baron scroll bug
Compensates for Firefox scrollbar calculation error in the baron framework.
Offsetwidth and clientwidth are used to find the width of the scrollbar. In
the legend these differ by 9px and cause the scroll div to grow by 9px for
every refresh. This fix compensates with a negative margin-right in that
case.

Fixes #11830
2018-05-16 15:08:22 +02:00
Mitsuhiro Tanda
87c9c47579 use canMakeEditable 2018-05-16 11:58:51 +09:00
Mitsuhiro Tanda
fe301142ba allow to add annotation for non editable dashboard 2018-05-16 11:51:28 +09:00
Daniel Lee
567fec402e scroll: temporary fix for double scrollbar issue
If #11939 is not merged in the patch release, then
this is a temporary fix for 5.1.3. It sets overflow to
hidden for larger screens and keeps the overflow set to
auto for mobiles and tablets.

Fixes #11937
2018-05-16 00:19:15 +02:00
Carl Bergquist
0841e67da8 Merge pull request #11940 from alexanderzobnin/plugin-meta-field
backend plugins: expose meta field
2018-05-15 20:20:28 +02:00
Alexander Zobnin
214b9af5a3 backend plugins: log an error if parsing meta field failed 2018-05-15 20:59:24 +03:00
Alexander Zobnin
4533f22871 backend plugins: expose meta field 2018-05-15 15:33:05 +03:00
Stuart McLean
c09c00a1f5 fixes following first code review 2018-05-15 10:06:26 +02:00
Stuart McLean
295169b94f add useful note to alerting api docs 2018-05-14 20:50:44 +02:00
Stuart McLean
2dd40eb4e4 improve alerting api docs sample responses 2018-05-14 20:50:08 +02:00
Marcus Efraimsson
b8c4aa3936 Merge pull request #11926 from grafana/davkal/fix-phantomjs-render
Use babel and hot loader only in yarn start
2018-05-14 13:47:35 +02:00
David
65f9970a3e Merge pull request #10434 from craig-miskell-fluxfederation/prometheus_align_queries
Align queries to prometheus with the step
2018-05-14 12:30:55 +02:00
David Kaltschmidt
a1b92369db Merge remote-tracking branch 'origin/master' into prometheus_align_queries
* origin/master: (21 commits)
  docs: removes notes about beeing introduced in 5.0
  lock caniuse-db version to resolve phantomjs rendering issue
  Update dashboard_permissions.md
  move database-specific code into dialects (#11884)
  refactor: tracing service refactoring (#11907)
  fix typo in getLdapAttrN (#11898)
  docs: update installation instructions targeting v5.1.2 stable
  changelog: add notes about closing #11862, #11656
  Fix dependencies on Node v10
  Update dashboard.md
  changelog: add notes about closing #10338
  Phantom render.js is incorrectly retrieving number of active panels (#11100)
  singlestat: render time of last point based on dashboard timezone (#11425)
  Fix for #10078: symbol "&" is not escaped (#10137)
  Add alpha color channel support for graph bars (#10956)
  interpolate 'field' again in Elasticsearch terms queries (#10026)
  Templating : return __empty__ value when all value return nothing to prevent elasticsearch syntaxe error (#9701)
  http_server: All files in public/build have now a huge max-age (#11536)
  fix: ldap unit test
  decrease length of auth_id column in user_auth table
  ...
2018-05-14 12:11:14 +02:00
David Kaltschmidt
e731c248d7 Prometheus step alignment: shift interval only on jitter
* only increase interval by step if jitter happened
* shift both start and end
* simplified tests by using low epoch numbers
2018-05-14 12:08:30 +02:00
David Kaltschmidt
dd66cbc847 Use babel and hot loader only in yarn start
* moved babel rules for hot reloading into TS loader
* toggling use of babel via HOT variable (true with `yarn start`)
* overriding webpack output when HOT to fix asset paths in dashboard
 urls like http://localhost:3333/d/...
2018-05-14 11:58:15 +02:00
bergquist
ca25a25386 docs: removes notes about beeing introduced in 5.0 2018-05-14 09:51:23 +02:00
Marcus Efraimsson
d3f516f1c4 Merge branch 'master' into WPH95-feature/add_es_alerting 2018-05-12 11:33:58 +02:00
Marcus Efraimsson
95285aa09f Merge pull request #11917 from grafana/fix_phantomjs
resolve phantomjs rendering in production build
2018-05-11 14:24:52 +02:00
Marcus Efraimsson
8ed856c64f lock caniuse-db version to resolve phantomjs rendering issue
For some reason a newer version of this sub-dependency makes phantomjs
rendering unable to generate and save a png image, however without
any error message logged
2018-05-11 14:10:54 +02:00
Marcus Efraimsson
26e1b3a3fa Merge pull request #11914 from b4456609/patch-1
docs: update dashboard_permissions.md
2018-05-11 09:21:23 +02:00
Bernie
1157542f70 Update dashboard_permissions.md
miss { in repsponse
2018-05-11 10:19:28 +08:00
Dan Cech
1dfff74da9 move database-specific code into dialects (#11884) 2018-05-10 16:54:21 +02:00
Torkel Ödegaard
27e1c67453 refactor: tracing service refactoring (#11907) 2018-05-10 16:51:55 +02:00
Dan Cech
bc64754364 fix typo in getLdapAttrN (#11898) 2018-05-09 20:26:17 +02:00
Marcus Efraimsson
486aaca109 docs: update installation instructions targeting v5.1.2 stable 2018-05-09 14:03:22 +02:00
Marcus Efraimsson
4dfaab4c5b changelog: add notes about closing #11862, #11656
[skip ci]
2018-05-09 10:45:40 +02:00
Daniel Lee
2c3b8bb035 Merge pull request #9910 from jeroenj/patch-1
Adding a user in a specified organisation uses the admin API
2018-05-08 23:09:25 +02:00
Daniel Lee
377b78102d Merge pull request #11888 from simPod/fix-node10
Fix dependencies on Node v10
2018-05-08 23:03:51 +02:00
Simon Podlipsky
4565676233 Fix dependencies on Node v10 2018-05-08 22:18:58 +02:00
Carl Bergquist
fa9a95f645 Merge pull request #11887 from simPod/patch-1
Update dashboard.md
2018-05-08 21:27:32 +02:00
Šimon Podlipský
ef60d89742 Update dashboard.md 2018-05-08 21:25:45 +02:00
Torkel Ödegaard
c79b1bef15 Merge branch 'master' into master 2018-05-08 21:23:34 +02:00
Marcus Efraimsson
cde347bd3d Merge branch 'master' into WPH95-feature/add_es_alerting 2018-05-08 17:13:08 +02:00
Marcus Efraimsson
77421531d0 changelog: add notes about closing #10338
[skip ci]
2018-05-08 16:18:54 +02:00
Adrian Muraru
5377b82612 Phantom render.js is incorrectly retrieving number of active panels (#11100)
Fixes #11099
2018-05-08 16:05:22 +02:00
Marcus Efraimsson
ef0b7bda6f singlestat: render time of last point based on dashboard timezone (#11425)
* singlestat: render time of last point based on dashboard timezone

* changelog: add note for #10338
2018-05-08 15:59:29 +02:00
Angrite
e52aceeaba Fix for #10078: symbol "&" is not escaped (#10137)
Fix for #10078: Render value as link in Table panel: ampersand symbol "&" is not escaped in link URL, resulting URL is wrong.
2018-05-08 15:47:09 +02:00
Chris Rice
10f934d287 Add alpha color channel support for graph bars (#10956)
* Set fillColor in bars on load and on color change

* Change bar fill color on color override

* Added test for series overrides

* Moved bars fill color setting into time_series. Fixed issue with prev commit where you could not show bars because of series overrides.
2018-05-08 15:18:57 +02:00
Andrew Richards
3095dabe3c interpolate 'field' again in Elasticsearch terms queries (#10026)
* interpolate 'field' again in Elasticsearch terms queries

Fix for #8662 which was regressed in commit e4950c2dc1 (the field 'field' was no longer interpolated)

* remove unnecessary check for existence of field 'field'
2018-05-08 15:17:16 +02:00
Seuf
1888708ca5 Templating : return __empty__ value when all value return nothing to prevent elasticsearch syntaxe error (#9701) 2018-05-08 14:04:20 +02:00
Thibaut Patel
bdb736a9ee http_server: All files in public/build have now a huge max-age (#11536) 2018-05-08 13:54:00 +02:00
Marcus Efraimsson
219118ef4a Merge pull request #11867 from grafana/11862_migration
decrease length of auth_id column in user_auth table
2018-05-08 13:10:22 +02:00
Torkel Ödegaard
869d8e6f0e fix: ldap unit test 2018-05-08 12:50:39 +02:00
David
06aca5e8b5 Merge branch 'master' into prometheus_align_queries 2018-05-08 12:22:55 +02:00
bergquist
65352dccc0 only error log when err is not nil 2018-05-08 11:59:27 +02:00
bergquist
b649358734 rename alerting engine to service 2018-05-08 11:56:30 +02:00
Tomasz Torcz
e1b9d361ed case-insensitive LDAP group comparison (#9926)
* ldap: case-insensitive LDAP group comparison

According to RFC2251 4.1.5, LDAP strings are case-insensitive. Disregard case when comparing group mappings.

* ldap: add test for case-insensitive group mapping
2018-05-08 11:47:23 +02:00
Marcus Efraimsson
3d9ea3f1fa changelog: add notes about closing #11813
[skip ci]
2018-05-08 11:36:05 +02:00
Torkel Ödegaard
4aae3c6c05 Merge branch 'master' of github.com:grafana/grafana 2018-05-08 11:33:13 +02:00
Torkel Ödegaard
cec783ca2c docs: updated changelog 2018-05-08 11:30:52 +02:00
Alexander Zobnin
00454b32f5 fix XSS vulnerabilities in dashboard links (#11813)
fix XSS vulnerabilities in dashboard links
2018-05-08 11:28:16 +02:00
Torkel Ödegaard
1c886940ff Merge branch 'jereksel-feature/save_json' 2018-05-08 11:25:20 +02:00
Torkel Ödegaard
eb3aa7b193 PR: ux changes to #11528 2018-05-08 11:24:20 +02:00
Torkel Ödegaard
6a5ce09b08 Merge branch 'feature/save_json' of https://github.com/jereksel/grafana into jereksel-feature/save_json 2018-05-08 10:54:26 +02:00
bergquist
7e9a10a5fb renames alerting engine to match other services 2018-05-08 10:53:42 +02:00
Dan Cech
93a8d8a25b allow analytics.js to be cached, enable anonymizeIP setting (#11656) 2018-05-08 10:48:27 +02:00
Torkel Ödegaard
a2b864dd6b Update CHANGELOG.md 2018-05-08 10:23:28 +02:00
Torkel Ödegaard
f84534adea Revert "Add baron scrollbar to a node managed by gafana (#11850)"
This reverts commit 34133671b9.
2018-05-08 09:45:08 +02:00
Torkel Ödegaard
4b61c7cd55 Merge branch 'influx-db-select-query-variable' 2018-05-08 09:29:53 +02:00
Marcus Efraimsson
8ed79d614b decrease length of auth_id column in user_auth table
certain mysql versions don't support having indices with a greater varchar length
than 190.
2018-05-08 09:26:28 +02:00
Carl Bergquist
8d13276844 Merge pull request #11852 from grafana/davkal/super-simple-docker
Support for local Docker builds
2018-05-08 09:17:01 +02:00
Torkel Ödegaard
b894a5ff16 Merge branch 'am/fix-query-variable-influxdb' of https://github.com/forzafootball/grafana into influx-db-select-query-variable 2018-05-08 09:01:58 +02:00
Patrick O'Carroll
8f0c8005af fixed svg background (#11848) 2018-05-08 06:40:34 +02:00
Ryan McKinley
34133671b9 Add baron scrollbar to a node managed by gafana (#11850)
* Add baron scroller to grafana panel, not plugin panel

* remove comment about root <div> element, since it will not be true
2018-05-08 06:39:12 +02:00
David
ed067e8d35 Fix CSS asset loading for yarn start (HMR) (#11855)
* enable url() processing in CSS to ensure assets load in HMR mode
* only needed when running `yarn start` which needs this for the hot
reloader
2018-05-07 17:02:55 +02:00
Torkel Ödegaard
4c6e4e2aa6 fix: fixed gometalinter issues with Discord PR 2018-05-07 17:01:31 +02:00
Carl Bergquist
23738ad4ac Merge pull request #11801 from grafana/provision-service-refactor
Server shutdown flow rewrite & provision service refactor
2018-05-07 16:32:26 +02:00
David
1236b7b918 Merge pull request #11770 from grafana/davkal/explore-panel-link
Explore: Add entry to panel menu to jump to Explore
2018-05-07 16:31:19 +02:00
Torkel Ödegaard
b170bde74f Update CHANGELOG.md 2018-05-07 15:44:34 +02:00
Torkel Ödegaard
c46a3c8646 Merge branch 'jereksel-feature/discord' 2018-05-07 15:41:10 +02:00
Torkel Ödegaard
e5e8b9800c merge: fixed conflicts in discord PR 2018-05-07 15:40:43 +02:00
Marcus Efraimsson
23c88a3b3f docs: update installation instructions targeting v5.1.1 stable 2018-05-07 14:57:18 +02:00
Dan Cech
29c9d3f74c fix root_url in docs & comments (#11819)
* fix root_url in docs & comments

* include ports in docker-compose config
2018-05-07 14:18:21 +02:00
Marcus Efraimsson
b804f6d999 changelog: 5.1.1 update
add notes about closing #11743 and add release data for 5.1.1
[skip ci]
2018-05-07 14:09:04 +02:00
Torkel Ödegaard
249c1e8d3d fix: loading of css url (images/fonts) 2018-05-07 14:02:38 +02:00
David Kaltschmidt
c3cc60b080 Support for local Docker builds
* add a git-ignored `local/` folder for Makefile/Dockerfile
* import `local/Makefile` to root Makefile
* add `.dockerignore`
2018-05-07 12:32:18 +02:00
Torkel Ödegaard
afec9ec5be Update ROADMAP.md 2018-05-07 11:16:59 +02:00
Dan Cech
543c7fe587 support additional fields in authproxy (#11661) 2018-05-07 10:39:16 +02:00
Dan Cech
b4ad044044 better handling for special chars in db config (#11662) 2018-05-07 10:33:33 +02:00
Florian Plattner
5d54bc00e1 Fix/improved csv output (#11740)
* fix: initial cleanup and implementation

* feat: finish special character escaping

* feat: updates fileExport to generate RFC-4180 compliant CSV

* chore: replace html decoder with the lodash version and final cleanup

* fix: restore character html decoding
2018-05-07 10:22:54 +02:00
Torkel Ödegaard
871b85f199 Update ROADMAP.md 2018-05-07 10:16:39 +02:00
Torkel Ödegaard
ec7703bad7 Update ROADMAP.md 2018-05-07 10:14:04 +02:00
Torkel Ödegaard
217d43e512 Update ROADMAP.md 2018-05-07 10:13:39 +02:00
Carl Bergquist
06623506d3 Merge pull request #11805 from simPod/missing-lock
Add missing items to Gopkg.lock
2018-05-07 10:08:05 +02:00
Torkel Ödegaard
fb7db147ed Merge remote-tracking branch 'origin/11809-permission-dropdown' 2018-05-07 09:49:38 +02:00
Šimon Podlipský
1fbac909cb Remove preceding / from public JS path (#11804) 2018-05-07 08:11:48 +02:00
Ryan McKinley
2ee59ccad8 Add panel scrolling docs (#11826) 2018-05-07 08:03:30 +02:00
Marcus Efraimsson
e078e2733f Merge pull request #11803 from svenklemm/whatsnew51-table
Fix variable interpolation examples in whats new in 5.1 docs
2018-05-06 08:45:02 +02:00
Sven Klemm
ed4dc241cc escape pipe symbol same way as in templating docs 2018-05-05 10:47:44 +02:00
Marcus Efraimsson
8523b1e410 changelog: add notes about closing #11616
[skip ci]
2018-05-04 15:03:30 +02:00
Marcus Efraimsson
d0753949bc Merge pull request #11794 from grafana/11616-timepicker-buttons
fix dark/light theme date selector styling in timepicker control
2018-05-04 14:55:56 +02:00
Patrick O'Carroll
515eab2405 added left:unset to counter left:0 in recent react-select release 2018-05-04 11:46:17 +02:00
Patrick O'Carroll
c897485958 fixed text color in light theme 2018-05-04 10:30:42 +02:00
Marcus Efraimsson
4d2e6b4a34 changelog: add notes about closing #11800
[skip ci]
2018-05-03 19:13:57 +02:00
Marcus Efraimsson
6eba9c2438 Merge pull request #11802 from svenklemm/variable-interpolation
dont shadow format passed in as function parameter in replace function in templatesrv
2018-05-03 19:09:40 +02:00
Sven Klemm
a806f542c6 test if default variable interpolation is effective when no specific
format is specified
2018-05-03 18:42:58 +02:00
Marcus Efraimsson
8a9da4ba66 changelog: notes about closing #11690
[skip ci]
2018-05-03 18:42:14 +02:00
Marcus Efraimsson
da8f6c150b Merge pull request #11751 from mtanda/11690
fix to match table column name and order
2018-05-03 18:33:46 +02:00
Daniel Lee
d518ed5330 changelog: add notes for ##11754, #11758, #11710 2018-05-03 15:46:21 +02:00
Daniel Lee
2c10f29b0f Merge pull request #11784 from grafana/11754_auth_migration
increase length of auth_id column in user_auth table
2018-05-03 15:30:38 +02:00
Daniel Lee
7db9cc3bf0 Merge pull request #11796 from alexanderzobnin/fix-11710
scroll: fix scrolling on mobile Chrome
2018-05-03 15:18:29 +02:00
Marcus Efraimsson
99257eb048 Merge branch 'master' of git://github.com/grafana/grafana into WPH95-feature/add_es_alerting 2018-05-03 12:03:04 +02:00
Alexander Zobnin
83d599670d scroll: remove firefox scrollbars 2018-05-03 11:54:02 +03:00
Simon Podlipsky
fc0a4b34a1 Add missing items to Gopkg.lock 2018-05-03 01:25:52 +02:00
Sven Klemm
f52920aa01 pipe escape try #3 2018-05-03 00:23:35 +02:00
Sven Klemm
7f8dacd087 use ascii code for pipe symbol to not mess up markdown table 2018-05-03 00:19:47 +02:00
Sven Klemm
fc7d876158 try to fix table 2018-05-03 00:17:18 +02:00
Sven Klemm
764fa15e24 dont shadow format passed in as function parameter 2018-05-02 23:03:37 +02:00
Torkel Ödegaard
c40a50829d fix: removed manully added http server from inject graph as it is now a self registered service 2018-05-02 21:30:15 +02:00
Torkel Ödegaard
b5e70d4607 fix: removed unused channel 2018-05-02 19:56:15 +02:00
Torkel Ödegaard
e3ea6c683c fix: comment spell fix 2018-05-02 19:56:15 +02:00
Torkel Ödegaard
23655315b8 fix: fixed race condition between http.Server ListenAndServe & Shutdown, now service crash during startup correctly closes http server every time 2018-05-02 19:56:15 +02:00
Torkel Ödegaard
d04ad835e2 refactoring: lots of refactoring around server shutdown flows, making sure process is terminated when background service has crashed 2018-05-02 19:56:15 +02:00
Torkel Ödegaard
053c2039bb refactor: provisioning service refactoring 2018-05-02 19:56:15 +02:00
Torkel Ödegaard
14bb7832af Metrics package now follows new service interface & registration (#11787)
* refactoring: metrics package now follows new service interface & registration

* fix: minor fix, make sure metrics service is imported, by grafana-server
2018-05-02 19:54:07 +02:00
Marcus Efraimsson
04d071aaa3 Merge pull request #11797 from grafana/revert-11775-unindent
Revert "Opportunities to unindent code (unindent)"
2018-05-02 14:19:55 +02:00
Marcus Efraimsson
de0d409a23 Revert "Opportunities to unindent code (unindent)" 2018-05-02 14:06:46 +02:00
Alexander Zobnin
64283408ee scroll: fix scrolling on mobile Chrome (#11710) 2018-05-02 12:43:25 +03:00
Marcus Efraimsson
6dcb9e696d changelog: add notes about closing #11625
[skip ci]
2018-05-02 11:19:22 +02:00
Marcus Efraimsson
f17100e98e Merge pull request #11786 from marefr/11625_save_as
dashboard: show save as button if user has edit permission

This will show the "Save As..." button in dashboard settings page if the user 
has edit permissions (org role admin/editor or viewers_can_edit enabled) 
and has at least edit permission in any folder.
2018-05-02 11:15:22 +02:00
Marcus Efraimsson
1f21b3e23b remove jest it.only to not skip important tests 2018-05-02 10:54:00 +02:00
Patrick O'Carroll
3dd073f98d fixed so all buttons are styled not just small ones, fixes #11616 2018-05-02 09:56:53 +02:00
Carl Bergquist
6ed69e3d93 Merge pull request #11775 from knweiss/unindent
Opportunities to unindent code (unindent)
2018-05-01 16:03:06 +02:00
Torkel Ödegaard
2b93cbbf04 --amend 2018-05-01 14:18:10 +02:00
Torkel Ödegaard
13e015fe3f fix: improved handling of http server shutdown 2018-05-01 14:14:11 +02:00
Mitsuhiro Tanda
253b2cc081 add test for prometheus table column title 2018-05-01 05:00:56 +09:00
David Kaltschmidt
8a53ec610b Fix url encoding, expand template vars, fix TS hacks
* moved datasource related functions to panel sub-class
* expand panel template vars for url
* added keybindings for x -> Explore
* url encoding for explore state
2018-04-30 17:44:30 +02:00
David Kaltschmidt
05b0bfafe4 Explore: Add entry to panel menu to jump to Explore
* panel container menu gets new Explore entry (between Edit and Share)
* entry only shows if datasource has `supportsExplore` set to true (set
 for Prometheus only for now)
* click on Explore entry changes url to `/explore/state` via location provider
* `state` is a JSON representation of the panel queries
* datasources implement `getExploreState()` how to turn a panel config into explore initial
 state
* Explore can parse the state and initialize its query expressions
* ReactContainer now forwards route parameters as props to component
* `pluginlist` and `singlestat` panel subclasses needed to be adapted because
 `panel_ctrl` now has the location provider as a property already
2018-04-30 17:44:28 +02:00
Marcus Efraimsson
0fc4da810f changelog: notes about closing #11498
[skip ci]
2018-04-30 16:33:27 +02:00
Marcus Efraimsson
b0349bc795 Merge pull request #11575 from alexanderzobnin/fix-11498
Histogram: fix invisible highest value bucket
2018-04-30 16:32:21 +02:00
Torkel Ödegaard
fa7d7ed5df Initial Baby Step to refactoring settings from global vars to instance (#11777)
* wip: start on refactoring settings

* settings: progress on settings refactor

* refactor: progress on settings refactoring

* fix: fixed failing test

* settings: moved smtp settings from global to instance
2018-04-30 16:21:04 +02:00
Daniel Lee
fc718b8a9a table: fix for padding
The table-panel-wrapper class got removed when clicking on the panel
menu which resulted in extra padding for the .panel-content div. This
fixes that by setting the table-specific css class lower down in the
html.
2018-04-30 16:17:37 +02:00
Alexander Zobnin
b16626c3b5 graph histogram: fix invisible highest value bucket 2018-04-30 16:12:31 +02:00
Marcus Efraimsson
5c57c7cff5 dashboard: show save as button if can edit and has edit permission to folders 2018-04-30 15:38:46 +02:00
Marcus Efraimsson
770acee56a new property for current user indicating if edit permissions in folders 2018-04-30 15:34:31 +02:00
Marcus Efraimsson
3d9b7a5892 increase length of auth_id column in user_auth table 2018-04-30 14:41:52 +02:00
Marcus Efraimsson
4f7791b9fa fix dropdown typeahead issue
New explore feature overriding css for dropdown typeahead component.
2018-04-30 11:50:50 +02:00
Karsten Weiss
893a91af3a Use opportunities to unindent code (unindent)
This commit fixes the following unindent findings:
pkg/api/common.go:102:2: "if x { if y" should be "if x && y"
pkg/components/dynmap/dynmap.go:642:2: invert condition and early return
pkg/components/dynmap/dynmap.go:681:2: invert condition and early return
pkg/components/simplejson/simplejson.go:171:2: "if x { if y" should be "if x && y"
pkg/middleware/dashboard_redirect.go:42:3: invert condition and early return
pkg/tsdb/mssql/mssql.go:301:3: invert condition and early break
pkg/tsdb/mysql/mysql.go:312:3: invert condition and early break
pkg/tsdb/postgres/postgres.go:292:3: invert condition and early break
pkg/tsdb/sql_engine.go:144:2: invert condition and early return
2018-04-28 10:53:16 +02:00
Carl Bergquist
c5419ba885 Merge pull request #11774 from knweiss/golint
Fix golint warnings
2018-04-28 09:40:56 +02:00
Karsten Weiss
de8696d5d3 Outdent code after if block that ends with return (golint)
This commit fixes the following golint warnings:
pkg/bus/bus.go:64:9: if block ends with a return statement, so drop this else and outdent its block
pkg/bus/bus.go:84:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:137:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:177:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:183:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:199:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:208:9: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/components/dynmap/dynmap.go:236:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:242:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:257:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:263:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:278:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:284:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:299:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:331:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:350:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:356:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:366:12: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:390:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:396:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:405:12: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:427:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:433:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:442:12: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:459:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:465:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:474:12: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:491:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:497:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:506:12: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:523:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:529:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:538:12: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:555:9: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:561:10: if block ends with a return statement, so drop this else and outdent its block
pkg/components/dynmap/dynmap.go:570:12: if block ends with a return statement, so drop this else and outdent its block
pkg/login/ldap.go:55:11: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/login/ldap_test.go:372:10: if block ends with a return statement, so drop this else and outdent its block
pkg/middleware/middleware_test.go:213:12: if block ends with a return statement, so drop this else and outdent its block
pkg/plugins/dashboard_importer.go:153:11: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/plugins/dashboards_updater.go:39:9: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/plugins/dashboards_updater.go:121:10: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/plugins/plugins.go:210:9: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/plugins/plugins.go:235:9: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/services/alerting/eval_context.go:111:9: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/services/alerting/notifier.go:92:9: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/services/alerting/notifier.go:98:9: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/services/alerting/notifier.go:122:10: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/services/alerting/rule.go:108:10: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/services/alerting/rule.go:118:10: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/services/alerting/rule.go:121:11: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/services/alerting/notifiers/telegram.go:94:10: if block ends with a return statement, so drop this else and outdent its block
pkg/services/sqlstore/annotation.go:34:11: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/services/sqlstore/annotation.go:99:11: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/services/sqlstore/dashboard_test.go:107:13: if block ends with a return statement, so drop this else and outdent its block
pkg/services/sqlstore/plugin_setting.go:78:10: if block ends with a return statement, so drop this else and outdent its block
pkg/services/sqlstore/preferences.go:91:10: if block ends with a return statement, so drop this else and outdent its block
pkg/services/sqlstore/user.go:50:10: if block ends with a return statement, so drop this else and outdent its block
pkg/services/sqlstore/migrator/migrator.go:106:11: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/services/sqlstore/migrator/postgres_dialect.go:48:10: if block ends with a return statement, so drop this else and outdent its block
pkg/tsdb/time_range.go:59:9: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/tsdb/time_range.go:67:9: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
pkg/tsdb/cloudwatch/metric_find_query.go:225:9: if block ends with a return statement, so drop this else and outdent its block
pkg/util/filepath.go:68:11: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
2018-04-27 23:10:43 +02:00
Karsten Weiss
b7adf28501 Remove redundancy in variable declarations (golint)
This commit fixes the following golint warnings:
pkg/api/avatar/avatar.go:229:12: should omit type *http.Client from declaration of var client; it will be inferred from the right-hand side
pkg/login/brute_force_login_protection.go:13:26: should omit type time.Duration from declaration of var loginAttemptsWindow; it will be inferred from the right-hand side
pkg/metrics/graphitebridge/graphite.go:58:26: should omit type []string from declaration of var metricCategoryPrefix; it will be inferred from the right-hand side
pkg/metrics/graphitebridge/graphite.go:69:22: should omit type []string from declaration of var trimMetricPrefix; it will be inferred from the right-hand side
pkg/models/alert.go:37:36: should omit type error from declaration of var ErrCannotChangeStateOnPausedAlert; it will be inferred from the right-hand side
pkg/models/alert.go:38:36: should omit type error from declaration of var ErrRequiresNewState; it will be inferred from the right-hand side
pkg/models/datasource.go:61:28: should omit type map[string]bool from declaration of var knownDatasourcePlugins; it will be inferred from the right-hand side
pkg/plugins/update_checker.go:16:13: should omit type http.Client from declaration of var httpClient; it will be inferred from the right-hand side
pkg/services/alerting/engine.go:103:24: should omit type time.Duration from declaration of var unfinishedWorkTimeout; it will be inferred from the right-hand side
pkg/services/alerting/engine.go:105:19: should omit type time.Duration from declaration of var alertTimeout; it will be inferred from the right-hand side
pkg/services/alerting/engine.go:106:19: should omit type int from declaration of var alertMaxAttempts; it will be inferred from the right-hand side
pkg/services/alerting/notifier.go:143:23: should omit type map[string]*NotifierPlugin from declaration of var notifierFactories; it will be inferred from the right-hand side
pkg/services/alerting/rule.go:136:24: should omit type map[string]ConditionFactory from declaration of var conditionFactories; it will be inferred from the right-hand side
pkg/services/alerting/conditions/evaluator.go:12:15: should omit type []string from declaration of var defaultTypes; it will be inferred from the right-hand side
pkg/services/alerting/conditions/evaluator.go:13:15: should omit type []string from declaration of var rangedTypes; it will be inferred from the right-hand side
pkg/services/alerting/notifiers/opsgenie.go:44:19: should omit type string from declaration of var opsgenieAlertURL; it will be inferred from the right-hand side
pkg/services/alerting/notifiers/pagerduty.go:43:23: should omit type string from declaration of var pagerdutyEventApiUrl; it will be inferred from the right-hand side
pkg/services/alerting/notifiers/telegram.go:21:17: should omit type string from declaration of var telegramApiUrl; it will be inferred from the right-hand side
pkg/services/provisioning/dashboards/config_reader_test.go:11:24: should omit type string from declaration of var simpleDashboardConfig; it will be inferred from the right-hand side
pkg/services/provisioning/dashboards/config_reader_test.go:12:24: should omit type string from declaration of var oldVersion; it will be inferred from the right-hand side
pkg/services/provisioning/dashboards/config_reader_test.go:13:24: should omit type string from declaration of var brokenConfigs; it will be inferred from the right-hand side
pkg/services/provisioning/dashboards/file_reader.go:22:30: should omit type time.Duration from declaration of var checkDiskForChangesInterval; it will be inferred from the right-hand side
pkg/services/provisioning/dashboards/file_reader.go:24:23: should omit type error from declaration of var ErrFolderNameMissing; it will be inferred from the right-hand side
pkg/services/provisioning/datasources/config_reader_test.go:15:34: should omit type string from declaration of var twoDatasourcesConfig; it will be inferred from the right-hand side
pkg/services/provisioning/datasources/config_reader_test.go:16:34: should omit type string from declaration of var twoDatasourcesConfigPurgeOthers; it will be inferred from the right-hand side
pkg/services/provisioning/datasources/config_reader_test.go:17:34: should omit type string from declaration of var doubleDatasourcesConfig; it will be inferred from the right-hand side
pkg/services/provisioning/datasources/config_reader_test.go:18:34: should omit type string from declaration of var allProperties; it will be inferred from the right-hand side
pkg/services/provisioning/datasources/config_reader_test.go:19:34: should omit type string from declaration of var versionZero; it will be inferred from the right-hand side
pkg/services/provisioning/datasources/config_reader_test.go:20:34: should omit type string from declaration of var brokenYaml; it will be inferred from the right-hand side
pkg/services/sqlstore/stats.go:16:25: should omit type time.Duration from declaration of var activeUserTimeLimit; it will be inferred from the right-hand side
pkg/services/sqlstore/migrator/mysql_dialect.go:69:14: should omit type bool from declaration of var hasLen1; it will be inferred from the right-hand side
pkg/services/sqlstore/migrator/mysql_dialect.go:70:14: should omit type bool from declaration of var hasLen2; it will be inferred from the right-hand side
pkg/services/sqlstore/migrator/postgres_dialect.go:95:14: should omit type bool from declaration of var hasLen1; it will be inferred from the right-hand side
pkg/services/sqlstore/migrator/postgres_dialect.go:96:14: should omit type bool from declaration of var hasLen2; it will be inferred from the right-hand side
pkg/setting/setting.go:42:15: should omit type string from declaration of var Env; it will be inferred from the right-hand side
pkg/setting/setting.go:161:18: should omit type bool from declaration of var LdapAllowSignup; it will be inferred from the right-hand side
pkg/setting/setting.go:473:30: should omit type bool from declaration of var skipStaticRootValidation; it will be inferred from the right-hand side
pkg/tsdb/interval.go:14:21: should omit type time.Duration from declaration of var defaultMinInterval; it will be inferred from the right-hand side
pkg/tsdb/interval.go:15:21: should omit type time.Duration from declaration of var year; it will be inferred from the right-hand side
pkg/tsdb/interval.go:16:21: should omit type time.Duration from declaration of var day; it will be inferred from the right-hand side
pkg/tsdb/cloudwatch/credentials.go:26:24: should omit type map[string]cache from declaration of var awsCredentialCache; it will be inferred from the right-hand side
pkg/tsdb/influxdb/query.go:15:27: should omit type *regexp.Regexp from declaration of var regexpOperatorPattern; it will be inferred from the right-hand side
pkg/tsdb/influxdb/query.go:16:27: should omit type *regexp.Regexp from declaration of var regexpMeasurementPattern; it will be inferred from the right-hand side
pkg/tsdb/mssql/mssql_test.go:25:14: should omit type string from declaration of var serverIP; it will be inferred from the right-hand side
2018-04-27 22:14:36 +02:00
Torkel Ödegaard
b3531362ca fix: minor fix to plugin service shut down flow 2018-04-27 21:22:29 +02:00
Daniel Lee
7e2fb5e92e appveyor: uppercase the C drive in go path
Fixes #11758
2018-04-27 17:32:53 +02:00
David
cc74f6c6a0 Merge pull request #11761 from grafana/davkal/explore-multi-row
Explore: add support for multiple queries
2018-04-27 17:31:25 +02:00
Leonard Gram
ec23816df6 docs: further documents changes to the docker image. (#11763)
* docs: further documents changes to the docker image.
* docs: explains the changes to user id better.
2018-04-27 17:06:08 +02:00
bergquist
c902ec1808 Merge branch 'notification-service-refactor2'
* notification-service-refactor2:
  fix: removed log calls used while troubleshooting
  refactor: refactoring notification service to use new service registry hooks
2018-04-27 16:59:32 +02:00
Carl Bergquist
2cc855a131 Merge branch 'master' into notification-service-refactor2 2018-04-27 16:59:14 +02:00
bergquist
0cbeb56af1 disable ent build to avoid slowing down build speed 2018-04-27 16:41:07 +02:00
David
d8abfe6a7d Merge pull request #11742 from grafana/davkal/explore
Explore UI skeleton
2018-04-27 15:46:40 +02:00
David Kaltschmidt
949e3d29e8 Explore: add support for multiple queries
* adds +/- buttons to query rows in the Explore section
* on Run Query all query expressions are submitted
* `generateQueryKey` and `ensureQueries` are helpers to ensure each
 query field has a unique key for react.
2018-04-27 15:42:35 +02:00
David Kaltschmidt
25d3ec5bbf Fixed settings default and explore path 2018-04-27 15:35:46 +02:00
Torkel Ödegaard
a8eed9d344 Refactoring PluginManager to be a self registering service (#11755)
* refator: refactored PluginManager to be a self registering service, a lot more work needed to fully make plugin manager use instance variables and not so many globals
2018-04-27 15:11:55 +02:00
Torkel Ödegaard
44b0f15a61 fix: removed log calls used while troubleshooting 2018-04-27 14:28:42 +02:00
Torkel Ödegaard
df71fe33fd refactor: refactoring notification service to use new service registry hooks 2018-04-27 14:15:17 +02:00
Marcus Efraimsson
8f29d28572 Merge pull request #11753 from grafana/11743_unit_revert
revert renaming of unit key ppm
2018-04-27 14:02:57 +02:00
Carl Bergquist
28f7b6dad1 Enable Grafana extensions at build time. (#11752)
* extensions: import and build

* bus: use predefined error

* enterprise: build script for enterprise packages

* poc: auto registering services and dependency injection

(cherry picked from commit b5b1ef875f905473af41e49f8071cb9028edc845)

* poc: backend services registry progress

(cherry picked from commit 97be69725881241bfbf1e7adf0e66801d6b0af3d)

* poc: minor update

(cherry picked from commit 03d7a6888b81403f458b94305792e075568f0794)

* ioc: introduce manuel ioc

* enterprise: adds setting for enterprise

* build: test and build specific ee commit

* cleanup: test testing code

* removes example hello service
2018-04-27 13:41:58 +02:00
Marcus Efraimsson
138c8c348e revert renaming of unit key ppm
#11211 removed the unit key ppm in favor of conppm. A change which is not forward compatible.
This commit revert the unit key back to ppm.
Also adds some better error description if trying to use a unit which don't exists.
Fixes #11743
2018-04-27 13:41:20 +02:00
Mitsuhiro Tanda
c2b720835b fix to match table column name and order 2018-04-27 19:34:10 +09:00
David Kaltschmidt
d338b7ea7b Import and typescript fixups 2018-04-27 11:49:11 +02:00
David Kaltschmidt
1e6e89121c Settings to enable Explore UI 2018-04-27 11:39:14 +02:00
bergquist
afce0feb05 Merge branch 'mjtrangoni-fix-deadcode-issues'
* mjtrangoni-fix-deadcode-issues:
  tech: removes unused code
  add deadcode linter to circleci
  pkg: fix deadcode issues
  build.go: fix deadcode issues
2018-04-27 10:41:56 +02:00
bergquist
8e9b3507c5 tech: removes unused code 2018-04-27 10:39:06 +02:00
bergquist
034f5921cc Merge branch 'fix-deadcode-issues' of https://github.com/mjtrangoni/grafana into mjtrangoni-fix-deadcode-issues
* 'fix-deadcode-issues' of https://github.com/mjtrangoni/grafana:
  add deadcode linter to circleci
  pkg: fix deadcode issues
  build.go: fix deadcode issues
2018-04-27 10:31:44 +02:00
David Kaltschmidt
f1220fd2a4 Explore WIP 2018-04-26 20:27:19 +02:00
Mario Trangoni
0459261d19 add deadcode linter to circleci 2018-04-26 19:24:21 +02:00
Mario Trangoni
97fd66db2e pkg: fix deadcode issues 2018-04-26 19:24:21 +02:00
Mario Trangoni
7aaa188471 build.go: fix deadcode issues 2018-04-26 19:04:07 +02:00
Marcus Efraimsson
b53a57610b docs: update current version to 5.1 2018-04-26 18:59:45 +02:00
Marcus Efraimsson
6fa7ffc23f docs: update installation instructions targeting v5.1.0 stable 2018-04-26 18:56:44 +02:00
Marcus Efraimsson
914071993d Merge branch 'docs-5.1' 2018-04-26 18:44:51 +02:00
Daniel Lee
44a61a6db3 changelog: update for v5.1.0 2018-04-26 18:18:54 +02:00
Marcus Efraimsson
28781e7dfd Merge pull request #11736 from grafana/11735_ga
fix so that google analytics script are cached
2018-04-26 16:01:08 +02:00
Marcus Efraimsson
ddeba41638 fix so that google analytics script are cached 2018-04-26 15:49:22 +02:00
Daniel Lee
1dd4f03100 Merge pull request #11726 from grafana/11708_prom_variables
prometheus: variable query should fallback correctly to a series query
2018-04-26 10:29:09 +02:00
Daniel Lee
375816106e Merge pull request #11714 from grafana/11703_mysql_ts_datatypes
sql tsdb: fix value columns conversion to float when using timeseries query
2018-04-25 23:17:22 +02:00
Marcus Efraimsson
fff5d7154e Merge pull request #11721 from grafana/11677-missaligned-menu-carot
fix misalignment of unit and other drop downs in firefox
2018-04-25 17:24:54 +02:00
Daniel Lee
4b73f67703 Merge pull request #11722 from grafana/ie11-panel-edit-height
removed height 100% from panel-container to fix ie11 panel edit mode
2018-04-25 16:26:41 +02:00
Daniel Lee
3000a2a43b Merge pull request #11652 from grafana/davkal/hmr
Add weback-dev-server with hot/hmr support
2018-04-25 15:52:53 +02:00
Marcus Efraimsson
f112e38266 prometheus: convert metric find query tests to jest 2018-04-25 15:37:58 +02:00
Marcus Efraimsson
6687409efb prometheus: fix variable query to fallback correctly to series query
Using a query of for example up or up{job=job1}
2018-04-25 15:37:58 +02:00
Patrick O'Carroll
6836268f3e removed height 100% from panel-container to fix ie11 panel edit mode 2018-04-25 12:44:39 +02:00
Patrick O'Carroll
99aa9a46bc replaced border hack carot with fontawesome carot fixes #11677 2018-04-25 12:16:43 +02:00
Leonard Gram
1290087b78 dev: Mac compatible prometheus block. (#11718) 2018-04-25 11:01:33 +02:00
David
c99d6bd505 Merge pull request #11678 from grafana/davkal/11673-silent-response
Add silent option to backend requests
2018-04-25 09:46:41 +02:00
Carl Bergquist
f2b5b6f299 Merge pull request #11694 from flopp999/patch-5
Added requests/sec(throughput)
2018-04-24 21:30:34 +02:00
Marcus Efraimsson
7626775491 Merge pull request #11695 from grafana/11508_variables_preview_values
allow to show more preview values for variables
2018-04-24 20:05:47 +02:00
Marcus Efraimsson
1452634a2a mssql: fix value columns conversion to float when using timeseries query 2018-04-24 19:54:08 +02:00
Marcus Efraimsson
cf43007531 postgres: fix value columns conversion to float when using timeseries query 2018-04-24 19:53:36 +02:00
Marcus Efraimsson
346577b664 mysql: fix value columns conversion to float when using timeseries query 2018-04-24 19:53:06 +02:00
Marcus Efraimsson
76bd2aea44 sql datasource: extract common logic for converting value column to float 2018-04-24 19:50:14 +02:00
Patrick O'Carroll
a40314022b added pointer to show more, reset values on new query 2018-04-24 17:40:03 +02:00
Marcus Efraimsson
7992897418 docs: add known issues section for mssql documentation
Fixes #11707
2018-04-24 16:30:24 +02:00
David Kaltschmidt
707700ac7d force GET for metadataRequests, w/ test 2018-04-24 16:26:46 +02:00
Marcus Efraimsson
85ccefdb84 Merge branch 'master' into docs-5.1 2018-04-24 16:17:15 +02:00
Marcus Efraimsson
d36efddcf7 Merge pull request #11699 from grafana/11466-edit-row
fixed so user who can edit dashboard can edit row
2018-04-24 14:57:50 +02:00
Carl Bergquist
005556632f Merge pull request #11705 from mjtrangoni/fix-ineffassign-issues
Fix ineffassign issues
2018-04-24 12:56:16 +02:00
David Kaltschmidt
006286ac05 Renamed helperRequest and removed positional args
From review feedback:

* s/helper/metadata
* combined positional args to _request into options dict
* metadataRequest reuses _request()
* moved consumption of this.httpMethod into _request, can be overwritten
 in options due to spread-after
2018-04-24 12:27:37 +02:00
David Kaltschmidt
0695e431ea Move function calls w/ side-effects to componentDidMount
* loadStore() modified the url which triggered a new render path, this
gets noticed by react. Moved to componentDidMount.
2018-04-24 12:07:24 +02:00
Patrick O'Carroll
38a4a2dc60 changed test name and dashboardMock code 2018-04-24 11:22:58 +02:00
Patrick O'Carroll
1446f54447 fixed test 2018-04-24 09:45:53 +02:00
Mario Trangoni
2e927a1053 add ineffassign to circleci gometalinter check 2018-04-23 20:07:31 +02:00
Mario Trangoni
b02a860e66 pkg/components: fix ineffassign issues 2018-04-23 20:03:57 +02:00
Mario Trangoni
15f11effa0 pkg/cmd: fix ineffassign issues 2018-04-23 19:34:55 +02:00
Mario Trangoni
bc570bb140 pkg/log: fix ineffassign issues 2018-04-23 19:31:23 +02:00
Mario Trangoni
6eb00000fe pkg/services: fix ineffassign issues 2018-04-23 19:28:54 +02:00
Patrick O'Carroll
45e6d9fcc4 removed import config 2018-04-23 17:45:51 +02:00
Patrick O'Carroll
3eaaa5d32d fixed so user who can edit dashboard can edit row, fixes #11466 2018-04-23 17:44:29 +02:00
Leonard Gram
3a48ea8dde Fixes signing of packages.
Signing was failing as the builds
were expected to run as ubuntu but
is run as root.

Closes #11686
2018-04-23 17:05:32 +02:00
Dan Cech
affd3d15a0 Merge pull request #11150 from sbskas/master
Make Ldap group composed of  DNs work.
2018-04-23 10:49:45 -04:00
Marcus Efraimsson
d14ac54af6 db: fix failing user auth tests for postgres 2018-04-23 16:02:59 +02:00
Daniel Lee
1dea5cb34b Merge pull request #11683 from marefr/11668_default_permissions
Fix for default permissions on folder are not shown as inherited in it's dashboards
2018-04-23 14:58:22 +02:00
flopp999
28ce71253f changed rps to reqps 2018-04-23 14:06:25 +02:00
bergquist
3cca45dd88 bump version 2018-04-23 13:59:52 +02:00
Patrick O'Carroll
c2cc77fa08 added button to show more preview values for variables, button runs a function that increases options limit, fixes #11508 2018-04-23 13:00:24 +02:00
flopp999
1cc4c0c1f0 Added requests/sec(throughput)
#9630
2018-04-23 12:05:26 +02:00
Marcus Efraimsson
079346917f use inherited property from api when rendering permissions 2018-04-23 09:23:31 +02:00
Marcus Efraimsson
d86ed679b1 return inherited property for permissions 2018-04-23 09:23:14 +02:00
Carl Bergquist
6315142d00 Merge pull request #11689 from mjtrangoni/fix-ineffassign-issues
pkg/tsdb: fix ineffassign isues
2018-04-23 07:57:55 +02:00
Carl Bergquist
7e089314f7 Merge pull request #11688 from mjtrangoni/fix-gometalinter-circleci
fix CircleCI gometalinter test
2018-04-23 07:54:21 +02:00
Andrzej Ressel
9d5ccaef54 Merge branch 'master' into feature/save_json 2018-04-22 21:24:52 +02:00
Mario Trangoni
556219b192 pkg/tsdb: fix ineffassign isues 2018-04-22 20:51:58 +02:00
Mario Trangoni
fd20aa7c03 fix circleci gometalinter test 2018-04-22 16:22:29 +02:00
Daniel Lee
6b5854936d Merge pull request #11502 from marefr/graphite_ds_test
graphite: use a query when testing data source
2018-04-22 11:31:51 +02:00
Daniel Lee
b5a54c535b Merge pull request #11654 from svenklemm/postgres-docs-timefilter
postgres: adjust timeFilter, timeFrom and timeTo macro examples
2018-04-22 11:16:15 +02:00
Sven Klemm
eb994ad72e Merge remote-tracking branch 'upstream/master' into postgres-docs-timefilter 2018-04-21 18:31:45 +02:00
Daniel Lee
3451f9a9db Merge branch 'annotations-created' of https://github.com/ryantxu/grafana into ryantxu-annotations-created 2018-04-20 17:14:06 +02:00
David Kaltschmidt
53817b7429 Add silent option to backend requests
* When set to `true`, the `silent` option for backend_srv requests
 suppresses all event emitters that are triggered when the response is
received.
* Added `helperRequest()` to the Prometheus datasource to support
 requests that are not triggered by the user, e.g., for tab completion.
`helperRequest()` sets the `silent` option.
* Migrated all non-timeseries queries of the Prometheus datasource to
 use `helperRequest()`.

Fixes #11673
2018-04-20 15:28:04 +02:00
Daniel Lee
8f9d9ed35d docs: escape asterisk in Graphite docs 2018-04-20 15:27:20 +02:00
Daniel Lee
f4f12c1e84 Merge remote-tracking branch 'upstream/master' into docs-5.1 2018-04-20 15:15:42 +02:00
Daniel Lee
bde0136317 Merge pull request #11671 from grafana/docs-variable-interpolation-mssql
Docs for mssql for #11642
2018-04-20 15:09:20 +02:00
Daniel Lee
2b3c547589 Merge pull request #11642 from grafana/docs-variable-interpolation
Docs variable interpolation
2018-04-20 15:09:05 +02:00
Daniel Lee
ba2e43f547 docs: disable quoting option for MSSQL 2018-04-20 13:36:07 +02:00
Daniel Lee
492f842c53 docs: fix example for graphite tag query
Was missing a tilde in the tag_values example
2018-04-20 13:32:17 +02:00
Daniel Lee
3a99148315 docs: spelling 2018-04-20 13:24:37 +02:00
bergquist
e168bfe03e docs: release 5.1.0-beta1 2018-04-20 13:23:45 +02:00
Daniel Lee
71dcafebb8 docs: add missing backtick for mysql/postgres 2018-04-20 13:22:43 +02:00
Daniel Lee
c10359dd5b docs: fixes for table in variable docs 2018-04-20 13:21:14 +02:00
bergquist
177220e2fe build: fixes release deploy 2018-04-20 12:59:44 +02:00
bergquist
d7f58d74d3 changelog: adds releaste date for 5.1.0-beta1 2018-04-20 11:16:24 +02:00
Daniel Lee
cdbd4e0fc0 graphite: convert ds test to jest 2018-04-20 11:09:52 +02:00
Daniel Lee
c2064781a0 Merge pull request #11640 from grafana/11637-dropdown-styling
removed padding and moved carrot
2018-04-20 11:05:40 +02:00
bergquist
98bbb01898 build: removes gometalinter
for some reason the linter lints files in /vendor
which it should not. So we have to remove it until
it works as expected

ref #10381
2018-04-20 10:35:29 +02:00
bergquist
03a9650c57 cli: adds os and arch headers
this makes it possible for the plugin repo
to provide the correct package if arch and os matters
2018-04-20 09:52:25 +02:00
Dan Cech
7cc3d0c34e Merge branch 'master' into master 2018-04-19 12:01:48 -04:00
Sven Klemm
5076f9304b slightly better example 2018-04-19 17:01:48 +02:00
Sven Klemm
048cecdab5 adjust timeFilter, timeFrom and timeTo macro examples 2018-04-19 16:56:58 +02:00
Marcus Efraimsson
9fc59cc212 Merge pull request #11644 from grafana/11392_whats_new_v51
docs: What's new in v5.1
2018-04-19 16:37:04 +02:00
Marcus Efraimsson
727a7bf27a docs: what's new improvements 2018-04-19 16:26:42 +02:00
Marcus Efraimsson
886c8b823a docs: what's new improvements 2018-04-19 14:51:33 +02:00
bergquist
b5820d930c Merge branch 'master' into 11392_whats_new_v51
* master:
  build: only lint the pkg folder
  changelog: adds note about closing #11476
  singlestat: Fix optimization in setTableColumnToSensibleDefault
  influxdb: Check before assuming first column to be 'time'
2018-04-19 14:27:13 +02:00
bergquist
ffb1db833c docs: what's new
add's info about new template variable interpolation
2018-04-19 14:23:47 +02:00
Marcus Efraimsson
540bde269e docs: fix typos 2018-04-19 13:49:40 +02:00
Marcus Efraimsson
cc3418f6a3 docs: what's new
Improved scrolling experience
2018-04-19 13:44:37 +02:00
bergquist
b4a77d49b4 docs: whats new
reduce content a little bit and highlight mssql and prom heatmap
2018-04-19 13:39:02 +02:00
bergquist
601a1d9b92 docs: more info prometheus heapmap to whats new 2018-04-19 13:33:50 +02:00
Marcus Efraimsson
6737f79331 docs: improve what's new in v5.1 2018-04-19 13:25:16 +02:00
Marcus Efraimsson
250f85b9bd docs: what's new in v5.1 draft 2018-04-19 12:54:10 +02:00
David Kaltschmidt
cc5d7002b0 Add weback-dev-server with hot/hmr support
* adds `npm start` / `yarn start` script
* starts a webpack-dev-server using the dev config, served on :3333
* hot reloading (HMR) for react/styles, not working for angular code
* new entry `dev.ts` for dynamic imports of CSS theme (ExtractText does
not work with HMR)
* TS loader pipeline moved out of common to add HMR for react
* applied `hot()` to some react containers (that's their new default
 export, named exports remains for testing)
* added sections to README
* updated yarn.lock
2018-04-19 11:42:53 +02:00
bergquist
7a62231816 build: only lint the pkg folder 2018-04-19 11:29:02 +02:00
bergquist
f50bcb6aae changelog: adds note about closing #11476 2018-04-19 11:20:29 +02:00
Carl Bergquist
2dfa576c76 Merge pull request #11504 from hahnjo/11476-influxdb-show-cardinality
influxdb: Check before assuming first column to be 'time'
2018-04-19 11:18:01 +02:00
Marcus Efraimsson
ba9c3f60c4 Merge branch 'master' into docs-5.1 2018-04-19 10:52:17 +02:00
Marcus Efraimsson
e6f38591b5 dev: only build server with bra run 2018-04-19 10:43:31 +02:00
Carl Bergquist
4f0d7586ae Merge pull request #11648 from mjtrangoni/add-gometalinter-circleci
Add gometalinter to CircleCI
2018-04-19 09:35:21 +02:00
Mario Trangoni
3543f1c3d4 add gometalinter to circleci 2018-04-18 22:52:21 +02:00
Mario Trangoni
33ae8d35ea comment unused struct fields 2018-04-18 22:23:49 +02:00
Carl Bergquist
89acafd567 Merge pull request #11646 from mjtrangoni/fix-varcheck-issues
remove unused variables detected by varcheck
2018-04-18 21:45:11 +02:00
Mario Trangoni
c1742df9ac remove unused variables detected by varcheck 2018-04-18 19:04:37 +02:00
Marcus Efraimsson
cec9634f4a fix typo 2018-04-18 14:52:36 +02:00
Daniel Lee
ab4f8c273d docs: describes variable formatting options
csv option in postgres/mysql docs and the regex option in the
graphite docs
2018-04-18 14:40:34 +02:00
Daniel Lee
120a86ecf9 docs: graphite template variables for tag queries
ref #11388 and ref #9911 and ref #10366
2018-04-18 14:40:34 +02:00
Daniel Lee
24ae9cef36 docs: describes new variable formatting syntax
Fixes #11388
Ref #11141
2018-04-18 14:40:34 +02:00
Marcus Efraimsson
7e8bd8d004 Merge branch 'master' into docs-5.1 2018-04-18 14:39:38 +02:00
Marcus Efraimsson
4ddd15d921 changelog: notes about closing #10427
[skip ci]
2018-04-18 14:18:21 +02:00
Marcus Efraimsson
fd409f119d Merge pull request #10986 from grafana/10427_addpanel_filter
add tabs and search filter to new panel control
2018-04-18 14:13:21 +02:00
Carl Bergquist
0ad6336634 Merge pull request #11354 from grafana/external-auth
External auth refactor
2018-04-18 14:03:50 +02:00
Marcus Efraimsson
606257a1da move jest test file to specs 2018-04-18 14:00:15 +02:00
Marcus Efraimsson
ce97f89de6 make add panel panel scrollbar adjust when panel/dashboard grid are resized 2018-04-18 13:59:26 +02:00
bergquist
dbf61355b3 style: code simplifications 2018-04-18 12:16:25 +02:00
Marcus Efraimsson
82054e1a3e Merge branch 'master' into 10427_addpanel_filter 2018-04-18 11:36:13 +02:00
Marcus Efraimsson
b7b0ca2b90 build: introduce -dev flag optimal for building in development mode
Fix performance issue with running bra run for go run build.go build
2018-04-18 11:25:34 +02:00
Patrick O'Carroll
23f644c2f5 changed copied message and added forced render for width change 2018-04-18 10:34:43 +02:00
Patrick O'Carroll
e794951087 removed padding and moved carrot 2018-04-18 10:21:48 +02:00
Carl Bergquist
54b7846eb6 Merge pull request #11635 from ohadbenita/patch-1
Specify expected encoding for access/secret key
2018-04-18 10:06:12 +02:00
bergquist
c22495b6f8 Merge branch 'master' into external-auth
* master:
  changelog: adds note about closing #11613 and #11602
  fix: sign in link should have target self to trigger full page reload, fixes #11626
  codespell: exclude by words instead of files
  Use sort.Strings() (gosimple)
  Remove unused return value assignment (gosimple)
  Remove unnecessary fmt.Sprintf() calls (gosimple)
  Merge variable declaration with assignment (gosimple)
  Use fmt.Errorf() (gosimple)
  Simplify make() (gosimple)
  Use raw strings to avoid double escapes (gosimple)
  Simplify if expression (gosimple)
  Simplify comparison to bool constant (gosimple)
  Simplify error returns (gosimple)
  Remove redundant break statements (gosimple)
2018-04-18 09:34:45 +02:00
bergquist
d9b3ff1952 changelog: adds note about closing #11613 and #11602 2018-04-18 09:21:51 +02:00
Dan Cech
3fedcb1e4b cleanup, make sure users are always synced with ldap 2018-04-17 17:48:56 -04:00
ohadbenita
4664549411 Specify expected encoding for access/secret key 2018-04-17 23:55:07 +03:00
Dan Cech
33760b5c3b make sure user's default org is kept up to date 2018-04-17 16:51:05 -04:00
Carl Bergquist
8367199a2d Merge pull request #11613 from knweiss/gosimple
Code simplification (gosimple)
2018-04-17 22:40:40 +02:00
Carl Bergquist
6ba830c73b Merge pull request #11632 from mjtrangoni/fix-codespell-circleci
codespell: exclude by words instead of files
2018-04-17 21:10:46 +02:00
Torkel Ödegaard
e81330abf0 fix: sign in link should have target self to trigger full page reload, fixes #11626 2018-04-17 21:01:52 +02:00
Mario Trangoni
b0217f5dd3 codespell: exclude by words instead of files 2018-04-17 20:45:46 +02:00
Dan Cech
00e74990ed remove old comment 2018-04-17 14:06:25 -04:00
Dan Cech
857830d981 org role sync tests 2018-04-17 14:06:25 -04:00
Dan Cech
52503d9cb5 refactor authproxy & ldap integration, address comments 2018-04-17 14:06:25 -04:00
Dan Cech
c8a0c1e6b8 pass DN in ldap test 2018-04-17 14:06:25 -04:00
Dan Cech
daeba40b3b tests for user auth module 2018-04-17 14:06:25 -04:00
Dan Cech
59f83ca5d8 fix ldap test 2018-04-17 14:06:25 -04:00
Dan Cech
e53e039b1b restructure GetUserByAuthInfo 2018-04-17 14:06:25 -04:00
Dan Cech
c4168c2396 error handling 2018-04-17 14:06:25 -04:00
Dan Cech
65847da1df use Result in GetAuthInfoQuery 2018-04-17 14:06:25 -04:00
Dan Cech
d837be91ec switch to passing ReqContext as a property 2018-04-17 14:06:25 -04:00
Dan Cech
e53315dce8 cleanup 2018-04-17 14:06:25 -04:00
Dan Cech
a1b1d2fe80 switch to Result 2018-04-17 14:06:25 -04:00
Dan Cech
d5dd1c9bca update auth proxy 2018-04-17 14:06:25 -04:00
Dan Cech
23f163e8cf fixes 2018-04-17 14:06:25 -04:00
Dan Cech
d2eab2ff4c fix tests 2018-04-17 14:06:25 -04:00
Dan Cech
1c5afa731f shared library for managing external user accounts 2018-04-17 14:06:25 -04:00
Torkel Ödegaard
1594ceeb6f fix: Label font weight should be semi bold, fixes #11629 2018-04-17 19:40:44 +02:00
bergquist
fa49332915 docs: typos 2018-04-17 19:09:39 +02:00
Carl Bergquist
3801df5da8 Merge pull request #11602 from mjtrangoni/add-codespell-to-circle
add codespell to CircleCI
2018-04-17 19:02:32 +02:00
Daniel Lee
5b968329a0 graphite: adds tests for tags and tag_values functions 2018-04-17 18:58:47 +02:00
Marcus Efraimsson
d30835f648 docs: update provisioning documentation
In addition to closing #10883
2018-04-17 17:22:25 +02:00
Marcus Efraimsson
b142d6a037 Merge branch 'master' into docs-5.1 2018-04-17 16:50:26 +02:00
Marcus Efraimsson
cfef609c32 changelog: notes about closing #10883
[skip ci]
2018-04-17 16:45:44 +02:00
Marcus Efraimsson
c120415406 Merge pull request #11398 from bergquist/readonly_dashboards
improved workflow for provisioned dashboards
2018-04-17 16:42:08 +02:00
Daniel Lee
d9b5ef8f7b changelog: adds note for #11553 2018-04-17 16:35:55 +02:00
Marcus Efraimsson
d7688241c6 Merge branch 'master' into readonly_dashboards 2018-04-17 16:27:51 +02:00
bergquist
059719104f dev: only build server with bra run 2018-04-17 15:02:22 +02:00
Daniel Lee
26bb22bffa Merge pull request #11554 from grafana/11553_viewer_general_access
User with org viewer role permission fixes
2018-04-17 13:50:45 +02:00
Daniel Lee
4a842f96ac changelog: adds note for #11173 2018-04-17 13:44:42 +02:00
Daniel Lee
b3acbb9995 Merge pull request #11526 from grafana/11173_folder_admin
A folder admin should be able to add permissions for folder/its dashboards
2018-04-17 13:42:38 +02:00
Patrick O'Carroll
0120023aba added forceupdate to grid item so addpanel items rezie instantly, renamed function to copyPanel, fixed panel items height issue 2018-04-17 13:10:08 +02:00
Marcus Efraimsson
2fc1558daf revert changes of add panel button to require save permission
This resolves an issue where the add panel button was shown on the default home dashboard
2018-04-17 11:03:46 +02:00
Marcus Efraimsson
8a5cb088d3 Merge branch 'master' into readonly_dashboards 2018-04-17 10:50:04 +02:00
Marcus Efraimsson
e21d574814 changelog: fix typo
[skip ci]
2018-04-17 10:28:16 +02:00
Marcus Efraimsson
a3eff6cf25 changelog: notes about closing #11572
[skip ci]
2018-04-17 10:27:12 +02:00
Dan Cech
e07de80b75 Fix issues with metric reporting (#11518)
* report active users in graphite stats

* use bus to publish system stats

* metrics: avoid using events unless we have to

this commit also changes the default interval
for updating the stats gauges. Seems like the old values
was a product of previous metrics implementation
2018-04-17 10:20:01 +02:00
Marcus Efraimsson
ffe9b426d4 changelog: notes about closing #10747
[skip ci]
2018-04-17 10:00:09 +02:00
Torkel Ödegaard
85121e55c9 fix: Row state is now ignored when looking for dashboard changes (#11608)
* fix: Row state is now ignored when looking for dashboawrd changes, had to fix bug in expand logic to make fix work. Also moved the ChangeTracker to it's own file and moved tests to jest, fixes #11208

* removed commented out log calls
2018-04-17 09:41:07 +02:00
Marcus Efraimsson
9733172d3c Merge pull request #11422 from grafana/dashboard-acl-ux2
improved ux for permission list
2018-04-17 09:39:39 +02:00
Marcus Efraimsson
d9799f7c13 Merge pull request #11572 from grafana/settings-icons-fix
ux: sizing and positioning of dashboard settings menu icons
2018-04-17 09:22:16 +02:00
Torkel Ödegaard
9ec89c1848 disable codecov comments 2018-04-17 09:20:43 +02:00
Marcus Efraimsson
92768d5a2b Merge branch 'master' into dashboard-acl-ux2 2018-04-17 09:19:36 +02:00
Marcus Efraimsson
a01e6fc9c7 add some more sort order asserts for permissions store tests 2018-04-17 09:19:17 +02:00
Carl Bergquist
ac5836f895 Merge pull request #11623 from grafana/revert-11571-remove-codecov
Revert "build: remove code cov"
2018-04-17 09:13:31 +02:00
Carl Bergquist
ca6dd9f53f Merge pull request #11622 from grafana/revert-11599-rm_codecov
Revert "removes codecov from frontend tests"
2018-04-17 09:13:06 +02:00
Carl Bergquist
ea56288f4a Merge pull request #11611 from mjtrangoni/fix-unconvert-issues
fix unconvert issues
2018-04-17 09:06:39 +02:00
Carl Bergquist
450a3b4a00 Revert "build: remove code cov" 2018-04-17 09:00:55 +02:00
Carl Bergquist
b6b152d9ea Revert "removes codecov from frontend tests" 2018-04-17 09:00:39 +02:00
Carl Bergquist
0976a46cb3 Merge pull request #11610 from grafana/davkal/bra-use-build-script
bra should use the proper build script
2018-04-17 08:51:01 +02:00
Marcus Efraimsson
ad22e20ecd docs: update postgres macro functions documentation
In addition to closing #11578
2018-04-17 00:06:25 +02:00
Marcus Efraimsson
979f2d79fb Merge branch 'master' into docs-5.1 2018-04-16 23:58:50 +02:00
Marcus Efraimsson
3a5d1f4594 tsdb: update query and annotation editor help texts for postgres
In addition to closing #11578
2018-04-16 23:56:14 +02:00
Marcus Efraimsson
69d1330ae9 changelog: notes about closing #11578
[skip ci]
2018-04-16 23:46:26 +02:00
Marcus Efraimsson
97e43ddc5a Merge pull request #11592 from svenklemm/postgres-timefilter-macro
tsdb: improve $__timeFilter macro for postgres
2018-04-16 23:38:05 +02:00
Marcus Efraimsson
0e0976b0a2 Merge branch 'master' into 10427_addpanel_filter 2018-04-16 23:30:34 +02:00
Sven Klemm
5dc36afe71 calculate datetime for timeFrom and timeTo macro in go 2018-04-16 23:02:24 +02:00
Sven Klemm
4599329683 set default for sslmode to verify-full in postgres datasource editor (#11615) 2018-04-16 22:23:24 +02:00
Marcus Efraimsson
58e6b11809 add some more sort order asserts for permissions store tests 2018-04-16 21:51:53 +02:00
Marcus Efraimsson
bc8353ae14 Merge branch 'master' into dashboard-acl-ux2 2018-04-16 21:19:01 +02:00
Karsten Weiss
ed46efa081 Use sort.Strings() (gosimple)
This fixes:
pkg/tsdb/cloudwatch/metric_find_query.go:257:2: should use sort.Strings(...) instead of sort.Sort(sort.StringSlice(...)) (S1032)
pkg/tsdb/cloudwatch/metric_find_query.go:286:2: should use sort.Strings(...) instead of sort.Sort(sort.StringSlice(...)) (S1032)
pkg/tsdb/cloudwatch/metric_find_query.go:315:2: should use sort.Strings(...) instead of sort.Sort(sort.StringSlice(...)) (S1032)
2018-04-16 21:04:57 +02:00
Karsten Weiss
25bb0b5569 Remove unused return value assignment (gosimple)
This fixes:
pkg/tsdb/sql_engine.go:54:6: should write version := engineCache.versions[dsInfo.Id] instead of version, _ := engineCache.versions[dsInfo.Id] (S1005)
2018-04-16 21:04:57 +02:00
Karsten Weiss
de084e5891 Remove unnecessary fmt.Sprintf() calls (gosimple)
This fixes:
pkg/services/sqlstore/migrator/migrations.go:116:18: the argument is already a string, there's no need to use fmt.Sprintf (S1025)
pkg/services/sqlstore/migrator/types.go:49:16: the argument is already a string, there's no need to use fmt.Sprintf (S1025)
2018-04-16 21:04:57 +02:00
Karsten Weiss
5d95601720 Merge variable declaration with assignment (gosimple)
This fixes:
pkg/cmd/grafana-cli/commands/upgrade_all_command.go:56:3: should merge variable declaration with assignment on next line (S1021)
pkg/login/ldap.go:406:4: should merge variable declaration with assignment on next line (S1021)
pkg/services/sqlstore/migrator/dialect.go:87:2: should merge variable declaration with assignment on next line (S1021)
pkg/services/sqlstore/migrator/dialect.go:165:2: should merge variable declaration with assignment on next line (S1021)
pkg/tsdb/cloudwatch/metric_find_query_test.go:185:2: should merge variable declaration with assignment on next line (S1021)
2018-04-16 21:04:57 +02:00
Karsten Weiss
4d6386e97b Use fmt.Errorf() (gosimple)
This fixes:
pkg/cmd/grafana-cli/commands/install_command.go:36:11: should use fmt.Errorf(...) instead of errors.New(fmt.Sprintf(...)) (S1028)
pkg/models/org_user.go:53:11: should use fmt.Errorf(...) instead of errors.New(fmt.Sprintf(...)) (S1028)
pkg/services/notifications/mailer.go:138:16: should use fmt.Errorf(...) instead of errors.New(fmt.Sprintf(...)) (S1028)
2018-04-16 21:04:57 +02:00
Karsten Weiss
4d87cb03c5 Simplify make() (gosimple)
This fixes:
pkg/api/http_server.go:142:89: should use make(map[string]func(*http.Server, *tls.Conn, http.Handler)) instead (S1019)
pkg/services/alerting/scheduler.go:18:30: should use make(map[int64]*Job) instead (S1019)
pkg/services/alerting/scheduler.go:26:31: should use make(map[int64]*Job) instead (S1019)
2018-04-16 21:04:57 +02:00
Karsten Weiss
cb3b9f8b66 Use raw strings to avoid double escapes (gosimple)
This fixes:
pkg/services/alerting/rule.go:58:21: should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (S1007\)
pkg/services/alerting/rule.go:59:21: should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (S1007)
2018-04-16 21:04:57 +02:00
Karsten Weiss
da5654ad04 Simplify if expression (gosimple)
pkg/util/shortid_generator.go:20:2: should use 'return <expr>' instead of 'if <expr> { return <bool> }; return <bool>' (S1008)
2018-04-16 21:04:57 +02:00
Karsten Weiss
f61e69ce75 Simplify comparison to bool constant (gosimple)
This fixes:
build.go:553:6: should omit comparison to bool constant, can be simplified to !strings.Contains(path, ".sha256") (S1002)
pkg/cmd/grafana-cli/commands/ls_command.go:27:5: should omit comparison to bool constant, can be simplified to !pluginDirInfo.IsDir() (S1002)
pkg/components/dynmap/dynmap_test.go:24:5: should omit comparison to bool constant, can be simplified to !value (S1002)
pkg/components/dynmap/dynmap_test.go:122:14: should omit comparison to bool constant, can be simplified to b (S1002)
pkg/components/dynmap/dynmap_test.go:125:14: should omit comparison to bool constant, can be simplified to !b (S1002)
pkg/components/dynmap/dynmap_test.go:128:14: should omit comparison to bool constant, can be simplified to !b (S1002)
pkg/models/org_user.go:51:5: should omit comparison to bool constant, can be simplified to !(*r).IsValid() (S1002)
pkg/plugins/datasource/wrapper/datasource_plugin_wrapper_test.go:77:12: should omit comparison to bool constant, can be simplified to !haveBool (S1002)
pkg/services/alerting/conditions/evaluator.go:23:9: should omit comparison to bool constant, can be simplified to !reducedValue.Valid (S1002)
pkg/services/alerting/conditions/evaluator.go:48:5: should omit comparison to bool constant, can be simplified to !reducedValue.Valid (S1002)
pkg/services/alerting/conditions/evaluator.go:91:5: should omit comparison to bool constant, can be simplified to !reducedValue.Valid (S1002)
pkg/services/alerting/conditions/query.go:56:6: should omit comparison to bool constant, can be simplified to !reducedValue.Valid (S1002)
pkg/services/alerting/extractor.go:107:20: should omit comparison to bool constant, can be simplified to !enabled.MustBool() (S1002)
pkg/services/alerting/notifiers/telegram.go:222:41: should omit comparison to bool constant, can be simplified to this.UploadImage (S1002)
pkg/services/sqlstore/apikey.go:58:12: should omit comparison to bool constant, can be simplified to !has (S1002)
pkg/services/sqlstore/apikey.go:72:12: should omit comparison to bool constant, can be simplified to !has (S1002)
pkg/services/sqlstore/dashboard.go:66:33: should omit comparison to bool constant, can be simplified to !cmd.Overwrite (S1002)
pkg/services/sqlstore/dashboard.go:175:12: should omit comparison to bool constant, can be simplified to !has (S1002)
pkg/services/sqlstore/dashboard.go:311:13: should omit comparison to bool constant, can be simplified to !has (S1002)
pkg/services/sqlstore/dashboard.go:444:12: should omit comparison to bool constant, can be simplified to !exists (S1002)
pkg/services/sqlstore/dashboard.go:472:12: should omit comparison to bool constant, can be simplified to !exists (S1002)
pkg/services/sqlstore/dashboard.go:554:32: should omit comparison to bool constant, can be simplified to !cmd.Overwrite (S1002)
pkg/services/sqlstore/dashboard_snapshot.go:83:12: should omit comparison to bool constant, can be simplified to !has (S1002)
pkg/services/sqlstore/plugin_setting.go:39:12: should omit comparison to bool constant, can be simplified to !has (S1002)
pkg/services/sqlstore/quota.go:34:12: should omit comparison to bool constant, can be simplified to !has (S1002)
pkg/services/sqlstore/quota.go:111:6: should omit comparison to bool constant, can be simplified to !has (S1002)
pkg/services/sqlstore/quota.go:136:12: should omit comparison to bool constant, can be simplified to !has (S1002)
pkg/services/sqlstore/quota.go:213:6: should omit comparison to bool constant, can be simplified to !has (S1002)
pkg/services/sqlstore/temp_user.go:129:12: should omit comparison to bool constant, can be simplified to !has (S1002)
pkg/services/sqlstore/user.go:157:12: should omit comparison to bool constant, can be simplified to !has (S1002)
pkg/services/sqlstore/user.go:182:5: should omit comparison to bool constant, can be simplified to !has (S1002)
pkg/services/sqlstore/user.go:191:12: should omit comparison to bool constant, can be simplified to !has (S1002)
pkg/services/sqlstore/user.go:212:12: should omit comparison to bool constant, can be simplified to !has (S1002)
pkg/services/sqlstore/user.go:307:12: should omit comparison to bool constant, can be simplified to !has (S1002)
pkg/social/generic_oauth.go:185:5: should omit comparison to bool constant, can be simplified to !s.extractToken(&data, token) (S1002)
pkg/tsdb/mssql/mssql.go:148:39: should omit comparison to bool constant, can be simplified to ok (S1002)
pkg/tsdb/mssql/mssql.go:212:6: should omit comparison to bool constant, can be simplified to !query.Model.Get("fillNull").MustBool(false) (S1002)
pkg/tsdb/mssql/mssql.go:247:56: should omit comparison to bool constant, can be simplified to ok (S1002)
pkg/tsdb/mssql/mssql.go:274:7: should omit comparison to bool constant, can be simplified to !exist (S1002)
pkg/tsdb/mssql/mssql.go:282:8: should omit comparison to bool constant, can be simplified to !exist (S1002)
pkg/tsdb/mysql/mysql.go:221:6: should omit comparison to bool constant, can be simplified to !query.Model.Get("fillNull").MustBool(false) (S1002)
pkg/tsdb/mysql/mysql.go:256:56: should omit comparison to bool constant, can be simplified to ok (S1002)
pkg/tsdb/mysql/mysql.go:283:7: should omit comparison to bool constant, can be simplified to !exist (S1002)
pkg/tsdb/mysql/mysql.go:291:8: should omit comparison to bool constant, can be simplified to !exist (S1002)
pkg/tsdb/postgres/postgres.go:134:39: should omit comparison to bool constant, can be simplified to ok (S1002)
pkg/tsdb/postgres/postgres.go:201:6: should omit comparison to bool constant, can be simplified to !query.Model.Get("fillNull").MustBool(false) (S1002)
pkg/tsdb/postgres/postgres.go:236:56: should omit comparison to bool constant, can be simplified to ok (S1002)
pkg/tsdb/postgres/postgres.go:263:7: should omit comparison to bool constant, can be simplified to !exist (S1002)
pkg/tsdb/postgres/postgres.go:271:8: should omit comparison to bool constant, can be simplified to !exist (S1002)
2018-04-16 21:04:57 +02:00
Karsten Weiss
be2d635078 Simplify error returns (gosimple)
This fixes:
pkg/api/avatar/avatar.go:261:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/log/file.go:102:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/metrics/graphitebridge/graphite.go:298:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/provisioning/provisioning.go:23:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/alert_notification.go:27:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/alert_notification.go:27:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/annotation.go:105:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/annotation.go:105:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/dashboard.go:351:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/dashboard.go:435:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/dashboard_acl.go:38:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/dashboard_acl.go:38:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/stats.go:22:2: 'if err != nil { return err }; return err' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/team.go:213:2: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/user.go:256:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/user.go:256:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/user.go:274:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/user.go:274:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/user.go:482:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
pkg/services/sqlstore/user.go:482:3: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013)
2018-04-16 21:04:57 +02:00
Karsten Weiss
c5a09a3dc1 Remove redundant break statements (gosimple)
This fixes:
pkg/components/dynmap/dynmap.go:588:3: redundant break statement (S1023)
pkg/components/dynmap/dynmap.go:610:3: redundant break statement (S1023)
pkg/components/dynmap/dynmap.go:641:3: redundant break statement (S1023)
pkg/components/dynmap/dynmap.go:690:3: redundant break statement (S1023)
pkg/components/dynmap/dynmap.go:712:3: redundant break statement (S1023)
pkg/components/dynmap/dynmap.go:749:3: redundant break statement (S1023)
pkg/components/dynmap/dynmap.go:785:3: redundant break statement (S1023)
pkg/tsdb/cloudwatch/cloudwatch.go:74:3: redundant break statement (S1023)
pkg/tsdb/cloudwatch/cloudwatch.go:77:3: redundant break statement (S1023)
pkg/tsdb/cloudwatch/cloudwatch.go:82:3: redundant break statement (S1023)
pkg/tsdb/cloudwatch/metric_find_query.go:178:3: redundant break statement (S1023)
pkg/tsdb/cloudwatch/metric_find_query.go:181:3: redundant break statement (S1023)
pkg/tsdb/cloudwatch/metric_find_query.go:184:3: redundant break statement (S1023)
pkg/tsdb/cloudwatch/metric_find_query.go:187:3: redundant break statement (S1023)
pkg/tsdb/cloudwatch/metric_find_query.go:190:3: redundant break statement (S1023)
pkg/tsdb/cloudwatch/metric_find_query.go:193:3: redundant break statement (S1023)
pkg/tsdb/cloudwatch/metric_find_query.go:196:3: redundant break statement (S1023)
2018-04-16 21:04:57 +02:00
Mario Trangoni
ce941a004d fix unconvert issues 2018-04-16 20:04:58 +02:00
Daniel Lee
e7bcd8c3c3 variable: fix binding bug after ts conversion 2018-04-16 19:59:47 +02:00
Sven Klemm
a2a7d3d436 add GetFromAsTimeUTC and GetToAsTimeUTC and use them in timeFilter macro 2018-04-16 19:38:35 +02:00
Sven Klemm
7ab0a54f4b Merge remote-tracking branch 'upstream/master' into postgres-timefilter-macro 2018-04-16 19:23:08 +02:00
Daniel Lee
7d165068df fix merge conflict 2018-04-16 19:19:48 +02:00
Sven Klemm
e8e554b3da remove changes to module.ts from this branch 2018-04-16 19:14:25 +02:00
Patrick O'Carroll
7ef6106197 migrated dropdown-typeahead to ts (#11499)
* migrated dropdown-typeahead to ts

* removed console.logs

* added @ngInject
2018-04-16 17:40:29 +02:00
Daniel Lee
aa999aa6a9 changelog: adds note for #11556 2018-04-16 17:22:19 +02:00
Daniel Lee
82a1deaf5e changelog: adds note for #11133 2018-04-16 17:20:26 +02:00
Marcus Efraimsson
e932623cc0 Merge branch 'master' into settings-icons-fix 2018-04-16 17:16:54 +02:00
Marcus Efraimsson
9573bc43ce dashboard: better size and alignment of settings icons 2018-04-16 17:16:35 +02:00
Daniel Lee
34455c0598 Merge pull request #11583 from grafana/11556-org-switch-order
ordered user orgs alphabeticaly
2018-04-16 17:09:36 +02:00
Daniel Lee
bb7a6a0153 Merge pull request #11595 from kichristensen/DeleteEmptyPlaylist
Support deleting empty playlist
2018-04-16 17:06:59 +02:00
David
ed44face0e Merge pull request #11605 from grafana/davkal/show-version-in-help
Show Grafana version and build in Help menu
2018-04-16 16:58:18 +02:00
David Kaltschmidt
9ca1a94580 bra should use the proper build script
* `bra run` is used during development, but it was not using build.go
which sets a couple of globals, e.g., the commit (currently set to "NA")
* This will help in reporting the commit that someone is basing their
screenshot on.
2018-04-16 16:52:44 +02:00
David Kaltschmidt
5a29c17282 moved version in help menu to top 2018-04-16 16:25:28 +02:00
Marcus Efraimsson
90ed046ce3 docs: elasticsearch and influxdb docs for group by time interval option (#11609) 2018-04-16 16:03:50 +02:00
Leonard Gram
8d963e2733 changelog: improved docker image 2018-04-16 15:45:55 +02:00
Leonard Gram
abed9c055f docs: new docker image in Grafana 5.1.0. 2018-04-16 15:33:15 +02:00
Patrick O'Carroll
5200196092 added fix for test 2018-04-16 14:49:47 +02:00
Marcus Efraimsson
c9f5568332 Merge branch 'master' into docs-5.1 2018-04-16 14:35:43 +02:00
Patrick O'Carroll
ce3dcadfef addeds test for sort order 2018-04-16 14:30:50 +02:00
David Kaltschmidt
712212d6aa Show Grafana version and build in Help menu
* establishes Help as the single place to look for the Grafana version
* version is passed as menu sub-title to side menu
* added rendering of sub-title, plus styles
* sub-title was used by profile menu (its value is the login string),
but was not shown; now showing this value on condition that login name
is different from user name
2018-04-16 13:37:05 +02:00
Marcus Efraimsson
645658d797 changlelog: notes about closing issues/pr's
#11053, #11252, #10836, #11185, #11168, #11332, #11391, #11073, #9342, #11001, #11183, #11211, #11384, #11095, #10792, #11138, 
#11516
[skip ci]
2018-04-16 13:08:00 +02:00
Daniel Lee
9337972a0f sqlds: fix text in comments for tests 2018-04-16 12:55:27 +02:00
Carl Bergquist
2bfd6ab3e4 Merge pull request #11599 from bergquist/rm_codecov
removes codecov from frontend tests
2018-04-16 12:42:56 +02:00
Mario Trangoni
aff336d4e7 add codespell to circleci 2018-04-16 12:21:13 +02:00
bergquist
6c6b74fc39 removes codecov from front-end tests 2018-04-16 11:39:09 +02:00
Daniel Lee
ee303c03e9 Merge pull request #11550 from grafana/sql_ts_precision
sql tsdb: fix precision and data type support for time columns
2018-04-16 11:04:46 +02:00
Patrick O'Carroll
6b4ef7f598 wip: writing tests for permission sorting 2018-04-16 10:42:39 +02:00
Marcus Efraimsson
92ac1fbb5b Merge branch 'master' into docs-5.1 2018-04-16 09:58:46 +02:00
bergquist
738fb29134 changelog: adds note about closing #11228 2018-04-16 09:38:18 +02:00
Carl Bergquist
693ff1c000 Merge pull request #11579 from towolf/add-url-param-for-inactive-mode
Add another URL param «inactive» which works like «kiosk» but with title
2018-04-16 09:35:57 +02:00
Carl Bergquist
a140296633 Merge pull request #11594 from xginn8/writable_plugins
Grafana-CLI: mention the plugins directory is not writable on failure
2018-04-16 09:27:19 +02:00
Daniel Lee
67daa9b058 Merge pull request #11588 from mjtrangoni/fix-codespell-issues
Fix codespell issues
2018-04-16 09:12:49 +02:00
Sven Klemm
6d3da9a73d remove postgresversion and convert unix timestamp in go 2018-04-15 22:14:13 +02:00
Kim Christensen
7534f0bff6 Support deleting empty playlist 2018-04-15 21:37:34 +02:00
Matthew McGinn
ee623e2091 Grafana-CLI: mention the plugins directory is not writable on failure 2018-04-15 13:44:59 -04:00
Sven Klemm
9b61ffb48a make timefilter macro aware of pg version 2018-04-15 18:38:20 +02:00
Sven Klemm
1161c7bc3e add postgresVersion to postgres settings 2018-04-15 17:56:56 +02:00
Daniel Lee
52bd51f2d0 changelog: adds note for #11530 2018-04-14 17:59:33 +02:00
Daniel Lee
d70cacc364 Merge pull request #11532 from ryantxu/sql-uint64
PostgreSQL should not cast all times to uint64
2018-04-14 17:56:39 +02:00
Daniel Lee
5702014917 Merge pull request #11590 from vitaliyf/patch-1
Documentation spelling fix
2018-04-14 16:57:28 +02:00
Daniel Lee
af91238d14 Merge pull request #11547 from grafana/value-select-dropdown-to-ts
Value select dropdown to ts
2018-04-14 16:53:08 +02:00
Vitaliy
e2add988ec Documentation spelling fix 2018-04-14 09:56:47 -04:00
Mario Trangoni
638f7d23d4 docs: fix codespell issues 2018-04-13 20:31:29 +02:00
Mario Trangoni
e5e6bc56c8 public: fix codespell issues 2018-04-13 20:31:29 +02:00
Mario Trangoni
298ece0a02 conf: fix codespell issues 2018-04-13 20:31:29 +02:00
Mario Trangoni
9a11b574ca blocks: fix codespell issues 2018-04-13 20:31:29 +02:00
Mario Trangoni
3fb204cc0d CHANGELOG.md: fix codespell issues 2018-04-13 20:31:29 +02:00
Mario Trangoni
3424fa94c2 scripts: fix codespell issues 2018-04-13 20:31:29 +02:00
Mario Trangoni
91fb2e07ce pkg: fix codespell issues 2018-04-13 20:31:29 +02:00
Daniel Lee
9413ce5ef6 Merge pull request #8096 from ryantxu/influx-db-query2
let the influxdb API set a database
2018-04-13 18:22:12 +02:00
Marcus Efraimsson
ff4e38c1d8 provisioned dashboard validation should be made when importing a dashboard
Had to add the validate before save command before validating provisioned dashboard
so that the import would get a proper dashboard id
2018-04-13 17:54:41 +02:00
Marcus Efraimsson
79d8937ce5 provisioned dashboard validation should not be made from provisioning service
Provisioned dashboard validation should not be made when creating/updating a folder or
when provisioning service are trying to provision/create/update dashboard
2018-04-13 17:45:32 +02:00
Marcus Efraimsson
4f44376564 remove comment/unused variable 2018-04-13 17:11:52 +02:00
Marcus Efraimsson
4a26797cdd Merge branch 'master' into readonly_dashboards 2018-04-13 17:03:00 +02:00
Marcus Efraimsson
48143d6caf Merge branch 'master' into docs-5.1 2018-04-13 16:40:38 +02:00
Marcus Efraimsson
511b34eb5c docs: improves provisoning example for postgres
[skip ci]
2018-04-13 16:37:49 +02:00
Marcus Efraimsson
9c492bd774 docs: add mssql provisioning example 2018-04-13 15:53:45 +02:00
Marcus Efraimsson
428d4b0dbf Merge branch 'master' into docs-5.1 2018-04-13 15:44:53 +02:00
Marcus Efraimsson
f5363227ff Merge pull request #11423 from bergquist/provisioning_datasources_examples
docs: adds provisioning examples for all datasources
2018-04-13 15:36:28 +02:00
Marcus Efraimsson
a6a45afc2b Merge branch 'master' into provisioning_datasources_examples 2018-04-13 15:25:28 +02:00
Marcus Efraimsson
14bf067263 docs: improves provisoning example for each datasource 2018-04-13 15:25:13 +02:00
Patrick O'Carroll
9ad8a77a21 ordered user orgs alphabeticaly fixes #11556 2018-04-13 14:53:36 +02:00
Marcus Efraimsson
060cd6ebef Merge branch 'master' into settings-icons-fix 2018-04-13 14:49:08 +02:00
Patrick O'Carroll
c431875f28 permissions sorting fixed + icon same size as avatrs 2018-04-13 13:50:15 +02:00
Marcus Efraimsson
f2c5417ee4 Merge branch 'master' into docs-5.1 2018-04-13 11:36:54 +02:00
Marcus Efraimsson
aa59843902 docs: update mssql with azure sql database support 2018-04-13 11:36:40 +02:00
Marcus Efraimsson
55d262655a changelog: adds note for #11569
[skip ci]
2018-04-13 11:06:57 +02:00
Marcus Efraimsson
fa95297e6a docs: update default annotation limit when querying api
Needed due to closing #11569
2018-04-13 10:58:29 +02:00
Marcus Efraimsson
80e4a9dc55 Merge branch 'master' into docs-5.1 2018-04-13 10:56:26 +02:00
Marcus Efraimsson
167d5aebe6 Merge pull request #11576 from flopp999/patch-3
change default annotation limit from 10 to 100 when querying api
2018-04-13 10:55:01 +02:00
Tobias Wolf
f143cb655a Mention the ?inactive parameter in the docs 2018-04-12 21:38:28 +02:00
Tobias Wolf
a43e7c7b3f Add another URL param «inactive» which works like «kiosk» but with title
closes #11228
2018-04-12 21:14:58 +02:00
Marcus Efraimsson
224a0eb0d3 Merge branch 'master' into sql-uint64 2018-04-12 19:12:45 +02:00
Marcus Efraimsson
a86ee304ff tsdb: remove unnecessary type casts in sql data sources macro engines 2018-04-12 19:08:35 +02:00
Marcus Efraimsson
f5586b1270 tsdb: sql data sources should handle time ranges before epoch start correctly 2018-04-12 18:53:12 +02:00
Marcus Efraimsson
a3874ce2c7 Merge branch 'master' into sql-uint64 2018-04-12 18:49:27 +02:00
flopp999
74f570fdf4 change annotation limit from 10 to 100 2018-04-12 17:38:10 +02:00
Daniel Lee
b481e1515d Merge pull request #11456 from alexanderzobnin/fix-11053
Migrating to baron scrollbar WIP
2018-04-12 14:56:04 +02:00
Alexander Zobnin
f8543fced9 remove mistakenly added styles 2018-04-12 14:29:35 +03:00
Alexander Zobnin
31e5c1fa1f Merge remote-tracking branch 'upstream/11053-remove-native-scrollbar' into 11053-remove-native-scrollbar 2018-04-12 14:23:47 +03:00
Alexander Zobnin
74c10515ad fix right side legend rendering in phantomjs 2018-04-12 14:22:19 +03:00
Carl Bergquist
be2016f46e Merge pull request #11571 from bergquist/remove-codecov
build: remove code cov
2018-04-12 11:38:00 +02:00
Daniel Lee
d4398479f5 scrollbar: fix so no overflow for legend under graph
Adds 1px of padding to the graph legend scroll div so that a non-table
legend does not get an unnecessary scroll bar.
2018-04-12 11:26:27 +02:00
bergquist
b220162b91 build: remove code cov 2018-04-12 11:26:05 +02:00
Daniel Lee
76c87d1a74 scrollbar: fixes continuation scrolling for iOS
The -webkit-overflow-scrolling is an iOS only property:

https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-overflow-scrolling

that turns on momementum/continuation scrolling for iOS devices. This means
that when swiping, the scroll continues for a half second rather than instantly
stopping the scroll when the user lifts their finger from the screen.
2018-04-12 10:53:27 +02:00
Patrick O'Carroll
229486015d added styling to fontawesome icons so they have same size as the other icons 2018-04-12 10:44:00 +02:00
Carl Bergquist
dca73b9ab6 Merge pull request #11567 from 247Sports/docs/cloudwatch-backend-iam-policy
Add minimal IAM policy example for CloudWatch data source
2018-04-12 10:23:56 +02:00
Tim O'Guin
1f0dfbbf86 Improve wording 2018-04-11 21:36:07 -05:00
Tim O'Guin
ee7943b9b2 Add minimal IAM policy example for CloudWatch data source 2018-04-11 21:29:11 -05:00
Andrzej Ressel
bff174dba9 PR comments 2018-04-11 22:59:29 +02:00
Marcus Efraimsson
1232745e89 docs: fix typo of default port for mssql
Fixes #11562
2018-04-11 20:56:16 +02:00
Marcus Efraimsson
fe4cfbeb73 Merge branch 'master' into docs-5.1 2018-04-11 20:38:09 +02:00
Marcus Efraimsson
cdcaaa5d03 minor scrollbar fixes
Hide page scrollbar when rendering using phantomjs.
Hide baron scrollbar when rendering using phantomjs.
2018-04-11 20:12:32 +02:00
Daniel Lee
db83255460 scrollbar: remove unused div
Fixes the height of the settings menu
2018-04-11 19:19:33 +02:00
Daniel Lee
e74be16900 Merge remote-tracking branch 'upstream/11053-remove-native-scrollbar' into 11053-remove-native-scrollbar 2018-04-11 18:33:00 +02:00
Marcus Efraimsson
a1b53674a9 dashboard: show baron scrollbar in dashboard panel when mouse is over
This should make the scrolling user experience much better since it
will highlight and show that content actually can be scrolled when
hovering over a panel.
2018-04-11 18:12:48 +02:00
Marcus Efraimsson
9549aadd26 fix so that page scrollbars can be scrolled by keyboard on page load
The page scrollbars are custom, not rendered on the body element and
with css property overflow set for scroll to be enabled.
For being able to scroll the page using the keyboard when a
page loads, some custom code was needed.
This fix should both work when doing a full reload of a url and when
navigating to other pages/dashboards.
For those pages having an input field that are focused on load,
scrolling by keyboard (arrow up/down) will obviously not work.
2018-04-11 17:49:40 +02:00
Marcus Efraimsson
2956011b60 fix so that dash list panel are rendered correctly
This resolves issue with dash list panel getting scrollbars
    attached to incorrect elements. Now the panel content are
    rendered correctly and all content are displayed as
    expected.
2018-04-11 17:44:51 +02:00
Marcus Efraimsson
8c04eb272d panel: add baron scroller to correct element
This resolves issue with alert list panel getting scrollbars
attached to incorrect element. Now the panel content are
rendered correctly and all content are displayed as
expected.
2018-04-11 17:41:20 +02:00
Daniel Lee
83f7ac18db Merge remote-tracking branch 'upstream/master' into 11053-remove-native-scrollbar 2018-04-11 14:32:19 +02:00
Leonard Gram
041067f5f0 Windows build updated to go1.10. 2018-04-11 14:31:23 +02:00
Daniel Lee
25ec7b5b02 scrollbar: use native scroll for page 2018-04-11 14:30:39 +02:00
Patrick O'Carroll
82aa6cf46b converted functions to arrow functions 2018-04-11 10:26:05 +02:00
Marcus Efraimsson
e73479ef33 folders: fix permissions in folder picker component
Only enable creating new folders from folder picker if user has org roles
admin or editor.
Only render General option in folder picker if user has org roles admin
or editor.
2018-04-11 00:26:16 +02:00
Marcus Efraimsson
b4863002c9 permission: fix user with org viewer save/move permissions
User with org viewer role should not be able to save/move dashboards
in/to general folder.
2018-04-11 00:23:50 +02:00
bergquist
93e1546f73 alerting: handle invalid json format
closes #11003
2018-04-10 22:22:12 +02:00
Marcus Efraimsson
be4b715aad docker: change mysql container so that it uses utc 2018-04-10 16:59:48 +02:00
Marcus Efraimsson
6cb891dca8 mysql: use a datetime column with microsecond precision in test 2018-04-10 16:37:39 +02:00
Marcus Efraimsson
97f67ddcb8 tsdb: improved floating point support when converting sql time column to epoch (ms) 2018-04-10 16:36:00 +02:00
Patrick O'Carroll
5f67d4268d added @ngInject 2018-04-10 15:48:51 +02:00
Daniel Lee
9e1a1ed572 Merge pull request #11501 from grafana/metric-segment-to-ts
migrated metric_segment to ts
2018-04-10 12:41:58 +02:00
bergquist
f424d13b53 provisioning: dont override permissions 2018-04-10 12:35:06 +02:00
bergquist
949484b949 provisioning: simplify db query
the GetProvisionedDashboardQuery wasent used for anything
else than check if a dashboard is provisioned or not. So
we simplified this query to make it more maintainable.
2018-04-10 12:30:37 +02:00
Marcus Efraimsson
9d84e6f31f mssql: fix precision for time columns in time series query mode 2018-04-10 11:10:56 +02:00
Marcus Efraimsson
0317ecbf0d postgres: support running multiple postgres integration tests
Makes it possible to run mysql integration tests for both
grafana config db and tsdb at the same time using
GRAFANA_TEST_DB=postgres go test ./pkg/...
2018-04-10 11:08:30 +02:00
Marcus Efraimsson
1783c534fd postgres: fix precision for time columns in time series query mode 2018-04-10 11:07:01 +02:00
Marcus Efraimsson
af62646624 mysql: fix precision for time columns in time series query mode 2018-04-10 11:01:43 +02:00
Marcus Efraimsson
5c120c2c11 mysql: mysql tests should use a db server with UTC
To get rid of issues involving date/time when testing.
Also, makes it possible to run mysql integration tests for both
grafana config db and tsdb at the same time using
GRAFANA_TEST_DB=mysql go test ./pkg/...
2018-04-10 10:58:45 +02:00
bergquist
0f9b592428 provisioning: fixes broken tests 2018-04-10 10:48:10 +02:00
Daniel Lee
63dab4ffe4 Merge branch 'fix-11053' of https://github.com/alexanderzobnin/grafana into alexanderzobnin-fix-11053 2018-04-10 10:33:47 +02:00
Marcus Efraimsson
a314890f89 tsdb: add support for more data types when converting sql time column to epoch (ms) 2018-04-10 10:33:23 +02:00
bergquist
77e7887e5e provisioning: check provisiong before saveCmd 2018-04-10 09:35:54 +02:00
bergquist
7845eab502 provisioning: fixes typo 2018-04-10 09:32:05 +02:00
bergquist
bcbe7a1c55 provisioning: adds error handling 2018-04-10 09:31:35 +02:00
Patrick O'Carroll
6719bdf9bd added @ngInject 2018-04-10 09:24:54 +02:00
Carl Bergquist
b610f77bd6 Merge pull request #11541 from calebtote/patch-1
Update annotations.md to contain correct annotations api path
2018-04-10 09:07:11 +02:00
Daniel Lee
c860f21052 playlist: add missing nginject attribute 2018-04-09 21:33:18 +02:00
Caleb Tote
5f47523d76 Update annotations.md to contain correct annotations api path 2018-04-09 15:09:37 -04:00
Patrick O'Carroll
77b8ccd7f5 removed console.log 2018-04-09 17:01:58 +02:00
Daniel Lee
d39dac10a6 docs: update after #11531 2018-04-09 15:19:41 +02:00
bergquist
2889a405a7 docs: improves provisoning example text 2018-04-09 14:56:42 +02:00
Daniel Lee
23ed5dfc8a Merge pull request #11531 from grafana/11391_access
Rename direct/proxy access mode to browser/server
2018-04-09 14:48:29 +02:00
ryan
1c9ebd5bd8 fix test 2018-04-09 14:01:09 +02:00
ryan
5ca972542b convert graphite epoch to ms 2018-04-09 13:58:09 +02:00
ryan
56679ac80f Merge remote-tracking branch 'grafana/master' into annotations-created
* grafana/master:
  prevent angular from evaluating {{hostname}} in tooltip (#11514)
2018-04-09 13:52:54 +02:00
ryan
920a0c4fec skip mssql fix 2018-04-09 13:49:13 +02:00
ryan
7d6c8aa612 add mssql and mysql 2018-04-09 13:34:35 +02:00
ryan
113bfb3d3e don't convert to uint64 2018-04-09 13:28:32 +02:00
Alexander Zobnin
d9ba16f550 scrollbar: fix phantomjs rendering error 2018-04-09 14:21:20 +03:00
Sven Klemm
00524e6827 prevent angular from evaluating {{hostname}} in tooltip (#11514) 2018-04-09 12:51:17 +02:00
ryan
60816f5fc2 using millis for annotations too 2018-04-09 12:48:01 +02:00
Marcus Efraimsson
95132165f8 data source: rename direct/proxy access mode in data source settings
Changes access drop down options names:
- proxy -> Server (Default)
- direct -> Browser
Replace access drop down info icon/tooltip with expandable/collapsable
help section.
2018-04-09 12:47:19 +02:00
ryan
39f37ff8aa Merge remote-tracking branch 'grafana/master' into annotations-created
* grafana/master:
  docs: updated debian distro in install docs to stretch, closes #11527
  css: quick fix after IE11 changes
  fixed sidemenu icon issue created by earlier pr
  changelog: adds note for #11165
  migrated dash_class to ts
  migrated segment_srv to ts
  removed indent for manage dashboards
  created closeDropdown function, renamed appevent, added second appevent for open timepicker
  added if to onAppevent, renamed appevent, add appevent to applyCustom and setRelativeFilter
  docker: add users and groups to ldap block
  timepicker now closes without exiting edit/view mode, close order: modal, timepicker, view
  bounnd the esc key to exit timepicker
  added indent to dashboards inside folder in search dropdown, and added indent to dashboard icon in search item
2018-04-09 12:31:44 +02:00
Aleksei Magusev
92e5968f91 Fix ResponseParser for InfluxDB to return only string values 2018-04-09 11:52:12 +02:00
Aleksei Magusev
a101177b55 Conditionally select a field to return in ResponseParser for InfluxDB
This patch also fixes "value[1] || value[0]" to not ignore zeros.
2018-04-09 11:51:22 +02:00
bergquist
25be937bfa docs: fixes typo 2018-04-09 09:55:10 +02:00
Torkel Ödegaard
d60c7b2013 docs: updated debian distro in install docs to stretch, closes #11527 2018-04-09 08:18:58 +02:00
Penghan Wang
fbed72c89c Merge branch 'master' into feature/add_es_alerting 2018-04-09 14:00:28 +08:00
Andrzej Ressel
c4b57a2562 Revert files 2018-04-08 20:40:09 +02:00
Andrzej Ressel
cfd1f5c072 Revert files 2018-04-08 20:38:08 +02:00
Andrzej Ressel
697a3eaa43 Fix after merge 2018-04-08 20:31:17 +02:00
Andrzej Ressel
30f048965c Merge branch 'master' into feature/discord 2018-04-08 20:09:56 +02:00
Andrzej Ressel
dc11f1da81 Make dashboard JSON editable 2018-04-08 20:00:18 +02:00
Marcus Efraimsson
f3e1557761 guardian: when updating permissions should verify existing permissions
Before in CheckPermissionBeforeUpdate, access was verified for updated
permissions. Now access is verified for existing permissions.
Refactored guardian tests to cover more test cases for org admin, editor
and viewer roles
2018-04-08 15:06:22 +02:00
Marcus Efraimsson
84d034c688 api: allow authenticated users to search current org users and teams
Any authenticated user of an organization should be able to
- search its organization's users
- search its organization's users
- retrieve a single user of its organization (this how it was
  implemented earlier)
2018-04-07 10:39:28 +02:00
Daniel Lee
ce787b88bf css: quick fix after IE11 changes
Temporary fix so that the add panel panel works properly. This will
break a3f15ced68.
2018-04-06 21:29:42 +02:00
Alexander Zobnin
41e5d66e39 scrollbar: fix add panel height bug 2018-04-06 20:31:44 +03:00
Alexander Zobnin
d3d64337b4 scrollbar: styles cleanup 2018-04-06 20:00:03 +03:00
Daniel Lee
817b8d3946 Merge pull request #11511 from grafana/side-menu-icon-fix
fixed sidemenu icon issue created by earlier pr
2018-04-06 17:53:50 +02:00
Daniel Lee
3fd9c787cf Merge pull request #11497 from grafana/dash-class-to-ts
migrated dash_class to ts
2018-04-06 17:48:18 +02:00
Patrick O'Carroll
c7cd754a94 migrating to ts 2018-04-06 15:02:32 +02:00
Daniel Lee
51148709bb Merge pull request #11496 from grafana/segment-srv-to-ts
migrated segment_srv to ts
2018-04-06 11:18:51 +02:00
Patrick O'Carroll
6d6ecbd458 fixed sidemenu icon issue created by earlier pr 2018-04-06 10:54:06 +02:00
Patrick O'Carroll
0203e7afd5 Merge branch 'dashboard-acl-ux2' of github.com:grafana/grafana into dashboard-acl-ux2 2018-04-06 09:50:36 +02:00
Patrick O'Carroll
b363e160d9 added icons for viewer and editor, fixed add permission team avatar 2018-04-06 09:43:59 +02:00
Daniel Lee
4ac290215e Merge branch 'fix-11053' of https://github.com/alexanderzobnin/grafana into alexanderzobnin-fix-11053 2018-04-05 22:30:13 +02:00
Jonas Hahnfeld
dfccabab75 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.
2018-04-05 20:59:11 +02:00
Jonas Hahnfeld
e3dbef755a 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).
2018-04-05 20:53:22 +02:00
Marcus Efraimsson
f619dd579e provisioning: fix tests for save provisioned dashboard modal 2018-04-05 20:51:47 +02:00
Marcus Efraimsson
6bbeb723ca Merge branch 'master' into readonly_dashboards 2018-04-05 20:30:27 +02:00
Marcus Efraimsson
bcdb3ec84d provisioning: ux fixes when saving provisioned dashboards
Wider modal.
Tried to improve provisioning description text.
Code editor for json.
Button that allows to save the json to a file.
2018-04-05 20:28:04 +02:00
Marcus Efraimsson
4cc80efee6 graphite: use a query when testing data source
Using a query (POST /render) request instead of GET /metrics/find to better
mimic an actual request for rendering a panel in a dashboard. The POST /render
request will add at least a custom http header which can be problematic when
using direct access mode since it will trigger a CORS prerequest check. By
doing this kind of query when testing the data source possible CORS issues
can be detected there instead of later when trying to use the data source
in a dashboard.
2018-04-05 18:11:35 +02:00
Patrick O'Carroll
35bc4e4632 migrated metric_segment to ts 2018-04-05 17:10:32 +02:00
Alexander Zobnin
9f07ae72ee scrollbar: fix search scroller in mobile view 2018-04-05 16:47:20 +03:00
Alexander Zobnin
d6233714d2 Merge remote-tracking branch 'upstream/master' into fix-11053 2018-04-05 16:30:46 +03:00
Marcus Efraimsson
166778b32a Merge pull request #11439 from grafana/ldap-block
docker: add users and groups to ldap block
2018-04-05 15:30:11 +02:00
Alexander Zobnin
fa43782299 scrollbar: fix graph legend height 2018-04-05 16:28:12 +03:00
Marcus Efraimsson
94d1a9fd83 Merge pull request #11430 from grafana/11332_esc_timepicker
Enable closing timepicker using escape key
2018-04-05 15:11:34 +02:00
Daniel Lee
fcfc33ee57 changelog: adds note for #11165 2018-04-05 15:02:54 +02:00
Patrick O'Carroll
714d555e36 migrated dash_class to ts 2018-04-05 14:33:27 +02:00
Patrick O'Carroll
7083e8a0a9 migrated segment_srv to ts 2018-04-05 14:09:32 +02:00
Daniel Lee
32b833e488 Merge pull request #11271 from grafana/11073_dashboard_folder_indent
added indent to dashboards inside folder in search dropdown…
2018-04-05 11:12:17 +02:00
Patrick O'Carroll
b321a21cb5 removed indent for manage dashboards 2018-04-05 11:00:15 +02:00
Alexander Zobnin
b4ef55f5d0 scrollbar: fix potential memory leaks in event handlers 2018-04-05 11:51:32 +03:00
ryan
66d020eb7e skip migration if it is a big number 2018-04-05 09:51:08 +02:00
ryan
392c47f39b Merge remote-tracking branch 'grafana/master' into annotations-created
* grafana/master: (51 commits)
  Use curly brackets around hyperlink help text #11478 (#11479)
  migrated playlist-routes to ts
  migrated last all.js to ts
  Notes for closing #7119
  changelog: adds note for #11128
  variables: adds test for variable sorting
  Add case-insensitive sort for variables.
  graphite: fixes #11434
  settings: fixes test
  changed from margin to padding
  changed variable for tabbed close btn hover, and changed text-strong variable for lighttheme, removed commented out variable
  mssql: typos in help sections
  Webpack Grafana plugin template project to links (#11457)
  rm panel.type  constrain from threshold_mapper.ts (#11448)
  No need for node_modules/bin in npm run-script (#11449)
  changelog: adds note about closing #11555
  add article
  fix some typos
  migrated graph_tooltip to ts
  started migration to ts
  ...
2018-04-05 09:48:00 +02:00
Daniel Lee
088720cf2b Merge pull request #11417 from grafana/ie11_alerting_style_fix
removed padding for icons and added margin
2018-04-04 23:24:41 +02:00
Daniel Lee
2d1f2f3636 Merge pull request #11480 from grafana/graph_tooltip_to_ts
Graph tooltip to ts
2018-04-04 23:03:31 +02:00
Daniel Lee
28849bbd57 Merge pull request #11481 from grafana/all-js-to-ts
migrated last all.js to ts
2018-04-04 22:09:10 +02:00
Daniel Lee
dc4cb0d565 Merge pull request #11483 from grafana/playlist-routes-to-ts
migrated playlist-routes to ts
2018-04-04 22:02:02 +02:00
Jarno Tuovinen
90aab44558 Use curly brackets around hyperlink help text #11478 (#11479) 2018-04-04 20:07:22 +02:00
Alexander Zobnin
b69316752a scrollbar: fix dashboard width updating for different modes 2018-04-04 19:51:12 +03:00
Daniel Lee
eef3120aed Merge branch 'fix-11053' of https://github.com/alexanderzobnin/grafana into alexanderzobnin-fix-11053 2018-04-04 18:32:18 +02:00
Alexander Zobnin
175937a679 scrollbar: remove perfect-scrollbar and add baron to package list 2018-04-04 19:26:29 +03:00
Alexander Zobnin
4df4249aea scrollbar: fix dashboard width bug 2018-04-04 19:22:07 +03:00
Alexander Zobnin
6b598f34cd scrollbar: fix 'legendScrollbar.destroy is not a function' error 2018-04-04 19:00:28 +03:00
Marcel Anacker
64c16eb912 Alerting: Fixing mobile notifications in Microsoft Teams 2018-04-04 16:28:12 +02:00
Patrick O'Carroll
0273365df3 created closeDropdown function, renamed appevent, added second appevent for open timepicker 2018-04-04 16:20:01 +02:00
Marcus Efraimsson
8f94cecf0f permissions: return user and team avatar in folder permissions api 2018-04-04 15:51:19 +02:00
Marcus Efraimsson
ebad863f95 permission: generate team avatar url with default 2018-04-04 15:50:45 +02:00
Patrick O'Carroll
84dce3282a migrated playlist-routes to ts 2018-04-04 15:26:23 +02:00
Daniel Lee
eea2369987 Merge branch 'fix-11053' of https://github.com/alexanderzobnin/grafana into alexanderzobnin-fix-11053 2018-04-04 14:25:54 +02:00
Patrick O'Carroll
13f6d3be87 migrated last all.js to ts 2018-04-04 14:16:39 +02:00
Alexander Zobnin
a265c77cf9 scrollbar: fix Firefox scroll position restore 2018-04-04 14:51:46 +03:00
Marcus Efraimsson
9841c81952 Notes for closing #7119
[skip ci]
2018-04-04 13:40:08 +02:00
Daniel Lee
4b1c1acab4 changelog: adds note for #11128 2018-04-03 22:40:48 +02:00
Daniel Lee
70eb281840 variables: adds test for variable sorting
ref #11280
2018-04-03 22:34:16 +02:00
Chris Ross
4a93766143 Add case-insensitive sort for variables. 2018-04-03 22:24:21 +02:00
Daniel Lee
a6c7635528 graphite: fixes #11434 2018-04-03 19:39:50 +02:00
Daniel Lee
533f3a9e8c settings: fixes test
For some reason, the url parse does not fail anymore for curly
braces. Add a colon in the first segment to make sure the url
parse fails.
2018-04-03 19:09:49 +02:00
Daniel Lee
1f3602c7dd Merge pull request #11428 from bergquist/11281_fix
Avoid panic when GF_DATABASE_URL contains illegal chars
2018-04-03 16:59:25 +02:00
Daniel Lee
a6a08038d4 Merge pull request #11416 from grafana/ie11_graphpanel_edit
Graphpanel Edit fix for IE11
2018-04-03 15:44:54 +02:00
Patrick O'Carroll
658c6a8ff4 changed from margin to padding 2018-04-03 15:43:25 +02:00
Patrick O'Carroll
8b076d921f fixes for avatar on adding permission and size for gicon 2018-04-03 15:20:39 +02:00
Daniel Lee
1a6c632264 Merge pull request #11396 from grafana/ie11_search_and_popup
fixed alignment in search + fixed issue ie popup
2018-04-03 15:06:08 +02:00
Daniel Lee
cdc0b04840 Merge pull request #11393 from grafana/ie_sidemenu
sidemenu fix for internet explorer 11,
2018-04-03 15:00:25 +02:00
Daniel Lee
6bc5896b3a Merge pull request #11381 from grafana/ie11_login
styled login page for ie11
2018-04-03 14:35:12 +02:00
Alexander Zobnin
3fcd262711 scrollbar: fix side menu on mobile devices 2018-04-03 14:48:48 +03:00
Daniel Lee
ebbbf170f1 Merge pull request #11463 from grafana/tabbed-close-btn-hover
Fix for tabbed-view btn in light theme
2018-04-03 10:31:14 +02:00
Patrick O'Carroll
feb222f633 changed variable for tabbed close btn hover, and changed text-strong variable for lighttheme, removed commented out variable 2018-04-03 09:53:14 +02:00
Daniel Lee
3fc2e53081 Merge branch 'fix-11053' of https://github.com/alexanderzobnin/grafana into alexanderzobnin-fix-11053 2018-04-03 09:52:31 +02:00
Daniel Lee
8b2441e098 mssql: typos in help sections
Fixes #11455
2018-04-03 09:51:29 +02:00
Daniel Lee
51b078fb65 docs: spelling 2018-04-03 09:47:53 +02:00
Patrick O'Carroll
98e1404fed added if to onAppevent, renamed appevent, add appevent to applyCustom and setRelativeFilter 2018-04-03 09:39:46 +02:00
Alexey Velikiy
6320bdf393 Webpack Grafana plugin template project to links (#11457) 2018-04-03 06:21:36 +02:00
Alexander Zobnin
7b75b251b1 scrollbar: fix Firefox issue (white stripe on the right of scrollbar) 2018-04-02 21:15:10 +03:00
Alexander Zobnin
efaf267deb scrollbar: fix legend rendering issues 2018-04-02 20:47:09 +03:00
Alexander Zobnin
77d2ee9add Initially move to baron scrollbar 2018-04-02 14:59:49 +03:00
Alexey Velikiy
00f67ea7c7 rm panel.type constrain from threshold_mapper.ts (#11448) 2018-04-02 08:13:22 +02:00
Alexey Velikiy
13deb891f3 No need for node_modules/bin in npm run-script (#11449)
how run-script works: https://docs.npmjs.com/cli/run-script
2018-04-02 08:09:10 +02:00
Carl Bergquist
880293eea1 Merge pull request #11445 from svenklemm/docs-dashboard
docs: fix some typos in dashboard docs
2018-03-30 20:41:31 +02:00
bergquist
4538ffc0e8 changelog: adds note about closing #11555 2018-03-30 20:30:57 +02:00
Carl Bergquist
375cc8de8f Merge pull request #11399 from roidelapluie/promba
Fix #10555 #6888 Backslash in Prometheus variables
2018-03-30 20:26:08 +02:00
Sven Klemm
2bdcebb5b1 add article 2018-03-30 16:47:51 +02:00
Sven Klemm
cb156ee30b fix some typos 2018-03-30 16:42:48 +02:00
Daniel Lee
de6cd7ed0b docker: add users and groups to ldap block 2018-03-30 10:09:36 +02:00
Patrick O'Carroll
9ef5f2700d timepicker now closes without exiting edit/view mode, close order: modal, timepicker, view 2018-03-29 15:02:00 +02:00
Patrick O'Carroll
7b9b34c6e1 migrated graph_tooltip to ts 2018-03-29 11:51:34 +02:00
Daniel Lee
32264c61c4 Merge branch 'master' into dashboard-acl-ux2 2018-03-29 11:32:24 +02:00
Patrick O'Carroll
65f7c5f08f started migration to ts 2018-03-29 10:40:45 +02:00
Julien Pivotto
1f1719c498 Fix #10555 #6888 Better escape for Prometheus variables
Prior this commit, C:\bar was escaped C:\\\bar. Should be C:\\\\bar.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2018-03-29 09:49:15 +02:00
Patrick O'Carroll
8195c085fa bounnd the esc key to exit timepicker 2018-03-29 09:15:15 +02:00
bergquist
45d9bfca97 print to stderr since logger might not exist 2018-03-28 22:51:21 +02:00
bergquist
2ccbf12d1c settings: return error instead of ignoring it
closes #11281
2018-03-28 22:32:58 +02:00
bergquist
d95eabfeec docs: adds provisioning examples for all datasources
closes #11363
2018-03-28 17:39:00 +02:00
Marcus Efraimsson
b41370ca49 Merge pull request #11421 from this-is-angus/patch-1
Fixed typo in upgrading.md
2018-03-28 16:37:50 +02:00
Angus Burroughs
e645c51f7c Fixed typo in upgrading.md
Line 26: 'you' to 'your' in "make a backup of you 'grafana.db'"
2018-03-28 16:26:15 +02:00
Daniel Lee
86776154cc docs: rpm install page - update to centos 7 2018-03-28 15:35:51 +02:00
Daniel Lee
485d0f1c95 docs: install pages for v5.0.4 2018-03-28 15:19:46 +02:00
Patrick O'Carroll
d40b7433ea removed padding for icons and added margin 2018-03-28 15:06:20 +02:00
Daniel Lee
33bd979494 changelog: another update for v5.0.4 2018-03-28 14:57:11 +02:00
Daniel Lee
b1d3535cbb changelog: update for v5.0.4 2018-03-28 14:50:27 +02:00
bergquist
df89be4de9 changelog: adds note about closing issues 2018-03-28 14:21:10 +02:00
Carl Bergquist
0a1bc53f3a Merge pull request #11406 from bergquist/gomail
tech: migrates to none deprecated mail lib
2018-03-28 14:19:39 +02:00
Patrick O'Carroll
a3f15ced68 fixed graphpanel editmode and custom width for right side legend for IE11 2018-03-28 14:19:17 +02:00
Carl Bergquist
f009443a6f Merge pull request #11330 from digineo/auth-ipv6
Support IPv6 in Auth proxy white list
2018-03-28 14:17:43 +02:00
Daniel Lee
4b6fd675e2 Merge pull request #11390 from bergquist/notifiers_default_value
Default value for uploading images in alert notifiers
2018-03-28 13:06:09 +02:00
Carl Bergquist
d37e8df991 Merge pull request #11412 from tettaji/variable-docs
Clarified formatting multiple values doc
2018-03-28 13:01:12 +02:00
Daniel Lee
208cbd1189 Merge pull request #11405 from bergquist/alert_link
alert: fixes broken link back to grafana
2018-03-28 13:00:32 +02:00
Carl Bergquist
36adce17df Merge pull request #11411 from grafana/11247-save-alerts
dashboard: allow alerts to be saved for new/provisioned dashboards
2018-03-28 12:59:14 +02:00
bergquist
d29563ff8e alerting: bad default state for notifiers
when we made image upload optional we didnt
show the default value properly in the UI. Which
caused confusing. This commit apply the default
values to existing notifiers in the edit pages
and reverts back to using uploadimage=true as the
default value.
2018-03-28 12:52:39 +02:00
Tariq Ettaji
8985e5ac53 Clarified formatting multiple values doc 2018-03-28 12:51:12 +02:00
Daniel Lee
68833fa978 dashboard: allow alerts to be saved for new/provisioned dashboards
This changes the logic for the alert validation in the extractor. Validation
is executed twice, once before attempting to save the alerts and once after
saving the dashboard while saving the alerts to the db. The first validation
will not require that the alert has a dashboard id which allows new dashboards
with alerts to be saved.

Fixes #11247
2018-03-28 11:32:05 +02:00
wph95
4050fce220 add response_parser test 2018-03-28 12:35:05 +08:00
bergquist
9e2e6fc586 add fallback for gravatar in org/admin view
closes #11095
2018-03-27 22:52:29 +02:00
bergquist
f2755982c3 tech: migrates to none deprecated mail lib
gomail is missing a maintainer so we are
switching to an active fork

ref https://github.com/go-gomail/gomail/issues/108

closes #7189
2018-03-27 21:53:46 +02:00
bergquist
2743e8be20 docs: not about email notifications and local img store
cloes #11054
2018-03-27 21:21:38 +02:00
bergquist
5596707531 alert: fixes broken link back to grafana
If Grafana was configured to use a subpath it
was included twice in the link from the
alert notification back to Grafana.

closes #11403
2018-03-27 20:26:51 +02:00
Marcus Efraimsson
828dd34507 docs: update table plugin documentation with value/range to text mapping 2018-03-27 20:18:04 +02:00
wph95
06f7332156 cleanup and add more test 2018-03-28 01:42:25 +08:00
Marcus Efraimsson
95a4d61d10 Merge pull request #11094 from infernix:value-to-text-upstream 2018-03-27 19:06:40 +02:00
Marcus Efraimsson
f673ec16d1 table panel: additional fixes for value to text mapping
Make the value to text mapping more similar to singlestat solution.
Adds more tests.
Also, allows string to be mapped to other string besides numeric values.
2018-03-27 19:04:45 +02:00
aandrew
67f0382222 add value to text mapping 2018-03-27 19:00:22 +02:00
bergquist
7f5c2ebdd1 provisioning: better description for provisioned save modal 2018-03-27 15:19:20 +02:00
bergquist
627df67992 dashboards: reject updates of provisioned dashboards 2018-03-27 15:12:47 +02:00
Leonard Gram
a40e209a91 Merge pull request #11379 from bergquist/provisioning_override_id
provisioning: removes id from dashboard.json
2018-03-27 14:57:00 +02:00
Marcus Efraimsson
52164b0685 notes about closing #9210
[skip ci]
2018-03-27 14:13:49 +02:00
Marcus Efraimsson
c9cdb4cda0 Merge pull request #11383 from alexanderzobnin/docs-10009
Update heatmap and prometheus docs
2018-03-27 14:01:36 +02:00
Marcus Efraimsson
41ff37f0a1 Merge branch 'master' into docs-5.1 2018-03-27 14:00:16 +02:00
Patrick O'Carroll
d4be953d23 fixed alignment in search + fixed issue ie popup 2018-03-27 12:36:13 +02:00
bergquist
e622d5582b changelog: adds note about closing #11102 2018-03-27 10:56:19 +02:00
Patrick O'Carroll
dbcba4a009 sidemenu fix for internet explorer 11, changed icon width/height to pixels and added height to logo 2018-03-27 10:41:47 +02:00
Carl Bergquist
cdf4664930 Merge pull request #11371 from towolf/add-duplicate-panel-hints
Add hints for the 'pd' Duplicate Panel command from PR #11264
2018-03-27 10:35:41 +02:00
Carl Bergquist
44eb33265c Merge pull request #11384 from Rohlik/patch-1
Add new currency - Czech koruna
2018-03-27 09:59:16 +02:00
Alexander Zobnin
2c7040c246 docs: prometheus ds, remove "new in v4.3" note 2018-03-27 09:48:19 +03:00
wph95
4042e4b225 fix a terms bug and add test 2018-03-27 02:12:43 +08:00
Thomas Rohlik
bf4273b584 Add new currency - Czech koruna
Currency used in Czech republic.
2018-03-26 16:34:49 +02:00
Alexander Zobnin
b97cede054 docs: update heatmap and prometheus docs, #10009 2018-03-26 17:12:25 +03:00
bergquist
d6faa3d06f provisioning: improve UX when saving provisioned dashboards 2018-03-26 15:08:46 +02:00
Patrick O'Carroll
ff62036f15 styled login page for ie11 2018-03-26 14:14:57 +02:00
Penghan Wang
a21afbe9a6 Merge branch 'master' into feature/add_es_alerting 2018-03-26 19:51:03 +08:00
wph95
63a200686e - pipeline aggs support
- add some test
2018-03-26 19:48:57 +08:00
bergquist
b61bc72e2a provisioning: removes id from dashboard.json
if dashboard json files contains `id` we
will just remove it form the dashboard model
before importing it into the database.

closes #11138
2018-03-26 13:17:39 +02:00
wph95
d6cdc2497c Handle Interval Date Format similar to the JS variant
7e14e272fa
2018-03-26 16:13:14 +08:00
Julian Kornberger
391868c5d6 Use net.SplitHostPort to support IPv6
- Add some tests
- Make error message more helpful
2018-03-26 02:48:25 +02:00
Carl Bergquist
a20f3d196c Merge pull request #11375 from svenklemm/graphite_docs
doc: add missing word to graphite docs
2018-03-25 21:20:41 +02:00
Sven Klemm
f2249a5bcc add missing word to graphite docs 2018-03-25 15:49:06 +02:00
wph95
1e275d0cd1 set right series name
Signed-off-by: wph95 <wph657856467@gmail.com>
2018-03-25 02:18:28 +08:00
Tobias Wolf
03b2561af2 Missed the 'p d' hint in the popup-menu 2018-03-24 14:49:06 +01:00
Tobias Wolf
02f84e0c74 Add hints for the 'pd' Duplicate Panel command from PR #11264 2018-03-24 14:41:41 +01:00
ryan
71ef9b6db5 Merge remote-tracking branch 'grafana/master' into annotations-created
* grafana/master: (26 commits)
  notes about closing #11306
  cleanup
  changelog: unix socket permissions
  Adjust permissions of unix socket
  docs: tweaks
  changelog: adds note about closing #5855
  legend: small refactoring
  Make golint happier
  mysql: skip tests by default
  mssql: update query editor help
  mysql: fix precision for the time column in table/annotation query mode
  postgres: fix precision for the time column in table/annotation query mode
  mssql: fix precision for the time column in table/annotation query mode
  mssql: remove UTC conversion in macro functions
  mssql: fix timeGroup macro so that it properly creates correct groups
  small screen legend right also work like legend under in render + set scrollbar to undefined in destroyScrollbar so it doesnt become disabled when toggeling between right and under
  fixed so legend right works like legend under on small screens
  Alerting: move getNewState to EvalContext
  graphite: adds more traces for alerting
  sql datasource: extract common logic for converting time column to epoch time in ms
  ...
2018-03-24 11:39:35 +01:00
ryan
eabcbcda88 remove README changes 2018-03-24 11:39:20 +01:00
wph95
bc5b59737c finished CODING PHASE 1
Signed-off-by: wph95 <wph657856467@gmail.com>
2018-03-24 13:06:21 +08:00
Carl Bergquist
980e078222 Merge pull request #11326 from bergquist/more_traces
dataproxy: adds dashboardid and panelid as tags
2018-03-23 17:13:15 +01:00
wph95
8e7d23cdeb wip
Signed-off-by: wph95 <wph657856467@gmail.com>
2018-03-23 23:50:16 +08:00
Marcus Efraimsson
da83964a7e notes about closing #11306
[skip ci]
2018-03-23 16:41:08 +01:00
Leonard Gram
f223e99875 cleanup 2018-03-23 16:25:20 +01:00
Patrick O'Carroll
bd7964d549 Merge pull request #11367 from grafana/graph_51_docs
Update graph panel documentation
2018-03-23 16:21:39 +01:00
Penghan Wang
fa72c4fea4 Merge pull request #1 from grafana/master
upgrade from grafana/grafana
2018-03-23 23:18:27 +08:00
Leonard Gram
97fa5361ff changelog: unix socket permissions 2018-03-23 16:13:59 +01:00
Julian Kornberger
6f363153d7 Adjust permissions of unix socket
fixes #8358
2018-03-23 16:09:04 +01:00
Marcus Efraimsson
13d0bd5815 Merge branch 'docs-5.1' into graph_51_docs 2018-03-23 15:51:32 +01:00
Marcus Efraimsson
0a487c484d docs: fix typos 2018-03-23 15:49:54 +01:00
Marcus Efraimsson
403c64ab20 docs: update postgres, mysql and mssql documentation
Due to changes closing #11306
2018-03-23 15:48:04 +01:00
Marcus Efraimsson
c318f7bb31 Merge branch 'master' into docs-5.1 2018-03-23 15:15:57 +01:00
Marcus Efraimsson
1b8103f0ea docs: update graph panel documentation
Added new versions of images and new images to better highlight the possible
configuration options.
Documentation was very outdated so tried to fix that to better reflect the
current state/latest release.
2018-03-23 14:43:57 +01:00
Daniel Lee
e84f746d1d Merge pull request #11348 from grafana/11306-sql-table-time
Postgres, MySQL, MSSQL minor refactoring/unification
2018-03-23 14:23:31 +01:00
Carl Bergquist
8d7fa644de Merge pull request #11352 from digineo/golint
Make golint happier
2018-03-23 13:35:11 +01:00
Daniel Lee
7b141280e5 docs: tweaks 2018-03-23 13:31:02 +01:00
bergquist
e2ba6fbb00 changelog: adds note about closing #5855 2018-03-23 13:20:02 +01:00
Carl Bergquist
8db09d7556 Merge pull request #11290 from Thib17/retry
Alerting: Add retry mechanism
2018-03-23 13:17:24 +01:00
ryan
7defb1adf5 remove dashboardId check... i can't figure out how the tests work 2018-03-23 12:54:53 +01:00
Daniel Lee
78d314a9c1 Merge pull request #11140 from grafana/11131_right_legend_responsive
added media breakpoint to legend-right
2018-03-23 12:49:35 +01:00
ryan
e92ea79524 get circle to run tests again 2018-03-23 12:48:03 +01:00
ryan
2116152295 add dashboardId to test 2018-03-23 12:35:39 +01:00
ryan
a58b4ff2d6 remove api tests 2018-03-23 12:13:38 +01:00
ryan
14b737e662 update CHANGELOG 2018-03-23 12:08:32 +01:00
ryan
b39fb7fdd5 fix operator 2018-03-23 12:01:21 +01:00
ryan
a0a6fa6fa5 remove constraint from sqlstore 2018-03-23 11:47:07 +01:00
ryan
a5588b6957 Merge remote-tracking branch 'origin/annotations-created' into annotations-created
* origin/annotations-created:
  dooh
2018-03-23 11:44:21 +01:00
ryan
4ed1ec5174 Merge remote-tracking branch 'grafana/master' into annotations-created
* grafana/master: (30 commits)
  changelog: adds note about closing #11278
  docs: spelling
  docs: add intro paragraph to provisioning page
  Cleanup CircleCI V2 Conversion
  changelog: notes for #1271 and #2740
  graph: minor fixes to y-axes alignment feature
  added save icon to save buttons
  removed trash can icon from save buttons
  Return actual user ID in UserProfileDTO
  dashboard version cleanup: more tests and refactor
  minor refactor of dashboard version cleanup
  refactor: dashboard version cleanup
  limit number of rows deleted by dashboard version cleanup
  fix dashboard version cleanup on large datasets
  Allocated to a separate alignment block. Replaced the attribute of the second axis by the attribute of the axes.
  Fixed unit test.
  Changed the way this feature was activated. And changed tolltip.
  Added validation of input parameters.
  Resolved conflict
  Corrected work for graphs created before this feature.
  ...
2018-03-23 11:38:43 +01:00
ryan
db92a96067 move dashboard error to API (not sql) 2018-03-23 11:36:44 +01:00
Daniel Lee
4f38d237cb legend: small refactoring 2018-03-23 11:08:24 +01:00
bergquist
09df38d9f4 changelog: adds note about closing #11278 2018-03-23 11:01:32 +01:00
Carl Bergquist
f0d77804da Merge pull request #11329 from alexanderzobnin/fix-11278
fix dashboard version cleanup on large datasets
2018-03-23 10:53:51 +01:00
Marcus Efraimsson
1d515bb52c Merge branch 'master' into docs-5.1 2018-03-23 10:40:12 +01:00
Carl Bergquist
d29116d8ff Merge pull request #11346 from infernix/fix-api-user-id
Return actual user ID in UserProfileDTO
2018-03-23 10:36:47 +01:00
Carl Bergquist
113888d6aa Merge pull request #11357 from tylerauerbeck/update_circleciv2
Cleanup CircleCI V2 Conversion
2018-03-23 10:29:37 +01:00
Daniel Lee
1c1d962bb1 docs: spelling 2018-03-23 09:04:50 +01:00
Daniel Lee
ccfe9de014 docs: add intro paragraph to provisioning page 2018-03-23 08:55:11 +01:00
Tyler Auerbeck
6f0eb94d46 Cleanup CircleCI V2 Conversion 2018-03-23 02:14:12 -04:00
Julian Kornberger
0a415c50d0 Make golint happier 2018-03-22 22:38:44 +01:00
Ryan McKinley
164ddb16c9 dooh 2018-03-22 20:48:40 +01:00
ryan
0c7294593c update the updated column! 2018-03-22 20:05:04 +01:00
ryan
d554c6f9be using circle as my tester 2018-03-22 19:44:47 +01:00
ryan
fa021b547a using circle as my tester 2018-03-22 19:39:30 +01:00
ryan
db91033b6e adding tests, but they arent running locally 2018-03-22 19:33:33 +01:00
Marcus Efraimsson
63465fd556 changelog: notes for #1271 and #2740
[skip ci]
2018-03-22 19:19:56 +01:00
Marcus Efraimsson
1ee0d1c296 Merge pull request #10994 from ilgizar/1271_share_zero 2018-03-22 18:34:38 +01:00
Marcus Efraimsson
f04a5d7329 Merge branch 'master' into 1271_share_zero 2018-03-22 18:31:37 +01:00
Marcus Efraimsson
c672e44d35 graph: minor fixes to y-axes alignment feature 2018-03-22 18:30:23 +01:00
Marcus Efraimsson
4af3a7875a Merge pull request #11349 from grafana/save_trash
Fix save icon in folder settings
2018-03-22 18:21:28 +01:00
Patrick O'Carroll
99626b8e07 added save icon to save buttons 2018-03-22 17:04:00 +01:00
Marcus Efraimsson
2e8aeffc13 Merge branch 'master' into 1271_share_zero 2018-03-22 16:59:36 +01:00
Patrick O'Carroll
823f903048 removed trash can icon from save buttons 2018-03-22 16:59:06 +01:00
Marcus Efraimsson
b818e9f619 Merge branch 'master' into 11306-sql-table-time 2018-03-22 16:45:33 +01:00
Marcus Efraimsson
f0f41c2a8e mysql: skip tests by default 2018-03-22 16:44:55 +01:00
Gerben Meijer
e722732021 Return actual user ID in UserProfileDTO
This fixes calls to /api/user where ID is currently always 0
2018-03-22 16:30:04 +01:00
ryan
20353db966 convert epoch to milliseconds 2018-03-22 16:21:47 +01:00
ryan
a2bbd89a9e adding updated column 2018-03-22 15:52:09 +01:00
Marcus Efraimsson
bd4ecaeac6 mssql: update query editor help 2018-03-22 15:46:40 +01:00
Marcus Efraimsson
f5654f88e2 mysql: fix precision for the time column in table/annotation query mode
Use the ConvertSqlTimeColumnToEpochMs function to convert any native
datetime data type or epoch time (millisecond precision).
Refactored mysql implementation to make it more similar to postgres
and mssql implementations.
Added $__timeEpoch macro function with same implementation as $__time.
Added possibility to use a time column named time in addition to
the currectly supported time_sec.
Additional tests and update of existing.
Added test dashboard.
2018-03-22 15:40:46 +01:00
Marcus Efraimsson
66c03f84f5 postgres: fix precision for the time column in table/annotation query mode
Use the ConvertSqlTimeColumnToEpochMs function to convert any native
datetime data type or epoch time (millisecond precision).
Additional tests and update of existing due to timezone issues
running postgres on UTC and dev environment on non-utc.
Added test dashboard.
2018-03-22 15:32:33 +01:00
Marcus Efraimsson
b69ebee066 mssql: fix precision for the time column in table/annotation query mode
Use the ConvertSqlTimeColumnToEpochMs function to convert any native
datetime data type or epoch time (millisecond precision).
Additional tests and update of existing due to timezone issues
running MSSQL on UTC and dev environment on non-utc.
Update stored procedures test to handle more parameters.
Update test dashboard.
2018-03-22 15:23:12 +01:00
ryan
df94b380f4 Merge remote-tracking branch 'grafana/master' into annotations-created
* grafana/master:
  Make golint happier
2018-03-22 14:59:14 +01:00
Marcus Efraimsson
b0076d4f65 mssql: remove UTC conversion in macro functions
Removes the macro function . Macro functions should not do UTC/timezone conversion - they should
work in the same way as postgres and mysql datasource implementations.
Grafana and Microsft SQL Server should be run on servers with UTC timezones.
2018-03-22 14:55:44 +01:00
Marcus Efraimsson
3ccadff800 mssql: fix timeGroup macro so that it properly creates correct groups
Earlier the division of interval was done using whole numbers resulting in that important information
was lost/too many time series merged to the same group. Now using division of floating point and rounding
up to solve the problem
2018-03-22 14:49:40 +01:00
Patrick O'Carroll
4916826364 small screen legend right also work like legend under in render + set scrollbar to undefined in destroyScrollbar so it doesnt become disabled when toggeling between right and under 2018-03-22 14:39:13 +01:00
Carl Bergquist
22fffe0dda Merge pull request #11337 from digineo/golint
Make golint happier
2018-03-22 14:35:33 +01:00
Alexander Zobnin
0ffcea08c7 dashboard version cleanup: more tests and refactor 2018-03-22 15:18:05 +03:00
Julian Kornberger
7aab6a8887 Make golint happier 2018-03-22 12:40:21 +01:00
Patrick O'Carroll
f2f709989f fixed so legend right works like legend under on small screens 2018-03-22 09:41:05 +01:00
ryan
3898ea02e6 adding created column 2018-03-22 02:22:58 +01:00
Thibault Chataigner
38bdb8dfb3 Alerting: move getNewState to EvalContext
This fix alert state update when several evaluation attempts are needed

Signed-off-by: Thibault Chataigner <t.chataigner@criteo.com>
2018-03-21 20:59:39 +01:00
Alexander Zobnin
2ade0881b1 minor refactor of dashboard version cleanup 2018-03-21 22:48:17 +03:00
Alexander Zobnin
3f85fcce2d refactor: dashboard version cleanup 2018-03-21 21:01:15 +03:00
Alexander Zobnin
f976b690ca limit number of rows deleted by dashboard version cleanup 2018-03-21 20:26:27 +03:00
Alexander Zobnin
fc2d1d6ca9 fix dashboard version cleanup on large datasets 2018-03-21 17:23:05 +03:00
Daniel Lee
624dac16fa docs: add variable regex examples (#11327) 2018-03-21 13:23:50 +01:00
bergquist
519fd8b2ba graphite: adds more traces for alerting 2018-03-21 13:16:59 +01:00
Marcus Efraimsson
42299eb328 Merge branch 'master' into 11306-sql-table-time 2018-03-21 12:08:48 +01:00
Marcus Efraimsson
3cb0bc3da1 sql datasource: extract common logic for converting time column to epoch time in ms 2018-03-21 11:20:15 +01:00
bergquist
f41f2089a2 docs: details about provisioning elastic
closes #11292
2018-03-21 08:54:09 +01:00
Carl Bergquist
4bcc073813 Merge pull request #11322 from jordo1138/patch-1
update email template default year and name
2018-03-21 07:49:35 +01:00
Jordan Hamel
7a4475fbf3 update email default year and name
from 2016 grafana and raintank to 2018 Grafana Labs
2018-03-20 16:55:57 -07:00
bergquist
f142548969 dataproxy: adds dashboardid and panelid as tags
closes #11315
2018-03-20 22:23:28 +01:00
Thibault Chataigner
5d23e7710b Alerting: Add retry mechanism and its unitests
Signed-off-by: Thibault Chataigner <t.chataigner@criteo.com>
2018-03-20 21:01:56 +01:00
Daniel Lee
c53fda4b5a Merge pull request #11264 from grafana/11102_duplicate_panel_shortcut
Keyboard shortcut to duplicate panel
2018-03-20 20:56:35 +01:00
Daniel Lee
685a371747 Merge pull request #11316 from ryantxu/ace-disable-snippets
Expose option to disable snippets in ACE code-editor
2018-03-20 20:53:34 +01:00
Marcus Efraimsson
9df5476fe3 Merge pull request #11312 from grafana/func_editor_js_to_ts
convert func_editor.js to typescript
2018-03-20 20:51:58 +01:00
Marcus Efraimsson
de396b277e Merge pull request #11309 from grafana/add_graphite_func_js_to_ts
convert add_graphite_func.js to typescript
2018-03-20 20:51:21 +01:00
Daniel Lee
4dcf1b72b3 Merge pull request #11313 from ryantxu/remove-unused-images
Remove unused kibana images
2018-03-20 20:44:00 +01:00
Daniel Lee
fe293718a2 Merge pull request #11310 from grafana/mssql_datasource_docs
docs: Using Microsoft SQL Server in Grafana
2018-03-20 20:39:52 +01:00
Daniel Lee
e5df179c7c docs: spelling 2018-03-20 20:38:20 +01:00
Daniel Lee
70cd501373 Merge pull request #11320 from daniellee/update-xorm
mysql: fixes panics when mysql connection times out (#11155)
2018-03-20 20:16:18 +01:00
Daniel Lee
32d1477b79 Merge pull request #11319 from alexanderzobnin/fix-11318
snapshot: fix legend rendering bug
2018-03-20 20:02:25 +01:00
Alexander Zobnin
a472d38fbf snapshot: fix legend rendering bug 2018-03-20 21:33:54 +03:00
Daniel Lee
92388f7faf session: update defaults for ConnMaxLifetime
to be the same as the 5.0.3 release defaults
2018-03-20 19:31:01 +01:00
Daniel Lee
1cef373d16 Merge remote-tracking branch 'upstream/master' into update-xorm 2018-03-20 19:21:58 +01:00
Daniel Lee
70630d742e snapshots: removes errors for empty values in ViewStore
Occurs when opening a snapshot.
2018-03-20 19:12:52 +01:00
ilgizar
0e159dada1 Allocated to a separate alignment block. Replaced the attribute of the second axis by the attribute of the axes. 2018-03-20 22:44:48 +05:00
ryan
f9acb4157b Expose option to disable snippets 2018-03-20 15:26:41 +01:00
Patrick O'Carroll
47215098a3 changed var to const, changed to string interpolation 2018-03-20 14:43:09 +01:00
Daniel Lee
e5e9d3c2f3 mssql: adds test for time should be ms in table mode 2018-03-20 14:42:29 +01:00
ryan
54c4b6a11a Remove unused kibana images 2018-03-20 14:39:19 +01:00
Patrick O'Carroll
3bdd006291 changed var to const 2018-03-20 14:26:03 +01:00
bergquist
fdf7a4c435 changelog: adds note about closing #11114 & #11086 2018-03-20 13:15:45 +01:00
Daniel Lee
d34cd8730e mssql: convert tests to jest 2018-03-20 13:01:32 +01:00
Daniel Lee
ae4c6e4648 mssql: fix precision for time column in table mode
ref #11306
2018-03-20 12:59:40 +01:00
Carl Bergquist
10a0460dc6 Merge pull request #11282 from alexanderzobnin/fix-11086
Fix rendering link to panel in collapsed row
2018-03-20 12:40:30 +01:00
Patrick O'Carroll
2a90370230 converted file to ts 2018-03-20 12:36:02 +01:00
Marcus Efraimsson
51cbf23c4a changelog: notes about #10093 and #11298
[ci skip]
2018-03-20 12:26:37 +01:00
Alexander Zobnin
05ac7d8fca dashboard: fix phantomjs panel rendering in collapsed row 2018-03-20 14:13:31 +03:00
ilgizar
e015047ed1 Fixed unit test. 2018-03-20 16:09:52 +05:00
ilgizar
341afe65ef Merge remote-tracking branch 'upstream/master' into 1271_share_zero 2018-03-20 15:54:56 +05:00
ilgizar
1588295375 Changed the way this feature was activated. And changed tolltip. 2018-03-20 15:38:48 +05:00
ilgizar
230f018c78 Added validation of input parameters. 2018-03-20 15:37:18 +05:00
Patrick O'Carroll
2a50bc35a3 converted file to ts 2018-03-20 11:07:31 +01:00
Marcus Efraimsson
74c3f732c1 docs: update using mssql in grafana 2018-03-20 10:59:35 +01:00
Carl Bergquist
f64c6e490a Merge pull request #11258 from mitjaziv/hide-credentials
add regex search/replace of username/password in urls
2018-03-20 09:37:09 +01:00
Marcus Efraimsson
720711d1fe fix: only run gofmt on pkg directory omitting vendor directory 2018-03-20 09:24:04 +01:00
Marcus Efraimsson
b816f18b3d fix: dep ensure. now without gofmt on ventor directory 2018-03-20 09:23:18 +01:00
Daniel Lee
4033283254 Merge pull request #11298 from grafana/mssql_datasource
Microsoft SQL Server data source
2018-03-20 00:03:26 +01:00
Marcus Efraimsson
192e913b7b mssql: add integration test to verify stored procedure usage 2018-03-19 19:56:34 +01:00
Marcus Efraimsson
8f6626e805 mssql: encrypt password in database 2018-03-19 17:32:51 +01:00
Marcus Efraimsson
6044b3aeeb Merge branch 'master' into mssql_datasource 2018-03-19 17:14:33 +01:00
Marcus Efraimsson
449a307575 mssql: remove dynamic construction of metric column and other columns
This seems like a niche feature which can be solved by defining multiple queries. In the future
we'll probably add support for defining series name by alias field similar to how other datasources
have solved that, e.g. prometheus.
2018-03-19 17:14:01 +01:00
Marcus Efraimsson
b8e2414e46 docker: pin microsoft/mssql-server-linux to 2017-CU4 tag 2018-03-19 16:39:50 +01:00
bergquist
ec007f536b docs: improve guide for high availability 2018-03-19 14:37:09 +01:00
Daniel Lee
caf60dda0e Merge pull request #10376 from grafana/openTSDB-file-to-ts
migrated file to ts
2018-03-19 14:32:32 +01:00
Marcus Efraimsson
4eb4ba67bd fix: dep ensure. now without gofmt on ventor directory 2018-03-19 14:15:36 +01:00
Marcus Efraimsson
f5e02d6508 fix: only run gofmt on pkg directory omitting vendor directory 2018-03-19 14:14:38 +01:00
Marcus Efraimsson
a2eaf3954a test 2018-03-19 14:06:05 +01:00
Daniel Lee
8b9c44be17 Merge pull request #10369 from grafana/elastic-file-to-ts
migrated files to ts
2018-03-19 13:59:30 +01:00
Marcus Efraimsson
d14946a135 mssql: cleanup and minor refactor 2018-03-19 13:32:04 +01:00
Marcus Efraimsson
24c0f28f41 mssql: allow host without port and fallback to default port 1433 2018-03-19 13:24:31 +01:00
Marcus Efraimsson
2802fe3f3e docker: update test dashboard for mssql tests 2018-03-19 13:07:26 +01:00
Marcus Efraimsson
62174c81c8 mssql: cleanup and minor changes 2018-03-19 13:06:46 +01:00
Leonard Gram
1f7235b340 Update CHANGELOG.md 2018-03-19 11:29:23 +01:00
Leonard Gram
0fde19552f Missed thanks in changelog 2018-03-19 11:27:08 +01:00
Leonard Gram
4ca15ae71e Adds pagerduty api update to changelog. 2018-03-19 11:25:57 +01:00
Marcus Efraimsson
8c2f3f761b mssql: update readme 2018-03-19 11:20:17 +01:00
Marcus Efraimsson
03d15f7955 mssql: update test dashboard 2018-03-19 11:08:53 +01:00
Marcus Efraimsson
1f8a2a67bf docs: Using Microsoft SQL Server in Grafana 2018-03-19 11:06:10 +01:00
Marcus Efraimsson
294ee5a610 Merge branch 'master' into mssql_datasource 2018-03-19 11:03:13 +01:00
Marcus Efraimsson
74a98d46eb mssql: remove logos for now 2018-03-19 11:02:55 +01:00
Marcus Efraimsson
e1c4a27d1d docs: mssql documentation will go into another branch targeting next minor version 2018-03-19 11:02:01 +01:00
Leonard Gram
148b71846f Updated roadmap for 5.1 2018-03-19 10:43:26 +01:00
Carl Bergquist
930d00b513 Merge pull request #11284 from flopp999/patch-1
Changed Swedish and Icelandic currency
2018-03-19 08:15:34 +01:00
Daniel Lee
72f4341305 Merge pull request #11289 from DavidLambauer/patch-1
Minor format changes
2018-03-19 07:56:47 +01:00
DavidLambauer
b90c323e31 Minor format changes
Just fixed some minor inconsistencies in the format of the file. There were some configurations uncommented like so: 

```
; container_name =
```

and some other like so:

```
;container_name =
```

So there is a need for a small perfection here! 

I also removed some unnecessary line breaks, bullying my eyes... 

![<3](https://media.giphy.com/media/dTJd5ygpxkzWo/giphy.gif)
2018-03-18 10:17:48 +01:00
flopp999
6718915a23 Changed Swedish and Icelandic currency
Swedish krone -> Swedish krona
Icelandic krone - > Icelandic króna
2018-03-16 19:46:20 +01:00
Alexander Zobnin
205714759e fix failed tests for dashboard view state 2018-03-16 21:45:31 +03:00
Alexander Zobnin
0e5b790b54 dashboard: fix rendering link to panel in collapsed row 2018-03-16 21:03:49 +03:00
Daniel Lee
4bf285c3d1 docs: update install docs for 5.0.3 2018-03-16 18:39:34 +01:00
Daniel Lee
e7bbc6e624 changelog: 5.0.3 2018-03-16 17:42:23 +01:00
Marcus Efraimsson
d26d8c713e Merge branch 'master' into mssql_datasource 2018-03-16 15:19:19 +01:00
Marcus Efraimsson
06afd24a10 mssql: add alternative logo without text 2018-03-16 15:18:05 +01:00
Marcus Efraimsson
1c7aff7810 mssql: strip inkscape from logo 2018-03-16 15:17:25 +01:00
Marcus Efraimsson
69b9fb6d15 mssql: minor improvements of query editor help 2018-03-16 15:11:15 +01:00
Marcus Efraimsson
ccd57fbfa3 mssql: skip rendering of mssql logos until we have a valid logo 2018-03-16 14:47:43 +01:00
Marcus Efraimsson
673c8290fb docker: add test dashboard for mssql tests based on test data generated by integration test 2018-03-16 14:44:26 +01:00
Marcus Efraimsson
e97b03e930 mssql: additional integration tests
Metric query of table having multiple value columns
Annotation query
2018-03-16 14:42:54 +01:00
Marcus Efraimsson
f0f8006d8d mssql: support money, smallmoney and decimal data types 2018-03-16 14:37:16 +01:00
Marcus Efraimsson
a6e4ac5484 mssql: update plugin.json, added description and name MSSQL -> Microsft SQL Server 2018-03-16 14:26:05 +01:00
Patrick O'Carroll
fc9014f920 added indent to dashboards inside folder in search dropdown, and added indent to dashboard icon in search item 2018-03-16 12:36:36 +01:00
Carl Bergquist
1014f7c40a Merge pull request #11260 from iksaif/master
alertmanager: handle resolved alerts, nodata, and execution errors + cleanups
2018-03-16 09:11:59 +01:00
Daniel Lee
3ca1e06509 session: fork Macaron mysql session middleware
This changes forks the mysql part of the Macaron session middleware.

In the forked mysql file:

- takes in a config setting for SetConnMaxLifetime (this solves wait_timeout
problem if it is set to a shorter interval than wait_timeout)
- removes the panic when an error is returned in the Exist function.
- retries the exist query once
- retries the GC query once
2018-03-16 01:19:28 +01:00
Daniel Lee
9cdd7cb04c database: expose SetConnMaxLifetime as config setting
For MySQL, setting this to be shorter than the wait_timeout MySQL setting
solves the issue with connection errors after the session has timed out for
the connection to the database via xorm.
2018-03-16 01:09:00 +01:00
Daniel Lee
5a3ba68a9c database: fixes after xorm update 2018-03-16 00:09:29 +01:00
Daniel Lee
1c20126f87 database: update xorm to v0.6.4 and xorm core to v0.5.7 2018-03-16 00:02:50 +01:00
Mitsuhiro Tanda
c6fa0b90a7 prometheus editor: variable autocomplete support (PR #9988)
* prometheus ace editor, template variable support

* minor fix

* support [[var]] notation

* don't remove last ] if token type is string

* Revert "don't remove last ] if token type is string"

This reverts commit bce5b2d56e.

* Revert "support [[var]] notation"

This reverts commit 10012f8ffe.

* fix token type and regex
2018-03-15 20:17:51 +03:00
Patrick O'Carroll
1094dc32bc made a keyboard shortcut to duplicate panel 2018-03-15 17:22:11 +01:00
Marcus Efraimsson
7dfa159ba1 docs: update mssql documentation 2018-03-15 17:19:07 +01:00
Marcus Efraimsson
9144701fcc mssql: disable mssql integration tests per default 2018-03-15 15:27:31 +01:00
Leonard Gram
3b03dce3c2 mssql: timeGroup fill support added. 2018-03-15 15:06:54 +01:00
Marcus Efraimsson
faf9e3f722 mssql: add timeGroup integration test 2018-03-15 14:26:53 +01:00
Corentin Chary
3d8f1a7439 alertmanager: /Creating/Sending/ 2018-03-15 13:48:58 +01:00
Leonard Gram
571556e1d8 mssql: adds fill to timeGroup macro. 2018-03-15 13:11:26 +01:00
ryan
a04c4ba454 allow any database for influx proxy 2018-03-15 13:01:17 +01:00
ryan
ad88e5398c remove 2018-03-15 12:57:09 +01:00
Corentin Chary
c8da1a46c5 alertmanager: handle resolved alerts, nodata, and execution errors
- Resolved alerts will be sent to the AM the first time they move
  from Alerting to OK
- Errors are forwarded
- NoData is not ignored anymore
- The summary annotation is set (with the alertname)
- The image annotation is set (when available)
2018-03-15 12:02:29 +01:00
Mitja Zivkovic
5669596518 add regex search of username and password in urls, which are replaced by strings.Replace 2018-03-15 10:50:57 +01:00
Corentin Chary
d4d2b6d7da notitfiers: avoid ShouldNotify duplication 2018-03-15 10:48:29 +01:00
ryan
3aed867b4b fix merge error 2018-03-15 10:35:50 +01:00
ryan
853d9bb378 Merge remote-tracking branch 'grafana/master' into influx-db-query2
* grafana/master:
  docker: change port for prom random data scrape target
2018-03-15 10:25:20 +01:00
Corentin Chary
777c1024c9 alertmanager: if there are no alerts to send, do nothing 2018-03-15 10:08:03 +01:00
Marcus Efraimsson
d2267643ed Merge branch 'master' into mssql_datasource 2018-03-15 09:53:19 +01:00
Marcus Efraimsson
eef01e3703 docker: change port for prom random data scrape target 2018-03-15 09:52:53 +01:00
Marcus Efraimsson
3d0f97aab9 mssql datasource: wip 2018-03-15 09:51:29 +01:00
Marcus Efraimsson
ef3588c1f8 docker: mssql and mssql tests blocks with common build context 2018-03-15 09:49:53 +01:00
ryan
1080c113f6 fix lint problems 2018-03-15 00:07:20 +01:00
ryan
1ce3e49e72 fix lint problems 2018-03-15 00:05:15 +01:00
ryan
cae9c28f70 fix lint problems 2018-03-15 00:03:47 +01:00
ryan
7a7e407393 fix lint problems 2018-03-15 00:02:38 +01:00
ryan
4f8ee9f5a7 merge with master 2018-03-14 23:52:24 +01:00
Carl Bergquist
18e498e0ff Update README.md
Removes alpha 

closes https://github.com/grafana/grafana/issues/11251
2018-03-14 21:07:55 +01:00
Marcus Efraimsson
61e1c12fee docker: fake-data-gen:latest updates
fake-data-gen for elastic 2.4 and 5 blocks, new graphite 1.1+ block.
added big dashboard for graphite 1 and 1.1+ that can be imported to grafana
2018-03-14 20:47:52 +01:00
ilgizar
bd3d17ab8c Merge remote-tracking branch 'upstream/master' into 1271_share_zero 2018-03-14 23:42:58 +05:00
ilgizar
9d7ab78d9f Resolved conflict 2018-03-14 23:39:05 +05:00
bergquist
8efb39ee2b docs: more details about slack notifier
closes #11059
2018-03-14 18:26:05 +01:00
bergquist
bdf6a75c91 docs: updates latest release for docs 2018-03-14 17:09:02 +01:00
bergquist
cf67584998 changelog: improve description of closed issues 2018-03-14 16:06:03 +01:00
Carl Bergquist
105f6ff88c Merge pull request #11249 from bergquist/legacy_render_urls
Avoid redirecting internal rendering requests
2018-03-14 15:42:07 +01:00
bergquist
6cac7c2de9 renderer: avoid redirect render requests
closes #11180
2018-03-14 15:27:18 +01:00
bergquist
e4cca1943c changelog: adds notes about 5.0.2
[ci skip]
2018-03-14 15:05:17 +01:00
Carl Bergquist
6d1e3613f7 Merge pull request #11246 from grafana/11227_import
dashboard: fix import dashboard with alert rule(s)
2018-03-14 14:38:29 +01:00
Carl Bergquist
a8918047a2 Merge pull request #11238 from grafana/11155-mysql-issue
middleware: recover and retry on session start
2018-03-14 14:29:47 +01:00
Marcus Efraimsson
87284d284e dashboard: fix import dashboard with alert rule
Importing a dashboard with alert rule(s) should be possible without receiving invalid
alert data error. This fix reverts the import logic to how it worked before Grafana v5.0,
that is import will allow dashboard with alert rule(s) but no alerts will be created.
After an import the user will need to update the dashboard for the alerts to be created.
Fixes #11227
2018-03-14 14:24:56 +01:00
Carl Bergquist
0ef94ea403 Merge pull request #11232 from grafana/11231_dash_url
Should be possible to browse dashboard using only uid
2018-03-14 14:18:58 +01:00
Carl Bergquist
a0a57ac33a Merge pull request #11236 from grafana/alerting_collapsed_panels
alerting: supports extracting alerts from collapsed panels
2018-03-14 14:16:50 +01:00
Daniel Lee
5f511deefc middleware: recover and retry on session start
Partial fix for #11155 - the Macaron session middleware
panics if mysql returns an error. This fix recovers from
the panic and retries once
2018-03-14 12:26:59 +01:00
bergquist
be7ec310b1 alerting: supports extracting alerts from collapsed panels
collapsed rows wrap the hidden rows within itself. This caused
the extractor to miss the panel and therefore delete the alert
accosiated with the graph.

closes #11222
2018-03-14 11:23:16 +01:00
Marcus Efraimsson
6503e482e3 docker: add test dashboard for mssql for visualizing data generated by fake-data-gen 2018-03-13 23:07:40 +01:00
Marcus Efraimsson
c87752102a mssql datasource: support for timeGroup macro function 2018-03-13 22:49:49 +01:00
flopp999
08461408a2 Added Kilopascals(kPa) under pressure 2018-03-13 22:17:56 +01:00
flopp999
af63a26be0 Added W/m2(energy) and l/h(flow)
both as .fixedUnit
2018-03-13 22:11:58 +01:00
Carl Bergquist
9cae6f05b4 Merge pull request #11225 from flopp999/patch-1
Added icon for iOS web app
2018-03-13 21:54:55 +01:00
Marcus Efraimsson
91fa076fb3 folders: should be possible to browse folder using only uid
That is, the slug part of url should be optional.
2018-03-13 21:32:37 +01:00
Marcus Efraimsson
5fbfd67b94 dashboards: should be possible to browse dashboard using only uid
That is, the slug part of url should be optional.
Closes #11231
2018-03-13 21:06:25 +01:00
Marcus Efraimsson
57d46a706c mssql datasource: additional data type tests 2018-03-13 19:54:29 +01:00
Marcus Efraimsson
e7b790316e docker: add mssql block 2018-03-13 17:03:10 +01:00
Marcus Efraimsson
d4beee2bb0 Merge branch 'master' into mssql_datasource 2018-03-13 16:03:02 +01:00
flopp999
0fd75e6005 Added icon for iOS web app
If you using Safari on a iOS device and save the page to home screen you will get the Grafana icon as icon
2018-03-13 15:12:04 +01:00
Alexander Zobnin
0185ad5b04 changelog: add note about closing #8151 2018-03-13 15:54:58 +03:00
Alexander Zobnin
560aec50b3 Merge PR #8613 2018-03-13 15:36:32 +03:00
Leonard Gram
87bc60b9d7 alerting: adds back the link to grafana. 2018-03-13 13:29:57 +01:00
John Baublitz
aba6f627c5 Fix CI 2018-03-13 13:29:57 +01:00
John Baublitz
89557dd67b Modify Grafana Pagerduty notifier to use Pagerduty API V2 2018-03-13 13:29:57 +01:00
Alexander Zobnin
30d077d1d1 graph: minor refactor of histogram mode PR #8613 2018-03-13 15:25:28 +03:00
bergquist
da19000733 changelog: adds note about closing #11220 2018-03-13 11:26:30 +01:00
bergquist
061a418f0f style: dont expose func outside package 2018-03-13 11:24:10 +01:00
Alexander Zobnin
38a19f7c90 Merge branch 'histogram_multi' of https://github.com/mtanda/grafana into mtanda-histogram_multi 2018-03-13 13:18:55 +03:00
Daniel Lee
3f2c086e6f teams: removes quota on route
Got added by mistake a year ago.
2018-03-13 10:56:35 +01:00
bergquist
c18c0f6db7 changelog: adds note about closing #11143
[ci skip]
2018-03-13 10:43:44 +01:00
Carl Bergquist
6df13252bf Merge pull request #11143 from ApsOps/colorize-singlestat-prefix-postfix
Add color to prefix and postfix in singlestat panel
2018-03-13 10:41:40 +01:00
bergquist
b400f7ccff changelog: adds note about closing #11107
[ci skip]
2018-03-13 09:54:46 +01:00
Yohann BARRE
a3388ef45f Second to HH:mm:ss formatter (#11105)
* Seconds to HH:MM:SS format
2018-03-13 09:52:41 +01:00
bergquist
18638c21c9 changelog: adds note about closing #10009
[ci skip]
2018-03-13 09:48:22 +01:00
Carl Bergquist
bf6ff50d0b Merge pull request #11087 from alexanderzobnin/prometheus-heatmap
Prometheus heatmap support
2018-03-13 09:44:25 +01:00
Carl Bergquist
ccd11ac928 Merge pull request #11212 from flopp999/patch-1
Added concentration units and "Normal cubic metre"
2018-03-13 08:23:04 +01:00
Carl Bergquist
a9fd3e65ea Merge pull request #11214 from kkohtaka/patch-1
docs: fix an outdated link to Prometheus's doc
2018-03-13 08:00:26 +01:00
Kazumasa Kohtaka
fcca00c0f9 docs: fix an outdated link to Prometheus's doc 2018-03-13 10:27:18 +09:00
flopp999
185aa6d47b Added concentration units and "Normal cubic metre"
ppm, ppb, ng/m3, ng/Nm3, μg/m3, μg/Nm3, mg/m3, mg/Nm3, g/m3, g/Nm3, Nm3
ppm was moved from "Dimensionless" and "submenu" to "Concentration"
2018-03-12 20:59:43 +01:00
Carl Bergquist
a9d485c1e8 Merge pull request #11205 from matrixik/patch-1
Fix urls in plugin update_checker logs
2018-03-12 20:40:24 +01:00
ilgizar
7dd66450ad Corrected work for graphs created before this feature. 2018-03-12 23:43:13 +05:00
ilgizar
8c82e5701c Replaced array values to variables yLeft and yRight for easy reading code. 2018-03-12 23:12:45 +05:00
ilgizar
11ae926388 Rename test file according module name. 2018-03-12 23:11:11 +05:00
Alexander Zobnin
989ba9763f prometheus: fix bug introduced by #9859 (httpMethod is undefined) 2018-03-12 19:41:07 +03:00
Alexander Zobnin
46d2067af2 prometheus: add tests for heatmap mode 2018-03-12 17:37:21 +03:00
Alexander Zobnin
94cf560304 Merge remote-tracking branch 'upstream/master' into prometheus-heatmap 2018-03-12 17:16:02 +03:00
Alexander Zobnin
479209f483 prometheus: datasource refactor 2018-03-12 17:13:05 +03:00
Dobrosław Żybort
5a368f99ec Fix urls in plugin update_checker logs 2018-03-12 14:38:37 +01:00
bergquist
1a781fcee1 changelog: adds note about closing #10029
[ci skip]
2018-03-12 14:26:28 +01:00
Carl Bergquist
e94d23e5ff Merge pull request #10873 from willyhutw/cloudwatch_dimension_values_add_dimension_filter
Cloudwatch dimension_values add dimension filter.
2018-03-12 14:24:26 +01:00
Marcus Efraimsson
34d9983da2 docs: add team api link from http api reference page 2018-03-12 13:57:32 +01:00
Patrick O'Carroll
1d190de918 added test for sorting and filtering 2018-03-12 11:58:47 +01:00
Carl Bergquist
74602b1077 Merge pull request #11183 from jtyr/jtyr-timeticks
Adding Timeticks unit
2018-03-12 09:53:53 +01:00
bergquist
4362a73dd2 changelog: adds note about closing #9859 2018-03-12 09:23:59 +01:00
Carl Bergquist
4edc49bfab Merge pull request #9859 from mtanda/prometheus_post
(prometheus) support POST for query and query_range
2018-03-12 09:21:45 +01:00
ilgizar
8152b9d6fe Refactoring 2018-03-12 10:54:03 +05:00
Mitsuhiro Tanda
4e1501b172 set default value of httpMethod 2018-03-12 13:53:05 +09:00
Mitsuhiro Tanda
a83ede0193 support POST for query and query_range 2018-03-12 13:25:05 +09:00
Jiri Tyr
6bfed903c4 Adding Timeticks unit 2018-03-09 17:20:24 +00:00
Marcus Efraimsson
f1fc1672be docs: minor fix for dashboard http api documentation
Reported in #11176
2018-03-09 10:39:50 -05:00
Leonard Gram
d3f54f941d build: cleanup 2018-03-09 12:19:52 +01:00
Leonard Gram
f72eea186d build: removes custom work dir in deploy. 2018-03-09 11:55:56 +01:00
Leonard Gram
49de4ed28b build: upgrades build pipeline from CircleCI 1.0 -> 2.0 (#11162)
build: upgrades build pipeline from CircleCI 1.0 -> 2.0
2018-03-09 11:27:00 +01:00
bergquist
77cd7f34c7 github: test new issue tempalte
My hope is that headers will make it easier to read
when people post issues.
2018-03-09 09:33:28 +01:00
bergquist
e5b9219f13 dev: update dev prometheus2 to 2.2.0 2018-03-08 23:01:03 +01:00
bergquist
64aedbf492 Merge branch 'mayli-master'
* mayli-master:
  Use B/s instead Bps for Bytes per second
2018-03-08 18:51:45 +01:00
bergquist
0ee6a5216b Merge branch 'master' of https://github.com/mayli/grafana into mayli-master
* 'master' of https://github.com/mayli/grafana:
  Use B/s instead Bps for Bytes per second
2018-03-08 18:50:02 +01:00
bergquist
c80d346417 changelog: adds note about closing #10925 2018-03-08 18:12:15 +01:00
bergquist
ad15c5405d Merge branch 'master' of github.com:grafana/grafana
* 'master' of github.com:grafana/grafana: (24 commits)
  docs: update latest to 5.0.1
  push 5.0.1 to package cloud
  changelog: adds release date for 5.0.1
  bump master build to 5.1.0-pre1
  move quota to dedicated service
  rename Context to ReqContext
  changelog: note about closing #11145 and #11127
  docs: adds note about closing #10632
  removes commented code
  removes unused variables
  upgrade to go 1.10
  alerting: fixes validation error when saving alerts in dash
  add csv templating format
  docs: note about closing #11046
  docs: adds note about #10942
  Documentation: path "~/go" to "$GOPATH"
  Update ROADMAP.md
  move Context and session out of middleware
  only use jwt token if it contains an email address
  hide row actions for viewers
  ...
2018-03-08 18:09:15 +01:00
Carl Bergquist
a589f701ad Merge pull request #10925 from mtanda/cw_high_resolution
(cloudwatch) support high resolution query
2018-03-08 18:06:08 +01:00
bergquist
71df2760a1 Merge branch 'cw_high_resolution' of https://github.com/mtanda/grafana
* 'cw_high_resolution' of https://github.com/mtanda/grafana:
  fix, set default highResolution setting
  support cloudwatch high resolution query
2018-03-08 18:02:35 +01:00
Carl Bergquist
5153d8e535 Merge pull request #11161 from DanCech/quota-refactor
move quota to dedicated service
2018-03-08 15:21:16 +01:00
bergquist
e11437ff56 docs: update latest to 5.0.1 2018-03-08 11:06:21 +01:00
bergquist
d539905517 push 5.0.1 to package cloud 2018-03-08 10:59:57 +01:00
bergquist
d1f5f209c5 changelog: adds release date for 5.0.1 2018-03-08 10:43:40 +01:00
Daniel Lee
8563c12548 Merge pull request #11157 from chaintng/fix-query-condition
fix query condition docs
2018-03-08 10:40:35 +01:00
Carl Bergquist
87db2d1183 Merge pull request #11130 from DanCech/context-refactor
move Context and session out of middleware
2018-03-08 10:21:34 +01:00
bergquist
7784e8a829 bump master build to 5.1.0-pre1 2018-03-08 09:51:25 +01:00
Dan Cech
bbd6adabbf move quota to dedicated service 2018-03-07 17:19:35 -05:00
Dan Cech
abef722265 Fix indent 2018-03-07 14:41:05 -05:00
Alexander Zobnin
425d2cfd3a docker: add prometheus/example-golang-random to docker-compose blocks 2018-03-07 21:20:22 +03:00
Sébastien BERNARD
380aa26ea3 Fix the code to match the documentation.
Permit for LDAP groups to be groupofuniquenames composed of uniquename (DN).
For this, propose DN as group_search_filter_user_attribute and DN also for the member_of in the server.attributes section.

DN is processed as a special attribute name which returns the LdapSearchResult.DN field instead of a member of attr array.
2018-03-07 18:14:18 +01:00
Carl Bergquist
e3b86637f9 Merge pull request #11146 from grafana/go1.10
Upgrade golang to 1.10
2018-03-07 18:00:37 +01:00
Dan Cech
c0ecdee375 rename Context to ReqContext 2018-03-07 11:54:50 -05:00
Carl Bergquist
687179809e Merge pull request #11139 from jonyrock/patch-1
Documentation fix: "~/go" to "$GOPATH"
2018-03-07 17:51:21 +01:00
Mitsuhiro Tanda
eecbdc89eb fix, set default highResolution setting 2018-03-08 01:18:11 +09:00
bergquist
e9c64a6631 changelog: note about closing #11145 and #11127 2018-03-07 17:18:03 +01:00
Carl Bergquist
d220516664 Merge pull request #11145 from grafana/alerting-invalid-data
alerting: fixes validation error when saving alerts in dash
2018-03-07 17:06:19 +01:00
Carl Bergquist
d07aff8991 Merge pull request #11127 from DanCech/oauth-jwt-email
only use jwt token if it contains an email address
2018-03-07 17:01:12 +01:00
bergquist
d9308a0325 docs: adds note about closing #10632 2018-03-07 16:58:27 +01:00
Carl Bergquist
b1494637d1 Merge pull request #11141 from mtanda/templating_comma_join
add comma templating format
2018-03-07 16:49:19 +01:00
bergquist
cb223ee563 removes commented code 2018-03-07 16:40:24 +01:00
bergquist
ff6108051d removes unused variables 2018-03-07 16:40:24 +01:00
bergquist
8ed12aa298 upgrade to go 1.10 2018-03-07 16:40:24 +01:00
Daniel Lee
d96fbb486f alerting: fixes validation error when saving alerts in dash
If a panelId in the dashboard json is set to zero then the validation
silently fails. Instead of returning an error, it just ignores alerts and
saves the dashboard.
2018-03-07 16:20:05 +01:00
Mitsuhiro Tanda
244cbe8cbd add csv templating format 2018-03-08 00:13:58 +09:00
bergquist
1dd9ee7d3d docs: note about closing #11046 2018-03-07 15:50:13 +01:00
Carl Bergquist
c39e68de24 Merge pull request #11046 from llamashoes/master
Add metrics that triggered alert to description in OpsGenie.
2018-03-07 15:48:30 +01:00
bergquist
9d74e1c35b docs: adds note about #10942 2018-03-07 15:43:04 +01:00
Carl Bergquist
3f6e525755 Merge pull request #10942 from grafana/pausing_alerts_updates_timestamp
Pausing/un alerts now updates new_state_date
2018-03-07 15:40:12 +01:00
Alexander Zobnin
759e05d09e heatmap: add explanation of Time series buckets mode 2018-03-07 17:08:34 +03:00
Aman
a94de51e5e Add color to prefix and postfix in singlestat 2018-03-07 19:36:42 +05:30
Patrick O'Carroll
834c421943 replaced if with classNames 2018-03-07 15:01:50 +01:00
Alexander Zobnin
5e452e445c heatmap: able to set upper/lower bucket bound manually 2018-03-07 16:57:46 +03:00
Alexander Zobnin
18a90667ba heatmap: refactor 2018-03-07 16:33:33 +03:00
Daniel Lee
4acc8f8ad7 Merge pull request #11119 from bergquist/no_row_setting_viewer
hide row actions for viewers
2018-03-07 14:25:39 +01:00
Patrick O'Carroll
3c9f31a0bb added media breakpoint to legend-right 2018-03-07 13:10:44 +01:00
Alexey Velikiy
67937a675e Documentation: path "~/go" to "$GOPATH"
In "Install from source" section supposed that Grafana`s sources installed to `~/go` , but it is not always true. 
In other hand, `go get ..` command would install project to `$GOPATH`

https://golang.org/cmd/go/#hdr-Download_and_install_packages_and_dependencies
2018-03-07 15:03:10 +03:00
Torkel Ödegaard
310d740667 Update ROADMAP.md 2018-03-07 12:53:00 +01:00
Patrick O'Carroll
8d4c439eeb add panel to list now copy, started on jest 2018-03-07 12:46:27 +01:00
bergquist
0273657a1c docs: improves docs for alert rules 2018-03-07 12:26:02 +01:00
Alexander Zobnin
a791a92d79 heatmap: fix Y axis and tooltip decimals and units issues 2018-03-07 13:28:44 +03:00
Daniel Lee
3a19cf52ef Merge pull request #11123 from grafana/mobile_menu_polish
changed background for mobile menu background on light theme,
2018-03-07 10:58:57 +01:00
Daniel Lee
c657fe8875 Merge pull request #11092 from grafana/11091_anonymous_sign_in
made drop-menu into link
2018-03-07 10:54:48 +01:00
ilgizar
916539fad9 Append test to check not zero level. 2018-03-07 14:21:10 +05:00
ilgizar
7cddc54306 Add bs-tooltip to Y-Align element. 2018-03-07 12:12:39 +05:00
Dan Cech
338655dd37 move Context and session out of middleware 2018-03-06 18:16:49 -05:00
Dan Cech
9d005c50a2 only use jwt token if it contains an email address 2018-03-06 14:21:36 -05:00
Daniel Lee
8e81dc1e79 scrolling: faster wheelspeed
ref #11053
2018-03-06 20:08:00 +01:00
bergquist
7ebf42842f docs: improves provisioning description
closes #11126
2018-03-06 18:59:40 +01:00
Leonard Gram
7ba9e2e608 changelog: adds note about closing #10975. 2018-03-06 15:36:57 +01:00
bergquist
330a290a8d changelog: adds note about closing #7107 2018-03-06 15:21:14 +01:00
Carl Bergquist
08f587a0ef Merge pull request #10838 from ilgizar/7107_right_y_axis
Thresholds for Right Y axis
2018-03-06 15:18:24 +01:00
bergquist
bc22c11675 changelog: adds note about closing #11103 2018-03-06 14:56:57 +01:00
Carl Bergquist
01582a2f12 Merge pull request #11121 from grafana/telegram-inline-image-notifications
alerting: Limits telegram captions to 200 chars.
2018-03-06 14:19:59 +01:00
Patrick O'Carroll
9b3863a150 changed background for mobile menu background on light theme, increased font size in and added border-right in menu 2018-03-06 14:16:10 +01:00
Alexander Zobnin
0912f61ea3 heatmap: fix tooltip count and bucket bound format 2018-03-06 15:21:37 +03:00
Leonard Gram
891462b5d9 alerting: Limits telegram captions to 200 chars.
The caption for inline images in Telegram is
limited to 200 characters.

Fixes #10975
2018-03-06 12:38:03 +01:00
bergquist
76d4163fe1 changelog: note about closing #11097 2018-03-06 12:37:39 +01:00
Carl Bergquist
9f40ad740f Merge pull request #11118 from bergquist/missing_icon_disabled_gravatar
fixes invalid link to profile pic when gravatar is disabled
2018-03-06 12:36:08 +01:00
bergquist
d3b23b01d8 hide row actions for viewers
closes #11112
2018-03-06 12:32:50 +01:00
bergquist
5934521137 fixes invalid link to profile pic when gravatar is disabled
closes #11097
2018-03-06 11:46:50 +01:00
bergquist
0780d57548 changelog: adds note about closing #11016 2018-03-06 11:31:24 +01:00
Torkel Ödegaard
0de90accfb fix: restores white resize handle for panels, fixes #11103 2018-03-06 11:19:01 +01:00
bergquist
cf6e5672ab changelog: adds note about closing #11063 2018-03-06 10:56:17 +01:00
Tony Dong
96504940a8 fix typo in heatmap rendering.ts (#11101) 2018-03-06 10:36:06 +01:00
Carl Bergquist
c372716692 Merge pull request #11109 from bergquist/unsaved_changes_fix
ignore iteration property when checking for unsaved changes
2018-03-06 10:33:27 +01:00
Carl Bergquist
1fe8b33f65 Merge pull request #11000 from victorclaessen/master
Added radiation units
2018-03-06 09:38:12 +01:00
Daniel Lee
0e54c474aa Merge branch 'master' into docs-5.1 2018-03-06 09:28:13 +01:00
Daniel Lee
4d434d9845 docs: add v5.1 to versions 2018-03-06 09:27:40 +01:00
Daniel Lee
8a1bd2ee22 docs: fill for mysql/postgres
ref #10138
2018-03-06 09:24:36 +01:00
bergquist
a7d62f44d3 ignore iteration property when checking for unsaved changes
closes #11063
2018-03-05 22:03:26 +01:00
Daniel Lee
1a16e588f7 changelog: notes for #11055 and #9487 2018-03-05 19:44:09 +01:00
Daniel Lee
9c8733ac85 Merge pull request #11093 from svenklemm/postgres-connection
postgres: use net/url to generate postgres connection url
2018-03-05 19:27:02 +01:00
Sven Klemm
4904a051cf use net/url to generate postgres connection url 2018-03-05 16:06:04 +01:00
Patrick O'Carroll
42cd462cbf made drop-menu into link 2018-03-05 14:09:04 +01:00
Alexander Zobnin
5037f93a78 heatmap: sort series before converting to heatmap.
This allows to use histogram series from arbitrary datasource and display it properly.
2018-03-05 14:01:55 +03:00
Daniel Lee
7ce63169a0 Merge pull request #10138 from svenklemm/macroengine-interpolate
postgres+mysql: add optional fill parameter to $__timeGroup macro to fill in missing values in series
2018-03-04 21:38:30 +01:00
Julien Pivotto
69c93e6401 Fix Prometheus 2.0 stats (#11048)
Fixes #11016

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2018-03-03 13:40:28 +01:00
Torkel Ödegaard
328fc45bcc docs: removed beta notice in whats new article 2018-03-03 12:49:40 +01:00
Sven Klemm
4e826ff8f7 remove spaces around arguments of macros 2018-03-02 19:24:15 +01:00
Sven Klemm
f1ba9137c0 remove spaces around arguments before calling macro expansion 2018-03-02 19:20:30 +01:00
Sven Klemm
0f931f9e5e Merge remote-tracking branch 'upstream/master' into macroengine-interpolate 2018-03-01 18:01:54 +01:00
Daniel Lee
655d2fb405 docs: update current version to 5.0 2018-03-01 10:11:52 +01:00
Daniel Lee
cc2f478792 Merge branch 'docs_v5.0' 2018-03-01 09:36:48 +01:00
Daniel Lee
f46f43dc32 docs: update install pages for v5.0.0 2018-03-01 09:20:52 +01:00
Alexander Zobnin
fa8403750b Merge remote-tracking branch 'upstream/master' into prometheus-heatmap 2018-03-01 11:09:04 +03:00
Daniel Lee
59a13f1847 update version to 5.0.1-pre1 2018-03-01 08:30:44 +01:00
Daniel Lee
2e2f47177d changelog update for 5.0.0 stable 2018-03-01 08:14:27 +01:00
Ryan Gifford
49266d5150 Add metrics that triggered alert to description 2018-02-28 15:26:11 -07:00
Alexander Zobnin
d6087eb5f4 heatmap: hide unused Y axis controls for tsbuckets mode 2018-02-28 16:30:00 +03:00
Alexander Zobnin
76c684cc01 heatmap: format numeric tick labels in tsbuckets mode 2018-02-28 16:19:58 +03:00
Alexander Zobnin
dfe8b0a0d2 heatmap: add rendering tests for tsbuckets mode 2018-02-28 15:58:28 +03:00
Alexander Zobnin
5c73ed6ecd heatmap: use series names as top or bottom bounds, depends of datasource 2018-02-27 15:14:40 +03:00
Alexander Zobnin
f21cebeefd heatmap: refactor 2018-02-27 14:17:57 +03:00
Alexander Zobnin
7c78e8e383 heatmap: add few tests for histogram converter 2018-02-27 14:17:29 +03:00
Alexander Zobnin
26ddb9977f heatmap: fix Y bucket size calculation for 'tsbuckets' mode 2018-02-26 16:26:54 +03:00
Patrick O'Carroll
e037ef21f7 added admin icon and permission member definitions(role,team,user) 2018-02-26 10:21:24 +01:00
bergquist
01fb3ea034 docs: adds accesskey and secret to securejsonfields
closes #11005
2018-02-23 09:32:22 +01:00
Carl Bergquist
75ae34cf84 Merge pull request #10999 from grafana/10995_docs
docs: update shortcut docs
2018-02-23 09:29:05 +01:00
victorclaessen
91e8468fb4 Added radiation units
Add common units in radiation and health physics monitoring, Bq, Ci, Gy, rad, Sv, rem. C/kg, R, Sv/h.
2018-02-22 19:21:08 +01:00
Marcus Efraimsson
0ac6d7cf4c docs: update shortcut docs 2018-02-22 18:24:10 +01:00
Marcus Efraimsson
c367cb294e docs: minor folder http api changes 2018-02-22 16:07:55 +01:00
Marcus Efraimsson
6751bbc17f Merge branch 'master' into docs_v5.0 2018-02-22 15:55:44 +01:00
Marcus Efraimsson
3aca9090e5 Merge pull request #10984 from grafana/10630_docs
Update http api docs for folder, dashboard and permissions
2018-02-22 15:53:57 +01:00
Alexander Zobnin
2a2675c1af heatmap: fix bucket labels shift 2018-02-22 16:54:28 +03:00
Alexander Zobnin
e0a874f677 heatmap tooltip: fix bucket bounds for 'tsbuckets' mode 2018-02-22 16:33:45 +03:00
Alexander Zobnin
cc34c9a651 heatmap tooltip: fix count decimals 2018-02-22 16:12:42 +03:00
Alexander Zobnin
bc47380032 heatmap: fix tooltip histogram for 'tsbuckets' mode 2018-02-22 16:06:21 +03:00
Alexander Zobnin
97c54e6956 heatmap: use buckets from histogram with 'tsbuckets' mode 2018-02-22 15:43:08 +03:00
ilgizar
66590042a6 Add unit tests. 2018-02-22 15:41:11 +05:00
ilgizar
9e68cbea51 Refactoring code 2018-02-22 15:38:32 +05:00
Patrick O'Carroll
07c3fb7e0f changed name of copy tab to paste 2018-02-22 10:38:22 +01:00
Patrick O'Carroll
ce9c8ae854 added no copies div 2018-02-22 09:58:52 +01:00
Alexander Zobnin
e361a31a2a prometheus: tests for heatmap format 2018-02-21 20:22:46 +03:00
Patrick O'Carroll
5e5a4cf1b0 added highlighter, fixed setState and changed back flex to spacea around 2018-02-21 15:39:15 +01:00
Patrick O'Carroll
9ac82f3d0e added tabs and searchfilter to addpanel, fixes#10427 2018-02-21 14:51:28 +01:00
Alexander Zobnin
efa869bb89 prometheus: initial heatmap support 2018-02-21 15:26:45 +03:00
Marcus Efraimsson
02b412b127 docs: update http api index 2018-02-21 13:11:32 +01:00
Marcus Efraimsson
7d89f19f6f docs: dashboard and folder permissions http api 2018-02-21 13:09:54 +01:00
Marcus Efraimsson
b5e96f5ec2 docs: folder http api 2018-02-21 13:09:01 +01:00
Torkel Ödegaard
2f6e77af1e Merge branch 'master' into docs_v5.0 2018-02-21 10:47:14 +01:00
Willy Hu (IS-TW)
417df1eae5 docs: updated cloudwatch docs
add dimension filter as a option for dimension_values query.
2018-02-21 10:51:28 +08:00
ilgizar
7eeb68b590 Refactoring code. Change Y-Zero to Y-Level. 2018-02-20 16:58:49 +05:00
ilgizar
57013d2228 Share zero between Y axis. 2018-02-18 00:54:35 +05:00
ilgizar
258a0d276c Add hook processRange to flot plugin. 2018-02-18 00:51:32 +05:00
Leonard Gram
1f3442020b alerts: refactoring tests 2018-02-16 14:37:10 +01:00
Leonard Gram
c5226a945b alerting: pausing alerts modifies updated.
When pausing an alert the updated field is
modified to the current time.

Closes #10191
2018-02-16 14:24:52 +01:00
Daniel Lee
2bcd7cd25b docs: status code changes for Team API 2018-02-16 11:18:41 +01:00
Daniel Lee
8377d3630c docs: team API. Closes #10832 2018-02-15 23:05:16 +01:00
Mitsuhiro Tanda
18c54a9341 support cloudwatch high resolution query 2018-02-15 23:35:01 +09:00
ilgizar
425586f67d Set default threshold axis to 'left' for panels created before this feature. 2018-02-14 23:44:04 +05:00
Torkel Ödegaard
73eaba076e wip: dashboard acl ux2, #10747 2018-02-14 15:03:22 +01:00
Torkel Ödegaard
ec6f0f94b8 permissions: refactoring of acl api and query 2018-02-14 14:31:20 +01:00
Torkel Ödegaard
db89ac4134 initial fixes for dashboard permission acl list query, fixes #10864 2018-02-14 11:50:58 +01:00
Marcus Efraimsson
4aff142fc5 Merge pull request #10903 from stukselbax/patch-2
Invalid url in docs
2018-02-14 10:42:02 +01:00
stukselbax
5b318428c4 Invalid url in docs 2018-02-14 11:34:46 +03:00
Marcus Efraimsson
2bddf50184 docs: update dashboard permissions http api docs 2018-02-12 14:50:35 +01:00
Marcus Efraimsson
2b31465254 Merge branch 'master' into docs_v5.0 2018-02-12 14:29:22 +01:00
Willy Hu (IS-TW)
725e23ef7d Cloudwatch dimension_values add dimension filter.
issue #10029

e.g.
- dimension_values($region, $namespace, cpu_usage_system, cpu)
- dimension_values($region, $namespace, disk_used_percent, device, {"InstanceId": "$instance_id"})
- dimension_values($region, $namespace, disk_used_percent, path, {"InstanceId": "$instance_id", "device": "$device"})
2018-02-12 10:13:55 +00:00
ilgizar
57e31ca71b Correct code style. 2018-02-09 10:06:50 +05:00
ilgizar
98e5815c97 append test to thresholds on right axis 2018-02-08 17:28:24 +05:00
bergquist
4eec4bfb05 docs: adds uid to dashboard.json reference docs 2018-02-08 09:55:12 +01:00
ilgizar
578ee88ff3 Fix #7107 2018-02-08 12:53:02 +05:00
bergquist
76dc7932a4 docs: describe uid for dashboard provisioning 2018-02-07 11:04:48 +01:00
Marcus Efraimsson
1e0817f863 docs: update http api for api index, dashboard, folder and dashboard search 2018-02-05 20:53:58 +01:00
Torkel Ödegaard
e0ecf300aa Merge branch 'docs_v5.0' of github.com:grafana/grafana into docs_v5.0 2018-02-05 17:35:46 +01:00
Torkel Ödegaard
c78280de89 Merge branch 'master' into docs_v5.0 2018-02-05 17:35:27 +01:00
Daniel Lee
34ab882986 docs: adds http api dashboard permissions 2018-02-05 17:13:05 +01:00
Torkel Ödegaard
7f5e195cb4 Merge branch 'master' into docs_v5.0 2018-02-05 16:29:49 +01:00
Torkel Ödegaard
b8b26e6677 Merge branch 'docs_v5.0' of github.com:grafana/grafana into docs_v5.0 2018-02-05 15:37:54 +01:00
Marcus Efraimsson
49c02aa8d2 Merge branch 'master' into docs_v5.0 2018-02-05 15:23:32 +01:00
Daniel Lee
65bb6cc728 docs: add examples for dashboard permissions 2018-02-01 16:53:39 +01:00
Mitsuhiro Tanda
cf1be5fdfc support multiple histogram series 2018-02-01 19:06:35 +09:00
Torkel Ödegaard
8bbbaad497 Merge branch 'master' into docs_v5.0 2018-02-01 10:49:26 +01:00
Trent White
e71efbd873 update text, fix a few typos 2018-01-31 14:45:09 -05:00
Torkel Ödegaard
17c1e7bac7 docs: added permissions page and updated folder docs 2018-01-31 16:07:27 +01:00
Torkel Ödegaard
b1a9360756 docs: updated whats new 2018-01-31 11:26:00 +01:00
Torkel Ödegaard
f6afa1d0f7 Merge branch 'docs_v5.0' of github.com:grafana/grafana into docs_v5.0 2018-01-31 09:42:06 +01:00
Torkel Ödegaard
c1cdcd3bda docs: updated whatsnew 2018-01-31 09:41:49 +01:00
Torkel Ödegaard
88e4f19909 docs: progress on whats new article 2018-01-31 09:40:09 +01:00
Patrick O'Carroll
a9128adcca Merge branch 'docs_v5.0' of github.com:grafana/grafana into docs_v5.0 2018-01-31 09:20:10 +01:00
Torkel Ödegaard
9a6bfb61a1 docs: updated version 2018-01-31 08:49:04 +01:00
Torkel Ödegaard
1cc5349bfd docs: fixed order of sidemenu 2018-01-31 08:49:04 +01:00
bergquist
8fed56e334 test: fixes failing test in go1.10 2018-01-31 08:49:04 +01:00
Patrick O'Carroll
8ecf2d127c fixed width of images and removed gifs and fixed text a bit in search 2018-01-30 17:12:12 +01:00
Patrick O'Carroll
411c81fee8 new gifs for search 2018-01-30 15:34:09 +01:00
bergquist
40832e6d71 docs: adds more info about whats new in v5 2018-01-30 15:25:18 +01:00
Torkel Ödegaard
f67bd368d4 Merge branch 'master' into docs_v5.0 2018-01-30 15:10:03 +01:00
Patrick O'Carroll
c29e75e9bc changed img for shortcuts 2018-01-30 10:51:50 +01:00
Patrick O'Carroll
ec3ba86a02 replaced img in export_import and sharing 2018-01-30 09:20:55 +01:00
Patrick O'Carroll
3fa2f8a411 changed img-link for timerange imgs and some text 2018-01-29 15:45:28 +01:00
Patrick O'Carroll
4294009b0b changed some img-links, updated text for annotated img, more work on whats new in v5.0 2018-01-26 10:58:31 +01:00
Patrick O'Carroll
45cd3730a7 added whats new v5, changed link in notifications, removed row from getting started 2018-01-25 11:24:49 +01:00
Daniel Lee
047d023022 docs: first draft of dashboard folders docs 2018-01-24 10:43:03 +01:00
Chainarong Tangsurakit
0c833666f5 fix query condition docs 2018-01-19 11:47:19 +07:00
Patrick O'Carroll
328141e7c9 added /** @nginject */ 2018-01-09 09:33:18 +01:00
Craig Miskell
2e86985d44 Remove silly noise 2018-01-05 16:22:49 +13:00
Craig Miskell
f9fb315dbd Update tests to match new reality, and rejig the implementation a bit to truly work as desired 2018-01-05 16:20:54 +13:00
Craig Miskell
61e6f63b32 Align queries to prometheus with the step to ensure 'rate' type expressions get consistent results 2018-01-05 09:08:40 +13:00
Ali
3e414ff2d6 Update built_in_plugins.ts 2018-01-03 10:47:21 +03:00
Ali
de22e793d8 Merge branch 'master' into master 2018-01-03 10:33:54 +03:00
Patrick O'Carroll
15dfa30701 migrated file to ts 2017-12-28 14:04:34 +01:00
Patrick O'Carroll
fc8ed3ad87 migrated files to ts 2017-12-28 09:18:57 +01:00
linux chips
6e7a067857 adding support for sgl native time datatypes 2017-12-12 23:43:24 +03:00
linux chips
dd7ab43d09 added missing cases for DATETIME datatype 2017-12-12 23:41:32 +03:00
Sven Klemm
cb15d9cbdd add missing value fill code to mysql datasource 2017-12-10 19:50:01 +01:00
Sven Klemm
6cdd901ec6 fix typo 2017-12-10 12:40:09 +01:00
Sven Klemm
c1282e8ea8 implement missing value fill functionality for postgres 2017-12-10 11:42:55 +01:00
Sven Klemm
e2a3590d8b allow optional 3rd argument to timeGroup to control filling missing
values
2017-12-10 09:59:33 +01:00
Sven Klemm
b86a42fffe pass tsdbQuery to transformToTimeSeries and transformToTable to get
access to selected frontend timerange
2017-12-09 20:35:00 +01:00
Sven Klemm
b6df91d56b pass Query to MacroEngine Interpolate 2017-12-08 23:30:33 +01:00
linux chips
5114b1f792 fixing a few fromattings 2017-12-06 10:32:20 +03:00
linux chips
1c1675afe3 adding mssql docs 2017-12-05 23:41:32 +03:00
linux chips
8883201635 updating the query editor's syntax highlighting mode to sqlserver 2017-12-05 14:49:48 +03:00
linux chips
6f3a62d299 add _tests for mssql data source 2017-12-03 21:56:21 +03:00
linux chips
c75f9a1923 MSSQL Data Source 2017-12-02 14:40:12 +03:00
linux chips
cc00327fbe add server only build target "build-srv" 2017-12-02 13:22:51 +03:00
Jeroen Jacobs
5b926cc102 Adding a user in a specified organisation uses the admin API 2017-11-17 12:19:18 +01:00
ryan
fb9c714a9a run go fmt 2017-10-18 23:49:33 +02:00
ryan
4440133f4d Add a setting to allow DB queries 2017-10-18 23:33:10 +02:00
ryan
c6ee715ef3 Merge remote-tracking branch 'grafana/master' into influx-db-query2
* grafana/master: (282 commits)
  Update CHANGELOG.md
  Fix heatmap Y axis rendering (#9580)
  prometheus: add builtin template variable as range vectors
  Note for #5457
  fix: fixed prometheus step issue that caused browser crash, fixes #9575
  changelog: adds note about closing #9551
  fix: getting started panel and mark adding data source as done, fixes #9568
  pluginloader: esModule true for systemjs config
  Fixes for annotations API (#9577)
  When Messasge field is set for an alert, map it to the output field in a Sensu check result. If Message is empty, send "Grafana Metric Condition Met"
  fix vector range
  allow ":" character for metric name
  build: added imports of rxjs utility functions
  fix template variable expanding
  Update CHANGELOG.md
  annotations: quote reserved fields (#9550)
  Update CHANGELOG.md
  Update CHANGELOG.md
  Update CHANGELOG.md
  fix: fixed color pickers that were broken in minified builds, fixes #9549
  ...
2017-10-18 17:55:33 +02:00
Mengyang Li
675e5ae17f Update kbn.js 2017-10-04 17:37:19 -07:00
Mengyang Li
66c998e6e6 Update kbn.js 2017-10-04 14:37:05 -07:00
Mengyang Li
a1283212ed Use B/s instead Bps for Bytes per second
Most places are using bps and B/s for bits and bytes,
ref: https://en.wikipedia.org/wiki/Data_rate_units
Bps (Bytes per second) isn't a really common used unit the in the wild.
2017-09-23 21:05:43 -07:00
ryan
967efea520 fix merge issue 2017-09-22 13:28:53 +02:00
ryan
b4b3008a19 Merge remote-tracking branch 'grafana/master' into influx-db-query2
* grafana/master: (112 commits)
  changelog: adds note about closing #5873
  Docs new updates (#9324)
  Update CHANGELOG.md
  Update latest.json
  cleanup: removed unused file
  tech: remove bower and moved remaining bower dependencies to npm
  tech: cleanup and fixed build issue
  tech: upgraded angularjs and moved dependency from bower to npm, closes #9327
  follow go idiom and return error as second param
  tech: updated tsconfig
  docker: adds alertmanager to prometheus fig
  tech: more tslint rules
  tech: removing unused variables from typescript files, and making tslint rules more strict
  context is reserved for go's context
  make ds a param for Query
  remove batch abstraction
  rename executor into tsdbqueryendpoint
  remove unused structs
  refactor response flow
  tech: removed test component
  ...
2017-09-22 13:27:24 +02:00
ryan
bc03640d6b Merge remote-tracking branch 'grafana/master' into influx-db-query2
* grafana/master: (35 commits)
  Update CHANGELOG.md
  Update CHANGELOG.md
  fixed some images (#9237)
  release: bumped version to v4.5.0 stable
  docs: minor update
  plugins: add styles for ol tags in markdown
  docs: minor fixes to images
  Docs image updates (#9225)
  fix: improve behavior when switching back and forth between x-axis modes, fixes #9229
  fixes for metrics tab when data source was not found
  provide ace editor for external datasource plugin (#9224)
  ux: increased code editor auto complete width from 320px to 550px, fixes #9203
  docs: windows - add note about ini comments
  prometheus: added completer unit test, #9208
  docs: minor update
  docs: kiosk mode options add to playlist doc
  influxdb: small css fix for order by in query editor
  style: corrected indentation in sass file
  replaced old images and gifs with new ones (#9217)
  ux: success/error alerts refactoring, #9214
  ...
2017-09-14 13:09:59 +02:00
ryan
f7efa65647 Merge remote-tracking branch 'grafana/master' into influx-db-query2
* grafana/master: (248 commits)
  add AWS/NATGateway metrics (#9202)
  docs: minor docs update
  docs: added v4.4 to docs archive
  docs: uppdated getting started with images and text, added info on query inspector to version45 and trouble shooting (#9193)
  reduce readme to be about the code
  adds note about closing #8876
  build: fixed broken build
  Optimize some wrong usage and spelling
  show only label name in label matcher (#9167)
  (prometheus) cache metric suggest query result (#9182)
  Have 'Hide series with only zeros' ignore nulls (#9179)
  docs: updated image in docs (#9184)
  fix: graph right y label is now correctly possitioned, fixes #9172
  Fix sortByName and percentileOfSeries in gfunc.js (#9169)
  docs: updated docs with v4.5 beta links
  Update CHANGELOG.md
  version bump to v4.5-beta1
  fix: fixed jshint issue
  fix: Elasticsearch and adhoc filters fix, fixes #9165
  docs: update to http api admin section
  ...
2017-09-08 09:50:00 +02:00
ryan
cf81b5caf6 Merge remote-tracking branch 'grafana/master' into influx-db-query2 2017-07-11 09:34:53 -07:00
ryan
c4fede6cf6 merge with master 2017-07-06 11:19:45 -07:00
ryan
cb9c2bcb2f merge with master 2017-06-19 16:13:16 -07:00
ryan
d08b0bbf14 Merge remote-tracking branch 'grafana/master' into influx-db-query2 2017-05-16 15:43:56 -07:00
ryan
26e62b4d06 use the original options parameter 2017-05-01 20:28:56 -07:00
ryan
aafd04f005 Merge remote-tracking branch 'grafana/master' into influx-db-query2 2017-05-01 20:27:02 -07:00
ryan
e8ad7805d8 Merge branch 'influx-db-query2' of https://github.com/ryantxu/grafana into influx-db-query2 2017-04-27 09:38:16 -07:00
ryan
6ee886cd6a Merge remote-tracking branch 'grafana/master' into influx-db-query2 2017-04-27 09:37:55 -07:00
Ryan McKinley
15e84a1c69 use targets[0] as the options 2017-04-26 15:41:10 -07:00
ryan
42abbf5f0d Merge remote-tracking branch 'grafana/master' into influx-db-query2 2017-04-24 09:50:23 -07:00
ryan
16819da08d pass the options along with a _seriesQuery 2017-04-18 09:27:25 -07:00
ryan
8c838cff08 Merge remote-tracking branch 'grafana/master' into influx-db-query2 2017-04-18 09:24:20 -07:00
ryan
8c5972dc55 Merge remote-tracking branch 'grafana/master' into influx-db-query2 2017-04-17 14:17:01 -07:00
ryan
7009184d6e pass database parameter in the options 2017-04-12 09:02:06 -07:00
ryan
e1654b9361 Merge remote-tracking branch 'grafana/master' into influx-db-query2 2017-04-12 08:40:34 -07:00
ryan
c346aca26d allow setting the database 2017-04-11 16:30:20 -07:00
Andrzej Ressel
1bf982439b Sending image 2017-03-23 21:53:54 +01:00
Andrzej Ressel
5f3b7eaa45 Discord integration 2017-03-22 23:28:55 +01:00
1364 changed files with 171065 additions and 36704 deletions

View File

@@ -1,6 +1,6 @@
[run]
init_cmds = [
["go", "build", "-o", "./bin/grafana-server", "./pkg/cmd/grafana-server"],
["go", "run", "build.go", "-dev", "build-server"],
["./bin/grafana-server", "cfg:app_mode=development"]
]
watch_all = true
@@ -12,6 +12,6 @@ watch_dirs = [
watch_exts = [".go", ".ini", ".toml"]
build_delay = 1500
cmds = [
["go", "build", "-o", "./bin/grafana-server", "./pkg/cmd/grafana-server"],
["go", "run", "build.go", "-dev", "build-server"],
["./bin/grafana-server", "cfg:app_mode=development"]
]

276
.circleci/config.yml Normal file
View File

@@ -0,0 +1,276 @@
aliases:
# Workflow filters
- &filter-only-release
branches:
ignore: /.*/
tags:
only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
- &filter-not-release
tags:
ignore: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
version: 2
jobs:
mysql-integration-test:
docker:
- image: circleci/golang:1.10
- image: circleci/mysql:5.6-ram
environment:
MYSQL_ROOT_PASSWORD: rootpass
MYSQL_DATABASE: grafana_tests
MYSQL_USER: grafana
MYSQL_PASSWORD: password
working_directory: /go/src/github.com/grafana/grafana
steps:
- checkout
- run: sudo apt update
- run: sudo apt install -y mysql-client
- run: dockerize -wait tcp://127.0.0.1:3306 -timeout 120s
- run: cat docker/blocks/mysql_tests/setup.sql | mysql -h 127.0.0.1 -P 3306 -u root -prootpass
- run:
name: mysql integration tests
command: 'GRAFANA_TEST_DB=mysql go test ./pkg/services/sqlstore/... ./pkg/tsdb/mysql/... '
postgres-integration-test:
docker:
- image: circleci/golang:1.10
- image: circleci/postgres:9.3-ram
environment:
POSTGRES_USER: grafanatest
POSTGRES_PASSWORD: grafanatest
POSTGRES_DB: grafanatest
working_directory: /go/src/github.com/grafana/grafana
steps:
- checkout
- run: sudo apt update
- run: sudo apt install -y postgresql-client
- run: dockerize -wait tcp://127.0.0.1:5432 -timeout 120s
- run: 'PGPASSWORD=grafanatest psql -p 5432 -h 127.0.0.1 -U grafanatest -d grafanatest -f docker/blocks/postgres_tests/setup.sql'
- run:
name: postgres integration tests
command: 'GRAFANA_TEST_DB=postgres go test ./pkg/services/sqlstore/... ./pkg/tsdb/postgres/...'
codespell:
docker:
- image: circleci/python
steps:
- checkout
- run:
name: install codespell
command: 'sudo pip install codespell'
- run:
# Important: all words have to be in lowercase, and separated by "\n".
name: exclude known exceptions
command: 'echo -e "unknwon" > words_to_ignore.txt'
- run:
name: check documentation spelling errors
command: 'codespell -I ./words_to_ignore.txt docs/'
gometalinter:
docker:
- image: circleci/golang:1.10
environment:
# we need CGO because of go-sqlite3
CGO_ENABLED: 1
working_directory: /go/src/github.com/grafana/grafana
steps:
- checkout
- run: 'go get -u gopkg.in/alecthomas/gometalinter.v2'
- run: 'go get -u github.com/tsenart/deadcode'
- run: 'go get -u github.com/gordonklaus/ineffassign'
- run: 'go get -u github.com/opennota/check/cmd/structcheck'
- run: 'go get -u github.com/mdempsky/unconvert'
- run: 'go get -u github.com/opennota/check/cmd/varcheck'
- run:
name: run linters
command: 'gometalinter.v2 --enable-gc --vendor --deadline 10m --disable-all --enable=deadcode --enable=ineffassign --enable=structcheck --enable=unconvert --enable=varcheck ./...'
test-frontend:
docker:
- image: circleci/node:6.11.4
steps:
- checkout
- run:
name: install yarn
command: 'sudo npm install -g yarn --quiet'
- restore_cache:
key: dependency-cache-{{ checksum "yarn.lock" }}
- run:
name: yarn install
command: 'yarn install --pure-lockfile --no-progress'
- save_cache:
key: dependency-cache-{{ checksum "yarn.lock" }}
paths:
- node_modules
- run:
name: frontend tests
command: './scripts/circle-test-frontend.sh'
test-backend:
docker:
- image: circleci/golang:1.10
working_directory: /go/src/github.com/grafana/grafana
steps:
- checkout
- run:
name: build backend and run go tests
command: './scripts/circle-test-backend.sh'
build-all:
docker:
- image: grafana/build-container:1.0.0
working_directory: /go/src/github.com/grafana/grafana
steps:
- checkout
- run:
name: prepare build tools
command: '/tmp/bootstrap.sh'
- restore_cache:
key: phantomjs-binaries-{{ checksum "scripts/build/download-phantomjs.sh" }}
- run:
name: download phantomjs binaries
command: './scripts/build/download-phantomjs.sh'
- save_cache:
key: phantomjs-binaries-{{ checksum "scripts/build/download-phantomjs.sh" }}
paths:
- /tmp/phantomjs
- run:
name: build and package grafana
command: './scripts/build/build-all.sh'
- run:
name: sign packages
command: './scripts/build/sign_packages.sh'
- run:
name: sha-sum packages
command: 'go run build.go sha-dist'
- run:
name: Build Grafana.com publisher
command: 'go build -o scripts/publish scripts/build/publish.go'
- persist_to_workspace:
root: .
paths:
- dist/grafana*
- scripts/*.sh
- scripts/publish
- store_artifacts:
path: dist
build-enterprise:
docker:
- image: grafana/build-container:v0.1
working_directory: /go/src/github.com/grafana/grafana
steps:
- checkout
- run:
name: build and package grafana
command: './scripts/build/build_enterprise.sh'
- run:
name: sign packages
command: './scripts/build/sign_packages.sh'
- run:
name: sha-sum packages
command: 'go run build.go sha-dist'
deploy-master:
docker:
- image: circleci/python:2.7-stretch
steps:
- attach_workspace:
at: .
- run:
name: install awscli
command: 'sudo pip install awscli'
- run:
name: deploy to s3
command: |
# Also
cp dist/grafana-latest.linux-x64.tar.gz dist/grafana-master-$(echo "${CIRCLE_SHA1}" | cut -b1-7).linux-x64.tar.gz
aws s3 sync ./dist s3://$BUCKET_NAME/master
- run:
name: Trigger Windows build
command: './scripts/trigger_windows_build.sh ${APPVEYOR_TOKEN} ${CIRCLE_SHA1} master'
- run:
name: Trigger Docker build
command: './scripts/trigger_docker_build.sh ${TRIGGER_GRAFANA_PACKER_CIRCLECI_TOKEN} master-$(echo "${CIRCLE_SHA1}" | cut -b1-7)'
- run:
name: Publish to Grafana.com
command: |
rm dist/grafana-master-$(echo "${CIRCLE_SHA1}" | cut -b1-7).linux-x64.tar.gz
./scripts/publish -apiKey ${GRAFANA_COM_API_KEY}
deploy-release:
docker:
- image: circleci/python:2.7-stretch
steps:
- attach_workspace:
at: .
- run:
name: install awscli
command: 'sudo pip install awscli'
- run:
name: deploy to s3
command: 'aws s3 sync ./dist s3://$BUCKET_NAME/release'
- run:
name: Trigger Windows build
command: './scripts/trigger_windows_build.sh ${APPVEYOR_TOKEN} ${CIRCLE_SHA1} release'
- run:
name: Trigger Docker build
command: './scripts/trigger_docker_build.sh ${TRIGGER_GRAFANA_PACKER_CIRCLECI_TOKEN} ${CIRCLE_TAG}'
workflows:
version: 2
test-and-build:
jobs:
- build-all:
filters: *filter-not-release
- codespell:
filters: *filter-not-release
- gometalinter:
filters: *filter-not-release
- test-frontend:
filters: *filter-not-release
- test-backend:
filters: *filter-not-release
- mysql-integration-test:
filters: *filter-not-release
- postgres-integration-test:
filters: *filter-not-release
- deploy-master:
requires:
- build-all
- test-backend
- test-frontend
- codespell
- gometalinter
- mysql-integration-test
- postgres-integration-test
filters:
branches:
only: master
release:
jobs:
- build-all:
filters: *filter-only-release
- codespell:
filters: *filter-only-release
- gometalinter:
filters: *filter-only-release
- test-frontend:
filters: *filter-only-release
- test-backend:
filters: *filter-only-release
- mysql-integration-test:
filters: *filter-only-release
- postgres-integration-test:
filters: *filter-only-release
- deploy-release:
requires:
- build-all
- test-backend
- test-frontend
- codespell
- gometalinter
- mysql-integration-test
- postgres-integration-test
filters: *filter-only-release

15
.dockerignore Normal file
View File

@@ -0,0 +1,15 @@
.awcache
.dockerignore
.git
.gitignore
.github
data*
dist
docker
docs
dump.rdb
node_modules
/local
/tmp
*.yml
*.md

View File

@@ -5,12 +5,12 @@ Read before posting:
- Checkout How to troubleshoot metric query issues: https://community.grafana.com/t/how-to-troubleshoot-metric-query-issues/50
Please include this information:
- What Grafana version are you using?
- What datasource are you using?
- What OS are you running grafana on?
- What did you do?
- What was the expected result?
- What happened instead?
- If related to metric query / data viz:
- Include raw network request & response: get by opening Chrome Dev Tools (F12, Ctrl+Shift+I on windows, Cmd+Opt+I on Mac), go the network tab.
### What Grafana version are you using?
### What datasource are you using?
### What OS are you running grafana on?
### What did you do?
### What was the expected result?
### What happened instead?
### If related to metric query / data viz:
### Include raw network request & response: get by opening Chrome Dev Tools (F12, Ctrl+Shift+I on windows, Cmd+Opt+I on Mac), go the network tab.

9
.gitignore vendored
View File

@@ -1,8 +1,10 @@
node_modules
npm-debug.log
yarn-error.log
coverage/
.aws-config.json
awsconfig
/.awcache
/dist
/public/build
/public/views/index.html
@@ -42,10 +44,13 @@ docker-compose.yaml
/conf/provisioning/**/custom.yaml
profile.cov
/grafana
/local
.notouch
/Makefile.local
/pkg/cmd/grafana-cli/grafana-cli
/pkg/cmd/grafana-server/grafana-server
/pkg/cmd/grafana-server/debug
/pkg/extensions
debug.test
/examples/*/dist
/packaging/**/*.rpm
@@ -60,4 +65,6 @@ debug.test
/vendor/**/*_test.go
/vendor/**/.editorconfig
/vendor/**/appengine*
*.orig
*.orig
/devenv/dashboards/bulk-testing/*.json

View File

@@ -1,3 +1,189 @@
# 5.2.0 (unreleased)
### New Features
* **Dashboard**: Import dashboard to folder [#10796](https://github.com/grafana/grafana/issues/10796)
### Minor
* **Dashboard**: Fix so panel titles doesn't wrap [#11074](https://github.com/grafana/grafana/issues/11074)
* **Dashboard**: Prevent double-click when saving dashboard [#11963](https://github.com/grafana/grafana/issues/11963)
* **Dashboard**: AutoFocus the add-panel search filter [#12189](https://github.com/grafana/grafana/pull/12189) thx [@ryantxu](https://github.com/ryantxu)
* **Units**: W/m2 (energy), l/h (flow) and kPa (pressure) [#11233](https://github.com/grafana/grafana/pull/11233), thx [@flopp999](https://github.com/flopp999)
* **Units**: Litre/min (flow) and milliLitre/min (flow) [#12282](https://github.com/grafana/grafana/pull/12282), thx [@flopp999](https://github.com/flopp999)
* **Alerting**: Fix mobile notifications for Microsoft Teams alert notifier [#11484](https://github.com/grafana/grafana/pull/11484), thx [@manacker](https://github.com/manacker)
* **Influxdb**: Add support for mode function [#12286](https://github.com/grafana/grafana/issues/12286)
* **Cloudwatch**: Fixes panic caused by bad timerange settings [#12199](https://github.com/grafana/grafana/issues/12199)
* **Auth Proxy**: Whitelist proxy IP address instead of client IP address [#10707](https://github.com/grafana/grafana/issues/10707)
# 5.2.0-beta1 (2018-06-05)
### New Features
* **Elasticsearch**: Alerting support [#5893](https://github.com/grafana/grafana/issues/5893), thx [@WPH95](https://github.com/WPH95)
* **Login**: Change admin password after first login [#11882](https://github.com/grafana/grafana/issues/11882)
* **Alert list panel**: Updated to support filtering alerts by name, dashboard title, folder, tags [#11500](https://github.com/grafana/grafana/issues/11500), [#8168](https://github.com/grafana/grafana/issues/8168), [#6541](https://github.com/grafana/grafana/issues/6541)
### Minor
* **Dashboard**: Modified time range and variables are now not saved by default [#10748](https://github.com/grafana/grafana/issues/10748), [#8805](https://github.com/grafana/grafana/issues/8805)
* **Graph**: Show invisible highest value bucket in histogram [#11498](https://github.com/grafana/grafana/issues/11498)
* **Dashboard**: Enable "Save As..." if user has edit permission [#11625](https://github.com/grafana/grafana/issues/11625)
* **Prometheus**: Query dates are now step-aligned [#10434](https://github.com/grafana/grafana/pull/10434)
* **Prometheus**: Table columns order now changes when rearrange queries [#11690](https://github.com/grafana/grafana/issues/11690), thx [@mtanda](https://github.com/mtanda)
* **Variables**: Fix variable interpolation when using multiple formatting types [#11800](https://github.com/grafana/grafana/issues/11800), thx [@svenklemm](https://github.com/svenklemm)
* **Dashboard**: Fix date selector styling for dark/light theme in time picker control [#11616](https://github.com/grafana/grafana/issues/11616)
* **Discord**: Alert notification channel type for Discord, [#7964](https://github.com/grafana/grafana/issues/7964) thx [@jereksel](https://github.com/jereksel),
* **InfluxDB**: Support SELECT queries in templating query, [#5013](https://github.com/grafana/grafana/issues/5013)
* **InfluxDB**: Support count distinct aggregation [#11645](https://github.com/grafana/grafana/issues/11645), thx [@kichristensen](https://github.com/kichristensen)
* **Dashboard**: JSON Model under dashboard settings can now be updated & changes saved, [#1429](https://github.com/grafana/grafana/issues/1429), thx [@jereksel](https://github.com/jereksel)
* **Security**: Fix XSS vulnerabilities in dashboard links [#11813](https://github.com/grafana/grafana/pull/11813)
* **Singlestat**: Fix "time of last point" shows local time when dashboard timezone set to UTC [#10338](https://github.com/grafana/grafana/issues/10338)
* **Prometheus**: Add support for passing timeout parameter to Prometheus [#11788](https://github.com/grafana/grafana/pull/11788), thx [@mtanda](https://github.com/mtanda)
* **Login**: Add optional option sign out url for generic oauth [#9847](https://github.com/grafana/grafana/issues/9847), thx [@roidelapluie](https://github.com/roidelapluie)
* **Login**: Use proxy server from environment variable if available [#9703](https://github.com/grafana/grafana/issues/9703), thx [@iyeonok](https://github.com/iyeonok)
* **Invite users**: Friendlier error message when smtp is not configured [#12087](https://github.com/grafana/grafana/issues/12087), thx [@thurt](https://github.com/thurt)
* **Graphite**: Don't send distributed tracing headers when using direct/browser access mode [#11494](https://github.com/grafana/grafana/issues/11494)
* **Sidenav**: Show create dashboard link for viewers if at least editor in one folder [#11858](https://github.com/grafana/grafana/issues/11858)
* **SQL**: Second epochs are now correctly converted to ms. [#12085](https://github.com/grafana/grafana/pull/12085)
* **Singlestat**: Fix singlestat threshold tooltip [#11971](https://github.com/grafana/grafana/issues/11971)
* **Dashboard**: Hide grid controls in fullscreen/low-activity views [#11771](https://github.com/grafana/grafana/issues/11771)
* **Dashboard**: Validate uid when importing dashboards [#11515](https://github.com/grafana/grafana/issues/11515)
* **Docker**: Support for env variables ending with _FILE [grafana-docker #166](https://github.com/grafana/grafana-docker/pull/166), thx [@efrecon](https://github.com/efrecon)
* **Alert list panel**: Show alerts for user with viewer role [#11167](https://github.com/grafana/grafana/issues/11167)
* **Provisioning**: Verify checksum of dashboards before updating to reduce load on database [#11670](https://github.com/grafana/grafana/issues/11670)
* **Provisioning**: Support symlinked files in dashboard provisioning config files [#11958](https://github.com/grafana/grafana/issues/11958)
* **Dashboard list panel**: Search dashboards by folder [#11525](https://github.com/grafana/grafana/issues/11525)
* **Sidenav**: Always show server admin link in sidenav if grafana admin [#11657](https://github.com/grafana/grafana/issues/11657)
# 5.1.3 (2018-05-16)
* **Scroll**: Graph panel / legend texts shifts on the left each time we move scrollbar on firefox [#11830](https://github.com/grafana/grafana/issues/11830)
# 5.1.2 (2018-05-09)
* **Database**: Fix MySql migration issue [#11862](https://github.com/grafana/grafana/issues/11862)
* **Google Analytics**: Enable Google Analytics anonymizeIP setting for GDPR [#11656](https://github.com/grafana/grafana/pull/11656)
# 5.1.1 (2018-05-07)
* **LDAP**: LDAP login with MariaDB/MySQL database and dn>100 chars not possible [#11754](https://github.com/grafana/grafana/issues/11754)
* **Build**: AppVeyor Windows build missing version and commit info [#11758](https://github.com/grafana/grafana/issues/11758)
* **Scroll**: Scroll can't start in graphs on Chrome mobile [#11710](https://github.com/grafana/grafana/issues/11710)
* **Units**: Revert renaming of unit key ppm [#11743](https://github.com/grafana/grafana/issues/11743)
# 5.1.0 (2018-04-26)
* **Folders**: Default permissions on folder are not shown as inherited in its dashboards [#11668](https://github.com/grafana/grafana/issues/11668)
* **Templating**: Allow more than 20 previews when creating a variable [#11508](https://github.com/grafana/grafana/issues/11508)
* **Dashboard**: Row edit icon not shown [#11466](https://github.com/grafana/grafana/issues/11466)
* **SQL**: Unsupported data types for value column using time series query [#11703](https://github.com/grafana/grafana/issues/11703)
* **Prometheus**: Prometheus query inspector expands to be very large on autocomplete queries [#11673](https://github.com/grafana/grafana/issues/11673)
# 5.1.0-beta1 (2018-04-20)
* **MSSQL**: New Microsoft SQL Server data source [#10093](https://github.com/grafana/grafana/pull/10093), [#11298](https://github.com/grafana/grafana/pull/11298), thx [@linuxchips](https://github.com/linuxchips)
* **Prometheus**: The heatmap panel now support Prometheus histograms [#10009](https://github.com/grafana/grafana/issues/10009)
* **Postgres/MySQL**: Ability to insert 0s or nulls for missing intervals [#9487](https://github.com/grafana/grafana/issues/9487), thanks [@svenklemm](https://github.com/svenklemm)
* **Postgres/MySQL/MSSQL**: Fix precision for the time column in table mode [#11306](https://github.com/grafana/grafana/issues/11306)
* **Graph**: Align left and right Y-axes to one level [#1271](https://github.com/grafana/grafana/issues/1271) & [#2740](https://github.com/grafana/grafana/issues/2740) thx [@ilgizar](https://github.com/ilgizar)
* **Graph**: Thresholds for Right Y axis [#7107](https://github.com/grafana/grafana/issues/7107), thx [@ilgizar](https://github.com/ilgizar)
* **Graph**: Support multiple series stacking in histogram mode [#8151](https://github.com/grafana/grafana/issues/8151), thx [@mtanda](https://github.com/mtanda)
* **Alerting**: Pausing/un alerts now updates new_state_date [#10942](https://github.com/grafana/grafana/pull/10942)
* **Alerting**: Support Pagerduty notification channel using Pagerduty V2 API [#10531](https://github.com/grafana/grafana/issues/10531), thx [@jbaublitz](https://github.com/jbaublitz)
* **Templating**: Add comma templating format [#10632](https://github.com/grafana/grafana/issues/10632), thx [@mtanda](https://github.com/mtanda)
* **Prometheus**: Show template variable candidate in query editor [#9210](https://github.com/grafana/grafana/issues/9210), thx [@mtanda](https://github.com/mtanda)
* **Prometheus**: Support POST for query and query_range [#9859](https://github.com/grafana/grafana/pull/9859), thx [@mtanda](https://github.com/mtanda)
* **Alerting**: Add support for retries on alert queries [#5855](https://github.com/grafana/grafana/issues/5855), thx [@Thib17](https://github.com/Thib17)
* **Table**: Table plugin value mappings [#7119](https://github.com/grafana/grafana/issues/7119), thx [infernix](https://github.com/infernix)
* **IE11**: IE 11 compatibility [#11165](https://github.com/grafana/grafana/issues/11165)
* **Scrolling**: Better scrolling experience [#11053](https://github.com/grafana/grafana/issues/11053), [#11252](https://github.com/grafana/grafana/issues/11252), [#10836](https://github.com/grafana/grafana/issues/10836), [#11185](https://github.com/grafana/grafana/issues/11185), [#11168](https://github.com/grafana/grafana/issues/11168)
* **Docker**: Improved docker image (breaking changes regarding file ownership) [grafana-docker #141](https://github.com/grafana/grafana-docker/issues/141), thx [@Spindel](https://github.com/Spindel), [@ChristianKniep](https://github.com/ChristianKniep), [@brancz](https://github.com/brancz) and [@jangaraj](https://github.com/jangaraj)
* **Folders**: A folder admin cannot add user/team permissions for folder/its dashboards [#11173](https://github.com/grafana/grafana/issues/11173)
* **Provisioning**: Improved workflow for provisioned dashboards [#10883](https://github.com/grafana/grafana/issues/10883)
### Minor
* **OpsGenie**: Add triggered alerts as description [#11046](https://github.com/grafana/grafana/pull/11046), thx [@llamashoes](https://github.com/llamashoes)
* **Cloudwatch**: Support high resolution metrics [#10925](https://github.com/grafana/grafana/pull/10925), thx [@mtanda](https://github.com/mtanda)
* **Cloudwatch**: Add dimension filtering to CloudWatch `dimension_values()` [#10029](https://github.com/grafana/grafana/issues/10029), thx [@willyhutw](https://github.com/willyhutw)
* **Units**: Second to HH:mm:ss formatter [#11107](https://github.com/grafana/grafana/issues/11107), thx [@gladdiologist](https://github.com/gladdiologist)
* **Singlestat**: Add color to prefix and postfix in singlestat panel [#11143](https://github.com/grafana/grafana/pull/11143), thx [@ApsOps](https://github.com/ApsOps)
* **Dashboards**: Version cleanup fails on old databases with many entries [#11278](https://github.com/grafana/grafana/issues/11278)
* **Server**: Adjust permissions of unix socket [#11343](https://github.com/grafana/grafana/pull/11343), thx [@corny](https://github.com/corny)
* **Shortcuts**: Add shortcut for duplicate panel [#11102](https://github.com/grafana/grafana/issues/11102)
* **AuthProxy**: Support IPv6 in Auth proxy white list [#11330](https://github.com/grafana/grafana/pull/11330), thx [@corny](https://github.com/corny)
* **SMTP**: Don't connect to STMP server using TLS unless configured. [#7189](https://github.com/grafana/grafana/issues/7189)
* **Prometheus**: Escape backslash in labels correctly. [#10555](https://github.com/grafana/grafana/issues/10555), thx [@roidelapluie](https://github.com/roidelapluie)
* **Variables**: Case-insensitive sorting for template values [#11128](https://github.com/grafana/grafana/issues/11128) thx [@cross](https://github.com/cross)
* **Annotations (native)**: Change default limit from 10 to 100 when querying api [#11569](https://github.com/grafana/grafana/issues/11569), thx [@flopp999](https://github.com/flopp999)
* **MySQL/Postgres/MSSQL**: PostgreSQL datasource generates invalid query with dates before 1970 [#11530](https://github.com/grafana/grafana/issues/11530) thx [@ryantxu](https://github.com/ryantxu)
* **Kiosk**: Adds url parameter for starting a dashboard in inactive mode [#11228](https://github.com/grafana/grafana/issues/11228), thx [@towolf](https://github.com/towolf)
* **Dashboard**: Enable closing timepicker using escape key [#11332](https://github.com/grafana/grafana/issues/11332)
* **Datasources**: Rename direct access mode in the data source settings [#11391](https://github.com/grafana/grafana/issues/11391)
* **Search**: Display dashboards in folder indented [#11073](https://github.com/grafana/grafana/issues/11073)
* **Units**: Use B/s instead Bps for Bytes per second [#9342](https://github.com/grafana/grafana/pull/9342), thx [@mayli](https://github.com/mayli)
* **Units**: Radiation units [#11001](https://github.com/grafana/grafana/issues/11001), thx [@victorclaessen](https://github.com/victorclaessen)
* **Units**: Timeticks unit [#11183](https://github.com/grafana/grafana/pull/11183), thx [@jtyr](https://github.com/jtyr)
* **Units**: Concentration units and "Normal cubic metre" [#11211](https://github.com/grafana/grafana/issues/11211), thx [@flopp999](https://github.com/flopp999)
* **Units**: New currency - Czech koruna [#11384](https://github.com/grafana/grafana/pull/11384), thx [@Rohlik](https://github.com/Rohlik)
* **Avatar**: Fix DISABLE_GRAVATAR option [#11095](https://github.com/grafana/grafana/issues/11095)
* **Heatmap**: Disable log scale when using time time series buckets [#10792](https://github.com/grafana/grafana/issues/10792)
* **Provisioning**: Remove `id` from json when provisioning dashboards, [#11138](https://github.com/grafana/grafana/issues/11138)
* **Prometheus**: tooltip for legend format not showing properly [#11516](https://github.com/grafana/grafana/issues/11516), thx [@svenklemm](https://github.com/svenklemm)
* **Playlist**: Empty playlists cannot be deleted [#11133](https://github.com/grafana/grafana/issues/11133), thx [@kichristensen](https://github.com/kichristensen)
* **Switch Orgs**: Alphabetic order in Switch Organization modal [#11556](https://github.com/grafana/grafana/issues/11556)
* **Postgres**: improve `$__timeFilter` macro [#11578](https://github.com/grafana/grafana/issues/11578), thx [@svenklemm](https://github.com/svenklemm)
* **Permission list**: Improved ux [#10747](https://github.com/grafana/grafana/issues/10747)
* **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)
* Add codespell to CI [#11602](https://github.com/grafana/grafana/pull/11602), thx [@mjtrangoni](https://github.com/mjtrangoni)
* Migrated JavaScript files to TypeScript
# 5.0.4 (2018-03-28)
* **Docker** Can't start Grafana on Kubernetes 1.7.14, 1.8.9, or 1.9.4 [#140 in grafana-docker repo](https://github.com/grafana/grafana-docker/issues/140) thx [@suquant](https://github.com/suquant)
* **Dashboard** Fixed bug where collapsed panels could not be directly linked to/renderer [#11114](https://github.com/grafana/grafana/issues/11114) & [#11086](https://github.com/grafana/grafana/issues/11086) & [#11296](https://github.com/grafana/grafana/issues/11296)
* **Dashboard** Provisioning dashboard with alert rules should create alerts [#11247](https://github.com/grafana/grafana/issues/11247)
* **Snapshots** For snapshots, the Graph panel renders the legend incorrectly on right hand side [#11318](https://github.com/grafana/grafana/issues/11318)
* **Alerting** Link back to Grafana returns wrong URL if root_path contains sub-path components [#11403](https://github.com/grafana/grafana/issues/11403)
* **Alerting** Incorrect default value for upload images setting for alert notifiers [#11413](https://github.com/grafana/grafana/pull/11413)
# 5.0.3 (2018-03-16)
* **Mysql**: Mysql panic occurring occasionally upon Grafana dashboard access (a bigger patch than the one in 5.0.2) [#11155](https://github.com/grafana/grafana/issues/11155)
# 5.0.2 (2018-03-14)
* **Mysql**: Mysql panic occurring occasionally upon Grafana dashboard access [#11155](https://github.com/grafana/grafana/issues/11155)
* **Dashboards**: Should be possible to browse dashboard using only uid [#11231](https://github.com/grafana/grafana/issues/11231)
* **Alerting**: Fixes bug where alerts from hidden panels where deleted [#11222](https://github.com/grafana/grafana/issues/11222)
* **Import**: Fixes bug where dashboards with alerts couldn't be imported [#11227](https://github.com/grafana/grafana/issues/11227)
* **Teams**: Remove quota restrictions from teams [#11220](https://github.com/grafana/grafana/issues/11220)
* **Render**: Fixes bug with legacy url redirection for panel rendering [#11180](https://github.com/grafana/grafana/issues/11180)
# 5.0.1 (2018-03-08)
* **Postgres**: PostgreSQL error when using ipv6 address as hostname in connection string [#11055](https://github.com/grafana/grafana/issues/11055), thanks [@svenklemm](https://github.com/svenklemm)
* **Dashboards**: Changing templated value from dropdown is causing unsaved changes [#11063](https://github.com/grafana/grafana/issues/11063)
* **Prometheus**: Fixes bundled Prometheus 2.0 dashboard [#11016](https://github.com/grafana/grafana/issues/11016), thx [@roidelapluie](https://github.com/roidelapluie)
* **Sidemenu**: Profile menu "invisible" when gravatar is disabled [#11097](https://github.com/grafana/grafana/issues/11097)
* **Dashboard**: Fixes a bug with resizable handles for panels [#11103](https://github.com/grafana/grafana/issues/11103)
* **Alerting**: Telegram inline image mode fails when caption too long [#10975](https://github.com/grafana/grafana/issues/10975)
* **Alerting**: Fixes silent failing validation [#11145](https://github.com/grafana/grafana/pull/11145)
* **OAuth**: Only use jwt token if it contains an email address [#11127](https://github.com/grafana/grafana/pull/11127)
# 5.0.0-stable (2018-03-01)
### Fixes
- **oauth** Fix Github OAuth not working with private Organizations [#11028](https://github.com/grafana/grafana/pull/11028) [@lostick](https://github.com/lostick)
- **kiosk** white area over bottom panels in kiosk mode [#11010](https://github.com/grafana/grafana/issues/11010)
- **alerting** Fix OK state doesn't show up in Microsoft Teams [#11032](https://github.com/grafana/grafana/pull/11032), thx [@manacker](https://github.com/manacker)
# 5.0.0-beta5 (2018-02-26)
### Fixes
@@ -49,7 +235,7 @@ Grafana v5.0 is going to be the biggest and most foundational release Grafana ha
### New Major Features
- **Dashboards** Dashboard folders, [#1611](https://github.com/grafana/grafana/issues/1611)
- **Teams** User groups (teams) implemented. Can be used in folder & dashboard permission list.
- **Dashboard grid**: Panels are now layed out in a two dimensional grid (with x, y, w, h). [#9093](https://github.com/grafana/grafana/issues/9093).
- **Dashboard grid**: Panels are now laid out in a two dimensional grid (with x, y, w, h). [#9093](https://github.com/grafana/grafana/issues/9093).
- **Templating**: Vertical repeat direction for panel repeats.
- **UX**: Major update to page header and navigation
- **Dashboard settings**: Combine dashboard settings views into one with side menu, [#9750](https://github.com/grafana/grafana/issues/9750)
@@ -83,7 +269,7 @@ Dashboard panels and rows are positioned using a gridPos object `{x: 0, y: 0, w:
* **Dashboard history**: New config file option versions_to_keep sets how many versions per dashboard to store, [#9671](https://github.com/grafana/grafana/issues/9671)
* **Dashboard as cfg**: Load dashboards from file into Grafana on startup/change [#9654](https://github.com/grafana/grafana/issues/9654) [#5269](https://github.com/grafana/grafana/issues/5269)
* **Prometheus**: Grafana can now send alerts to Prometheus Alertmanager while firing [#7481](https://github.com/grafana/grafana/issues/7481), thx [@Thib17](https://github.com/Thib17) and [@mtanda](https://github.com/mtanda)
* **Table**: Support multiple table formated queries in table panel [#9170](https://github.com/grafana/grafana/issues/9170), thx [@davkal](https://github.com/davkal)
* **Table**: Support multiple table formatted queries in table panel [#9170](https://github.com/grafana/grafana/issues/9170), thx [@davkal](https://github.com/davkal)
* **Security**: Protect against brute force (frequent) login attempts [#7616](https://github.com/grafana/grafana/issues/7616)
## Minor
@@ -105,7 +291,7 @@ Dashboard panels and rows are positioned using a gridPos object `{x: 0, y: 0, w:
* **Sensu**: Send alert message to sensu output [#9551](https://github.com/grafana/grafana/issues/9551), thx [@cjchand](https://github.com/cjchand)
* **Singlestat**: suppress error when result contains no datapoints [#9636](https://github.com/grafana/grafana/issues/9636), thx [@utkarshcmu](https://github.com/utkarshcmu)
* **Postgres/MySQL**: Control quoting in SQL-queries when using template variables [#9030](https://github.com/grafana/grafana/issues/9030), thanks [@svenklemm](https://github.com/svenklemm)
* **Pagerduty**: Pagerduty dont auto resolve incidents by default anymore. [#10222](https://github.com/grafana/grafana/issues/10222)
* **Pagerduty**: Pagerduty don't auto resolve incidents by default anymore. [#10222](https://github.com/grafana/grafana/issues/10222)
* **Cloudwatch**: Fix for multi-valued templated queries. [#9903](https://github.com/grafana/grafana/issues/9903)
## Tech
@@ -183,7 +369,7 @@ The following properties have been deprecated and will be removed in a future re
* **Annotations**: Add support for creating annotations from graph panel [#8197](https://github.com/grafana/grafana/pull/8197)
* **GCS**: Adds support for Google Cloud Storage [#8370](https://github.com/grafana/grafana/issues/8370) thx [@chuhlomin](https://github.com/chuhlomin)
* **Prometheus**: Adds /metrics endpoint for exposing Grafana metrics. [#9187](https://github.com/grafana/grafana/pull/9187)
* **Graph**: Add support for local formating in axis. [#1395](https://github.com/grafana/grafana/issues/1395), thx [@m0nhawk](https://github.com/m0nhawk)
* **Graph**: Add support for local formatting in axis. [#1395](https://github.com/grafana/grafana/issues/1395), thx [@m0nhawk](https://github.com/m0nhawk)
* **Jaeger**: Add support for open tracing using jaeger in Grafana. [#9213](https://github.com/grafana/grafana/pull/9213)
* **Unit types**: New date & time unit types added, useful in singlestat to show dates & times. [#3678](https://github.com/grafana/grafana/issues/3678), [#6710](https://github.com/grafana/grafana/issues/6710), [#2764](https://github.com/grafana/grafana/issues/2764)
* **CLI**: Make it possible to install plugins from any url [#5873](https://github.com/grafana/grafana/issues/5873)
@@ -220,7 +406,7 @@ The following properties have been deprecated and will be removed in a future re
* **Graphite**: Fix for Grafana internal metrics to Graphite sending NaN values [#9279](https://github.com/grafana/grafana/issues/9279)
* **HTTP API**: Fix for HEAD method requests [#9307](https://github.com/grafana/grafana/issues/9307)
* **Templating**: Fix for duplicate template variable queries when refresh is set to time range change [#9185](https://github.com/grafana/grafana/issues/9185)
* **Metrics**: dont write NaN values to graphite [#9279](https://github.com/grafana/grafana/issues/9279)
* **Metrics**: don't write NaN values to graphite [#9279](https://github.com/grafana/grafana/issues/9279)
# 4.5.1 (2017-09-15)
@@ -257,12 +443,12 @@ The following properties have been deprecated and will be removed in a future re
### Breaking change
* **InfluxDB/Elasticsearch**: The panel & data source option named "Group by time interval" is now named "Min time interval" and does now always define a lower limit for the auto group by time. Without having to use `>` prefix (that prefix still works). This should in theory have close to zero actual impact on existing dashboards. It does mean that if you used this setting to define a hard group by time interval of, say "1d", if you zoomed to a time range wide enough the time range could increase above the "1d" range as the setting is now always considered a lower limit.
* **Elasticsearch**: Elasticsearch metric queries without date histogram now return table formated data making table panel much easier to use for this use case. Should not break/change existing dashboards with stock panels but external panel plugins can be affected.
* **Elasticsearch**: Elasticsearch metric queries without date histogram now return table formatted data making table panel much easier to use for this use case. Should not break/change existing dashboards with stock panels but external panel plugins can be affected.
## Changes
* **InfluxDB**: Change time range filter for absolute time ranges to be inclusive instead of exclusive [#8319](https://github.com/grafana/grafana/issues/8319), thx [@Oxydros](https://github.com/Oxydros)
* **InfluxDB**: Added paranthesis around tag filters in queries [#9131](https://github.com/grafana/grafana/pull/9131)
* **InfluxDB**: Added parenthesis around tag filters in queries [#9131](https://github.com/grafana/grafana/pull/9131)
## Bug Fixes
@@ -274,7 +460,7 @@ The following properties have been deprecated and will be removed in a future re
## Bug Fixes
* **Search**: Fix for issue that casued search view to hide when you clicked starred or tags filters, fixes [#8981](https://github.com/grafana/grafana/issues/8981)
* **Search**: Fix for issue that caused search view to hide when you clicked starred or tags filters, fixes [#8981](https://github.com/grafana/grafana/issues/8981)
* **Modals**: ESC key now closes modal again, fixes [#8981](https://github.com/grafana/grafana/issues/8988), thx [@j-white](https://github.com/j-white)
# 4.4.2 (2017-08-01)
@@ -613,12 +799,12 @@ due to too many connections/file handles on the data source backend. This proble
### Enhancements
* **Login**: Adds option to disable username/password logins, closes [#4674](https://github.com/grafana/grafana/issues/4674)
* **SingleStat**: Add seriename as option in singlestat panel, closes [#4740](https://github.com/grafana/grafana/issues/4740)
* **Localization**: Week start day now dependant on browser locale setting, closes [#3003](https://github.com/grafana/grafana/issues/3003)
* **Localization**: Week start day now dependent on browser locale setting, closes [#3003](https://github.com/grafana/grafana/issues/3003)
* **Templating**: Update panel repeats for variables that change on time refresh, closes [#5021](https://github.com/grafana/grafana/issues/5021)
* **Templating**: Add support for numeric and alphabetical sorting of variable values, closes [#2839](https://github.com/grafana/grafana/issues/2839)
* **Elasticsearch**: Support to set Precision Threshold for Unique Count metric, closes [#4689](https://github.com/grafana/grafana/issues/4689)
* **Navigation**: Add search to org swithcer, closes [#2609](https://github.com/grafana/grafana/issues/2609)
* **Database**: Allow database config using one propertie, closes [#5456](https://github.com/grafana/grafana/pull/5456)
* **Database**: Allow database config using one property, closes [#5456](https://github.com/grafana/grafana/pull/5456)
* **Graphite**: Add support for groupByNodes, closes [#5613](https://github.com/grafana/grafana/pull/5613)
* **Influxdb**: Add support for elapsed(), closes [#5827](https://github.com/grafana/grafana/pull/5827)
* **OpenTSDB**: Add support for explicitTags for OpenTSDB>=2.3, closes [#6360](https://github.com/grafana/grafana/pull/6361)
@@ -685,7 +871,7 @@ due to too many connections/file handles on the data source backend. This proble
* **Datasource**: Pending data source requests are cancelled before new ones are issues (Graphite & Prometheus), closes [#5321](https://github.com/grafana/grafana/issues/5321)
### Breaking changes
* **Logging** : Changed default logging output format (now structured into message, and key value pairs, with logger key acting as component). You can also no change in config to json log ouput.
* **Logging** : Changed default logging output format (now structured into message, and key value pairs, with logger key acting as component). You can also no change in config to json log output.
* **Graphite** : The Graph panel no longer have a Graphite PNG option. closes [#5367](https://github.com/grafana/grafana/issues/5367)
### Bug fixes
@@ -703,7 +889,7 @@ due to too many connections/file handles on the data source backend. This proble
* **Annotations**: Annotations can now use a template variable as data source, closes [#5054](https://github.com/grafana/grafana/issues/5054)
* **Time picker**: Fixed issue timepicker and UTC when reading time from URL, fixes [#5078](https://github.com/grafana/grafana/issues/5078)
* **CloudWatch**: Support for Multiple Account by AssumeRole, closes [#3522](https://github.com/grafana/grafana/issues/3522)
* **Singlestat**: Fixed alignment and minium height issue, fixes [#5113](https://github.com/grafana/grafana/issues/5113), fixes [#4679](https://github.com/grafana/grafana/issues/4679)
* **Singlestat**: Fixed alignment and minimum height issue, fixes [#5113](https://github.com/grafana/grafana/issues/5113), fixes [#4679](https://github.com/grafana/grafana/issues/4679)
* **Share modal**: Fixed link when using grafana under dashboard sub url, fixes [#5109](https://github.com/grafana/grafana/issues/5109)
* **Prometheus**: Fixed bug in query editor that caused it not to load when reloading page, fixes [#5107](https://github.com/grafana/grafana/issues/5107)
* **Elasticsearch**: Fixed bug when template variable query returns numeric values, fixes [#5097](https://github.com/grafana/grafana/issues/5097), fixes [#5088](https://github.com/grafana/grafana/issues/5088)
@@ -720,7 +906,7 @@ due to too many connections/file handles on the data source backend. This proble
* **Graph**: Fixed broken PNG rendering in graph panel, fixes [#5025](https://github.com/grafana/grafana/issues/5025)
* **Graph**: Fixed broken xaxis on graph panel, fixes [#5024](https://github.com/grafana/grafana/issues/5024)
* **Influxdb**: Fixes crash when hiding middle serie, fixes [#5005](https://github.com/grafana/grafana/issues/5005)
* **Influxdb**: Fixes crash when hiding middle series, fixes [#5005](https://github.com/grafana/grafana/issues/5005)
# 3.0.1 Stable (2016-05-11)
@@ -732,7 +918,7 @@ due to too many connections/file handles on the data source backend. This proble
### Bug fixes
* **Dashboard title**: Fixed max dashboard title width (media query) for large screens, fixes [#4859](https://github.com/grafana/grafana/issues/4859)
* **Annotations**: Fixed issue with entering annotation edit view, fixes [#4857](https://github.com/grafana/grafana/issues/4857)
* **Remove query**: Fixed issue with removing query for data sources without collapsable query editors, fixes [#4856](https://github.com/grafana/grafana/issues/4856)
* **Remove query**: Fixed issue with removing query for data sources without collapsible query editors, fixes [#4856](https://github.com/grafana/grafana/issues/4856)
* **Graphite PNG**: Fixed issue graphite png rendering option, fixes [#4864](https://github.com/grafana/grafana/issues/4864)
* **InfluxDB**: Fixed issue missing plus group by iconn, fixes [#4862](https://github.com/grafana/grafana/issues/4862)
* **Graph**: Fixes missing line mode for thresholds, fixes [#4902](https://github.com/grafana/grafana/pull/4902)
@@ -748,11 +934,11 @@ due to too many connections/file handles on the data source backend. This proble
### Bug fixes
* **InfluxDB 0.12**: Fixed issue templating and `show tag values` query only returning tags for first measurement, fixes [#4726](https://github.com/grafana/grafana/issues/4726)
* **Templating**: Fixed issue with regex formating when matching multiple values, fixes [#4755](https://github.com/grafana/grafana/issues/4755)
* **Templating**: Fixed issue with regex formatting when matching multiple values, fixes [#4755](https://github.com/grafana/grafana/issues/4755)
* **Templating**: Fixed issue with custom all value and escaping, fixes [#4736](https://github.com/grafana/grafana/issues/4736)
* **Dashlist**: Fixed issue dashboard list panel and caching tags, fixes [#4768](https://github.com/grafana/grafana/issues/4768)
* **Graph**: Fixed issue with unneeded scrollbar in legend for Firefox, fixes [#4760](https://github.com/grafana/grafana/issues/4760)
* **Table panel**: Fixed issue table panel formating string array properties, fixes [#4791](https://github.com/grafana/grafana/issues/4791)
* **Table panel**: Fixed issue table panel formatting string array properties, fixes [#4791](https://github.com/grafana/grafana/issues/4791)
* **grafana-cli**: Improve error message when failing to install plugins due to corrupt response, fixes [#4651](https://github.com/grafana/grafana/issues/4651)
* **Singlestat**: Fixes prefix an postfix for gauges, fixes [#4812](https://github.com/grafana/grafana/issues/4812)
* **Singlestat**: Fixes auto-refresh on change for some options, fixes [#4809](https://github.com/grafana/grafana/issues/4809)
@@ -844,7 +1030,7 @@ slack channel (link to slack channel in readme).
### Bug fixes
* **Playlist**: Fix for memory leak when running a playlist, closes [#3794](https://github.com/grafana/grafana/pull/3794)
* **InfluxDB**: Fix for InfluxDB and table panel when using Format As Table and having group by time, fixes [#3928](https://github.com/grafana/grafana/issues/3928)
* **Panel Time shift**: Fix for panel time range and using dashboard times liek `Today` and `This Week`, fixes [#3941](https://github.com/grafana/grafana/issues/3941)
* **Panel Time shift**: Fix for panel time range and using dashboard times like `Today` and `This Week`, fixes [#3941](https://github.com/grafana/grafana/issues/3941)
* **Row repeat**: Repeated rows will now appear next to each other and not by the bottom of the dashboard, fixes [#3942](https://github.com/grafana/grafana/issues/3942)
* **Png renderer**: Fix for phantomjs path on windows, fixes [#3657](https://github.com/grafana/grafana/issues/3657)
@@ -868,7 +1054,7 @@ slack channel (link to slack channel in readme).
### Bug Fixes
* **metric editors**: Fix for clicking typeahead auto dropdown option, fixes [#3428](https://github.com/grafana/grafana/issues/3428)
* **influxdb**: Fixed issue showing Group By label only on first query, fixes [#3453](https://github.com/grafana/grafana/issues/3453)
* **logging**: Add more verbose info logging for http reqeusts, closes [#3405](https://github.com/grafana/grafana/pull/3405)
* **logging**: Add more verbose info logging for http requests, closes [#3405](https://github.com/grafana/grafana/pull/3405)
# 2.6.0-Beta1 (2015-12-04)
@@ -895,7 +1081,7 @@ slack channel (link to slack channel in readme).
**New Feature: Mix data sources**
- A built in data source is now available named `-- Mixed --`, When picked in the metrics tab,
it allows you to add queries of differnet data source types & instances to the same graph/panel!
it allows you to add queries of different data source types & instances to the same graph/panel!
[Issue #436](https://github.com/grafana/grafana/issues/436)
**New Feature: Elasticsearch Metrics Query Editor and Viz Support**
@@ -934,7 +1120,7 @@ it allows you to add queries of differnet data source types & instances to the s
- [Issue #2564](https://github.com/grafana/grafana/issues/2564). Templating: Another atempt at fixing #2534 (Init multi value template var used in repeat panel from url)
- [Issue #2620](https://github.com/grafana/grafana/issues/2620). Graph: multi series tooltip did no highlight correct point when stacking was enabled and series were of different resolution
- [Issue #2636](https://github.com/grafana/grafana/issues/2636). InfluxDB: Do no show template vars in dropdown for tag keys and group by keys
- [Issue #2604](https://github.com/grafana/grafana/issues/2604). InfluxDB: More alias options, can now use `$[0-9]` syntax to reference part of a measurement name (seperated by dots)
- [Issue #2604](https://github.com/grafana/grafana/issues/2604). InfluxDB: More alias options, can now use `$[0-9]` syntax to reference part of a measurement name (separated by dots)
**Breaking Changes**
- Notice to makers/users of custom data sources, there is a minor breaking change in 2.2 that
@@ -1016,7 +1202,7 @@ Grunt & Watch tasks:
- [Issue #1826](https://github.com/grafana/grafana/issues/1826). User role 'Viewer' are now prohibited from entering edit mode (and doing other transient dashboard edits). A new role `Read Only Editor` will replace the old Viewer behavior
- [Issue #1928](https://github.com/grafana/grafana/issues/1928). HTTP API: GET /api/dashboards/db/:slug response changed property `model` to `dashboard` to match the POST request nameing
- Backend render URL changed from `/render/dashboard/solo` `render/dashboard-solo/` (in order to have consistent dashboard url `/dashboard/:type/:slug`)
- Search HTTP API response has changed (simplified), tags list moved to seperate HTTP resource URI
- Search HTTP API response has changed (simplified), tags list moved to separate HTTP resource URI
- Datasource HTTP api breaking change, ADD datasource is now POST /api/datasources/, update is now PUT /api/datasources/:id
**Fixes**
@@ -1033,7 +1219,7 @@ Grunt & Watch tasks:
# 2.0.2 (2015-04-22)
**Fixes**
- [Issue #1832](https://github.com/grafana/grafana/issues/1832). Graph Panel + Legend Table mode: Many series casued zero height graph, now legend will never reduce the height of the graph below 50% of row height.
- [Issue #1832](https://github.com/grafana/grafana/issues/1832). Graph Panel + Legend Table mode: Many series caused zero height graph, now legend will never reduce the height of the graph below 50% of row height.
- [Issue #1846](https://github.com/grafana/grafana/issues/1846). Snapshots: Fixed issue with snapshoting dashboards with an interval template variable
- [Issue #1848](https://github.com/grafana/grafana/issues/1848). Panel timeshift: You can now use panel timeshift without a relative time override
@@ -1075,7 +1261,7 @@ Grunt & Watch tasks:
**Fixes**
- [Issue #1649](https://github.com/grafana/grafana/issues/1649). HTTP API: grafana /render calls nows with api keys
- [Issue #1667](https://github.com/grafana/grafana/issues/1667). Datasource proxy & session timeout fix (casued 401 Unauthorized error after a while)
- [Issue #1667](https://github.com/grafana/grafana/issues/1667). Datasource proxy & session timeout fix (caused 401 Unauthorized error after a while)
- [Issue #1707](https://github.com/grafana/grafana/issues/1707). Unsaved changes: Do not show for snapshots, scripted and file based dashboards
- [Issue #1703](https://github.com/grafana/grafana/issues/1703). Unsaved changes: Do not show for users with role `Viewer`
- [Issue #1675](https://github.com/grafana/grafana/issues/1675). Data source proxy: Fixed issue with Gzip enabled and data source proxy
@@ -1088,14 +1274,14 @@ Grunt & Watch tasks:
**Important Note**
Grafana 2.x is fundamentally different from 1.x; it now ships with an integrated backend server. Please read the [Documentation](http://docs.grafana.org) for more detailed about this SIGNIFCANT change to Grafana
Grafana 2.x is fundamentally different from 1.x; it now ships with an integrated backend server. Please read the [Documentation](http://docs.grafana.org) for more detailed about this SIGNIFICANT change to Grafana
**New features**
- [Issue #1623](https://github.com/grafana/grafana/issues/1623). Share Dashboard: Dashboard snapshot sharing (dash and data snapshot), save to local or save to public snapshot dashboard snapshots.raintank.io site
- [Issue #1622](https://github.com/grafana/grafana/issues/1622). Share Panel: The share modal now has an embed option, gives you an iframe that you can use to embedd a single graph on another web site
- [Issue #718](https://github.com/grafana/grafana/issues/718). Dashboard: When saving a dashboard and another user has made changes inbetween the user is promted with a warning if he really wants to overwrite the other's changes
- [Issue #718](https://github.com/grafana/grafana/issues/718). Dashboard: When saving a dashboard and another user has made changes in between the user is promted with a warning if he really wants to overwrite the other's changes
- [Issue #1331](https://github.com/grafana/grafana/issues/1331). Graph & Singlestat: New axis/unit format selector and more units (kbytes, Joule, Watt, eV), and new design for graph axis & grid tab and single stat options tab views
- [Issue #1241](https://github.com/grafana/grafana/issues/1242). Timepicker: New option in timepicker (under dashboard settings), to change ``now`` to be for example ``now-1m``, usefull when you want to ignore last minute because it contains incomplete data
- [Issue #1241](https://github.com/grafana/grafana/issues/1242). Timepicker: New option in timepicker (under dashboard settings), to change ``now`` to be for example ``now-1m``, useful when you want to ignore last minute because it contains incomplete data
- [Issue #171](https://github.com/grafana/grafana/issues/171). Panel: Different time periods, panels can override dashboard relative time and/or add a time shift
- [Issue #1488](https://github.com/grafana/grafana/issues/1488). Dashboard: Clone dashboard / Save as
- [Issue #1458](https://github.com/grafana/grafana/issues/1458). User: persisted user option for dark or light theme (no longer an option on a dashboard)
@@ -1126,7 +1312,7 @@ Grafana 2.x is fundamentally different from 1.x; it now ships with an integrated
**OpenTSDB breaking change**
- [Issue #1438](https://github.com/grafana/grafana/issues/1438). OpenTSDB: Automatic downsample interval passed to OpenTSDB (depends on timespan and graph width)
- NOTICE, Downsampling is now enabled by default, so if you have not picked a downsample aggregator in your metric query do so or your graphs will be missleading
- NOTICE, Downsampling is now enabled by default, so if you have not picked a downsample aggregator in your metric query do so or your graphs will be misleading
- This will make Grafana a lot quicker for OpenTSDB users when viewing large time spans without having to change the downsample interval manually.
**Tech**
@@ -1157,7 +1343,7 @@ Grafana 2.x is fundamentally different from 1.x; it now ships with an integrated
- [Issue #1114](https://github.com/grafana/grafana/issues/1114). Graphite: Lexer fix, allow equal sign (=) in metric paths
- [Issue #1136](https://github.com/grafana/grafana/issues/1136). Graph: Fix to legend value Max and negative values
- [Issue #1150](https://github.com/grafana/grafana/issues/1150). SinglestatPanel: Fixed absolute drilldown link issue
- [Issue #1123](https://github.com/grafana/grafana/issues/1123). Firefox: Workaround for Firefox bug, casued input text fields to not be selectable and not have placeable cursor
- [Issue #1123](https://github.com/grafana/grafana/issues/1123). Firefox: Workaround for Firefox bug, caused input text fields to not be selectable and not have placeable cursor
- [Issue #1108](https://github.com/grafana/grafana/issues/1108). Graph: Fix for tooltip series order when series draw order was changed with zindex property
# 1.9.0-rc1 (2014-11-17)
@@ -1234,7 +1420,7 @@ Read this [blog post](https://grafana.com/blog/2014/09/11/grafana-1.8.0-rc1-rele
- [Issue #234](https://github.com/grafana/grafana/issues/234). Templating: Interval variable type for time intervals summarize/group by parameter, included "auto" option, and auto step counts option.
- [Issue #262](https://github.com/grafana/grafana/issues/262). Templating: Ability to use template variables for function parameters via custom variable type, can be used as parameter for movingAverage or scaleToSeconds for example
- [Issue #312](https://github.com/grafana/grafana/issues/312). Templating: Can now use template variables in panel titles
- [Issue #613](https://github.com/grafana/grafana/issues/613). Templating: Full support for InfluxDB, filter by part of series names, extract series substrings, nested queries, multipe where clauses!
- [Issue #613](https://github.com/grafana/grafana/issues/613). Templating: Full support for InfluxDB, filter by part of series names, extract series substrings, nested queries, multiple where clauses!
- Template variables can be initialized from url, with var-my_varname=value, breaking change, before it was just my_varname.
- Templating and url state sync has some issues that are not solved for this release, see [Issue #772](https://github.com/grafana/grafana/issues/772) for more details.
@@ -1323,7 +1509,7 @@ Read this [blog post](https://grafana.com/blog/2014/09/11/grafana-1.8.0-rc1-rele
- [Issue #136](https://github.com/grafana/grafana/issues/136). Graph: New legend display option "Align as table"
- [Issue #556](https://github.com/grafana/grafana/issues/556). Graph: New legend display option "Right side", will show legend to the right of the graph
- [Issue #604](https://github.com/grafana/grafana/issues/604). Graph: New axis format, 'bps' (SI unit in steps of 1000) useful for network gear metics
- [Issue #626](https://github.com/grafana/grafana/issues/626). Graph: Downscale y axis to more precise unit, value of 0.1 for seconds format will be formated as 100 ms. Thanks @kamaradclimber
- [Issue #626](https://github.com/grafana/grafana/issues/626). Graph: Downscale y axis to more precise unit, value of 0.1 for seconds format will be formatted as 100 ms. Thanks @kamaradclimber
- [Issue #618](https://github.com/grafana/grafana/issues/618). OpenTSDB: Series alias option to override metric name returned from opentsdb. Thanks @heldr
**Documentation**
@@ -1353,13 +1539,13 @@ Read this [blog post](https://grafana.com/blog/2014/09/11/grafana-1.8.0-rc1-rele
- [Issue #522](https://github.com/grafana/grafana/issues/522). Series names and column name typeahead cache fix
- [Issue #504](https://github.com/grafana/grafana/issues/504). Fixed influxdb issue with raw query that caused wrong value column detection
- [Issue #526](https://github.com/grafana/grafana/issues/526). Default property that marks which datasource is default in config.js is now optional
- [Issue #342](https://github.com/grafana/grafana/issues/342). Auto-refresh caused 2 refreshes (and hence mulitple queries) each time (at least in firefox)
- [Issue #342](https://github.com/grafana/grafana/issues/342). Auto-refresh caused 2 refreshes (and hence multiple queries) each time (at least in firefox)
# 1.6.0 (2014-06-16)
#### New features or improvements
- [Issue #427](https://github.com/grafana/grafana/issues/427). New Y-axis formater for metric values that represent seconds, Thanks @jippi
- [Issue #390](https://github.com/grafana/grafana/issues/390). Allow special characters in serie names (influxdb datasource), Thanks @majst01
- [Issue #390](https://github.com/grafana/grafana/issues/390). Allow special characters in series names (influxdb datasource), Thanks @majst01
- [Issue #428](https://github.com/grafana/grafana/issues/428). Refactoring of filterSrv, Thanks @Tetha
- [Issue #445](https://github.com/grafana/grafana/issues/445). New config for playlist feature. Set playlist_timespan to set default playlist interval, Thanks @rmca
- [Issue #461](https://github.com/grafana/grafana/issues/461). New graphite function definition added isNonNull, Thanks @tmonk42
@@ -1380,13 +1566,13 @@ Read this [blog post](https://grafana.com/blog/2014/09/11/grafana-1.8.0-rc1-rele
- [Issue #475](https://github.com/grafana/grafana/issues/475). Add panel icon and Row edit button is replaced by the Row edit menu
- New graphs now have a default empty query
- Add Row button now creates a row with default height of 250px (no longer opens dashboard settings modal)
- Clean up of config.sample.js, graphiteUrl removed (still works, but depricated, removed in future)
- Clean up of config.sample.js, graphiteUrl removed (still works, but deprecated, removed in future)
Use datasources config instead. panel_names removed from config.js. Use plugins.panels to add custom panels
- Graphite panel is now renamed graph (Existing dashboards will still work)
#### Fixes
- [Issue #126](https://github.com/grafana/grafana/issues/126). Graphite query lexer change, can now handle regex parameters for aliasSub function
- [Issue #447](https://github.com/grafana/grafana/issues/447). Filter option loading when having muliple nested filters now works better. Options are now reloaded correctly and there are no multiple renders/refresh inbetween.
- [Issue #447](https://github.com/grafana/grafana/issues/447). Filter option loading when having muliple nested filters now works better. Options are now reloaded correctly and there are no multiple renders/refresh in between.
- [Issue #412](https://github.com/grafana/grafana/issues/412). After a filter option is changed and a nested template param is reloaded, if the current value exists after the options are reloaded the current selected value is kept.
- [Issue #460](https://github.com/grafana/grafana/issues/460). Legend Current value did not display when value was zero
- [Issue #328](https://github.com/grafana/grafana/issues/328). Fix to series toggling bug that caused annotations to be hidden when toggling/hiding series.

181
Gopkg.lock generated
View File

@@ -4,8 +4,8 @@
[[projects]]
name = "cloud.google.com/go"
packages = ["compute/metadata"]
revision = "767c40d6a2e058483c25fa193e963a22da17236d"
version = "v0.18.0"
revision = "056a55f54a6cc77b440b31a56a5e7c3982d32811"
version = "v0.22.0"
[[projects]]
name = "github.com/BurntSushi/toml"
@@ -19,12 +19,6 @@
packages = ["."]
revision = "7677a1d7c1137cd3dd5ba7a076d0c898a1ef4520"
[[projects]]
name = "github.com/apache/thrift"
packages = ["lib/go/thrift"]
revision = "b2a4d4ae21c789b689dd162deb819665567f481c"
version = "0.10.0"
[[projects]]
name = "github.com/aws/aws-sdk-go"
packages = [
@@ -44,6 +38,8 @@
"aws/request",
"aws/session",
"aws/signer/v4",
"internal/sdkio",
"internal/sdkrand",
"internal/shareddefaults",
"private/protocol",
"private/protocol/ec2query",
@@ -58,8 +54,8 @@
"service/s3",
"service/sts"
]
revision = "decd990ddc5dcdf2f73309cbcab90d06b996ca28"
version = "v1.12.67"
revision = "c7cd1ebe87257cde9b65112fc876b0339ea0ac30"
version = "v1.13.49"
[[projects]]
branch = "master"
@@ -71,7 +67,7 @@
branch = "master"
name = "github.com/beorn7/perks"
packages = ["quantile"]
revision = "4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9"
revision = "3a771d992973f24aa725d07868b467d1ddfceafb"
[[projects]]
branch = "master"
@@ -103,17 +99,37 @@
revision = "346938d642f2ec3594ed81d874461961cd0faa76"
version = "v1.1.0"
[[projects]]
name = "github.com/denisenkom/go-mssqldb"
packages = [
".",
"internal/cp"
]
revision = "270bc3860bb94dd3a3ffd047377d746c5e276726"
[[projects]]
branch = "master"
name = "github.com/facebookgo/inject"
packages = ["."]
revision = "cc1aa653e50f6a9893bcaef89e673e5b24e1e97b"
[[projects]]
branch = "master"
name = "github.com/facebookgo/structtag"
packages = ["."]
revision = "217e25fb96916cc60332e399c9aa63f5c422ceed"
[[projects]]
name = "github.com/fatih/color"
packages = ["."]
revision = "570b54cabe6b8eb0bc2dfce68d964677d63b5260"
version = "v1.5.0"
revision = "5b77d2a35fb0ede96d138fc9a99f5c9b6aef11b4"
version = "v1.7.0"
[[projects]]
name = "github.com/go-ini/ini"
packages = ["."]
revision = "32e4c1e6bc4e7d0d8451aa6b75200d19e37a536a"
version = "v1.32.0"
revision = "6529cf7c58879c08d927016dde4477f18a0634cb"
version = "v1.36.0"
[[projects]]
name = "github.com/go-ldap/ldap"
@@ -145,7 +161,6 @@
packages = [
".",
"memcache",
"mysql",
"postgres",
"redis"
]
@@ -163,20 +178,22 @@
version = "v1.7.0"
[[projects]]
branch = "master"
name = "github.com/go-xorm/builder"
packages = ["."]
revision = "488224409dd8aa2ce7a5baf8d10d55764a913738"
revision = "bad0a612f0d6277b953910822ab5dfb30dd18237"
version = "v0.2.0"
[[projects]]
name = "github.com/go-xorm/core"
packages = ["."]
revision = "e8409d73255791843585964791443dbad877058c"
revision = "da1adaf7a28ca792961721a34e6e04945200c890"
version = "v0.5.7"
[[projects]]
name = "github.com/go-xorm/xorm"
packages = ["."]
revision = "6687a2b4e824f4d87f2d65060ec5cb0d896dff1e"
revision = "1933dd69e294c0a26c0266637067f24dbb25770c"
version = "v0.6.4"
[[projects]]
branch = "master"
@@ -188,13 +205,13 @@
"ptypes/duration",
"ptypes/timestamp"
]
revision = "c65a0412e71e8b9b3bfd22925720d23c0f054237"
revision = "927b65914520a8b7d44f5c9057611cfec6b2e2d0"
[[projects]]
branch = "master"
name = "github.com/gopherjs/gopherjs"
packages = ["js"]
revision = "178c176a91fe05e3e6c58fa5c989bad19e6cdcb3"
revision = "8dffc02ea1cb8398bb73f30424697c60fcf8d4c5"
[[projects]]
name = "github.com/gorilla/websocket"
@@ -210,32 +227,35 @@
[[projects]]
branch = "master"
name = "github.com/grafana/grafana_plugin_model"
packages = ["go/datasource"]
revision = "dfe5dc0a6ce05825ba7fe2d0323d92e631bffa89"
name = "github.com/grafana/grafana-plugin-model"
packages = [
"go/datasource",
"go/renderer"
]
revision = "84176c64269d8060f99e750ee8aba6f062753336"
[[projects]]
branch = "master"
name = "github.com/hashicorp/go-hclog"
packages = ["."]
revision = "5bcb0f17e36442247290887cc914a6e507afa5c4"
revision = "69ff559dc25f3b435631604f573a5fa1efdb6433"
[[projects]]
name = "github.com/hashicorp/go-plugin"
packages = ["."]
revision = "3e6d191694b5a3a2b99755f31b47fa209e4bcd09"
revision = "e8d22c780116115ae5624720c9af0c97afe4f551"
[[projects]]
branch = "master"
name = "github.com/hashicorp/go-version"
packages = ["."]
revision = "4fe82ae3040f80a03d04d2cccb5606a626b8e1ee"
revision = "23480c0665776210b5fbbac6eaaee40e3e6a96b7"
[[projects]]
branch = "master"
name = "github.com/hashicorp/yamux"
packages = ["."]
revision = "683f49123a33db61abfb241b7ac5e4af4dc54d55"
revision = "2658be15c5f05e76244154714161f17e3e77de2e"
[[projects]]
name = "github.com/inconshreveable/log15"
@@ -276,16 +296,16 @@
version = "v1.1"
[[projects]]
branch = "master"
name = "github.com/kr/pretty"
packages = ["."]
revision = "cfb55aafdaf3ec08f0db22699ab822c50091b1c4"
revision = "73f6ac0b30a98e433b289500d779f50c1a6f0712"
version = "v0.1.0"
[[projects]]
branch = "master"
name = "github.com/kr/text"
packages = ["."]
revision = "7cafcd837844e784b526369c9bce262804aebc60"
revision = "e2ffdb16a802fe2bb95e2e35ff34f0e53aeef34f"
version = "v0.1.0"
[[projects]]
branch = "master"
@@ -294,7 +314,7 @@
".",
"oid"
]
revision = "61fe37aa2ee24fabcdbe5c4ac1d4ac566f88f345"
revision = "d34b9ff171c21ad295489235aec8b6626023cd04"
[[projects]]
name = "github.com/mattn/go-colorable"
@@ -311,8 +331,8 @@
[[projects]]
name = "github.com/mattn/go-sqlite3"
packages = ["."]
revision = "6c771bb9887719704b210e87e934f08be014bdb1"
version = "v1.6.0"
revision = "323a32be5a2421b8c7087225079c6c900ec397cd"
version = "v1.7.0"
[[projects]]
name = "github.com/matttproud/golang_protobuf_extensions"
@@ -326,6 +346,12 @@
packages = ["."]
revision = "a61a99592b77c9ba629d254a693acffaeb4b7e28"
[[projects]]
name = "github.com/oklog/run"
packages = ["."]
revision = "4dadeb3030eda0273a12382bb2348ffc7c9d1a39"
version = "v1.0.0"
[[projects]]
name = "github.com/opentracing/opentracing-go"
packages = [
@@ -342,6 +368,12 @@
revision = "a3647f8e31d79543b2d0f0ae2fe5c379d72cedc0"
version = "v2.1.0"
[[projects]]
name = "github.com/pkg/errors"
packages = ["."]
revision = "645ef00459ed84a119197bfb8d8205042c6df63d"
version = "v0.8.0"
[[projects]]
name = "github.com/prometheus/client_golang"
packages = [
@@ -367,7 +399,7 @@
"internal/bitbucket.org/ww/goautoneg",
"model"
]
revision = "89604d197083d4781071d3c65855d24ecfb0a563"
revision = "d811d2e9bf898806ecfb6ef6296774b13ffc314c"
[[projects]]
branch = "master"
@@ -375,10 +407,10 @@
packages = [
".",
"internal/util",
"nfsd",
"nfs",
"xfs"
]
revision = "85fadb6e89903ef7cca6f6a804474cd5ea85b6e1"
revision = "8b1c2da0d56deffdbb9e48d4414b4e674bd8083e"
[[projects]]
branch = "master"
@@ -387,10 +419,10 @@
revision = "cb7f23ec59bec0d61b19c56cd88cee3d0cc1870c"
[[projects]]
branch = "master"
name = "github.com/sergi/go-diff"
packages = ["diffmatchpatch"]
revision = "1744e2970ca51c86172c8190fadad617561ed6e7"
version = "v1.0.0"
[[projects]]
name = "github.com/smartystreets/assertions"
@@ -399,8 +431,8 @@
"internal/go-render/render",
"internal/oglematchers"
]
revision = "0b37b35ec7434b77e77a4bb29b79677cced992ea"
version = "1.8.1"
revision = "7678a5452ebea5b7090a6b163f844c133f523da2"
version = "1.8.3"
[[projects]]
name = "github.com/smartystreets/goconvey"
@@ -426,8 +458,11 @@
"internal/baggage",
"internal/baggage/remote",
"internal/spanlog",
"internal/throttler",
"internal/throttler/remote",
"log",
"rpcmetrics",
"thrift",
"thrift-gen/agent",
"thrift-gen/baggage",
"thrift-gen/jaeger",
@@ -435,14 +470,14 @@
"thrift-gen/zipkincore",
"utils"
]
revision = "3ac96c6e679cb60a74589b0d0aa7c70a906183f7"
version = "v2.11.2"
revision = "b043381d944715b469fd6b37addfd30145ca1758"
version = "v2.14.0"
[[projects]]
name = "github.com/uber/jaeger-lib"
packages = ["metrics"]
revision = "7f95f4f7e80028096410abddaae2556e4c61b59f"
version = "v1.3.1"
revision = "ed3a127ec5fef7ae9ea95b01b542c47fbd999ce5"
version = "v1.5.0"
[[projects]]
name = "github.com/yudai/gojsondiff"
@@ -462,8 +497,11 @@
[[projects]]
branch = "master"
name = "golang.org/x/crypto"
packages = ["pbkdf2"]
revision = "3d37316aaa6bd9929127ac9a527abf408178ea7b"
packages = [
"md4",
"pbkdf2"
]
revision = "1a580b3eff7814fc9b40602fd35256c63b50f491"
[[projects]]
branch = "master"
@@ -471,14 +509,14 @@
packages = [
"context",
"context/ctxhttp",
"http/httpguts",
"http2",
"http2/hpack",
"idna",
"internal/timeseries",
"lex/httplex",
"trace"
]
revision = "5ccada7d0a7ba9aeb5d3aca8d3501b4c2a509fec"
revision = "2491c5de3490fced2f6cff376127c667efeed857"
[[projects]]
branch = "master"
@@ -490,22 +528,21 @@
"jws",
"jwt"
]
revision = "b28fcf2b08a19742b43084fb40ab78ac6c3d8067"
revision = "cdc340f7c179dbbfa4afd43b7614e8fcadde4269"
[[projects]]
branch = "master"
name = "golang.org/x/sync"
packages = ["errgroup"]
revision = "fd80eb99c8f653c847d294a001bdf2a3a6f768f5"
revision = "1d60e4601c6fd243af51cc01ddf169918a5407ca"
[[projects]]
branch = "master"
name = "golang.org/x/sys"
packages = ["unix"]
revision = "af50095a40f9041b3b38960738837185c26e9419"
revision = "7c87d13f8e835d2fb3a70a2912c811ed0c1d241b"
[[projects]]
branch = "master"
name = "golang.org/x/text"
packages = [
"collate",
@@ -523,7 +560,8 @@
"unicode/norm",
"unicode/rangetable"
]
revision = "e19ae1496984b1c655b8044a65c0300a3c878dd3"
revision = "f21a4dfb5e38f5895301dc265a8def02365cc3d0"
version = "v0.3.0"
[[projects]]
name = "google.golang.org/appengine"
@@ -547,7 +585,7 @@
branch = "master"
name = "google.golang.org/genproto"
packages = ["googleapis/rpc/status"]
revision = "a8101f21cf983e773d0c1133ebc5424792003214"
revision = "7bb2a897381c9c5ab2aeb8614f758d7766af68ff"
[[projects]]
name = "google.golang.org/grpc"
@@ -560,6 +598,7 @@
"connectivity",
"credentials",
"encoding",
"encoding/proto",
"grpclb/grpc_lb_v1/messages",
"grpclog",
"health",
@@ -577,8 +616,8 @@
"tap",
"transport"
]
revision = "6b51017f791ae1cfbec89c52efdf444b13b550ef"
version = "v1.9.2"
revision = "1e2570b1b19ade82d8dbb31bba4e65e9f9ef5b34"
version = "v1.11.1"
[[projects]]
branch = "v3"
@@ -598,23 +637,23 @@
revision = "567b2bfa514e796916c4747494d6ff5132a1dfce"
version = "v1"
[[projects]]
branch = "v2"
name = "gopkg.in/gomail.v2"
packages = ["."]
revision = "81ebce5c23dfd25c6c67194b37d3dd3f338c98b1"
[[projects]]
name = "gopkg.in/ini.v1"
packages = ["."]
revision = "32e4c1e6bc4e7d0d8451aa6b75200d19e37a536a"
version = "v1.32.0"
revision = "6529cf7c58879c08d927016dde4477f18a0634cb"
version = "v1.36.0"
[[projects]]
name = "gopkg.in/macaron.v1"
packages = ["."]
revision = "75f2e9b42e99652f0d82b28ccb73648f44615faa"
version = "v1.2.4"
revision = "c1be95e6d21e769e44e1ec33cec9da5837861c10"
version = "v1.3.1"
[[projects]]
branch = "v2"
name = "gopkg.in/mail.v2"
packages = ["."]
revision = "5bc5c8bb07bd8d2803831fbaf8cbd630fcde2c68"
[[projects]]
name = "gopkg.in/redis.v2"
@@ -623,14 +662,14 @@
version = "v2.3.2"
[[projects]]
branch = "v2"
name = "gopkg.in/yaml.v2"
packages = ["."]
revision = "d670f9405373e636a5a2765eea47fac0c9bc91a4"
revision = "5420a8b6744d3b0345ab293f6fcba19c978f1183"
version = "v2.2.1"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
inputs-digest = "4de68f1342ba98a637ec8ca7496aeeae2021bf9e4c7c80db7924e14709151a62"
inputs-digest = "85cc057e0cc074ab5b43bd620772d63d51e07b04e8782fcfe55e6929d2fc40f7"
solver-name = "gps-cdcl"
solver-version = 1

View File

@@ -85,13 +85,11 @@ ignored = [
[[constraint]]
name = "github.com/go-xorm/core"
revision = "e8409d73255791843585964791443dbad877058c"
#version = "0.5.7" //keeping this since we would rather depend on version then commit
version = "=0.5.7"
[[constraint]]
name = "github.com/go-xorm/xorm"
revision = "6687a2b4e824f4d87f2d65060ec5cb0d896dff1e"
#version = "0.6.4" //keeping this since we would rather depend on version then commit
version = "=0.6.4"
[[constraint]]
name = "github.com/gorilla/websocket"
@@ -103,12 +101,16 @@ ignored = [
[[constraint]]
branch = "master"
name = "github.com/grafana/grafana_plugin_model"
name = "github.com/grafana/grafana-plugin-model"
[[constraint]]
branch = "master"
name = "github.com/hashicorp/go-hclog"
[[constraint]]
name = "github.com/hashicorp/go-plugin"
revision = "e8d22c780116115ae5624720c9af0c97afe4f551"
[[constraint]]
branch = "master"
name = "github.com/hashicorp/go-version"
@@ -127,7 +129,7 @@ ignored = [
[[constraint]]
name = "github.com/mattn/go-sqlite3"
version = "1.6.0"
version = "1.7.0"
[[constraint]]
name = "github.com/opentracing/opentracing-go"
@@ -174,7 +176,7 @@ ignored = [
name = "golang.org/x/sync"
[[constraint]]
name = "gopkg.in/gomail.v2"
name = "gopkg.in/mail.v2"
branch = "v2"
[[constraint]]
@@ -197,3 +199,7 @@ ignored = [
[[constraint]]
branch = "master"
name = "github.com/teris-io/shortid"
[[constraint]]
name = "github.com/denisenkom/go-mssqldb"
revision = "270bc3860bb94dd3a3ffd047377d746c5e276726"

View File

@@ -12,6 +12,10 @@ module.exports = function (grunt) {
platform: process.platform.replace('win32', 'windows'),
};
if (grunt.option('platform')) {
config.platform = grunt.option('platform');
}
if (grunt.option('arch')) {
config.arch = grunt.option('arch');
} else {

View File

@@ -1,3 +1,5 @@
-include local/Makefile
all: deps build
deps-go:
@@ -11,8 +13,14 @@ deps: deps-js
build-go:
go run build.go build
build-server:
go run build.go build-server
build-cli:
go run build.go build-cli
build-js:
npm run build
yarn run build
build: build-go build-js
@@ -20,7 +28,7 @@ test-go:
go test -v ./pkg/...
test-js:
npm test
yarn test
test: test-go test-js

View File

@@ -9,6 +9,7 @@ upgrading Grafana please check here before creating an issue.
- [Datasource plugin written in typescript](https://github.com/grafana/typescript-template-datasource)
- [Simple json dataource plugin](https://github.com/grafana/simple-json-datasource)
- [Plugin development guide](http://docs.grafana.org/plugins/developing/development/)
- [Webpack Grafana plugin template project](https://github.com/CorpGlory/grafana-plugin-template-webpack)
## Changes in v4.6

View File

@@ -9,9 +9,6 @@ Graphite, Elasticsearch, OpenTSDB, Prometheus and InfluxDB.
![](http://docs.grafana.org/assets/img/features/dashboard_ex1.png)
## Grafana v5 Alpha Preview
Grafana master is now v5.0 alpha. This is going to be the biggest and most foundational release Grafana has ever had, coming with a ton of UX improvements, a new dashboard grid engine, dashboard folders, user teams and permissions. Checkout out this [video preview](https://www.youtube.com/watch?v=BC_YRNpqj5k) of Grafana v5.
## Installation
Head to [docs.grafana.org](http://docs.grafana.org/installation/) and [download](https://grafana.com/get)
the latest release.
@@ -27,13 +24,13 @@ the latest master builds [here](https://grafana.com/grafana/download)
### Dependencies
- Go 1.9
- Go 1.10
- NodeJS LTS
### Building the backend
```bash
go get github.com/grafana/grafana
cd ~/go/src/github.com/grafana/grafana
cd $GOPATH/src/github.com/grafana/grafana
go run build.go setup
go run build.go build
```
@@ -42,12 +39,21 @@ go run build.go build
For this you need nodejs (v.6+).
To build the assets, rebuild on file change, and serve them by Grafana's webserver (http://localhost:3000):
```bash
npm install -g yarn
yarn install --pure-lockfile
npm run watch
```
Build the assets, rebuild on file change with Hot Module Replacement (HMR), and serve them by webpack-dev-server (http://localhost:3333):
```bash
yarn start
# OR set a theme
env GRAFANA_THEME=light yarn start
```
Note: HMR for Angular is not supported. If you edit files in the Angular part of the app, the whole page will reload.
Run tests
```bash
npm run jest

View File

@@ -1,24 +1,20 @@
# Roadmap (2018-02-22)
# Roadmap (2018-05-06)
This roadmap is a tentative plan for the core development team. Things change constantly as PRs come in and priorities change.
But it will give you an idea of our current vision and plan.
### Short term (1-2 months)
- v5.1
- Crossplatform builds & build speed improvements
- Enterprise LDAP
- New template interpolation syntax
- Provisioning workflow
- Elasticsearch alerting
- Crossplatform builds
- Backend service refactorings
- Explore UI
- First login registration view
- IFQL Initial support
### Mid term (2-4 months)
- v5.2
- Azure monitor backend rewrite
- Elasticsearch alerting
- Backend plugins? (alert notifiers, auth)
- Multi-Stat panel
- React Panels
- Templating Query Editor UI Plugin hook
### Long term (4 - 8 months)

View File

@@ -6,8 +6,8 @@ clone_folder: c:\gopath\src\github.com\grafana\grafana
environment:
nodejs_version: "6"
GOPATH: c:\gopath
GOVERSION: 1.9.2
GOPATH: C:\gopath
GOVERSION: 1.10
install:
- rmdir c:\go /s /q
@@ -38,16 +38,3 @@ artifacts:
- path: grafana-*windows-*.*
name: binzip
type: zip
deploy:
- provider: Environment
name: GrafanaReleaseMaster
on:
buildType: master
- provider: Environment
name: GrafanaReleaseRelease
on:
buildType: release

191
build.go
View File

@@ -16,7 +16,6 @@ import (
"os/exec"
"path"
"path/filepath"
"regexp"
"runtime"
"strconv"
"strings"
@@ -24,14 +23,13 @@ import (
)
var (
versionRe = regexp.MustCompile(`-[0-9]{1,3}-g[0-9a-f]{5,10}`)
goarch string
goos string
gocc string
gocxx string
cgo string
pkgArch string
version string = "v1"
//versionRe = regexp.MustCompile(`-[0-9]{1,3}-g[0-9a-f]{5,10}`)
goarch string
goos string
gocc string
cgo bool
pkgArch string
version string = "v1"
// deb & rpm does not support semver so have to handle their version a little differently
linuxPackageVersion string = "v1"
linuxPackageIteration string = ""
@@ -41,10 +39,10 @@ var (
includeBuildNumber bool = true
buildNumber int = 0
binaries []string = []string{"grafana-server", "grafana-cli"}
isDev bool = false
enterprise bool = false
)
const minGoVersion = 1.8
func main() {
log.SetOutput(os.Stdout)
log.SetFlags(0)
@@ -54,13 +52,14 @@ func main() {
flag.StringVar(&goarch, "goarch", runtime.GOARCH, "GOARCH")
flag.StringVar(&goos, "goos", runtime.GOOS, "GOOS")
flag.StringVar(&gocc, "cc", "", "CC")
flag.StringVar(&gocxx, "cxx", "", "CXX")
flag.StringVar(&cgo, "cgo-enabled", "", "CGO_ENABLED")
flag.BoolVar(&cgo, "cgo-enabled", cgo, "Enable cgo")
flag.StringVar(&pkgArch, "pkg-arch", "", "PKG ARCH")
flag.StringVar(&phjsToRelease, "phjs", "", "PhantomJS binary")
flag.BoolVar(&race, "race", race, "Use race detector")
flag.BoolVar(&includeBuildNumber, "includeBuildNumber", includeBuildNumber, "IncludeBuildNumber in package name")
flag.BoolVar(&enterprise, "enterprise", enterprise, "Build enterprise version of Grafana")
flag.IntVar(&buildNumber, "buildNumber", 0, "Build number from CI system")
flag.BoolVar(&isDev, "dev", isDev, "optimal for development, skips certain steps")
flag.Parse()
readVersionFromPackageJson()
@@ -79,25 +78,37 @@ func main() {
case "setup":
setup()
case "build-srv":
clean()
build("grafana-server", "./pkg/cmd/grafana-server", []string{})
case "build-cli":
clean()
build("grafana-cli", "./pkg/cmd/grafana-cli", []string{})
case "build":
case "build-server":
clean()
build("grafana-server", "./pkg/cmd/grafana-server", []string{})
case "build":
//clean()
for _, binary := range binaries {
build(binary, "./pkg/cmd/"+binary, []string{})
}
case "build-frontend":
grunt(gruntBuildArg("build")...)
case "test":
test("./pkg/...")
grunt("test")
case "package":
grunt(gruntBuildArg("release")...)
if runtime.GOOS != "windows" {
createLinuxPackages()
}
grunt(gruntBuildArg("build")...)
packageGrafana()
case "package-only":
packageGrafana()
case "pkg-rpm":
grunt(gruntBuildArg("release")...)
@@ -122,6 +133,22 @@ func main() {
}
}
func packageGrafana() {
platformArg := fmt.Sprintf("--platform=%v", goos)
previousPkgArch := pkgArch
if pkgArch == "" {
pkgArch = goarch
}
postProcessArgs := gruntBuildArg("package")
postProcessArgs = append(postProcessArgs, platformArg)
grunt(postProcessArgs...)
pkgArch = previousPkgArch
if goos == "linux" {
createLinuxPackages()
}
}
func makeLatestDistCopies() {
files, err := ioutil.ReadDir("dist")
if err != nil {
@@ -129,9 +156,9 @@ func makeLatestDistCopies() {
}
latestMapping := map[string]string{
".deb": "dist/grafana_latest_amd64.deb",
".rpm": "dist/grafana-latest-1.x86_64.rpm",
".tar.gz": "dist/grafana-latest.linux-x64.tar.gz",
"_amd64.deb": "dist/grafana_latest_amd64.deb",
".x86_64.rpm": "dist/grafana-latest-1.x86_64.rpm",
".linux-amd64.tar.gz": "dist/grafana-latest.linux-x64.tar.gz",
}
for _, file := range files {
@@ -202,6 +229,10 @@ type linuxPackageOptions struct {
}
func createDebPackages() {
previousPkgArch := pkgArch
if pkgArch == "armv7" {
pkgArch = "armhf"
}
createPackage(linuxPackageOptions{
packageType: "deb",
homeDir: "/usr/share/grafana",
@@ -219,9 +250,17 @@ func createDebPackages() {
depends: []string{"adduser", "libfontconfig"},
})
pkgArch = previousPkgArch
}
func createRpmPackages() {
previousPkgArch := pkgArch
switch {
case pkgArch == "armv7":
pkgArch = "armhfp"
case pkgArch == "arm64":
pkgArch = "aarch64"
}
createPackage(linuxPackageOptions{
packageType: "rpm",
homeDir: "/usr/share/grafana",
@@ -239,6 +278,7 @@ func createRpmPackages() {
depends: []string{"/sbin/service", "fontconfig", "freetype", "urw-fonts"},
})
pkgArch = previousPkgArch
}
func createLinuxPackages() {
@@ -276,19 +316,33 @@ func createPackage(options linuxPackageOptions) {
"-s", "dir",
"--description", "Grafana",
"-C", packageRoot,
"--vendor", "Grafana",
"--url", "https://grafana.com",
"--license", "\"Apache 2.0\"",
"--maintainer", "contact@grafana.com",
"--config-files", options.initdScriptFilePath,
"--config-files", options.etcDefaultFilePath,
"--config-files", options.systemdServiceFilePath,
"--after-install", options.postinstSrc,
"--name", "grafana",
"--version", linuxPackageVersion,
"-p", "./dist",
}
name := "grafana"
if enterprise {
name += "-enterprise"
}
args = append(args, "--name", name)
description := "Grafana"
if enterprise {
description += " Enterprise"
}
args = append(args, "--vendor", description)
if !enterprise {
args = append(args, "--license", "\"Apache 2.0\"")
}
if options.packageType == "rpm" {
args = append(args, "--rpm-posttrans", "packaging/rpm/control/posttrans")
}
@@ -316,20 +370,6 @@ func createPackage(options linuxPackageOptions) {
runPrint("fpm", append([]string{"-t", options.packageType}, args...)...)
}
func verifyGitRepoIsClean() {
rs, err := runError("git", "ls-files", "--modified")
if err != nil {
log.Fatalf("Failed to check if git tree was clean, %v, %v\n", string(rs), err)
return
}
count := len(string(rs))
if count > 0 {
log.Fatalf("Git repository has modified files, aborting")
}
log.Println("Git repository is clean")
}
func ensureGoPath() {
if os.Getenv("GOPATH") == "" {
cwd, err := os.Getwd()
@@ -342,10 +382,6 @@ func ensureGoPath() {
}
}
func ChangeWorkingDir(dir string) {
os.Chdir(dir)
}
func grunt(params ...string) {
if runtime.GOOS == "windows" {
runPrint(`.\node_modules\.bin\grunt`, params...)
@@ -381,12 +417,19 @@ func test(pkg string) {
}
func build(binaryName, pkg string, tags []string) {
binary := "./bin/" + binaryName
binary := fmt.Sprintf("./bin/%s-%s/%s", goos, goarch, binaryName)
if isDev {
//dont include os and arch in output path in dev environment
binary = fmt.Sprintf("./bin/%s", binaryName)
}
if goos == "windows" {
binary += ".exe"
}
rmr(binary, binary+".md5")
if !isDev {
rmr(binary, binary+".md5")
}
args := []string{"build", "-ldflags", ldflags()}
if len(tags) > 0 {
args = append(args, "-tags", strings.Join(tags, ","))
@@ -397,16 +440,22 @@ func build(binaryName, pkg string, tags []string) {
args = append(args, "-o", binary)
args = append(args, pkg)
setBuildEnv()
runPrint("go", "version")
if !isDev {
setBuildEnv()
runPrint("go", "version")
fmt.Printf("Targeting %s/%s\n", goos, goarch)
}
runPrint("go", args...)
// Create an md5 checksum of the binary, to be included in the archive for
// automatic upgrades.
err := md5File(binary)
if err != nil {
log.Fatal(err)
if !isDev {
// Create an md5 checksum of the binary, to be included in the archive for
// automatic upgrades.
err := md5File(binary)
if err != nil {
log.Fatal(err)
}
}
}
@@ -416,6 +465,7 @@ func ldflags() string {
b.WriteString(fmt.Sprintf(" -X main.version=%s", version))
b.WriteString(fmt.Sprintf(" -X main.commit=%s", getGitSha()))
b.WriteString(fmt.Sprintf(" -X main.buildstamp=%d", buildStamp()))
b.WriteString(fmt.Sprintf(" -X main.enterprise=%t", enterprise))
return b.String()
}
@@ -427,6 +477,10 @@ func rmr(paths ...string) {
}
func clean() {
if isDev {
return
}
rmr("dist")
rmr("tmp")
rmr(filepath.Join(os.Getenv("GOPATH"), fmt.Sprintf("pkg/%s_%s/github.com/grafana", goos, goarch)))
@@ -434,6 +488,14 @@ func clean() {
func setBuildEnv() {
os.Setenv("GOOS", goos)
if goos == "windows" {
// require windows >=7
os.Setenv("CGO_CFLAGS", "-D_WIN32_WINNT=0x0601")
}
if goarch != "amd64" || goos != "linux" {
// needed for all other archs
cgo = true
}
if strings.HasPrefix(goarch, "armv") {
os.Setenv("GOARCH", "arm")
os.Setenv("GOARM", goarch[4:])
@@ -443,15 +505,12 @@ func setBuildEnv() {
if goarch == "386" {
os.Setenv("GO386", "387")
}
if cgo != "" {
os.Setenv("CGO_ENABLED", cgo)
if cgo {
os.Setenv("CGO_ENABLED", "1")
}
if gocc != "" {
os.Setenv("CC", gocc)
}
if gocxx != "" {
os.Setenv("CXX", gocxx)
}
}
func getGitSha() string {
@@ -471,24 +530,6 @@ func buildStamp() int64 {
return s
}
func buildArch() string {
os := goos
if os == "darwin" {
os = "macosx"
}
return fmt.Sprintf("%s-%s", os, goarch)
}
func run(cmd string, args ...string) []byte {
bs, err := runError(cmd, args...)
if err != nil {
log.Println(cmd, strings.Join(args, " "))
log.Println(string(bs))
log.Fatal(err)
}
return bytes.TrimSpace(bs)
}
func runError(cmd string, args ...string) ([]byte, error) {
ecmd := exec.Command(cmd, args...)
bs, err := ecmd.CombinedOutput()
@@ -542,7 +583,7 @@ func shaFilesInDist() {
return nil
}
if strings.Contains(path, ".sha256") == false {
if !strings.Contains(path, ".sha256") {
err := shaFile(path)
if err != nil {
log.Printf("Failed to create sha file. error: %v\n", err)

View File

@@ -1,57 +0,0 @@
machine:
node:
version: 6.11.4
python:
version: 2.7.3
services:
- docker
environment:
GOPATH: "/home/ubuntu/.go_workspace"
ORG_PATH: "github.com/grafana"
REPO_PATH: "${ORG_PATH}/grafana"
GODIST: "go1.9.3.linux-amd64.tar.gz"
post:
- mkdir -p ~/download
- mkdir -p ~/docker
- test -e download/$GODIST || curl -o download/$GODIST https://storage.googleapis.com/golang/$GODIST
- sudo rm -rf /usr/local/go
- sudo tar -C /usr/local -xzf download/$GODIST
dependencies:
cache_directories:
- "~/docker"
- "~/download"
override:
- rm -rf ${GOPATH}/src/${REPO_PATH}
- mkdir -p ${GOPATH}/src/${ORG_PATH}
- cp -r ~/grafana ${GOPATH}/src/${ORG_PATH}
pre:
- pip install awscli
- sudo apt-get update; sudo apt-get install rpm; sudo apt-get install expect
- ./scripts/build/build_container.sh
test:
override:
- bash scripts/circle-test-frontend.sh
- bash scripts/circle-test-backend.sh
deployment:
gh_branch:
branch: master
commands:
- ./scripts/build/deploy.sh
- ./scripts/build/sign_packages.sh
- go run build.go sha-dist
- aws s3 sync ./dist s3://$BUCKET_NAME/master
- ./scripts/trigger_windows_build.sh ${APPVEYOR_TOKEN} ${CIRCLE_SHA1} master
- ./scripts/trigger_docker_build.sh ${TRIGGER_GRAFANA_PACKER_CIRCLECI_TOKEN}
- go run ./scripts/build/publish.go -apiKey ${GRAFANA_COM_API_KEY}
gh_tag:
tag: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
commands:
- ./scripts/build/deploy.sh
- ./scripts/build/sign_packages.sh
- go run build.go sha-dist
- aws s3 sync ./dist s3://$BUCKET_NAME/release
- ./scripts/trigger_windows_build.sh ${APPVEYOR_TOKEN} ${CIRCLE_SHA1} release
- ./scripts/trigger_docker_build.sh ${TRIGGER_GRAFANA_PACKER_CIRCLECI_TOKEN} ${CIRCLE_TAG}

View File

@@ -8,6 +8,4 @@ coverage:
patch: yes
changes: no
comment:
layout: "diff"
behavior: "once"
comment: off

View File

@@ -82,6 +82,9 @@ max_idle_conn = 2
# Max conn setting default is 0 (mean not set)
max_open_conn =
# Connection Max Lifetime default is 14400 (means 14400 seconds or 4 hours)
conn_max_lifetime = 14400
# Set to true to log the sql calls and execution times.
log_queries =
@@ -125,6 +128,9 @@ cookie_secure = false
session_life_time = 86400
gc_interval_time = 86400
# Connection Max Lifetime default is 14400 (means 14400 seconds or 4 hours)
conn_max_lifetime = 14400
#################################### Data proxy ###########################
[dataproxy]
@@ -231,6 +237,9 @@ disable_login_form = false
# Set to true to disable the signout link in the side menu. useful if you use auth.proxy
disable_signout_menu = false
# URL to redirect the user to after sign out
signout_redirect_url =
#################################### Anonymous Auth ######################
[auth.anonymous]
# enable anonymous access
@@ -436,6 +445,11 @@ enabled = true
# Makes it possible to turn off alert rule execution but alerting UI is visible
execute_alerts = true
#################################### Explore #############################
[explore]
# Enable the Explore section
enabled = false
#################################### Internal Grafana Metrics ############
# Metrics available at HTTP API Url /metrics
[metrics]

View File

@@ -4,10 +4,10 @@
# change
# possible values : production, development
; app_mode = production
;app_mode = production
# instance name, defaults to HOSTNAME environment variable value or hostname if HOSTNAME var is empty
; instance_name = ${HOSTNAME}
;instance_name = ${HOSTNAME}
#################################### Paths ####################################
[paths]
@@ -21,7 +21,7 @@
;plugins = /var/lib/grafana/plugins
# folder that contains provisioning config files that grafana will apply on startup and while running.
; provisioning = conf/provisioning
;provisioning = conf/provisioning
#################################### Server ####################################
[server]
@@ -64,7 +64,7 @@
#################################### Database ####################################
[database]
# You can configure the database connection by specifying type, host, name, user and password
# as seperate properties or as on string using the url propertie.
# as separate properties or as on string using the url properties.
# Either "mysql", "postgres" or "sqlite3", it's your choice
;type = sqlite3
@@ -90,6 +90,9 @@
# Max conn setting default is 0 (mean not set)
;max_open_conn =
# Connection Max Lifetime default is 14400 (means 14400 seconds or 4 hours)
;conn_max_lifetime = 14400
# Set to true to log the sql calls and execution times.
log_queries =
@@ -121,7 +124,6 @@ log_queries =
# This enables data proxy logging, default is false
;logging = false
#################################### Analytics ####################################
[analytics]
# Server reporting, sends usage counters to stats.grafana.org every 24 hours.
@@ -215,6 +217,9 @@ log_queries =
# Set to true to disable the signout link in the side menu. useful if you use auth.proxy, defaults to false
;disable_signout_menu = false
# URL to redirect the user to after sign out
;signout_redirect_url =
#################################### Anonymous Auth ##########################
[auth.anonymous]
# enable anonymous access
@@ -323,7 +328,6 @@ log_queries =
# optional settings to set different levels for specific loggers. Ex filters = sqlstore:debug
;filters =
# For "console" mode only
[log.console]
;level =
@@ -369,7 +373,6 @@ log_queries =
# Syslog tag. By default, the process' argv[0] is used.
;tag =
#################################### Alerting ############################
[alerting]
# Disable alerting engine & UI features
@@ -377,6 +380,11 @@ log_queries =
# Makes it possible to turn off alert rule execution but alerting UI is visible
;execute_alerts = true
#################################### Explore #############################
[explore]
# Enable the Explore section
;enabled = false
#################################### Internal Grafana Metrics ##########################
# Metrics available at HTTP API Url /metrics
[metrics]

11
devenv/README.md Normal file
View File

@@ -0,0 +1,11 @@
This folder contains useful scripts and configuration for...
* Configuring datasources in Grafana
* Provision example dashboards in Grafana
* Run preconfiured datasources as docker containers
want to know more? run setup!
```bash
./setup.sh
```

View File

@@ -0,0 +1,9 @@
apiVersion: 1
providers:
- name: 'Bulk dashboards'
folder: 'Bulk dashboards'
type: file
options:
path: devenv/dashboards/bulk-testing

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,73 @@
apiVersion: 1
datasources:
- name: Graphite
type: graphite
access: proxy
url: http://localhost:8080
jsonData:
graphiteVersion: "1.1"
- name: Prometheus
type: prometheus
access: proxy
isDefault: true
url: http://localhost:9090
- name: InfluxDB
type: influxdb
access: proxy
database: site
user: grafana
password: grafana
url: http://localhost:8086
jsonData:
timeInterval: "15s"
- name: OpenTsdb
type: opentsdb
access: proxy
url: http://localhost:4242
jsonData:
tsdbResolution: 1
tsdbVersion: 1
- name: Elastic
type: elasticsearch
access: proxy
database: "[metrics-]YYYY.MM.DD"
url: http://localhost:9200
jsonData:
interval: Daily
timeField: "@timestamp"
- name: MySQL
type: mysql
url: localhost:3306
database: grafana
user: grafana
password: password
- name: MSSQL
type: mssql
url: localhost:1433
database: grafana
user: grafana
password: "Password!"
- name: Postgres
type: postgres
url: localhost:5432
database: grafana
user: grafana
password: password
jsonData:
sslmode: "disable"
- name: Cloudwatch
type: cloudwatch
editable: true
jsonData:
authType: credentials
defaultRegion: eu-west-2

61
devenv/setup.sh Executable file
View File

@@ -0,0 +1,61 @@
#/bin/bash
bulkDashboard() {
requiresJsonnet
COUNTER=0
MAX=400
while [ $COUNTER -lt $MAX ]; do
jsonnet -o "dashboards/bulk-testing/dashboard${COUNTER}.json" -e "local bulkDash = import 'dashboards/bulk-testing/bulkdash.jsonnet'; bulkDash + { uid: 'uid-${COUNTER}', title: 'title-${COUNTER}' }"
let COUNTER=COUNTER+1
done
ln -s -f -r ./dashboards/bulk-testing/bulk-dashboards.yaml ../conf/provisioning/dashboards/custom.yaml
}
requiresJsonnet() {
if ! type "jsonnet" > /dev/null; then
echo "you need you install jsonnet to run this script"
echo "follow the instructions on https://github.com/google/jsonnet"
exit 1
fi
}
defaultDashboards() {
echo "not implemented yet"
}
defaultDatasources() {
echo "setting up all default datasources using provisioning"
ln -s -f -r ./datasources/default/default.yaml ../conf/provisioning/datasources/custom.yaml
}
usage() {
echo -e "install.sh\n\tThis script installs my basic setup for a debian laptop\n"
echo "Usage:"
echo " bulk-dashboards - create and provisioning 400 dashboards"
echo " default-datasources - provisiong all core datasources"
}
main() {
local cmd=$1
if [[ -z "$cmd" ]]; then
usage
exit 1
fi
if [[ $cmd == "bulk-dashboards" ]]; then
bulkDashboard
elif [[ $cmd == "default-datasources" ]]; then
defaultDatasources
elif [[ $cmd == "default-dashboards" ]]; then
bulkDashboard
else
usage
fi
}
main "$@"

View File

@@ -2,7 +2,7 @@
# http://localhost:3000 (Grafana running locally)
#
# Please note that you'll need to change the root_url in the Grafana configuration:
# root_url = %(protocol)s://%(domain)s:/grafana/
# root_url = %(protocol)s://%(domain)s:10081/grafana/
apacheproxy:
build: blocks/apache_proxy

View File

@@ -6,3 +6,10 @@
- "9300:9300"
volumes:
- ./blocks/elastic/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
fake-elastic-data:
image: grafana/fake-data-gen
network_mode: bridge
environment:
FD_DATASOURCE: elasticsearch
FD_PORT: 9200

View File

@@ -6,3 +6,10 @@
ports:
- "10200:9200"
- "10300:9300"
fake-elastic5-data:
image: grafana/fake-data-gen
network_mode: bridge
environment:
FD_DATASOURCE: elasticsearch
FD_PORT: 10200

View File

@@ -0,0 +1,15 @@
# You need to run 'sysctl -w vm.max_map_count=262144' on the host machine
elasticsearch6:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.4
command: elasticsearch
ports:
- "11200:9200"
- "11300:9300"
fake-elastic6-data:
image: grafana/fake-data-gen
network_mode: bridge
environment:
FD_DATASOURCE: elasticsearch6
FD_PORT: 11200

View File

@@ -0,0 +1,2 @@
script.inline: on
script.indexed: on

View File

@@ -38,7 +38,7 @@ CACHE_QUERY_PORT = 7002
LOG_UPDATES = False
# Enable AMQP if you want to receve metrics using an amqp broker
# Enable AMQP if you want to receive metrics using an amqp broker
# ENABLE_AMQP = False
# Verbose means a line will be logged for every metric received

File diff suppressed because it is too large Load Diff

View File

@@ -41,7 +41,7 @@ PICKLE_RECEIVER_PORT = 2004
CACHE_QUERY_INTERFACE = 0.0.0.0
CACHE_QUERY_PORT = 7002
# Enable AMQP if you want to receve metrics using you amqp broker
# Enable AMQP if you want to receive metrics using you amqp broker
ENABLE_AMQP = True
# Verbose means a line will be logged for every metric received

View File

@@ -265,7 +265,7 @@ WHISPER_FALLOCATE_CREATE = True
# CARBON_METRIC_PREFIX = carbon
# CARBON_METRIC_INTERVAL = 60
# Enable AMQP if you want to receve metrics using an amqp broker
# Enable AMQP if you want to receive metrics using an amqp broker
# ENABLE_AMQP = False
# Verbose means a line will be logged for every metric received

View File

@@ -30,7 +30,7 @@ give_completer_focus = shift-space
# pertain only to specific metric types.
#
# The dashboard presents only metrics that fall into specified naming schemes
# defined in this file. This creates a simpler, more targetted view of the
# defined in this file. This creates a simpler, more targeted view of the
# data. The general form for defining a naming scheme is as follows:
#
#[Metric Type]

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,18 @@
graphite11:
image: graphiteapp/graphite-statsd
ports:
- "8180:80"
- "2103-2104:2003-2004"
- "2123-2124:2023-2024"
- "8225:8125/udp"
- "8226:8126"
fake-graphite11-data:
image: grafana/fake-data-gen
network_mode: bridge
environment:
FD_DATASOURCE: graphite
FD_PORT: 2103
FD_GRAPHITE_VERSION: 1.1
depends_on:
- graphite11

View File

@@ -0,0 +1,5 @@
FROM microsoft/mssql-server-linux:2017-CU4
WORKDIR /usr/setup
COPY . /usr/setup
RUN chmod +x /usr/setup/setup.sh
CMD /bin/bash ./entrypoint.sh

View File

@@ -0,0 +1,2 @@
#start SQL Server and run setup script
/usr/setup/setup.sh & /opt/mssql/bin/sqlservr

View File

@@ -0,0 +1,12 @@
#/bin/bash
#wait for the SQL Server to come up
sleep 15s
cat /usr/setup/setup.sql.template | awk '{
gsub(/%%DB%%/,"'$MSSQL_DATABASE'");
gsub(/%%USER%%/,"'$MSSQL_USER'");
gsub(/%%PWD%%/,"'$MSSQL_PASSWORD'")
}1' > /usr/setup/setup.sql
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $MSSQL_SA_PASSWORD -d master -i /usr/setup/setup.sql

View File

@@ -0,0 +1,26 @@
CREATE LOGIN %%USER%% WITH PASSWORD = '%%PWD%%'
GO
CREATE DATABASE %%DB%%
ON
( NAME = %%DB%%,
FILENAME = '/var/opt/mssql/data/%%DB%%.mdf',
SIZE = 500MB,
MAXSIZE = 1000MB,
FILEGROWTH = 100MB )
LOG ON
( NAME = %%DB%%_log,
FILENAME = '/var/opt/mssql/data/%%DB%%_log.ldf',
SIZE = 500MB,
MAXSIZE = 1000MB,
FILEGROWTH = 100MB );
GO
USE %%DB%%;
GO
CREATE USER %%USER%% FOR LOGIN %%USER%%;
GO
EXEC sp_addrolemember 'db_owner', '%%USER%%';
GO

View File

@@ -0,0 +1,539 @@
{
"__inputs": [
{
"name": "DS_MSSQL",
"label": "MSSQL",
"description": "",
"type": "datasource",
"pluginId": "mssql",
"pluginName": "MSSQL"
}
],
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "5.0.0"
},
{
"type": "panel",
"id": "graph",
"name": "Graph",
"version": "5.0.0"
},
{
"type": "datasource",
"id": "mssql",
"name": "MSSQL",
"version": "1.0.0"
},
{
"type": "panel",
"id": "table",
"name": "Table",
"version": "5.0.0"
}
],
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"description": "A dashboard visualizing data generated from grafana/fake-data-gen",
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": null,
"iteration": 1520976748896,
"links": [],
"panels": [
{
"aliasColors": {
"total avg": "#6ed0e0"
},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_MSSQL}",
"fill": 2,
"gridPos": {
"h": 9,
"w": 12,
"x": 0,
"y": 0
},
"id": 2,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "null",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [
{
"alias": "total avg",
"fill": 0,
"pointradius": 3,
"points": true
}
],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"alias": "",
"format": "time_series",
"rawSql": "SELECT\n $__timeGroup(createdAt,'$summarize') as time,\n avg(value) as value,\n hostname as metric\nFROM \n grafana_metric\nWHERE\n $__timeFilter(createdAt) AND\n measurement = 'logins.count' AND\n hostname IN($host)\nGROUP BY $__timeGroup(createdAt,'$summarize'), hostname\nORDER BY 1",
"refId": "A"
},
{
"alias": "",
"format": "time_series",
"rawSql": "SELECT\n $__timeGroup(createdAt,'$summarize') as time,\n min(value) as value,\n 'total avg' as metric\nFROM \n grafana_metric\nWHERE\n $__timeFilter(createdAt) AND\n measurement = 'logins.count'\nGROUP BY $__timeGroup(createdAt,'$summarize')\nORDER BY 1",
"refId": "B"
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "Average logins / $summarize",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"decimals": null,
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_MSSQL}",
"fill": 2,
"gridPos": {
"h": 18,
"w": 12,
"x": 12,
"y": 0
},
"id": 8,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "null",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"alias": "",
"format": "time_series",
"rawSql": "SELECT\n $__timeGroup(createdAt,'$summarize') as time,\n avg(value) as value,\n 'started' as metric\nFROM \n grafana_metric\nWHERE\n $__timeFilter(createdAt) AND\n measurement = 'payment.started'\nGROUP BY $__timeGroup(createdAt,'$summarize')\nORDER BY 1",
"refId": "A"
},
{
"alias": "",
"format": "time_series",
"rawSql": "SELECT\n $__timeGroup(createdAt,'$summarize') as time,\n avg(value) as value,\n 'ended' as \"metric\"\nFROM \n grafana_metric\nWHERE\n $__timeFilter(createdAt) AND\n measurement = 'payment.ended'\nGROUP BY $__timeGroup(createdAt,'$summarize')\nORDER BY 1",
"refId": "B"
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "Average payments started/ended / $summarize",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_MSSQL}",
"fill": 2,
"gridPos": {
"h": 9,
"w": 12,
"x": 0,
"y": 9
},
"id": 6,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "null",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"alias": "",
"format": "time_series",
"rawSql": "SELECT\n $__timeGroup(createdAt,'$summarize') as time,\n max(value) as value,\n hostname as metric\nFROM \n grafana_metric\nWHERE\n $__timeFilter(createdAt) AND\n measurement = 'cpu' AND\n hostname IN($host)\nGROUP BY $__timeGroup(createdAt,'$summarize'), hostname\nORDER BY 1",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "Max CPU / $summarize",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
},
{
"columns": [],
"datasource": "${DS_MSSQL}",
"fontSize": "100%",
"gridPos": {
"h": 10,
"w": 24,
"x": 0,
"y": 18
},
"id": 4,
"links": [],
"pageSize": null,
"scroll": true,
"showHeader": true,
"sort": {
"col": 0,
"desc": true
},
"styles": [
{
"alias": "Time",
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"pattern": "Time",
"type": "date"
},
{
"alias": "",
"colorMode": null,
"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"
}
],
"targets": [
{
"alias": "",
"format": "table",
"rawSql": "SELECT createdAt as Time, source, datacenter, hostname, value FROM grafana_metric WHERE hostname in($host)",
"refId": "A"
}
],
"title": "Values",
"transform": "table",
"type": "table"
}
],
"schemaVersion": 16,
"style": "dark",
"tags": [],
"templating": {
"list": [
{
"allValue": null,
"current": {},
"datasource": "${DS_MSSQL}",
"hide": 0,
"includeAll": false,
"label": "Datacenter",
"multi": false,
"name": "datacenter",
"options": [],
"query": "SELECT DISTINCT datacenter FROM grafana_metric",
"refresh": 1,
"regex": "",
"sort": 1,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"allValue": null,
"current": {},
"datasource": "${DS_MSSQL}",
"hide": 0,
"includeAll": true,
"label": "Hostname",
"multi": true,
"name": "host",
"options": [],
"query": "SELECT DISTINCT hostname FROM grafana_metric WHERE datacenter='$datacenter'",
"refresh": 1,
"regex": "",
"sort": 1,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"auto": false,
"auto_count": 30,
"auto_min": "10s",
"current": {
"text": "1m",
"value": "1m"
},
"hide": 0,
"label": "Summarize",
"name": "summarize",
"options": [
{
"selected": false,
"text": "1s",
"value": "1s"
},
{
"selected": false,
"text": "10s",
"value": "10s"
},
{
"selected": false,
"text": "30s",
"value": "30s"
},
{
"selected": true,
"text": "1m",
"value": "1m"
},
{
"selected": false,
"text": "5m",
"value": "5m"
},
{
"selected": false,
"text": "10m",
"value": "10m"
},
{
"selected": false,
"text": "30m",
"value": "30m"
},
{
"selected": false,
"text": "1h",
"value": "1h"
},
{
"selected": false,
"text": "6h",
"value": "6h"
},
{
"selected": false,
"text": "12h",
"value": "12h"
},
{
"selected": false,
"text": "1d",
"value": "1d"
},
{
"selected": false,
"text": "7d",
"value": "7d"
},
{
"selected": false,
"text": "14d",
"value": "14d"
},
{
"selected": false,
"text": "30d",
"value": "30d"
}
],
"query": "1s,10s,30s,1m,5m,10m,30m,1h,6h,12h,1d,7d,14d,30d",
"refresh": 2,
"type": "interval"
}
]
},
"time": {
"from": "now-1h",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "",
"title": "Grafana Fake Data Gen - MSSQL",
"uid": "86Js1xRmk",
"version": 11
}

View File

@@ -0,0 +1,19 @@
mssql:
build:
context: blocks/mssql/build
environment:
ACCEPT_EULA: Y
MSSQL_SA_PASSWORD: Password!
MSSQL_PID: Developer
MSSQL_DATABASE: grafana
MSSQL_USER: grafana
MSSQL_PASSWORD: Password!
ports:
- "1433:1433"
fake-mssql-data:
image: grafana/fake-data-gen
network_mode: bridge
environment:
FD_DATASOURCE: mssql
FD_PORT: 1433

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,12 @@
mssqltests:
build:
context: blocks/mssql/build
environment:
ACCEPT_EULA: Y
MSSQL_SA_PASSWORD: Password!
MSSQL_PID: Express
MSSQL_DATABASE: grafanatest
MSSQL_USER: grafana
MSSQL_PASSWORD: Password!
ports:
- "1433:1433"

View File

@@ -2,7 +2,7 @@
"__inputs": [
{
"name": "DS_MYSQL",
"label": "Mysql",
"label": "MySQL",
"description": "",
"type": "datasource",
"pluginId": "mysql",
@@ -20,19 +20,19 @@
"type": "panel",
"id": "graph",
"name": "Graph",
"version": ""
"version": "5.0.0"
},
{
"type": "datasource",
"id": "mysql",
"name": "MySQL",
"version": "1.0.0"
"version": "5.0.0"
},
{
"type": "panel",
"id": "table",
"name": "Table",
"version": ""
"version": "5.0.0"
}
],
"annotations": {
@@ -53,7 +53,7 @@
"gnetId": null,
"graphTooltip": 0,
"id": null,
"iteration": 1518602729468,
"iteration": 1523372133566,
"links": [],
"panels": [
{
@@ -118,7 +118,7 @@
],
"thresholds": [],
"timeFrom": null,
"timeShift": "1h",
"timeShift": null,
"title": "Average logins / $summarize",
"tooltip": {
"shared": true,
@@ -150,7 +150,11 @@
"min": null,
"show": true
}
]
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
@@ -204,7 +208,7 @@
],
"thresholds": [],
"timeFrom": null,
"timeShift": "1h",
"timeShift": null,
"title": "Average payments started/ended / $summarize",
"tooltip": {
"shared": true,
@@ -236,7 +240,11 @@
"min": null,
"show": true
}
]
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
@@ -284,7 +292,7 @@
],
"thresholds": [],
"timeFrom": null,
"timeShift": "1h",
"timeShift": null,
"title": "Max CPU / $summarize",
"tooltip": {
"shared": true,
@@ -316,7 +324,11 @@
"min": null,
"show": true
}
]
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"columns": [],
@@ -369,7 +381,7 @@
"target": ""
}
],
"timeShift": "1h",
"timeShift": null,
"title": "Values",
"transform": "table",
"type": "table"
@@ -428,7 +440,6 @@
"auto_count": 5,
"auto_min": "10s",
"current": {
"selected": true,
"text": "1m",
"value": "1m"
},
@@ -545,5 +556,5 @@
"timezone": "",
"title": "Grafana Fake Data Gen - MySQL",
"uid": "DGsCac3kz",
"version": 6
"version": 8
}

View File

@@ -1,5 +1,5 @@
mysql:
image: mysql:latest
image: mysql:5.6
environment:
MYSQL_ROOT_PASSWORD: rootpass
MYSQL_DATABASE: grafana
@@ -7,9 +7,6 @@
MYSQL_PASSWORD: password
ports:
- "3306:3306"
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci, --innodb_monitor_enable=all]
fake-mysql-data:

View File

@@ -0,0 +1,3 @@
FROM mysql:5.6
ADD setup.sql /docker-entrypoint-initdb.d
CMD ["mysqld"]

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,6 @@
mysqltests:
image: mysql:latest
build:
context: blocks/mysql_tests
environment:
MYSQL_ROOT_PASSWORD: rootpass
MYSQL_DATABASE: grafana_tests
@@ -7,7 +8,4 @@
MYSQL_PASSWORD: password
ports:
- "3306:3306"
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
tmpfs: /var/lib/mysql:rw

View File

@@ -0,0 +1,2 @@
CREATE DATABASE grafana_ds_tests;
GRANT ALL PRIVILEGES ON grafana_ds_tests.* TO 'grafana';

View File

@@ -2,7 +2,7 @@
# http://localhost:3000 (Grafana running locally)
#
# Please note that you'll need to change the root_url in the Grafana configuration:
# root_url = %(protocol)s://%(domain)s:/grafana/
# root_url = %(protocol)s://%(domain)s:10080/grafana/
nginxproxy:
build: blocks/nginx_proxy

View File

@@ -17,6 +17,7 @@ EXPOSE 389
VOLUME ["/etc/ldap", "/var/lib/ldap"]
COPY modules/ /etc/ldap.dist/modules
COPY prepopulate/ /etc/ldap.dist/prepopulate
COPY entrypoint.sh /entrypoint.sh

View File

@@ -65,7 +65,7 @@ EOF
fi
if [[ -n "$SLAPD_ADDITIONAL_SCHEMAS" ]]; then
IFS=","; declare -a schemas=($SLAPD_ADDITIONAL_SCHEMAS)
IFS=","; declare -a schemas=($SLAPD_ADDITIONAL_SCHEMAS); unset IFS
for schema in "${schemas[@]}"; do
slapadd -n0 -F /etc/ldap/slapd.d -l "/etc/ldap/schema/${schema}.ldif" >/dev/null 2>&1
@@ -73,14 +73,18 @@ EOF
fi
if [[ -n "$SLAPD_ADDITIONAL_MODULES" ]]; then
IFS=","; declare -a modules=($SLAPD_ADDITIONAL_MODULES)
IFS=","; declare -a modules=($SLAPD_ADDITIONAL_MODULES); unset IFS
for module in "${modules[@]}"; do
slapadd -n0 -F /etc/ldap/slapd.d -l "/etc/ldap/modules/${module}.ldif" >/dev/null 2>&1
done
fi
chown -R openldap:openldap /etc/ldap/slapd.d/
for file in `ls /etc/ldap/prepopulate/*.ldif`; do
slapadd -F /etc/ldap/slapd.d -l "$file"
done
chown -R openldap:openldap /etc/ldap/slapd.d/ /var/lib/ldap/ /var/run/slapd/
else
slapd_configs_in_env=`env | grep 'SLAPD_'`

View File

@@ -0,0 +1,13 @@
# Notes on OpenLdap Docker Block
Any ldif files added to the prepopulate subdirectory will be automatically imported into the OpenLdap database.
The ldif files add three users, `ldapviewer`, `ldapeditor` and `ldapadmin`. Two groups, `admins` and `users`, are added that correspond with the group mappings in the default conf/ldap.toml. `ldapadmin` is a member of `admins` and `ldapeditor` is a member of `users`.
Note that users that are added here need to specify a `memberOf` attribute manually as well as the `member` attribute for the group. The `memberOf` module usually does this automatically (if you add a group in Apache Directory Studio for example) but this does not work in the entrypoint script as it uses the `slapadd` command to add entries before the server has started and before the `memberOf` module is loaded.
After adding ldif files to `prepopulate`:
1. Remove your current docker image: `docker rm docker_openldap_1`
2. Build: `docker-compose build`
3. `docker-compose up`

View File

@@ -0,0 +1,10 @@
dn: cn=ldapadmin,dc=grafana,dc=org
mail: ldapadmin@grafana.com
userPassword: grafana
objectClass: person
objectClass: top
objectClass: inetOrgPerson
objectClass: organizationalPerson
sn: ldapadmin
cn: ldapadmin
memberOf: cn=admins,dc=grafana,dc=org

View File

@@ -0,0 +1,5 @@
dn: cn=admins,dc=grafana,dc=org
cn: admins
member: cn=ldapadmin,dc=grafana,dc=org
objectClass: groupOfNames
objectClass: top

View File

@@ -0,0 +1,10 @@
dn: cn=ldapeditor,dc=grafana,dc=org
mail: ldapeditor@grafana.com
userPassword: grafana
objectClass: person
objectClass: top
objectClass: inetOrgPerson
objectClass: organizationalPerson
sn: ldapeditor
cn: ldapeditor
memberOf: cn=users,dc=grafana,dc=org

View File

@@ -0,0 +1,5 @@
dn: cn=users,dc=grafana,dc=org
cn: users
member: cn=ldapeditor,dc=grafana,dc=org
objectClass: groupOfNames
objectClass: top

View File

@@ -0,0 +1,9 @@
dn: cn=ldapviewer,dc=grafana,dc=org
mail: ldapviewer@grafana.com
userPassword: grafana
objectClass: person
objectClass: top
objectClass: inetOrgPerson
objectClass: organizationalPerson
sn: ldapviewer
cn: ldapviewer

View File

@@ -1,5 +1,5 @@
postgrestest:
image: postgres:latest
image: postgres:9.3
environment:
POSTGRES_USER: grafana
POSTGRES_PASSWORD: password
@@ -13,4 +13,4 @@
network_mode: bridge
environment:
FD_DATASOURCE: postgres
FD_PORT: 5432
FD_PORT: 5432

View File

@@ -0,0 +1,3 @@
FROM postgres:9.3
ADD setup.sql /docker-entrypoint-initdb.d
CMD ["postgres"]

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,6 @@
postgrestest:
image: postgres:latest
build:
context: blocks/postgres_tests
environment:
POSTGRES_USER: grafanatest
POSTGRES_PASSWORD: grafanatest

View File

@@ -0,0 +1,3 @@
CREATE DATABASE grafanadstest;
REVOKE CONNECT ON DATABASE grafanadstest FROM PUBLIC;
GRANT CONNECT ON DATABASE grafanadstest TO grafanatest;

View File

@@ -23,3 +23,9 @@
network_mode: host
ports:
- "9093:9093"
prometheus-random-data:
build: blocks/prometheus_random_data
network_mode: host
ports:
- "8081:8080"

View File

@@ -25,11 +25,15 @@ scrape_configs:
- job_name: 'node_exporter'
static_configs:
- targets: ['127.0.0.1:9100']
- job_name: 'fake-data-gen'
static_configs:
- targets: ['127.0.0.1:9091']
- job_name: 'grafana'
static_configs:
- targets: ['127.0.0.1:3000']
- job_name: 'prometheus-random-data'
static_configs:
- targets: ['127.0.0.1:8081']

View File

@@ -1,3 +1,3 @@
FROM prom/prometheus:v2.0.0
FROM prom/prometheus:v2.2.0
ADD prometheus.yml /etc/prometheus/
ADD alert.rules /etc/prometheus/

View File

@@ -23,3 +23,9 @@
network_mode: host
ports:
- "9093:9093"
prometheus-random-data:
build: blocks/prometheus_random_data
network_mode: host
ports:
- "8081:8080"

View File

@@ -25,11 +25,15 @@ scrape_configs:
- job_name: 'node_exporter'
static_configs:
- targets: ['127.0.0.1:9100']
- job_name: 'fake-data-gen'
static_configs:
- targets: ['127.0.0.1:9091']
- job_name: 'grafana'
static_configs:
- targets: ['127.0.0.1:3000']
- job_name: 'prometheus-random-data'
static_configs:
- targets: ['127.0.0.1:8081']

View File

@@ -0,0 +1,3 @@
FROM prom/prometheus:v1.8.2
ADD prometheus.yml /etc/prometheus/
ADD alert.rules /etc/prometheus/

View File

@@ -0,0 +1,10 @@
# Alert Rules
ALERT AppCrash
IF process_open_fds > 0
FOR 15s
LABELS { severity="critical" }
ANNOTATIONS {
summary = "Number of open fds > 0",
description = "Just testing"
}

View File

@@ -0,0 +1,26 @@
prometheus:
build: blocks/prometheus_mac
ports:
- "9090:9090"
node_exporter:
image: prom/node-exporter
ports:
- "9100:9100"
fake-prometheus-data:
image: grafana/fake-data-gen
ports:
- "9091:9091"
environment:
FD_DATASOURCE: prom
alertmanager:
image: quay.io/prometheus/alertmanager
ports:
- "9093:9093"
prometheus-random-data:
build: blocks/prometheus_random_data
ports:
- "8081:8080"

View File

@@ -0,0 +1,39 @@
# my global config
global:
scrape_interval: 10s # By default, scrape targets every 15 seconds.
evaluation_interval: 10s # By default, scrape targets every 15 seconds.
# scrape_timeout is set to the global default (10s).
# Load and evaluate rules in this file every 'evaluation_interval' seconds.
rule_files:
- "alert.rules"
# - "first.rules"
# - "second.rules"
alerting:
alertmanagers:
- scheme: http
static_configs:
- targets:
- "alertmanager:9093"
scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
- job_name: 'node_exporter'
static_configs:
- targets: ['node_exporter:9100']
- job_name: 'fake-data-gen'
static_configs:
- targets: ['fake-prometheus-data:9091']
- job_name: 'grafana'
static_configs:
- targets: ['host.docker.internal:3000']
- job_name: 'prometheus-random-data'
static_configs:
- targets: ['prometheus-random-data:8080']

View File

@@ -0,0 +1,18 @@
# This Dockerfile builds an image for a client_golang example.
# Builder image, where we build the example.
FROM golang:1.9.0 AS builder
# Download prometheus/client_golang/examples/random first
RUN go get github.com/prometheus/client_golang/examples/random
WORKDIR /go/src/github.com/prometheus/client_golang
WORKDIR /go/src/github.com/prometheus/client_golang/prometheus
RUN go get -d
WORKDIR /go/src/github.com/prometheus/client_golang/examples/random
RUN CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags '-w'
# Final image.
FROM scratch
LABEL maintainer "The Prometheus Authors <prometheus-developers@googlegroups.com>"
COPY --from=builder /go/src/github.com/prometheus/client_golang/examples/random .
EXPOSE 8080
ENTRYPOINT ["/random"]

View File

@@ -22,6 +22,6 @@ log() {
log $RUN_CMD
$RUN_CMD
# Exit immidiately in case of any errors or when we have interactive terminal
# Exit immediately in case of any errors or when we have interactive terminal
if [[ $? != 0 ]] || test -t 0; then exit $?; fi
log

View File

@@ -1 +1 @@
v4.3
v5.0

View File

@@ -65,13 +65,46 @@ Permission levels:
- **Admin**: Can edit & create dashboards and edit permissions.
- **Edit**: Can edit & create dashboards. **Cannot** edit folder/dashboard permissions.
- **View**: Can only view existing dashboards/folders.
#### Restricting Access
The highest permission always wins so if you for example want to hide a folder or dashboard from others you need to remove the **Organization Role** based permission from the Access Control List (ACL).
- You cannot override permissions for users with the **Org Admin Role**. Admins always have access to everything.
- A more specific permission with a lower permission level will not have any effect if a more general rule exists with higher permission level. You need to remove or lower the permission level of the more general rule.
#### How Grafana Resolves Multiple Permissions - Examples
##### Example 1 (`user1` has the Editor Role)
Permissions for a dashboard:
- `Everyone with Editor Role Can Edit`
- `user1 Can View`
Result: `user1` has Edit permission as the highest permission always wins.
##### Example 2 (`user1` has the Viewer Role and is a member of `team1`)
Permissions for a dashboard:
- `Everyone with Viewer Role Can View`
- `user1 Can Edit`
- `team1 Can Admin`
Result: `user1` has Admin permission as the highest permission always wins.
##### Example 3
Permissions for a dashboard:
- `user1 Can Admin (inherited from parent folder)`
- `user1 Can Edit`
Result: You cannot override to a lower permission. `user1` has Admin permission as the highest permission always wins.
- **View**: Can only view existing dashboars/folders.
#### Restricting access
The highest permission always wins so if you for example want to hide a folder or dashboard from others you need to remove the **Organization Role** based permission from the
Access Control List (ACL).
- You cannot override permissions for users with **Org Admin Role**
- A more specific permission with lower permission level will not have any effect if a more general rule exists with higher permission level. For example if "Everyone with Editor Role Can Edit" exists in the ACL list then **John Doe** will still have Edit permission even after you have specifically added a permission for this user with the permission set to **View**. You need to remove or lower the permission level of the more general rule.

View File

@@ -11,11 +11,13 @@ weight = 8
# Provisioning Grafana
## Config file
In previous versions of Grafana, you could only use the API for provisioning data sources and dashboards. But that required the service to be running before you started creating dashboards and you also needed to set up credentials for the HTTP API. In v5.0 we decided to improve this experience by adding a new active provisioning system that uses config files. This will make GitOps more natural as data sources and dashboards can be defined via files that can be version controlled. We hope to extend this system to later add support for users, orgs and alerts as well.
## Config File
Checkout the [configuration](/installation/configuration) page for more information on what you can configure in `grafana.ini`
### Config file locations
### Config File Locations
- Default configuration from `$WORKING_DIR/conf/defaults.ini`
- Custom configuration from `$WORKING_DIR/conf/custom.ini`
@@ -26,7 +28,7 @@ Checkout the [configuration](/installation/configuration) page for more informat
> `/etc/grafana/grafana.ini`. This path is specified in the Grafana
> init.d script using `--config` file parameter.
### Using environment variables
### Using Environment Variables
All options in the configuration file (listed below) can be overridden
using environment variables using the syntax:
@@ -59,7 +61,7 @@ export GF_AUTH_GOOGLE_CLIENT_SECRET=newS3cretKey
<hr />
## Configuration management tools
## Configuration Management Tools
Currently we do not provide any scripts/manifests for configuring Grafana. Rather than spending time learning and creating scripts/manifests for each tool, we think our time is better spent making Grafana easier to provision. Therefore, we heavily relay on the expertise of the community.
@@ -74,12 +76,14 @@ Saltstack | [https://github.com/salt-formulas/salt-formula-grafana](https://gith
> This feature is available from v5.0
It's possible to manage datasources in Grafana by adding one or more yaml config files in the [`provisioning/datasources`](/installation/configuration/#provisioning) directory. Each config file can contain a list of `datasources` that will be added or updated during start up. If the datasource already exists, Grafana will update it to match the configuration file. The config file can also contain a list of datasources that should be deleted. That list is called `delete_datasources`. Grafana will delete datasources listed in `delete_datasources` before inserting/updating those in the `datasource` list.
It's possible to manage datasources in Grafana by adding one or more yaml config files in the [`provisioning/datasources`](/installation/configuration/#provisioning) directory. Each config file can contain a list of `datasources` that will be added or updated during start up. If the datasource already exists, Grafana will update it to match the configuration file. The config file can also contain a list of datasources that should be deleted. That list is called `deleteDatasources`. Grafana will delete datasources listed in `deleteDatasources` before inserting/updating those in the `datasource` list.
### Running Multiple Grafana Instances
### Running multiple Grafana instances.
If you are running multiple instances of Grafana you might run into problems if they have different versions of the `datasource.yaml` configuration file. The best way to solve this problem is to add a version number to each datasource in the configuration and increase it when you update the config. Grafana will only update datasources with the same or lower version number than specified in the config. That way, old configs cannot overwrite newer configs if they restart at the same time.
### Example datasource config file
### Example Datasource Config File
```yaml
# config file version
apiVersion: 1
@@ -90,13 +94,13 @@ deleteDatasources:
orgId: 1
# list of datasources to insert/update depending
# whats available in the database
# what's available in the database
datasources:
# <string, required> name of the datasource. Required
- name: Graphite
# <string, required> datasource type. Required
type: graphite
# <string, required> access mode. direct or proxy. Required
# <string, required> access mode. proxy or direct (Server or Browser in the UI). Required
access: proxy
# <int> org id. will default to orgId 1 if not specified
orgId: 1
@@ -133,30 +137,36 @@ datasources:
editable: false
```
#### Json data
#### Custom Settings per Datasource
Please refer to each datasource documentation for specific provisioning examples.
| Datasource | Misc |
| ---- | ---- |
| Elasticsearch | Elasticsearch uses the `database` property to configure the index for a datasource |
#### Json Data
Since not all datasources have the same configuration settings we only have the most common ones as fields. The rest should be stored as a json blob in the `json_data` field. Here are the most common settings that the core datasources use.
| Name | Type | Datasource |Description |
| ----| ---- | ---- | --- |
| Name | Type | Datasource | Description |
| ---- | ---- | ---- | ---- |
| tlsAuth | boolean | *All* | Enable TLS authentication using client cert configured in secure json data |
| tlsAuthWithCACert | boolean | *All* | Enable TLS authtication using CA cert |
| tlsAuthWithCACert | boolean | *All* | Enable TLS authentication using CA cert |
| tlsSkipVerify | boolean | *All* | Controls whether a client verifies the server's certificate chain and host name. |
| graphiteVersion | string | Graphite | Graphite version |
| timeInterval | string | Elastic, Influxdb & Prometheus | Lowest interval/step value that should be used for this data source |
| esVersion | string | Elastic | Elasticsearch version |
| timeInterval | string | Elastic, InfluxDB & Prometheus | Lowest interval/step value that should be used for this data source |
| esVersion | string | Elastic | Elasticsearch version as an number (2/5/56) |
| timeField | string | Elastic | Which field that should be used as timestamp |
| interval | string | Elastic | Index date time format |
| authType | string | Cloudwatch | Auth provider. keys/credentials/arn |
| assumeRoleArn | string | Cloudwatch | ARN of Assume Role |
| defaultRegion | string | Cloudwatch | AWS region |
| customMetricsNamespaces | string | Cloudwatch | Namespaces of Custom Metrics |
| tsdbVersion | string | OpenTsdb | Version |
| tsdbResolution | string | OpenTsdb | Resolution |
| sslmode | string | Postgre | SSLmode. 'disable', 'require', 'verify-ca' or 'verify-full' |
| tsdbVersion | string | OpenTSDB | Version |
| tsdbResolution | string | OpenTSDB | Resolution |
| sslmode | string | PostgreSQL | SSLmode. 'disable', 'require', 'verify-ca' or 'verify-full' |
#### Secure Json data
#### Secure Json Data
`{"authType":"keys","defaultRegion":"us-west-2","timeField":"@timestamp"}`
@@ -167,8 +177,10 @@ Secure json data is a map of settings that will be encrypted with [secret key](/
| tlsCACert | string | *All* |CA cert for out going requests |
| tlsClientCert | string | *All* |TLS Client cert for outgoing requests |
| tlsClientKey | string | *All* |TLS Client key for outgoing requests |
| password | string | Postgre | password |
| user | string | Postgre | user |
| password | string | PostgreSQL | password |
| user | string | PostgreSQL | user |
| accessKey | string | Cloudwatch | Access key for connecting to Cloudwatch |
| secretKey | string | Cloudwatch | Secret key for connecting to Cloudwatch |
### Dashboards
@@ -185,13 +197,28 @@ providers:
folder: ''
type: file
disableDeletion: false
editable: false
updateIntervalSeconds: 3 #how often Grafana will scan for changed dashboards
options:
path: /var/lib/grafana/dashboards
```
When Grafana starts, it will update/insert all dashboards available in the configured path. Then later on poll that path and look for updated json files and insert those update/insert those into the database.
#### Making changes to a provisioned dashboard
It's possible to make changes to a provisioned dashboard in Grafana UI, but there's currently no possibility to automatically save the changes back to the provisioning source.
However, if you make changes to a provisioned dashboard you can `Save` the dashboard which will bring up a *Cannot save provisioned dashboard* dialog like seen in the screenshot below.
Here available options 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.
Note: The JSON shown in input field and when using `Copy JSON to Clipboard` and/or `Save JSON to file` will have the `id` field automatically removed to aid the provisioning workflow.
{{< docs-imagebox img="/img/docs/v51/provisioning_cannot_save_dashboard.png" max-width="500px" class="docs-image--no-shadow" >}}
### Reuseable Dashboard Urls
If the dashboard in the json file contains an [uid](/reference/dashboard/#json-fields), Grafana will force insert/update on that uid. This allows you to migrate dashboards betweens Grafana instances and provisioning Grafana from configuration without breaking the urls given since the new dashboard url uses the uid as identifier.
When Grafana starts, it will update/insert all dashboards available in the configured folders. If you modify the file, the dashboard will also be updated.
By default Grafana will delete dashboards in the database if the file is removed. You can disable this behavior using the `disableDeletion` setting.
By default Grafana will delete dashboards in the database if the file is removed. You can disable this behavior using the `disableDeletion` setting.
> **Note.** Provisioning allows you to overwrite existing dashboards
> which leads to problems if you re-use settings that are supposed to be unique.

View File

@@ -20,7 +20,7 @@ to add and configure a `notification` channel (can be email, PagerDuty or other
## Notification Channel Setup
{{< imgbox max-width="40%" img="/img/docs/v43/alert_notifications_menu.png" caption="Alerting Notification Channels" >}}
{{< imgbox max-width="30%" img="/img/docs/v50/alerts_notifications_menu.png" caption="Alerting Notification Channels" >}}
On the Notification Channels page hit the `New Channel` button to go the page where you
can configure and setup a new Notification Channel.
@@ -41,6 +41,8 @@ Grafana ships with the following set of notification types:
To enable email notifications you have to setup [SMTP settings](/installation/configuration/#smtp)
in the Grafana config. Email notifications will upload an image of the alert graph to an
external image destination if available or fallback to attaching the image to the email.
Be aware that if you use the `local` image storage email servers and clients might not be
able to access the image.
### Slack
@@ -58,6 +60,8 @@ Recipient | allows you to override the Slack recipient.
Mention | make it possible to include a mention in the Slack notification sent by Grafana. Ex @here or @channel
Token | If provided, Grafana will upload the generated image via Slack's file.upload API method, not the external image destination.
If you are using the token for a slack bot, then you have to invite the bot to the channel you want to send notifications and add the channel to the recipient field.
### PagerDuty
To set up PagerDuty, all you have to do is to provide an API key.
@@ -149,10 +153,10 @@ Prometheus Alertmanager | `prometheus-alertmanager` | no
# Enable images in notifications {#external-image-store}
Grafana can render the panel associated with the alert rule and include that in the notification. Most Notification Channels require that this image be publicly accessable (Slack and PagerDuty for example). In order to include images in alert notifications, Grafana can upload the image to an image store. It currently supports
Grafana can render the panel associated with the alert rule and include that in the notification. Most Notification Channels require that this image be publicly accessible (Slack and PagerDuty for example). In order to include images in alert notifications, Grafana can upload the image to an image store. It currently supports
Amazon S3, Webdav, Google Cloud Storage and Azure Blob Storage. So to set that up you need to configure the [external image uploader](/installation/configuration/#external-image-storage) in your grafana-server ini config file.
Be aware that some notifiers requires public access to the image to be able to include it in the notification. So make sure to enable public access to the images. If your using local image uploader, your Grafana instance need to be accessible by the internet.
Be aware that some notifiers requires public access to the image to be able to include it in the notification. So make sure to enable public access to the images. If you're using local image uploader, your Grafana instance need to be accessible by the internet.
Currently only the Email Channels attaches images if no external image store is specified. To include images in alert notifications for other channels then you need to set up an external image store.

View File

@@ -27,7 +27,9 @@ and the conditions that need to be met for the alert to change state and trigger
## Execution
The alert rules are evaluated in the Grafana backend in a scheduler and query execution engine that is part
of core Grafana. Only some data sources are supported right now. They include `Graphite`, `Prometheus`, `InfluxDB`, `OpenTSDB`, `MySQL`, `Postgres` and `Cloudwatch`.
of core Grafana. Only some data sources are supported right now. They include `Graphite`, `Prometheus`, `Elasticsearch`, `InfluxDB`, `OpenTSDB`, `MySQL`, `Postgres` and `Cloudwatch`.
> Alerting support for Elasticsearch is only available in Grafana v5.2 and above.
### Clustering
@@ -59,7 +61,7 @@ avg() OF query(A, 5m, now) IS BELOW 14
```
- `avg()` Controls how the values for **each** series should be reduced to a value that can be compared against the threshold. Click on the function to change it to another aggregation function.
- `query(A, 5m, now)` The letter defines what query to execute from the **Metrics** tab. The second two parameters define the time range, `5m, now` means 5 minutes from now to now. You can also do `10m, now-2m` to define a time range that will be 10 minutes from now to 2 minutes from now. This is useful if you want to ignore the last 2 minutes of data.
- `query(A, 5m, now)` The letter defines what query to execute from the **Metrics** tab. The second two parameters define the time range, `5m, now` means 5 minutes ago to now. You can also do `10m, now-2m` to define a time range that will be 10 minutes ago to 2 minutes ago. This is useful if you want to ignore the last 2 minutes of data.
- `IS BELOW 14` Defines the type of threshold and the threshold value. You can click on `IS BELOW` to change the type of threshold.
The query used in an alert rule cannot contain any template variables. Currently we only support `AND` and `OR` operators between conditions and they are executed serially.
@@ -110,7 +112,7 @@ to `Keep Last State` in order to basically ignore them.
## Notifications
In alert tab you can also specify alert rule notifications along with a detailed messsage about the alert rule.
In alert tab you can also specify alert rule notifications along with a detailed message about the alert rule.
The message can contain anything, information about how you might solve the issue, link to runbook, etc.
The actual notifications are configured and shared between multiple alerts. Read the
@@ -152,6 +154,8 @@ filters = alerting.scheduler:debug \
tsdb.prometheus:debug \
tsdb.opentsdb:debug \
tsdb.influxdb:debug \
tsdb.elasticsearch:debug \
tsdb.elasticsearch.client:debug \
```
If you want to log raw query sent to your TSDB and raw response in log you also have to set grafana.ini option `app_mode` to

View File

@@ -1,6 +1,6 @@
+++
title = "Contributor Licence Agreement (CLA)"
description = "Contributer Licence Agreement (CLA)"
description = "Contributor Licence Agreement (CLA)"
type = "docs"
aliases = ["/project/cla", "docs/contributing/cla.html"]
[menu.docs]
@@ -101,4 +101,4 @@ TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT WILL YOU [OR US]
<br>
<br>
<br>
This CLA aggreement is based on the [Harmony Contributor Aggrement Template (combined)](http://www.harmonyagreements.org/agreements.html), [Creative Commons Attribution 3.0 Unported License](https://creativecommons.org/licenses/by/3.0/)
This CLA agreement is based on the [Harmony Contributor Aggrement Template (combined)](http://www.harmonyagreements.org/agreements.html), [Creative Commons Attribution 3.0 Unported License](https://creativecommons.org/licenses/by/3.0/)

View File

@@ -43,6 +43,40 @@ server is running on AWS you can use IAM Roles and authentication will be handle
Checkout AWS docs on [IAM Roles](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html)
## IAM Policies
Grafana needs permissions granted via IAM to be able to read CloudWatch metrics
and EC2 tags/instances. You can attach these permissions to IAM roles and
utilize Grafana's built-in support for assuming roles.
Here is a minimal policy example:
```json
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowReadingMetricsFromCloudWatch",
"Effect": "Allow",
"Action": [
"cloudwatch:ListMetrics",
"cloudwatch:GetMetricStatistics"
],
"Resource": "*"
},
{
"Sid": "AllowReadingTagsFromEC2",
"Effect": "Allow",
"Action": [
"ec2:DescribeTags",
"ec2:DescribeInstances"
],
"Resource": "*"
}
]
}
```
### AWS credentials file
Create a file at `~/.aws/credentials`. That is the `HOME` path for user running grafana-server.
@@ -87,7 +121,7 @@ Name | Description
*namespaces()* | Returns a list of namespaces CloudWatch support.
*metrics(namespace, [region])* | Returns a list of metrics in the namespace. (specify region or use "default" for custom metrics)
*dimension_keys(namespace)* | Returns a list of dimension keys in the namespace.
*dimension_values(region, namespace, metric, dimension_key)* | Returns a list of dimension values matching the specified `region`, `namespace`, `metric` and `dimension_key`.
*dimension_values(region, namespace, metric, dimension_key, [filters])* | Returns a list of dimension values matching the specified `region`, `namespace`, `metric`, `dimension_key` or you can use dimension `filters` to get more specific result as well.
*ebs_volume_ids(region, instance_id)* | Returns a list of volume ids matching the specified `region`, `instance_id`.
*ec2_instance_attribute(region, attribute_name, filters)* | Returns a list of attributes matching the specified `region`, `attribute_name`, `filters`.
@@ -104,6 +138,7 @@ Query | Service
*dimension_values(us-east-1,AWS/Redshift,CPUUtilization,ClusterIdentifier)* | RedShift
*dimension_values(us-east-1,AWS/RDS,CPUUtilization,DBInstanceIdentifier)* | RDS
*dimension_values(us-east-1,AWS/S3,BucketSizeBytes,BucketName)* | S3
*dimension_values(us-east-1,CWAgent,disk_used_percent,device,{"InstanceId":"$instance_id"})* | CloudWatch Agent
## ec2_instance_attribute examples
@@ -172,3 +207,37 @@ Amazon provides 1 million CloudWatch API requests each month at no additional ch
it costs $0.01 per 1,000 GetMetricStatistics or ListMetrics requests. For each query Grafana will
issue a GetMetricStatistics request and every time you pick a dimension in the query editor
Grafana will issue a ListMetrics request.
## Configure the Datasource with Provisioning
It's now possible to configure datasources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for datasources on the [provisioning docs page](/administration/provisioning/#datasources)
Here are some provisioning examples for this datasource.
Using a credentials file
```yaml
apiVersion: 1
datasources:
- name: Cloudwatch
type: cloudwatch
jsonData:
authType: credentials
defaultRegion: eu-west-2
```
Using `accessKey` and `secretKey`
```yaml
apiVersion: 1
datasources:
- name: Cloudwatch
type: cloudwatch
jsonData:
authType: keys
defaultRegion: eu-west-2
secureJsonData:
accessKey: "<your access key>"
secretKey: "<your secret key>"
```

View File

@@ -29,13 +29,19 @@ Name | Description
*Name* | The data source name. This is how you refer to the data source in panels & queries.
*Default* | Default data source means that it will be pre-selected for new panels.
*Url* | The HTTP protocol, IP, and port of your Elasticsearch server.
*Access* | Proxy = access via Grafana backend, Direct = access directly from browser.
*Access* | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser.
Proxy access means that the Grafana backend will proxy all requests from the browser, and send them on to the Data Source. This is useful because it can eliminate CORS (Cross Origin Site Resource) issues, as well as eliminate the need to disseminate authentication to the browser.
Access mode controls how requests to the data source will be handled. Server should be the preferred way if nothing else stated.
### Direct access
### Server access mode (Default)
If you select direct access you must update your Elasticsearch configuration to allow other domains to access
All requests will be made from the browser to Grafana backend/server which in turn will forward the requests to the data source and by that circumvent possible Cross-Origin Resource Sharing (CORS) requirements. The URL needs to be accessible from the grafana backend/server if you select this access mode.
### Browser (Direct) access
All requests will be made from the browser directly to the data source and may be subject to Cross-Origin Resource Sharing (CORS) requirements. The URL needs to be accessible from the browser if you select this access mode.
If you select Browser access you must update your Elasticsearch configuration to allow other domains to access
Elasticsearch from the browser. You do this by specifying these to options in your **elasticsearch.yml** config file.
```bash
@@ -45,7 +51,7 @@ http.cors.allow-origin: "*"
### Index settings
![](/img/docs/elasticsearch/elasticsearch_ds_details.png)
![Elasticsearch Datasource Details](/img/docs/elasticsearch/elasticsearch_ds_details.png)
Here you can specify a default for the `time field` and specify the name of your Elasticsearch index. You can use
a time pattern for the index name or a wildcard.
@@ -55,9 +61,25 @@ a time pattern for the index name or a wildcard.
Be sure to specify your Elasticsearch version in the version selection dropdown. This is very important as there are differences how queries are composed. Currently only 2.x and 5.x
are supported.
### Min time interval
A lower limit for the auto group by time interval. Recommended to be set to write frequency, for example `1m` if your data is written every minute.
This option can also be overridden/configured in a dashboard panel under data source options. It's important to note that this value **needs** to be formatted as a
number followed by a valid time identifier, e.g. `1m` (1 minute) or `30s` (30 seconds). The following time identifiers are supported:
Identifier | Description
------------ | -------------
`y` | year
`M` | month
`w` | week
`d` | day
`h` | hour
`m` | minute
`s` | second
`ms` | millisecond
## Metric Query editor
![](/img/docs/elasticsearch/query_editor.png)
![Elasticsearch Query Editor](/img/docs/elasticsearch/query_editor.png)
The Elasticsearch query editor allows you to select multiple metrics and group by multiple terms or filters. Use the plus and minus icons to the right to add/remove
metrics or group by clauses. Some metrics and group by clauses haves options, click the option text to expand the row to view and edit metric or group by options.
@@ -137,3 +159,23 @@ Query | You can leave the search query blank or specify a lucene query
Time | The name of the time field, needs to be date field.
Text | Event description field.
Tags | Optional field name to use for event tags (can be an array or a CSV string).
## Configure the Datasource with Provisioning
It's now possible to configure datasources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for datasources on the [provisioning docs page](/administration/provisioning/#datasources)
Here are some provisioning examples for this datasource.
```yaml
apiVersion: 1
datasources:
- name: Elastic
type: elasticsearch
access: proxy
database: "[metrics-]YYYY.MM.DD"
url: http://localhost:9200
jsonData:
interval: Daily
timeField: "@timestamp"
```

View File

@@ -20,7 +20,7 @@ queries through the use of query references.
## Adding the data source
1. Open the side menu by clicking the Grafana icon in the top header.
2. In the side menu under the `Dashboards` link you should find a link named `Data Sources`.
2. In the side menu under the `Configuration` link you should find a link named `Data Sources`.
3. Click the `+ Add data source` button in the top header.
4. Select `Graphite` from the *Type* dropdown.
@@ -31,20 +31,28 @@ Name | Description
*Name* | The data source name. This is how you refer to the data source in panels & queries.
*Default* | Default data source means that it will be pre-selected for new panels.
*Url* | The HTTP protocol, IP, and port of your graphite-web or graphite-api install.
*Access* | Proxy = access via Grafana backend, Direct = access directly from browser.
*Access* | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser.
Proxy access means that the Grafana backend will proxy all requests from the browser, and send them on to the Data Source. This is useful because it can eliminate CORS (Cross Origin Site Resource) issues, as well as eliminate the need to disseminate authentication details to the browser.
Access mode controls how requests to the data source will be handled. Server should be the preferred way if nothing else stated.
### Server access mode (Default)
All requests will be made from the browser to Grafana backend/server which in turn will forward the requests to the data source and by that circumvent possible Cross-Origin Resource Sharing (CORS) requirements. The URL needs to be accessible from the grafana backend/server if you select this access mode.
### Browser access mode
All requests will be made from the browser directly to the data source and may be subject to Cross-Origin Resource Sharing (CORS) requirements. The URL needs to be accessible from the browser if you select this access mode.
## Metric editor
### Navigate metric segments
Click the ``Select metric`` link to start navigating the metric space. One you start you can continue using the mouse
or keyboard arrow keys. You can select a wildcard and still continue.
{{< docs-imagebox img="/img/docs/v45/graphite_query1_still.png"
animated-gif="/img/docs/v45/graphite_query1.gif" >}}
### Functions
Click the plus icon to the right to add a function. You can search for the function or select it from the menu. Once
@@ -55,7 +63,6 @@ by the x icon.
{{< docs-imagebox img="/img/docs/v45/graphite_query2_still.png"
animated-gif="/img/docs/v45/graphite_query2.gif" >}}
### Optional parameters
Some functions like aliasByNode support an optional second argument. To add this parameter specify for example 3,-2 as the first parameter and the function editor will adapt and move the -2 to a second parameter. To remove the second optional parameter just click on it and leave it blank and the editor will remove it.
@@ -63,7 +70,6 @@ Some functions like aliasByNode support an optional second argument. To add this
{{< docs-imagebox img="/img/docs/v45/graphite_query3_still.png"
animated-gif="/img/docs/v45/graphite_query3.gif" >}}
### Nested Queries
You can reference queries by the row “letter” that theyre on (similar to Microsoft Excel). If you add a second query to a graph, you can reference the first query simply by typing in #A. This provides an easy and convenient way to build compounded queries.
@@ -71,11 +77,10 @@ You can reference queries by the row “letter” that theyre on (similar to
{{< docs-imagebox img="/img/docs/v45/graphite_nested_queries_still.png"
animated-gif="/img/docs/v45/graphite_nested_queries.gif" >}}
## Point consolidation
All Graphite metrics are consolidated so that Graphite doesn't return more data points than there are pixels in the graph. By default,
this consolidation is done using `avg` function. You can how Graphite consolidates metrics by adding the Graphite consolidateBy function.
this consolidation is done using `avg` function. You can control how Graphite consolidates metrics by adding the Graphite consolidateBy function.
> *Notice* This means that legend summary values (max, min, total) cannot be all correct at the same time. They are calculated
> client side by Grafana. And depending on your consolidation function only one or two can be correct at the same time.
@@ -89,6 +94,18 @@ being displayed in your dashboard.
Checkout the [Templating]({{< relref "reference/templating.md" >}}) documentation for an introduction to the templating feature and the different
types of template variables.
Graphite 1.1 introduced tags and Grafana added support for Graphite queries with tags in version 5.0. To create a variable using tag values, then you need to use the Grafana functions `tags` and `tag_values`.
Query | Description
------------ | -------------
*tags()* | Returns all tags.
*tags(server=~backend\*)* | Returns only tags that occur in series matching the filter expression.
*tag_values(server)* | Return tag values for the specified tag.
*tag_values(server, server=~backend\*)* | Returns filtered tag values that occur for the specified tag in series matching those expressions.
*tag_values(server, server=~backend\*, app=~${apps:regex})* | Multiple filter expressions and expressions can contain other variables.
For more details, see the [Graphite docs on the autocomplete api for tags](http://graphite.readthedocs.io/en/latest/tags.html#auto-complete-support).
### Query variable
The query you specify in the query field should be a metric find type of query. For example, a query like `prod.servers.*` will fill the
@@ -97,10 +114,10 @@ variable with all possible values that exist in the wildcard position.
You can also create nested variables that use other variables in their definition. For example
`apps.$app.servers.*` uses the variable `$app` in its query definition.
### Variable usage
### Variable Usage
You can use a variable in a metric node path or as a parameter to a function.
![](/img/docs/v2/templated_variable_parameter.png)
![variable](/img/docs/v2/templated_variable_parameter.png)
There are two syntaxes:
@@ -113,6 +130,18 @@ the second syntax in expressions like `my.server[[serverNumber]].count`.
Example:
[Graphite Templated Dashboard](http://play.grafana.org/dashboard/db/graphite-templated-nested)
### Variable Usage in Tag Queries
Multi-value variables in tag queries use the advanced formatting syntax introduced in Grafana 5.0 for variables: `{var:regex}`. Non-tag queries will use the default glob formatting for multi-value variables.
Example of a tag expression with regex formatting and using the Equal Tilde operator, `=~`:
```text
server=~${servers:regex}
```
Checkout the [Advanced Formatting Options section in the Variables]({{< relref "reference/templating.md#advanced-formatting-options" >}}) documentation for examples and details.
## Annotations
[Annotations]({{< relref "reference/annotations.md" >}}) allows you to overlay rich event information on top of graphs. You add annotation
@@ -120,3 +149,21 @@ queries via the Dashboard menu / Annotations view.
Graphite supports two ways to query annotations. A regular metric query, for this you use the `Graphite query` textbox. A Graphite events query, use the `Graphite event tags` textbox,
specify a tag or wildcard (leave empty should also work)
## Configure the Datasource with Provisioning
It's now possible to configure datasources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for datasources on the [provisioning docs page](/administration/provisioning/#datasources)
Here are some provisioning examples for this datasource.
```yaml
apiVersion: 1
datasources:
- name: Graphite
type: graphite
access: proxy
url: http://localhost:8080
jsonData:
graphiteVersion: "1.1"
```

View File

@@ -30,6 +30,7 @@ The following datasources are officially supported:
* [Prometheus]({{< relref "prometheus.md" >}})
* [MySQL]({{< relref "mysql.md" >}})
* [Postgres]({{< relref "postgres.md" >}})
* [Microsoft SQL Server (MSSQL)]({{< relref "mssql.md" >}})
## Data source plugins

View File

@@ -28,16 +28,36 @@ Name | Description
*Name* | The data source name. This is how you refer to the data source in panels & queries.
*Default* | Default data source means that it will be pre-selected for new panels.
*Url* | The http protocol, ip and port of you influxdb api (influxdb api port is by default 8086)
*Access* | Proxy = access via Grafana backend, Direct = access directly from browser.
*Access* | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser.
*Database* | Name of your influxdb database
*User* | Name of your database user
*Password* | Database user's password
### Proxy vs Direct access
Access mode controls how requests to the data source will be handled. Server should be the preferred way if nothing else stated.
Proxy access means that the Grafana backend will proxy all requests from the browser. So requests to InfluxDB will be channeled through
`grafana-server`. This means that the URL you specify needs to be accessible from the server you are running Grafana on. Proxy access
mode is also more secure as the username & password will never reach the browser.
### Server access mode (Default)
All requests will be made from the browser to Grafana backend/server which in turn will forward the requests to the data source and by that circumvent possible Cross-Origin Resource Sharing (CORS) requirements. The URL needs to be accessible from the grafana backend/server if you select this access mode.
### Browser access mode
All requests will be made from the browser directly to the data source and may be subject to Cross-Origin Resource Sharing (CORS) requirements. The URL needs to be accessible from the browser if you select this access mode.
### Min time interval
A lower limit for the auto group by time interval. Recommended to be set to write frequency, for example `1m` if your data is written every minute.
This option can also be overridden/configured in a dashboard panel under data source options. It's important to note that this value **needs** to be formatted as a
number followed by a valid time identifier, e.g. `1m` (1 minute) or `30s` (30 seconds). The following time identifiers are supported:
Identifier | Description
------------ | -------------
`y` | year
`M` | month
`w` | week
`d` | day
`h` | hour
`m` | minute
`s` | second
`ms` | millisecond
## Query Editor
@@ -174,3 +194,22 @@ SELECT title, description from events WHERE $timeFilter order asc
For InfluxDB you need to enter a query like in the above example. You need to have the ```where $timeFilter```
part. If you only select one column you will not need to enter anything in the column mapping fields. The
Tags field can be a comma separated string.
## Configure the Datasource with Provisioning
It's now possible to configure datasources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for datasources on the [provisioning docs page](/administration/provisioning/#datasources)
Here are some provisioning examples for this datasource.
```yaml
apiVersion: 1
datasources:
- name: InfluxDB
type: influxdb
access: proxy
database: site
user: grafana
password: grafana
url: http://localhost:8086
```

View File

@@ -0,0 +1,565 @@
+++
title = "Using Microsoft SQL Server in Grafana"
description = "Guide for using Microsoft SQL Server in Grafana"
keywords = ["grafana", "MSSQL", "Microsoft", "SQL", "guide", "Azure SQL Database"]
type = "docs"
[menu.docs]
name = "Microsoft SQL Server"
parent = "datasources"
weight = 7
+++
# Using Microsoft SQL Server in Grafana
> Only available in Grafana v5.1+.
Grafana 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.
## Adding the data source
1. Open the side menu by clicking the Grafana icon in the top header.
2. In the side menu under the `Configuration` link you should find a link named `Data Sources`.
3. Click the `+ Add data source` button in the top header.
4. Select *Microsoft SQL Server* from the *Type* dropdown.
### Data source options
Name | Description
------------ | -------------
*Name* | The data source name. This is how you refer to the data source in panels & queries.
*Default* | Default data source means that it will be pre-selected for new panels.
*Host* | The IP address/hostname and optional port of your MSSQL instance. If port is omitted, default 1433 will be used.
*Database* | Name of your MSSQL database.
*User* | Database user's login/username
*Password* | Database user's password
### Database User Permissions (Important!)
The database user you specify when you add the data source should only be granted SELECT permissions on
the specified database & tables you want to query. Grafana does not validate that the query is safe. The query
could include any SQL statement. For example, statements like `DELETE FROM user;` and `DROP TABLE user;` would be
executed. To protect against this we **Highly** recommend you create a specific MSSQL user with restricted permissions.
Example:
```sql
CREATE USER grafanareader WITH PASSWORD 'password'
GRANT SELECT ON dbo.YourTable3 TO grafanareader
```
Make sure the user does not get any unwanted privileges from the public role.
### Known Issues
MSSQL 2008 and 2008 R2 engine cannot handle login records when SSL encryption is not disabled. Due to this you may receive an `Login error: EOF` error when trying to create your datasource.
To fix MSSQL 2008 R2 issue, install MSSQL 2008 R2 Service Pack 2. To fix MSSQL 2008 issue, install Microsoft MSSQL 2008 Service Pack 3 and Cumulative update package 3 for MSSQL 2008 SP3.
## Query Editor
{{< docs-imagebox img="/img/docs/v51/mssql_query_editor.png" class="docs-image--no-shadow" >}}
You find the MSSQL query editor in the metrics tab in Graph, Singlestat or Table panel's edit mode. You enter edit mode by clicking the
panel title, then edit. The editor allows you to define a SQL query to select data to be visualized.
1. Select *Format as* `Time series` (for use in Graph or Singlestat panel's among others) or `Table` (for use in Table panel among others).
2. This is the actual editor where you write your SQL queries.
3. Show help section for MSSQL below the query editor.
4. Show actual executed SQL query. Will be available first after a successful query has been executed.
5. Add an additional query where an additional query editor will be displayed.
<div class="clearfix"></div>
## Macros
To simplify syntax and to allow for dynamic parts, like date range filters, the query can contain macros.
Macro example | Description
------------ | -------------
*$__time(dateColumn)* | Will be replaced by an expression to rename the column to *time*. For example, *dateColumn as time*
*$__timeEpoch(dateColumn)* | Will be replaced by an expression to convert a DATETIME column type to unix timestamp and rename it to *time*. <br/>For example, *DATEDIFF(second, '1970-01-01', dateColumn) AS time*
*$__timeFilter(dateColumn)* | Will be replaced by a time range filter using the specified column name. <br/>For example, *dateColumn >= DATEADD(s, 1494410783, '1970-01-01') AND dateColumn <= DATEADD(s, 1494410783, '1970-01-01')*
*$__timeFrom()* | Will be replaced by the start of the currently active time selection. For example, *DATEADD(second, 1494410783, '1970-01-01')*
*$__timeTo()* | Will be replaced by the end of the currently active time selection. For example, *DATEADD(second, 1494410783, '1970-01-01')*
*$__timeGroup(dateColumn,'5m'[, fillvalue])* | Will be replaced by an expression usable in GROUP BY clause. Providing a *fillValue* of *NULL* or *floating value* will automatically fill empty series in timerange with that value. <br/>For example, *CAST(ROUND(DATEDIFF(second, '1970-01-01', time_column)/300.0, 0) as bigint)\*300*.
*$__timeGroup(dateColumn,'5m', 0)* | Same as above but with a fill parameter so all null values will be converted to the fill value (all null values would be set to zero using this example).
*$__unixEpochFilter(dateColumn)* | Will be replaced by a time range filter using the specified column name with times represented as unix timestamp. For example, *dateColumn > 1494410783 AND dateColumn < 1494497183*
*$__unixEpochFrom()* | Will be replaced by the start of the currently active time selection as unix timestamp. For example, *1494410783*
*$__unixEpochTo()* | Will be replaced by the end of the currently active time selection as unix timestamp. For example, *1494497183*
We plan to add many more macros. If you have suggestions for what macros you would like to see, please [open an issue](https://github.com/grafana/grafana) in our GitHub repo.
The query editor has a link named `Generated SQL` that shows up after a query has been executed, while in panel edit mode. Click on it and it will expand and show the raw interpolated SQL string that was executed.
## Table queries
If the `Format as` query option is set to `Table` then you can basically do any type of SQL query. The table panel will automatically show the results of whatever columns & rows your query returns.
**Example database table:**
```sql
CREATE TABLE [event] (
time_sec bigint,
description nvarchar(100),
tags nvarchar(100),
)
```
```sql
CREATE TABLE [mssql_types] (
c_bit bit, c_tinyint tinyint, c_smallint smallint, c_int int, c_bigint bigint, c_money money, c_smallmoney smallmoney, c_numeric numeric(10,5),
c_real real, c_decimal decimal(10,2), c_float float,
c_char char(10), c_varchar varchar(10), c_text text,
c_nchar nchar(12), c_nvarchar nvarchar(12), c_ntext ntext,
c_datetime datetime, c_datetime2 datetime2, c_smalldatetime smalldatetime, c_date date, c_time time, c_datetimeoffset datetimeoffset
)
INSERT INTO [mssql_types]
SELECT
1, 5, 20020, 980300, 1420070400, '$20000.15', '£2.15', 12345.12,
1.11, 2.22, 3.33,
'char10', 'varchar10', 'text',
N'☺nchar12☺', N'☺nvarchar12☺', N'☺text☺',
GETDATE(), CAST(GETDATE() AS DATETIME2), CAST(GETDATE() AS SMALLDATETIME), CAST(GETDATE() AS DATE), CAST(GETDATE() AS TIME), SWITCHOFFSET(CAST(GETDATE() AS DATETIMEOFFSET), '-07:00'))
```
Query editor with example query:
{{< docs-imagebox img="/img/docs/v51/mssql_table_query.png" max-width="500px" class="docs-image--no-shadow" >}}
The query:
```sql
SELECT * FROM [mssql_types]
```
You can control the name of the Table panel columns by using regular `AS ` SQL column selection syntax. Example:
```sql
SELECT
c_bit as [column1], c_tinyint as [column2]
FROM
[mssql_types]
```
The resulting table panel:
{{< docs-imagebox img="/img/docs/v51/mssql_table_result.png" max-width="1489px" class="docs-image--no-shadow" >}}
## Time series queries
If you set `Format as` to `Time series`, for use in Graph panel for example, then the query must must have a column named `time` that returns either a sql datetime or any numeric datatype representing unix epoch in seconds. You may return a column named `metric` that is used as metric name for the value column. Any column except `time` and `metric` is treated as a value column. If you omit the `metric` column, tha name of the value column will be the metric name. You may select multiple value columns, each will have its name as metric.
**Example database table:**
```sql
CREATE TABLE [event] (
time_sec bigint,
description nvarchar(100),
tags nvarchar(100),
)
```
```sql
CREATE TABLE metric_values (
time datetime,
measurement nvarchar(100),
valueOne int,
valueTwo int,
)
INSERT metric_values (time, measurement, valueOne, valueTwo) VALUES('2018-03-15 12:30:00', 'Metric A', 62, 6)
INSERT metric_values (time, measurement, valueOne, valueTwo) VALUES('2018-03-15 12:30:00', 'Metric B', 49, 11)
...
INSERT metric_values (time, measurement, valueOne, valueTwo) VALUES('2018-03-15 13:55:00', 'Metric A', 14, 25)
INSERT metric_values (time, measurement, valueOne, valueTwo) VALUES('2018-03-15 13:55:00', 'Metric B', 48, 10)
```
{{< docs-imagebox img="/img/docs/v51/mssql_time_series_one.png" class="docs-image--no-shadow docs-image--right" >}}
**Example with one `value` and one `metric` column.**
```sql
SELECT
time,
valueOne,
measurement as metric
FROM
metric_values
WHERE
$__timeFilter(time)
ORDER BY 1
```
When above query are used in a graph panel the result will be two series named `Metric A` and `Metric B` with value of `valueOne` and `valueTwo` plotted over `time`.
<div class="clearfix"></div>
{{< docs-imagebox img="/img/docs/v51/mssql_time_series_two.png" class="docs-image--no-shadow docs-image--right" >}}
**Example with multiple `value` culumns:**
```sql
SELECT
time,
valueOne,
valueTwo
FROM
metric_values
WHERE
$__timeFilter(time)
ORDER BY 1
```
When above query are used in a graph panel the result will be two series named `valueOne` and `valueTwo` with value of `valueOne` and `valueTwo` plotted over `time`.
<div class="clearfix"></div>
{{< docs-imagebox img="/img/docs/v51/mssql_time_series_three.png" class="docs-image--no-shadow docs-image--right" >}}
**Example using the $__timeGroup macro:**
```sql
SELECT
$__timeGroup(time, '3m') as time,
measurement as metric,
avg(valueOne)
FROM
metric_values
WHERE
$__timeFilter(time)
GROUP BY
$__timeGroup(time, '3m'),
measurement
ORDER BY 1
```
When above query are used in a graph panel the result will be two series named `Metric A` and `Metric B` with an average of `valueOne` plotted over `time`.
Any two series lacking a value in a 3 minute window will render a line between those two lines. You'll notice that the graph to the right never goes down to zero.
<div class="clearfix"></div>
{{< docs-imagebox img="/img/docs/v51/mssql_time_series_four.png" class="docs-image--no-shadow docs-image--right" >}}
**Example using the $__timeGroup macro with fill parameter set to zero:**
```sql
SELECT
$__timeGroup(time, '3m', 0) as time,
measurement as metric,
sum(valueTwo)
FROM
metric_values
WHERE
$__timeFilter(time)
GROUP BY
$__timeGroup(time, '3m'),
measurement
ORDER BY 1
```
When above query are used in a graph panel the result will be two series named `Metric A` and `Metric B` with a sum of `valueTwo` plotted over `time`.
Any series lacking a value in a 3 minute window will have a value of zero which you'll see rendered in the graph to the right.
## Templating
Instead of hard-coding things like server, application and sensor name in you metric queries you can use variables in their place. Variables are shown as dropdown select boxes at the top of the dashboard. These dropdowns makes it easy to change the data being displayed in your dashboard.
Checkout the [Templating]({{< relref "reference/templating.md" >}}) documentation for an introduction to the templating feature and the different types of template variables.
### Query Variable
If you add a template variable of the type `Query`, you can write a MSSQL query that can
return things like measurement names, key names or key values that are shown as a dropdown select box.
For example, you can have a variable that contains all values for the `hostname` column in a table if you specify a query like this in the templating variable *Query* setting.
```sql
SELECT hostname FROM host
```
A query can return multiple columns and Grafana will automatically create a list from them. For example, the query below will return a list with values from `hostname` and `hostname2`.
```sql
SELECT [host].[hostname], [other_host].[hostname2] FROM host JOIN other_host ON [host].[city] = [other_host].[city]
```
Another option is a query that can create a key/value variable. The query should return two columns that are named `__text` and `__value`. The `__text` column value should be unique (if it is not unique then the first value is used). The options in the dropdown will have a text and value that allows you to have a friendly name as text and an id as the value. An example query with `hostname` as the text and `id` as the value:
```sql
SELECT hostname __text, id __value FROM host
```
You can also create nested variables. For example if you had another variable named `region`. Then you could have
the hosts variable only show hosts from the current selected region with a query like this (if `region` is a multi-value variable then use the `IN` comparison operator rather than `=` to match against multiple values):
```sql
SELECT hostname FROM host WHERE region IN ($region)
```
### Using Variables in Queries
> From Grafana 4.3.0 to 4.6.0, template variables are always quoted automatically so if it is a string value do not wrap them in quotes in where clauses.
>
> From Grafana 5.0.0, template variable values are only quoted when the template variable is a `multi-value`.
If the variable is a multi-value variable then use the `IN` comparison operator rather than `=` to match against multiple values.
There are two syntaxes:
`$<varname>` Example with a template variable named `hostname`:
```sql
SELECT
atimestamp time,
aint value
FROM table
WHERE $__timeFilter(atimestamp) and hostname in($hostname)
ORDER BY atimestamp
```
`[[varname]]` Example with a template variable named `hostname`:
```sql
SELECT
atimestamp as time,
aint as value
FROM table
WHERE $__timeFilter(atimestamp) and hostname in([[hostname]])
ORDER BY atimestamp
```
#### Disabling Quoting for Multi-value Variables
Grafana automatically creates a quoted, comma-separated string for multi-value variables. For example: if `server01` and `server02` are selected then it will be formatted as: `'server01', 'server02'`. Do disable quoting, use the csv formatting option for variables:
`${servers:csv}`
Read more about variable formatting options in the [Variables]({{< relref "reference/templating.md#advanced-formatting-options" >}}) documentation.
## Annotations
[Annotations]({{< relref "reference/annotations.md" >}}) allows you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
**Columns:**
Name | Description
------------ | -------------
time | The name of the date/time field. Could be a column with a native sql date/time data type or epoch value.
text | Event description field.
tags | Optional field name to use for event tags as a comma separated string.
**Example database tables:**
```sql
CREATE TABLE [events] (
time_sec bigint,
description nvarchar(100),
tags nvarchar(100),
)
```
We also use the database table defined in [Time series queries](#time-series-queries).
**Example query using time column with epoch values:**
```sql
SELECT
time_sec as time,
description as [text],
tags
FROM
[events]
WHERE
$__unixEpochFilter(time_sec)
ORDER BY 1
```
**Example query using time column of native sql date/time data type:**
```sql
SELECT
time,
measurement as text,
convert(varchar, valueOne) + ',' + convert(varchar, valueTwo) as tags
FROM
metric_values
WHERE
$__timeFilter(time_column)
ORDER BY 1
```
## Stored procedure support
Stored procedures have been verified to work. However, please note that we haven't done anything special to support this why there may exist edge cases where it won't work as you would expect.
Stored procedures should be supported in table, time series and annotation queries as long as you use the same naming of columns and return data in the same format as describe above under respective section.
Please note that any macro function will not work inside a stored procedure.
### Examples
{{< docs-imagebox img="/img/docs/v51/mssql_metrics_graph.png" class="docs-image--no-shadow docs-image--right" >}}
For the following examples the database table defined in [Time series queries](#time-series-queries). Let's say that we want to visualize 4 series in a graph panel, i.e. all combinations of columns `valueOne`, `valueTwo` and `measurement`. Graph panel to the right visualizes what we want to achieve. To solve this we actually need to use two queries:
**First query:**
```sql
SELECT
$__timeGroup(time, '5m') as time,
measurement + ' - value one' as metric,
avg(valueOne) as valueOne
FROM
metric_values
WHERE
$__timeFilter(time)
GROUP BY
$__timeGroup(time, '5m'),
measurement
ORDER BY 1
```
**Second query:**
```sql
SELECT
$__timeGroup(time, '5m') as time,
measurement + ' - value two' as metric,
avg(valueTwo) as valueTwo
FROM
metric_values
GROUP BY
$__timeGroup(time, '5m'),
measurement
ORDER BY 1
```
#### Stored procedure using time in epoch format
We can define a stored procedure that will return all data we need to render 4 series in a graph panel like above.
In this case the stored procedure accepts two parameters `@from` and `@to` of `int` data types which should be a timerange (from-to) in epoch format
which will be used to filter the data to return from the stored procedure.
We're mimicking the `$__timeGroup(time, '5m')` in the select and group by expressions and that's why there's a lot of lengthy expressions needed -
these could be extracted to MSSQL functions, if wanted.
```sql
CREATE PROCEDURE sp_test_epoch(
@from int,
@to int
) AS
BEGIN
SELECT
cast(cast(DATEDIFF(second, {d '1970-01-01'}, DATEADD(second, DATEDIFF(second,GETDATE(),GETUTCDATE()), time))/600 as int)*600 as int) as time,
measurement + ' - value one' as metric,
avg(valueOne) as value
FROM
metric_values
WHERE
time >= DATEADD(s, @from, '1970-01-01') AND time <= DATEADD(s, @to, '1970-01-01')
GROUP BY
cast(cast(DATEDIFF(second, {d '1970-01-01'}, DATEADD(second, DATEDIFF(second,GETDATE(),GETUTCDATE()), time))/600 as int)*600 as int),
measurement
UNION ALL
SELECT
cast(cast(DATEDIFF(second, {d '1970-01-01'}, DATEADD(second, DATEDIFF(second,GETDATE(),GETUTCDATE()), time))/600 as int)*600 as int) as time,
measurement + ' - value two' as metric,
avg(valueTwo) as value
FROM
metric_values
WHERE
time >= DATEADD(s, @from, '1970-01-01') AND time <= DATEADD(s, @to, '1970-01-01')
GROUP BY
cast(cast(DATEDIFF(second, {d '1970-01-01'}, DATEADD(second, DATEDIFF(second,GETDATE(),GETUTCDATE()), time))/600 as int)*600 as int),
measurement
ORDER BY 1
END
```
Then we can use the following query for our graph panel.
```sql
DECLARE
@from int = $__unixEpochFrom(),
@to int = $__unixEpochTo()
EXEC dbo.sp_test_epoch @from, @to
```
#### Stored procedure using time in datetime format
We can define a stored procedure that will return all data we need to render 4 series in a graph panel like above.
In this case the stored procedure accepts two parameters `@from` and `@to` of `datetime` data types which should be a timerange (from-to)
which will be used to filter the data to return from the stored procedure.
We're mimicking the `$__timeGroup(time, '5m')` in the select and group by expressions and that's why there's a lot of lengthy expressions needed -
these could be extracted to MSSQL functions, if wanted.
```sql
CREATE PROCEDURE sp_test_datetime(
@from datetime,
@to datetime
) AS
BEGIN
SELECT
cast(cast(DATEDIFF(second, {d '1970-01-01'}, time)/600 as int)*600 as int) as time,
measurement + ' - value one' as metric,
avg(valueOne) as value
FROM
metric_values
WHERE
time >= @from AND time <= @to
GROUP BY
cast(cast(DATEDIFF(second, {d '1970-01-01'}, time)/600 as int)*600 as int),
measurement
UNION ALL
SELECT
cast(cast(DATEDIFF(second, {d '1970-01-01'}, time)/600 as int)*600 as int) as time,
measurement + ' - value two' as metric,
avg(valueTwo) as value
FROM
metric_values
WHERE
time >= @from AND time <= @to
GROUP BY
cast(cast(DATEDIFF(second, {d '1970-01-01'}, time)/600 as int)*600 as int),
measurement
ORDER BY 1
END
```
Then we can use the following query for our graph panel.
```sql
DECLARE
@from datetime = $__timeFrom(),
@to datetime = $__timeTo()
EXEC dbo.sp_test_datetime @from, @to
```
## Alerting
Time series queries should work in alerting conditions. Table formatted queries are not yet supported in alert rule
conditions.
## Configure the Datasource with Provisioning
It's now possible to configure datasources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for datasources on the [provisioning docs page](/administration/provisioning/#datasources)
Here are some provisioning examples for this datasource.
```yaml
apiVersion: 1
datasources:
- name: MSSQL
type: mssql
url: localhost:1433
database: grafana
user: grafana
secureJsonData:
password: "Password!"
```

View File

@@ -12,6 +12,8 @@ weight = 7
# Using MySQL in Grafana
> Only available in Grafana v4.3+.
>
> Starting from Grafana v5.1 you can name the time column *time* in addition to earlier supported *time_sec*. Usage of *time_sec* will eventually be deprecated.
Grafana ships with a built-in MySQL data source plugin that allow you to query any visualize
data from a MySQL compatible database.
@@ -23,6 +25,17 @@ data from a MySQL compatible database.
3. Click the `+ Add data source` button in the top header.
4. Select *MySQL* from the *Type* dropdown.
### Data source options
Name | Description
------------ | -------------
*Name* | The data source name. This is how you refer to the data source in panels & queries.
*Default* | Default data source means that it will be pre-selected for new panels.
*Host* | The IP address/hostname and optional port of your MySQL instance.
*Database* | Name of your MySQL database.
*User* | Database user's login/username
*Password* | Database user's password
### Database User Permissions (Important!)
The database user you specify when you add the data source should only be granted SELECT permissions on
@@ -46,10 +59,12 @@ To simplify syntax and to allow for dynamic parts, like date range filters, the
Macro example | Description
------------ | -------------
*$__time(dateColumn)* | Will be replaced by an expression to convert to a UNIX timestamp and rename the column to `time_sec`. For example, *UNIX_TIMESTAMP(dateColumn) as time_sec*
*$__timeEpoch(dateColumn)* | Will be replaced by an expression to convert to a UNIX timestamp and rename the column to `time_sec`. For example, *UNIX_TIMESTAMP(dateColumn) as time_sec*
*$__timeFilter(dateColumn)* | Will be replaced by a time range filter using the specified column name. For example, *dateColumn > FROM_UNIXTIME(1494410783) AND dateColumn < FROM_UNIXTIME(1494497183)*
*$__timeFrom()* | Will be replaced by the start of the currently active time selection. For example, *FROM_UNIXTIME(1494410783)*
*$__timeTo()* | Will be replaced by the end of the currently active time selection. For example, *FROM_UNIXTIME(1494497183)*
*$__timeGroup(dateColumn,'5m')* | Will be replaced by an expression usable in GROUP BY clause. For example, *cast(cast(UNIX_TIMESTAMP(dateColumn)/(300) as signed)*300 as signed) as time_sec,*
*$__timeGroup(dateColumn,'5m')* | Will be replaced by an expression usable in GROUP BY clause. For example, *cast(cast(UNIX_TIMESTAMP(dateColumn)/(300) as signed)*300 as signed),*
*$__timeGroup(dateColumn,'5m',0)* | Same as above but with a fill parameter so all null values will be converted to the fill value (all null values would be set to zero using this example).
*$__unixEpochFilter(dateColumn)* | Will be replaced by a time range filter using the specified column name with times represented as unix timestamp. For example, *dateColumn > 1494410783 AND dateColumn < 1494497183*
*$__unixEpochFrom()* | Will be replaced by the start of the currently active time selection as unix timestamp. For example, *1494410783*
*$__unixEpochTo()* | Will be replaced by the end of the currently active time selection as unix timestamp. For example, *1494497183*
@@ -84,39 +99,50 @@ The resulting table panel:
![](/img/docs/v43/mysql_table.png)
### Time series queries
## Time series queries
If you set `Format as` to `Time series`, for use in Graph panel for example, then there are some requirements for
what your query returns.
If you set `Format as` to `Time series`, for use in Graph panel for example, then the query must return a column named `time` that returns either a sql datetime or any numeric datatype representing unix epoch.
Any column except `time` and `metric` is treated as a value column.
You may return a column named `metric` that is used as metric name for the value column.
- Must be a column named `time_sec` representing a unix epoch in seconds.
- Must be a column named `value` representing the time series value.
- Must be a column named `metric` representing the time series name.
Example:
**Example with `metric` column:**
```sql
SELECT
min(UNIX_TIMESTAMP(time_date_time)) as time_sec,
max(value_double) as value,
metric1 as metric
FROM test_data
WHERE $__timeFilter(time_date_time)
GROUP BY metric1, UNIX_TIMESTAMP(time_date_time) DIV 300
ORDER BY time_sec asc
```
Example with $__timeGroup macro:
```sql
SELECT
$__timeGroup(time_date_time,'5m') as time_sec,
min(value_double) as value,
metric_name as metric
$__timeGroup(time_date_time,'5m'),
min(value_double),
'min' as metric
FROM test_data
WHERE $__timeFilter(time_date_time)
GROUP BY 1, metric_name
ORDER BY 1
GROUP BY time
ORDER BY time
```
**Example using the fill parameter in the $__timeGroup macro to convert null values to be zero instead:**
```sql
SELECT
$__timeGroup(createdAt,'5m',0),
sum(value_double) as value,
measurement
FROM test_data
WHERE
$__timeFilter(createdAt)
GROUP BY time, measurement
ORDER BY time
```
**Example with multiple columns:**
```sql
SELECT
$__timeGroup(time_date_time,'5m'),
min(value_double) as min_value,
max(value_double) as max_value
FROM test_data
WHERE $__timeFilter(time_date_time)
GROUP BY time
ORDER BY time
```
Currently, there is no support for a dynamic group by time based on time range & panel width.
@@ -180,7 +206,7 @@ There are two syntaxes:
```sql
SELECT
UNIX_TIMESTAMP(atimestamp) as time_sec,
UNIX_TIMESTAMP(atimestamp) as time,
aint as value,
avarchar as metric
FROM my_table
@@ -192,7 +218,7 @@ ORDER BY atimestamp ASC
```sql
SELECT
UNIX_TIMESTAMP(atimestamp) as time_sec,
UNIX_TIMESTAMP(atimestamp) as time,
aint as value,
avarchar as metric
FROM my_table
@@ -200,28 +226,68 @@ WHERE $__timeFilter(atimestamp) and hostname in([[hostname]])
ORDER BY atimestamp ASC
```
#### Disabling Quoting for Multi-value Variables
Grafana automatically creates a quoted, comma-separated string for multi-value variables. For example: if `server01` and `server02` are selected then it will be formatted as: `'server01', 'server02'`. Do disable quoting, use the csv formatting option for variables:
`${servers:csv}`
Read more about variable formatting options in the [Variables]({{< relref "reference/templating.md#advanced-formatting-options" >}}) documentation.
## Annotations
[Annotations]({{< relref "reference/annotations.md" >}}) allows you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
[Annotations]({{< relref "reference/annotations.md" >}}) allow you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
An example query:
**Example query using time column with epoch values:**
```sql
SELECT
UNIX_TIMESTAMP(atimestamp) as time_sec,
value as text,
epoch_time as time,
metric1 as text,
CONCAT(tag1, ',', tag2) as tags
FROM my_table
WHERE $__timeFilter(atimestamp)
ORDER BY atimestamp ASC
FROM
public.test_data
WHERE
$__unixEpochFilter(epoch_time)
```
**Example query using time column of native sql date/time data type:**
```sql
SELECT
native_date_time as time,
metric1 as text,
CONCAT(tag1, ',', tag2) as tags
FROM
public.test_data
WHERE
$__timeFilter(native_date_time)
```
Name | Description
------------ | -------------
time_sec | The name of the date/time field.
time | The name of the date/time field. Could be a column with a native sql date/time data type or epoch value.
text | Event description field.
tags | Optional field name to use for event tags as a comma separated string.
## Alerting
Time series queries should work in alerting conditions. Table formatted queries is not yet supported in alert rule conditions.
## Configure the Datasource with Provisioning
It's now possible to configure datasources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for datasources on the [provisioning docs page](/administration/provisioning/#datasources)
Here are some provisioning examples for this datasource.
```yaml
apiVersion: 1
datasources:
- name: MySQL
type: mysql
url: localhost:3306
database: grafana
user: grafana
password: password
```

View File

@@ -28,11 +28,10 @@ Name | Description
*Name* | The data source name. This is how you refer to the data source in panels & queries.
*Default* | Default data source means that it will be pre-selected for new panels.
*Url* | The http protocol, ip and port of you opentsdb server (default port is usually 4242)
*Access* | Proxy = access via Grafana backend, Direct = access directly from browser.
*Access* | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser.
*Version* | Version = opentsdb version, either <=2.1 or 2.2
*Resolution* | Metrics from opentsdb may have datapoints with either second or millisecond resolution.
## Query editor
Open a graph in edit mode by click the title. Query editor will differ if the datasource has version <=2.1 or = 2.2.
@@ -78,7 +77,7 @@ the existing time series data in OpenTSDB, you need to run `tsdb uid metasync` o
### Nested Templating
One template variable can be used to filter tag values for another template varible. First parameter is the metric name,
One template variable can be used to filter tag values for another template variable. First parameter is the metric name,
second parameter is the tag key for which you need to find tag values, and after that all other dependent template variables.
Some examples are mentioned below to make nested template queries work successfully.
@@ -88,3 +87,22 @@ Query | Description
*tag_values(cpu, hostanme, env=$env, region=$region)* | Return tag values for cpu metric, selected env tag value, selected region tag value and tag key hostname
For details on OpenTSDB metric queries checkout the official [OpenTSDB documentation](http://opentsdb.net/docs/build/html/index.html)
## Configure the Datasource with Provisioning
It's now possible to configure datasources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for datasources on the [provisioning docs page](/administration/provisioning/#datasources)
Here are some provisioning examples for this datasource.
```yaml
apiVersion: 1
datasources:
- name: OpenTsdb
type: opentsdb
access: proxy
url: http://localhost:4242
jsonData:
tsdbResolution: 1
tsdbVersion: 1
```

View File

@@ -20,6 +20,18 @@ Grafana ships with a built-in PostgreSQL data source plugin that allows you to q
3. Click the `+ Add data source` button in the top header.
4. Select *PostgreSQL* from the *Type* dropdown.
### Data source options
Name | Description
------------ | -------------
*Name* | The data source name. This is how you refer to the data source in panels & queries.
*Default* | Default data source means that it will be pre-selected for new panels.
*Host* | The IP address/hostname and optional port of your PostgreSQL instance.
*Database* | Name of your PostgreSQL database.
*User* | Database user's login/username
*Password* | Database user's password
*SSL Mode* | This option determines whether or with what priority a secure SSL TCP/IP connection will be negotiated with the server.
### Database User Permissions (Important!)
The database user you specify when you add the data source should only be granted SELECT permissions on
@@ -45,11 +57,12 @@ Macro example | Description
------------ | -------------
*$__time(dateColumn)* | Will be replaced by an expression to rename the column to `time`. For example, *dateColumn as time*
*$__timeSec(dateColumn)* | Will be replaced by an expression to rename the column to `time` and converting the value to unix timestamp. For example, *extract(epoch from dateColumn) as time*
*$__timeFilter(dateColumn)* | Will be replaced by a time range filter using the specified column name. For example, *extract(epoch from dateColumn) BETWEEN 1494410783 AND 1494497183*
*$__timeFrom()* | Will be replaced by the start of the currently active time selection. For example, *to_timestamp(1494410783)*
*$__timeTo()* | Will be replaced by the end of the currently active time selection. For example, *to_timestamp(1494497183)*
*$__timeFilter(dateColumn)* | Will be replaced by a time range filter using the specified column name. For example, *dateColumn BETWEEN '2017-04-21T05:01:17Z' AND '2017-04-21T05:06:17Z'*
*$__timeFrom()* | Will be replaced by the start of the currently active time selection. For example, *'2017-04-21T05:01:17Z'*
*$__timeTo()* | Will be replaced by the end of the currently active time selection. For example, *'2017-04-21T05:06:17Z'*
*$__timeGroup(dateColumn,'5m')* | Will be replaced by an expression usable in GROUP BY clause. For example, *(extract(epoch from dateColumn)/300)::bigint*300 AS time*
*$__unixEpochFilter(dateColumn)* | Will be replaced by a time range filter using the specified column name with times represented as unix timestamp. For example, *dateColumn > 1494410783 AND dateColumn < 1494497183*
*$__timeGroup(dateColumn,'5m', 0)* | Same as above but with a fill parameter so all null values will be converted to the fill value (all null values would be set to zero using this example).
*$__unixEpochFilter(dateColumn)* | Will be replaced by a time range filter using the specified column name with times represented as unix timestamp. For example, *dateColumn >= 1494410783 AND dateColumn <= 1494497183*
*$__unixEpochFrom()* | Will be replaced by the start of the currently active time selection as unix timestamp. For example, *1494410783*
*$__unixEpochTo()* | Will be replaced by the end of the currently active time selection as unix timestamp. For example, *1494497183*
@@ -82,36 +95,50 @@ You can control the name of the Table panel columns by using regular `as ` SQL c
The resulting table panel:
![](/img/docs/v46/postgres_table.png)
![postgres table](/img/docs/v46/postgres_table.png)
### Time series queries
## Time series queries
If you set `Format as` to `Time series`, for use in Graph panel for example, then the query must return a column named `time` that returns either a sql datetime or any numeric datatype representing unix epoch in seconds.
If you set `Format as` to `Time series`, for use in Graph panel for example, then the query must return a column named `time` that returns either a sql datetime or any numeric datatype representing unix epoch.
Any column except `time` and `metric` is treated as a value column.
You may return a column named `metric` that is used as metric name for the value column.
Example with `metric` column
**Example with `metric` column:**
```sql
SELECT
$__timeGroup(time_date_time,'5m'),
min(value_double),
$__timeGroup("time_date_time",'5m'),
min("value_double"),
'min' as metric
FROM test_data
WHERE $__timeFilter(time_date_time)
WHERE $__timeFilter("time_date_time")
GROUP BY time
ORDER BY time
```
Example with multiple columns:
**Example using the fill parameter in the $__timeGroup macro to convert null values to be zero instead:**
```sql
SELECT
$__timeGroup(time_date_time,'5m'),
min(value_double) as min_value,
max(value_double) as max_value
$__timeGroup("createdAt",'5m',0),
sum(value) as value,
measurement
FROM test_data
WHERE $__timeFilter(time_date_time)
WHERE
$__timeFilter("createdAt")
GROUP BY time, measurement
ORDER BY time
```
**Example with multiple columns:**
```sql
SELECT
$__timeGroup("time_date_time",'5m'),
min("value_double") as "min_value",
max("value_double") as "max_value"
FROM test_data
WHERE $__timeFilter("time_date_time")
GROUP BY time
ORDER BY time
```
@@ -190,26 +217,47 @@ WHERE $__timeFilter(atimestamp) and hostname in([[hostname]])
ORDER BY atimestamp ASC
```
#### Disabling Quoting for Multi-value Variables
Grafana automatically creates a quoted, comma-separated string for multi-value variables. For example: if `server01` and `server02` are selected then it will be formatted as: `'server01', 'server02'`. Do disable quoting, use the csv formatting option for variables:
`${servers:csv}`
Read more about variable formatting options in the [Variables]({{< relref "reference/templating.md#advanced-formatting-options" >}}) documentation.
## Annotations
[Annotations]({{< relref "reference/annotations.md" >}}) allow you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
An example query:
**Example query using time column with epoch values:**
```sql
SELECT
extract(epoch from time_date_time) AS time,
metric1 as text,
epoch_time as time,
metric1 as text,
concat_ws(', ', metric1::text, metric2::text) as tags
FROM
public.test_data
WHERE
$__timeFilter(time_date_time)
$__unixEpochFilter(epoch_time)
```
**Example query using time column of native sql date/time data type:**
```sql
SELECT
native_date_time as time,
metric1 as text,
concat_ws(', ', metric1::text, metric2::text) as tags
FROM
public.test_data
WHERE
$__timeFilter(native_date_time)
```
Name | Description
------------ | -------------
time | The name of the date/time field.
time | The name of the date/time field. Could be a column with a native sql date/time data type or epoch value.
text | Event description field.
tags | Optional field name to use for event tags as a comma separated string.
@@ -217,3 +265,24 @@ tags | Optional field name to use for event tags as a comma separated string.
Time series queries should work in alerting conditions. Table formatted queries is not yet supported in alert rule
conditions.
## Configure the Datasource with Provisioning
It's now possible to configure datasources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for datasources on the [provisioning docs page](/administration/provisioning/#datasources)
Here are some provisioning examples for this datasource.
```yaml
apiVersion: 1
datasources:
- name: Postgres
type: postgres
url: localhost:5432
database: grafana
user: grafana
secureJsonData:
password: "Password!"
jsonData:
sslmode: "disable" # disable/require/verify-ca/verify-full
```

View File

@@ -30,11 +30,11 @@ Name | Description
*Name* | The data source name. This is how you refer to the data source in panels & queries.
*Default* | Default data source means that it will be pre-selected for new panels.
*Url* | The http protocol, ip and port of you Prometheus server (default port is usually 9090)
*Access* | Proxy = access via Grafana backend, Direct = access directly from browser.
*Access* | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser.
*Basic Auth* | Enable basic authentication to the Prometheus data source.
*User* | Name of your Prometheus user
*Password* | Database user's password
*Scrape interval* | This will be used as a lower limit for the Prometheus step query parameter. Default value is 15s.
*Scrape interval* | This will be used as a lower limit for the Prometheus step query parameter. Default value is 15s.
## Query editor
@@ -50,7 +50,7 @@ Name | Description
*Min step* | Set a lower limit for the Prometheus step option. Step controls how big the jumps are when the Prometheus query engine performs range queries. Sadly there is no official prometheus documentation to link to for this very important option.
*Resolution* | Controls the step option. Small steps create high-resolution graphs but can be slow over larger time ranges, lowering the resolution can speed things up. `1/2` will try to set step option to generate 1 data point for every other pixel. A value of `1/10` will try to set step option so there is a data point every 10 pixels.
*Metric lookup* | Search for metric names in this input field.
*Format as* | **(New in v4.3)** Switch between Table & Time series. Table format will only work in the Table panel.
*Format as* | Switch between Table, Time series or Heatmap. Table format will only work in the Table panel. Heatmap format is suitable for displaying metrics having histogram type on Heatmap panel. Under the hood, it converts cumulative histogram to regular and sorts series by the bucket bound.
## Templating
@@ -93,10 +93,26 @@ queries via the Dashboard menu / Annotations view.
Prometheus supports two ways to query annotations.
- A regular metric query
- A Prometheus query for pending and firing alerts (for details see [Inspecting alerts during runtime](https://prometheus.io/docs/alerting/rules/#inspecting-alerts-during-runtime))
- A Prometheus query for pending and firing alerts (for details see [Inspecting alerts during runtime](https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/#inspecting-alerts-during-runtime))
The step option is useful to limit the number of events returned from your query.
## Getting Grafana metrics into Prometheus
Since 4.6.0 Grafana exposes metrics for Prometheus on the `/metrics` endpoint. We also bundle a dashboard within Grafana so you can get started viewing your metrics faster. You can import the bundled dashboard by going to the data source edit page and click the dashboard tab. There you can find a dashboard for Grafana and one for Prometheus. Import and start viewing all the metrics!
## Configure the Datasource with Provisioning
It's now possible to configure datasources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for datasources on the [provisioning docs page](/administration/provisioning/#datasources)
Here are some provisioning examples for this datasource.
```yaml
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
access: proxy
url: http://localhost:9090
```

View File

@@ -14,7 +14,7 @@ weight = 4
{{< docs-imagebox img="/img/docs/v45/alert-list-panel.png" max-width="850px" >}}
The alert list panel allows you to display your dashbords alerts. The list can be configured to show current state or recent state changes. You can read more about alerts [here](http://docs.grafana.org/alerting/rules).
The alert list panel allows you to display your dashboards alerts. The list can be configured to show current state or recent state changes. You can read more about alerts [here](http://docs.grafana.org/alerting/rules).
## Alert List Options

View File

@@ -25,7 +25,7 @@ The dashboard list panel allows you to display dynamic links to other dashboards
1. **Starred**: The starred dashboard selection displays starred dashboards in alphabetical order.
2. **Recently Viewed**: The recently viewed dashboard selection displays recently viewed dashboards in alphabetical order.
3. **Search**: The search dashboard selection displays dashboards by search query or tag(s).
4. **Show Headings**: When show headings is ticked the choosen list selection(Starred, Recently Viewed, Search) is shown as a heading.
4. **Show Headings**: When show headings is ticked the chosen list selection(Starred, Recently Viewed, Search) is shown as a heading.
5. **Max Items**: Max items set the maximum of items in a list.
6. **Query**: Here is where you enter your query you want to search by. Queries are case-insensitive, and partial values are accepted.
7. **Tags**: Here is where you enter your tag(s) you want to search by. Note that existing tags will not appear as you type, and *are* case sensitive. To see a list of existing tags, you can always return to the dashboard, open the Dashboard Picker at the top and click `tags` link in the search bar.

View File

@@ -22,15 +22,18 @@ options for the panel.
## General
{{< docs-imagebox img="/img/docs/v43/graph_general.png" max-width= "900px" >}}
{{< docs-imagebox img="/img/docs/v51/graph_general.png" max-width= "800px" >}}
The general tab allows customization of a panel's appearance and menu options.
### General Options
### Info
- **Title** - The panel title on the dashboard
- **Span** - The panel width in columns
- **Height** - The panel contents height in pixels
- **Title** - The panel title of the dashboard, displayed at the top.
- **Description** - The panel description, displayed on hover of info icon in the upper left corner of the panel.
- **Transparent** - If checked, removes the solid background of the panel (default not checked).
### Repeat
Repeat a panel for each value of a variable. Repeating panels are described in more detail [here]({{< relref "reference/templating.md#repeating-panels" >}}).
### Drilldown / detail link
@@ -54,47 +57,65 @@ options.
## Axes
{{< docs-imagebox img="/img/docs/v43/graph_axes_grid_options.png" max-width= "900px" >}}
{{< docs-imagebox img="/img/docs/v51/graph_axes_grid_options.png" max-width= "800px" >}}
The Axes tab controls the display of axes, grids and legend. The **Left Y** and **Right Y** can be customized using:
The Axes tab controls the display of axes.
### Left Y/Right Y
The **Left Y** and **Right Y** can be customized using:
- **Unit** - The display unit for the Y value
- **Scale** -
- **Scale** - The scale to use for the Y value, linear or logarithmic. (default linear)
- **Y-Min** - The minimum Y value. (default auto)
- **Y-Max** - The maximum Y value. (default auto)
- **Decimals** - Controls how many decimals are displayed for Y value (default auto)
- **Label** - The Y axis label (default "")
Axes can also be hidden by unchecking the appropriate box from **Show**.
### X-Axis Mode
### X-Axis
There are three options:
Axis can be hidden by unchecking **Show**.
For **Mode** there are three options:
- The default option is **Time** and means the x-axis represents time and that the data is grouped by time (for example, by hour or by minute).
- The **Series** option means that the data is grouped by series and not by time. The y-axis still represents the value.
{{< docs-imagebox img="/img/docs/v45/graph-x-axis-mode-series.png" max-width="700px">}}
{{< docs-imagebox img="/img/docs/v51/graph-x-axis-mode-series.png" max-width="800px">}}
- The **Histogram** option converts the graph into a histogram. 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. Histograms and buckets are described in more detail [here](http://docs.grafana.org/features/panels/heatmap/#histograms-and-buckets).
<img src="/img/docs/v43/heatmap_histogram.png" class="no-shadow">
### Legend
The legend hand be hidden by checking the **Show** checkbox. If it's shown, it can be
displayed as a table of values by checking the **Table** checkbox. Series with no
values can be hidden from the legend using the **Hide empty** checkbox.
### Y-Axes
### Legend Values
- **Align** - Check to align left and right Y-axes by value (default unchecked/false)
- **Level** - Available when *Align* is checked. Value to use for alignment of left and right Y-axes, starting from Y=0 (default 0)
## Legend
{{< docs-imagebox img="/img/docs/v51/graph-legend.png" max-width= "800px" >}}
### Options
- **Show** - Uncheck to hide the legend (default checked/true)
- **Table** - Check to display legend in table (default unchecked/false)
- **To the right** - Check to display legend to the right (default unchecked/false)
- **Width** - Available when *To the right* is checked. Value to control the minimum width for the legend (default 0)
### Values
Additional values can be shown along-side the legend names:
- **Total** - Sum of all values returned from metric query
- **Current** - Last value returned from the metric query
- **Min** - Minimum of all values returned from metric query
- **Max** - Maximum of all values returned from the metric query
- **Avg** - Average of all values returned from metric query
- **Current** - Last value returned from the metric query
- **Total** - Sum of all values returned from metric query
- **Decimals** - Controls how many decimals are displayed for legend values (and graph hover tooltips)
The legend values are calculated client side by Grafana and depend on what type of
@@ -103,63 +124,72 @@ be correct at the same time. For example if you plot a rate like requests/second
using average as aggregator, then the Total in the legend will not represent the total number of requests.
It is just the sum of all data points received by Grafana.
### Hide series
Hide series when all values of a series from a metric query are of a specific value:
- **With only nulls** - Value=*null* (default unchecked)
- **With only zeros** - Value=*zero* (default unchecked)
## Display styles
{{< docs-imagebox img="/img/docs/v43/graph_display_styles.png" max-width= "900px" >}}
{{< docs-imagebox img="/img/docs/v51/graph_display_styles.png" max-width= "800px" >}}
Display styles control visual properties of the graph.
### Thresholds
### Draw Options
Thresholds allow you to add arbitrary lines or sections to the graph to make it easier to see when
the graph crosses a particular threshold.
### Chart Options
#### Draw Modes
- **Bar** - Display values as a bar chart
- **Lines** - Display values as a line graph
- **Points** - Display points for values
### Line Options
#### Mode Options
- **Line Fill** - Amount of color fill for a series. 0 is none.
- **Line Width** - The width of the line for a series.
- **Null point mode** - How null values are displayed
- **Staircase line** - Draws adjacent points as staircase
- **Fill** - Amount of color fill for a series (default 1). 0 is none.
- **Line Width** - The width of the line for a series (default 1).
- **Staircase** - Draws adjacent points as staircase
- **Points Radius** - Adjust the size of points when *Points* are selected as *Draw Mode*.
### Multiple Series
#### Hover tooltip
- **Mode** - Controls how many series to display in the tooltip when hover over a point in time, All series or single (default All series).
- **Sort order** - Controls how series displayed in tooltip are sorted, None, Ascending or Descending (default None).
- **Stacked value** - Available when *Stack* are checked and controls how stacked values are displayed in tooltip (default Individual).
- Individual: the value for the series you hover over
- Cumulative - sum of series below plus the series you hover over
#### Stacking & Null value
If there are multiple series, they can be displayed as a group.
- **Stack** - Each series is stacked on top of another
- **Percent** - Each series is drawn as a percentage of the total of all series
- **Percent** - Available when *Stack* are checked. Each series is drawn as a percentage of the total of all series
- **Null value** - How null values are displayed
If you have stack enabled, you can select what the mouse hover feature should show.
### Series overrides
- Cumulative - Sum of series below plus the series you hover over
- Individual - Just the value for the series you hover over
### Rendering
- **Flot** - Render the graphs in the browser using Flot (default)
- **Graphite PNG** - Render the graph on the server using graphite's render API.
### Tooltip
- **All series** - Show all series on the same tooltip and a x crosshairs to help follow all series
### Series Specific Overrides
{{< docs-imagebox img="/img/docs/v51/graph_display_overrides.png" max-width= "800px" >}}
The section allows a series to be rendered differently from the others. For example, one series can be given
a thicker line width to make it stand out.
a thicker line width to make it stand out and/or be moved to the right Y-axis.
#### Dashes Drawing Style
There is an option under Series overrides to draw lines as dashes. Set Dashes to the value True to override the line draw setting for a specific series.
### Thresholds
{{< docs-imagebox img="/img/docs/v51/graph_display_thresholds.png" max-width= "800px" >}}
Thresholds allow you to add arbitrary lines or sections to the graph to make it easier to see when
the graph crosses a particular threshold.
## Time Range
The time range tab allows you to override the dashboard time range and specify a panel specific time. Either through a relative from now time option or through a timeshift.
{{< docs-imagebox img="/img/docs/v51/graph-time-range.png" max-width= "900px" >}}
{{< docs-imagebox img="/img/docs/v45/graph-time-range.png" max-width= "900px" >}}
The time range tab allows you to override the dashboard time range and specify a panel specific time.
Either through a relative from now time option or through a timeshift.
Panel time overrides & timeshift are described in more detail [here]({{< relref "reference/timerange.md#panel-time-overrides-timeshift" >}}).

View File

@@ -56,26 +56,39 @@ Data and bucket options can be found in the `Axes` tab.
Data format | Description
------------ | -------------
*Time series* | Grafana does the bucketing by going through all time series values. The bucket sizes & intervals will be determined using the Buckets options.
*Time series buckets* | Each time series already represents a Y-Axis bucket. The time series name (alias) needs to be a numeric value representing the upper interval for the bucket. Grafana does no bucketing so the bucket size options are hidden.
*Time series buckets* | Each time series already represents a Y-Axis bucket. The time series name (alias) needs to be a numeric value representing the upper or lower interval for the bucket. Grafana does no bucketing so the bucket size options are hidden.
### Bucket bound
When Data format is *Time series buckets* datasource returns series with names representing bucket bound. But depending
on datasource, a bound may be *upper* or *lower*. This option allows to adjust a bound type. If *Auto* is set, a bound
option will be chosen based on panels' datasource type.
### Bucket Size
The Bucket count & size options are used by Grafana to calculate how big each cell in the heatmap is. You can
define the bucket size either by count (the first input box) or by specifying a size interval. For the Y-Axis
the size interval is just a value but for the X-bucket you can specify a time range in the *Size* input, for example,
the time range `1h`. This will make the cells 1h wide on the X-axis.
the time range `1h`. This will make the cells 1h wide on the X-axis.
### Pre-bucketed data
If you have a data that is already organized into buckets you can use the `Time series buckets` data format. This format requires that your metric query return regular time series and that each time series has a numeric name
that represent the upper or lower bound of the interval.
If you have a data that is already organized into buckets you can use the `Time series buckets` data format. This format
requires that your metric query return regular time series and that each time series has a numeric name that represent
the upper or lower bound of the interval.
The only data source that supports histograms over time is Elasticsearch. You do this by adding a *Histogram*
bucket aggregation before the *Date Histogram*.
There are a number of datasources supporting histogram over time like Elasticsearch (by using a Histogram bucket
aggregation) or Prometheus (with [histogram](https://prometheus.io/docs/concepts/metric_types/#histogram) metric type
and *Format as* option set to Heatmap). But generally, any datasource could be used if it meets the requirements:
returns series with names representing bucket bound or returns sereis sorted by the bound in ascending order.
![](/img/docs/v43/elastic_histogram.png)
With Elasticsearch you control the size of the buckets using the Histogram interval (Y-Axis) and the Date Histogram interval (X-axis).
You control the size of the buckets using the Histogram interval (Y-Axis) and the Date Histogram interval (X-axis).
![Elastic histogram](/img/docs/v43/elastic_histogram.png)
With Prometheus you can only control X-axis by adjusting *Min step* and *Resolution* options.
![Prometheus histogram](/img/docs/v51/prometheus_histogram.png)
## Display Options
@@ -100,8 +113,8 @@ but include a group by time interval or maxDataPoints limit coupled with an aggr
This all depends on the time range of your query of course. But the important point is to know that the Histogram bucketing
that Grafana performs may be done on already aggregated and averaged data. To get more accurate heatmaps it is better
to do the bucketing during metric collection or store the data in Elasticsearch, which currently is the only data source
data supports doing Histogram bucketing on the raw data.
to do the bucketing during metric collection or store the data in Elasticsearch, or in the other data source which
supports doing Histogram bucketing on the raw data.
If you remove or lower the group by time (or raise maxDataPoints) in your query to return more data points your heatmap will be
more accurate but this can also be very CPU & Memory taxing for your browser and could cause hangs and crashes if the number of

View File

@@ -30,7 +30,7 @@ The singlestat panel has a normal query editor to allow you define your exact me
* **total** - The sum of all the non-null values in the series
* **first** - The first value in the series
* **delta** - The total incremental increase (of a counter) in the series. An attempt is made to account for counter resets, but this will only be accurate for single instance metrics. Used to show total counter increase in time series.
* **diff** - The difference betwen 'current' (last value) and 'first'.
* **diff** - The difference between 'current' (last value) and 'first'.
* **range** - The difference between 'min' and 'max'. Useful the show the range of change for a gauge.
2. **Prefix/Postfix**: The Prefix/Postfix fields let you define a custom label to appear *before/after* the value. The `$__name` variable can be used here to use the series name or alias from the metric query.
3. **Units**: Units are appended to the the Singlestat within the panel, and will respect the color and threshold settings for the value.
@@ -70,18 +70,18 @@ Gauges gives a clear picture of how high a value is in it's context. It's a grea
{{< docs-imagebox img="/img/docs/v45/singlestat-gauge-options.png" max-width="500px" class="docs-image--right docs-image--no-shadow">}}
1. **Show**: The show checkbox will toggle wether the gauge is shown in the panel. When unselected, only the Singlestat value will appear.
1. **Show**: The show checkbox will toggle whether the gauge is shown in the panel. When unselected, only the Singlestat value will appear.
2. **Min/Max**: This sets the start and end point for the gauge.
3. **Threshold Labels**: Check if you want to show the threshold labels. Thresholds are set in the color options.
4. **Threshold Markers**: Check if you want to have a second meter showing the thresholds.
<div class="clearfix"></div>
### Value to text mapping
### Value/Range to text mapping
{{< docs-imagebox img="/img/docs/v45/singlestat-value-mapping.png" class="docs-image--right docs-image--no-shadow">}}
Value to text mapping allows you to translate the value of the summary stat into explicit text. The text will respect all styling, thresholds and customization defined for the value. This can be useful to translate the number of the main Singlestat value into a context-specific human-readable word or message.
Value/Range to text mapping allows you to translate the value of the summary stat into explicit text. The text will respect all styling, thresholds and customization defined for the value. This can be useful to translate the number of the main Singlestat value into a context-specific human-readable word or message.
<div class="clearfix"></div>

View File

@@ -14,11 +14,53 @@ weight = 2
<img class="screenshot" src="/assets/img/features/table-panel.png">
The new table panel is very flexible, supporting both multiple modes for time series as well as for
The table panel is very flexible, supporting both multiple modes for time series as well as for
table, annotation and raw JSON data. It also provides date formatting and value formatting and coloring options.
To view table panels in action and test different configurations with sample data, check out the [Table Panel Showcase in the Grafana Playground](http://play.grafana.org/dashboard/db/table-panel-showcase).
## Querying Data
The table panel displays the results of a query specified in the **Metrics** tab.
The result being displayed depends on the datasource and the query, but generally there is one row per datapoint, with extra columns for associated keys and values, as well as one column for the numeric value of the datapoint.
You can change the behavior in the section **Data to Table** below.
### Merge Multiple Queries per Table
> Only available in Grafana v5.0+.
Sometimes it is useful to display the results of multiple queries in the same table on corresponding rows, e.g., when comparing capacity and actual usage of resources.
In this example usage and capacity are metrics that will have corresponding datapoints, while their associated keys and values can be used to match them.
(This matching is only available with the **Table Transform** set to **Table**.)
In its simplest case, both queries return time-series data with a numeric value and a timestamp.
If the timestamps are the same, datapoints will be matched and rendered on the same row.
Some datasources return keys and values (labels, tags) associated with the datapoint.
These are being matched as well if they are present in both results and have the same value.
The following datapoints will end up on the same row with one time column, two label columns ("host" and "job") and two value columns:
```
Datapoint for query A: {time: 1, host: "node-2", job: "job-8", value: 3}
Datapoint for query B: {time: 1, host: "node-2", value: 4}
```
The following two results cannot be matched and will be rendered on separate rows:
```
Different time
Datapoint for query A: {time: 1, host: "node-2", job: "job-8", value: 3}
Datapoint for query B: {time: 2, host: "node-2", value: 4}
Different label "host"
Datapoint for query A: {time: 1, host: "node-2", job: "job-8", value: 3}
Datapoint for query B: {time: 1, host: "node-9", value: 4}
```
You can still merge both of the above cases by changing the conflicting column's **Type** to **hidden** in the **Column Styles**.
Note that if each datapoint of your query results have multiple value fields like max, min, mean, etc., they will likely have different values and therefore will not match and render on separate rows.
If you intend for rows to be merged but see them rendered on separate rows, check the query results in the **Query Inspector** for field values being identical across datapoints that should be merged into a row.
## Options overview
The table panel has many ways to manipulate your data for optimal presentation.
@@ -97,3 +139,14 @@ The column styles allow you control how dates and numbers are formatted.
4. **Thresholds and Coloring**: Specify color mode and thresholds limits.
5. **Type**: The three supported types of types are **Number**, **String** and **Date**. **Unit** and **Decimals**: Specify unit and decimal precision for numbers. **Format**: Specify date format for dates.
### String
#### Value/Range to text mapping
> Only available in Grafana v5.1+.
{{< docs-imagebox img="/img/docs/v51/table-value-mapping.png" class="docs-image--right docs-image--no-shadow">}}
Value/range to text mapping allows you to translate numeric values into explicit text. The text will respect all styling, thresholds and customization defined for the value. This can be useful to translate the numeric values into a context-specific human-readable word or message.
<div class="clearfix"></div>

View File

@@ -8,7 +8,7 @@ weight = 7
# Keyboard shortcuts
{{< docs-imagebox img="/img/docs/v4/shortcuts.png" max-width="20rem" class="docs-image--right" >}}
{{< docs-imagebox img="/img/docs/v50/shortcuts.png" max-width="20rem" class="docs-image--right" >}}
Grafana v4 introduces a number of really powerful keyboard shortcuts. You can now focus a panel
by hovering over it with your mouse. With a panel focused you can simple hit `e` to toggle panel
@@ -34,20 +34,20 @@ Hit `?` on your keyboard to open the shortcuts help modal.
- `d` `s` Dashboard settings
- `d` `v` Toggle in-active / view mode
- `d` `k` Toggle kiosk mode (hides top nav)
- `d` `E` Expand all rows
- `d` `C` Collapse all rows
- `mod+o` Toggle shared graph crosshair
### Focused Panel
- `e` Toggle panel edit view
- `v` Toggle panel fullscreen view
- `p` `s` Open Panel Share Modal
- `p` `d` Duplicate Panel
- `p` `r` Remove Panel
### Focused Row
- `r` `c` Collapse Row
- `r` `r` Remove Row
### Time Range
- `t` `z` Zoom out time range
- `t` Move time range back
- `t` Move time range forward
mod = CTRL on windows or linux and CMD key on Mac

View File

@@ -27,36 +27,36 @@ Read the [Basic Concepts](/guides/basic_concepts) document to get a crash course
Let's start with creating a new Dashboard. You can find the new Dashboard link on the right side of the Dashboard picker. You now have a blank Dashboard.
<img class="no-shadow" src="/img/docs/v45/top_nav_annotated.png">
<img class="no-shadow" src="/img/docs/v50/top_nav_annotated.png" width="580px">
The image above shows you the top header for a Dashboard.
1. Side menubar toggle: This toggles the side menu, allowing you to focus on the data presented in the dashboard. The side menu provides access to features unrelated to a Dashboard such as Users, Organizations, and Data Sources.
2. Dashboard dropdown: This dropdown shows you which Dashboard you are currently viewing, and allows you to easily switch to a new Dashboard. From here you can also create a new Dashboard, Import existing Dashboards, and manage Dashboard playlists.
3. Star Dashboard: Star (or unstar) the current Dashboard. Starred Dashboards will show up on your own Home Dashboard by default, and are a convenient way to mark Dashboards that you're interested in.
4. Share Dashboard: Share the current dashboard by creating a link or create a static Snapshot of it. Make sure the Dashboard is saved before sharing.
5. Save dashboard: The current Dashboard will be saved with the current Dashboard name.
6. Settings: Manage Dashboard settings and features such as Templating and Annotations.
2. Dashboard dropdown: This dropdown shows you which Dashboard you are currently viewing, and allows you to easily switch to a new Dashboard. From here you can also create a new Dashboard or folder, Import existing Dashboards, and manage Dashboard playlists.
3. Add Panel: Adds a new panel to the current Dashboard
4. Star Dashboard: Star (or unstar) the current Dashboard. Starred Dashboards will show up on your own Home Dashboard by default, and are a convenient way to mark Dashboards that you're interested in.
5. Share Dashboard: Share the current dashboard by creating a link or create a static Snapshot of it. Make sure the Dashboard is saved before sharing.
6. Save dashboard: The current Dashboard will be saved with the current Dashboard name.
7. Settings: Manage Dashboard settings and features such as Templating and Annotations.
## Dashboards, Panels, Rows, the building blocks of Grafana...
## Dashboards, Panels, the building blocks of Grafana...
Dashboards are at the core of what Grafana is all about. Dashboards are composed of individual Panels arranged on a number of Rows. Grafana ships with a variety of Panels. Grafana makes it easy to construct the right queries, and customize the display properties so that you can create the perfect Dashboard for your need. Each Panel can interact with data from any configured Grafana Data Source (currently InfluxDB, Graphite, OpenTSDB, Prometheus and Cloudwatch). The [Basic Concepts](/guides/basic_concepts) guide explores these key ideas in detail.
Dashboards are at the core of what Grafana is all about. Dashboards are composed of individual Panels arranged on a grid. Grafana ships with a variety of Panels. Grafana makes it easy to construct the right queries, and customize the display properties so that you can create the perfect Dashboard for your need. Each Panel can interact with data from any configured Grafana Data Source (currently InfluxDB, Graphite, OpenTSDB, Prometheus and Cloudwatch). The [Basic Concepts](/guides/basic_concepts) guide explores these key ideas in detail.
<img src="/img/docs/v45/dashboard_annotated.png" class="no-shadow">
<img src="/img/docs/v50/dashboard_annotated.png" class="no-shadow" width="700px">
1. Zoom out time range
2. Time picker dropdown. Here you can access relative time range options, auto refresh options and set custom absolute time ranges.
3. Manual refresh button. Will cause all panels to refresh (fetch new data).
4. Row controls menu. Via this menu you can add panels to the row, set row height and more.
5. Dashboard panel. You edit panels by clicking the panel title.
6. Graph legend. You can change series colors, y-axis and series visibility directly from the legend.
4. Dashboard panel. You edit panels by clicking the panel title.
5. Graph legend. You can change series colors, y-axis and series visibility directly from the legend.
## Adding & Editing Graphs and Panels
![](/img/docs/v45/metrics_tab.png)
1. You add panels via row menu. The row menu is the icon to the left of each row.
1. You add panels by clicking the Add panel icon on the top menu.
2. To edit the graph you click on the graph title to open the panel menu, then `Edit`.
3. This should take you to the `Metrics` tab. In this tab you should see the editor for your default data source.
@@ -64,7 +64,7 @@ When you click the `Metrics` tab, you are presented with a Query Editor that is
## Drag-and-Drop panels
You can Drag-and-Drop Panels within and between Rows. Click and hold the Panel title, and drag it to its new location. You can also easily resize panels by clicking the (-) and (+) icons.
You can Drag-and-Drop Panels by simply clicking and holding the Panel title, and drag it to its new location. You can also easily resize panels by clicking the (-) and (+) icons.
![](/img/docs/animated_gifs/drag_drop.gif)

View File

@@ -3,11 +3,6 @@ title = "What's New in Grafana v2.1"
description = "Feature & improvement highlights for Grafana v2.1"
keywords = ["grafana", "new", "documentation", "2.1"]
type = "docs"
[menu.docs]
name = "Version 2.1"
identifier = "v2.1"
parent = "whatsnew"
weight = 10
+++
# What's new in Grafana v2.1

Some files were not shown because too many files have changed in this diff Show More