bergquist
1240db31d3
alerting: reduce log level for notifiers
2017-12-13 19:17:00 +01:00
Thibault Chataigner
a8264fe316
Alertmanager notifier: add "metric" labels if no tags
...
Signed-off-by: Thibault Chataigner <t.chataigner@criteo.com>
2017-12-13 19:17:00 +01:00
Thibault Chataigner
3a7939c930
Alertmanager notifier: make it match the new notifier interface
...
Signed-off-by: Thibault Chataigner <t.chataigner@criteo.com>
2017-12-13 19:17:00 +01:00
Mitsuhiro Tanda
20d94f9703
support alertmanager
2017-12-13 19:17:00 +01:00
Carl Bergquist
35106537f2
Replace Read Only Editor role with ViewersCanEdit setting ( #10166 )
...
* removes readonly editor role
* adds viewersCanEdit setting
This enable you to allow viewers to edit/inspect
dashboards in grafana in their own browser without
allowing them to save dashboards
* remove read only editor option from all dropdowns
* migrates all read only viewers to viewers
* docs: replace readOnlyEditor with viewersCanEdit
2017-12-13 18:53:42 +01:00
Torkel Ödegaard
7f0440fded
minor tweaks
2017-12-13 18:00:16 +01:00
bergquist
7c0fc59dfb
execute process directly instead of creating sub shell
2017-12-13 17:58:50 +01:00
Torkel Ödegaard
313735bd75
search: worked on search results
2017-12-13 15:51:59 +01:00
bergquist
bf999a4f82
fixes broken alert eval when first condition is using OR
...
closes #9318
2017-12-13 13:37:10 +01:00
Torkel Ödegaard
ccbd18006e
ux: org user management changes
2017-12-13 13:16:44 +01:00
bergquist
dd3dd407ad
removes unused property
2017-12-13 13:12:50 +01:00
Torkel Ödegaard
22aa1f7e42
ux: change members to users
2017-12-13 11:21:33 +01:00
bergquist
0b6169b3f5
removes verbose logging
2017-12-13 10:21:11 +01:00
Torkel Ödegaard
2465fcbd6b
fix: FolderId and IsFolder when saving dashboard
2017-12-13 10:00:54 +01:00
Thibault Chataigner
fd633a1d5d
Add a per-notifier ShouldNotify()
...
This way we are able to edit notification behavior per notifier.
This would be usefull to let some notifiers send notifications,
even when the state doesn't change, or with custom condition.
Signed-off-by: Thibault Chataigner <t.chataigner@criteo.com>
2017-12-12 17:35:54 +01:00
Torkel Ödegaard
67f1435dc7
minor fix for #10136
2017-12-12 17:18:25 +01:00
Torkel Ödegaard
05cc1f85c3
Merge branch 'refactor-user-group-to-team' of https://github.com/alexanderzobnin/grafana into user-group-to-team
2017-12-12 17:07:00 +01:00
Torkel Ödegaard
89db9cc976
fix: fixed dashboard api tests
2017-12-12 16:15:24 +01:00
Torkel Ödegaard
8a61e0967e
Merge branch 'master' into develop
2017-12-12 13:22:13 +01:00
Torkel Ödegaard
cafed8ce8f
Merge branch 'master' into develop
2017-12-12 13:19:07 +01:00
bergquist
ff1b71bc20
allow overriding dashboards from api
2017-12-12 13:18:00 +01:00
bergquist
c68e7c7283
avatar: avoid concurrent map writes
2017-12-12 11:25:47 +01:00
Carl Bergquist
ea2f65b4c3
Merge pull request #10110 from bwhaley/master
...
Fixes bug in cloudwatch regarding credentials
2017-12-12 10:16:53 +01:00
Alfred Krohmer
72e686457c
Add default message for Pushover notifications
...
If the message field is left empty for Pushover notifications, the API will return an error. This adds a default message if the message would otherwise be empty.
This fixes #8006 .
2017-12-11 22:14:38 +01:00
Alexander Zobnin
26281dd9d8
refactor: format files by gofmt
2017-12-11 19:46:05 +03:00
bergquist
411e8a16c2
backend plugins: manage plugins lifecycle with context
2017-12-11 15:05:06 +01:00
bergquist
1af4f7a1b4
backend plugins: dont swallow errors
2017-12-11 13:16:16 +01:00
bergquist
026eb9ac36
backend plugins: cleanup protobuf files
2017-12-11 13:09:10 +01:00
bergquist
7f68c2a53d
backend plugins: add more datasource params
2017-12-11 12:53:01 +01:00
Torkel Ödegaard
795d9c0362
ux: fixed navbar and sidemenu z-index issue and improved responsive rules
2017-12-11 11:42:13 +01:00
bergquist
48e7f866f6
code style
2017-12-11 11:26:36 +01:00
bergquist
55a39dd2ad
implement upstream changes
2017-12-11 11:14:03 +01:00
bergquist
a4748d82ab
Merge branch 'master' into backend_plugins
...
* master:
changelog: adds note about closing #10131
Explicitly specify default region in CloudWatch datasource (#9440 )
wait for all sub routines to finish
changelog: adds ntoe about closing #10111
postgres: change $__timeGroup macro to include "AS time" column alias (#10119 )
fixes broken test
Solves problem with Github authentication restriction by organization membership when the organization's access policy is set to "Access restricted". "Access restricted" policy should not stop user to authenticate.
2017-12-11 10:43:41 +01:00
Carl Bergquist
5d70a36ad8
Merge pull request #10150 from jomenxiao/jomenxiao/render_setting_lang
...
[render image]add encoding param
2017-12-11 10:36:38 +01:00
Carl Bergquist
a5b3f2b891
Merge pull request #10132 from bergquist/go_routine_management
...
Wait for all sub routines to finish before closing Grafana
2017-12-11 09:43:37 +01:00
Mikael Olenfalk
8e7166b5c4
Explicitly specify default region in CloudWatch datasource ( #9440 )
...
The datasource uses the default region in the query if the region
is "" in the settings. However setting the region to an empty string
is almost impossible and rendered incorrectly.
This commit introduces a special value "default" for region which
is shown in the drop down and is translated to the default region
of the data source when performing queries.
2017-12-11 09:37:27 +01:00
jomenxiao
ad2a69bff4
add encoding param
2017-12-11 16:01:17 +08:00
bergquist
f7ed24475c
wait for all sub routines to finish
...
simple solution for waiting for all go sub routines to
finish before closing Grafana. We would use errGroup
here as well but I dont like spreading context's all
over the place.
closes #10131
2017-12-11 08:53:06 +01:00
Alexander Zobnin
5d3bfee2f1
refactor: user groups to teams, rename backend files
2017-12-08 18:51:59 +03:00
Alexander Zobnin
d8612380e9
refactor: rename User Groups to Teams
2017-12-08 18:25:45 +03:00
Carl Bergquist
2408d8f09a
Merge pull request #10112 from adiletmaratov/master
...
Solves problem with Github authentication restriction by organization
2017-12-08 16:05:27 +01:00
Sven Klemm
ce809de1ed
postgres: change $__timeGroup macro to include "AS time" column alias ( #10119 )
...
* change $__timeGroup macro to include column alias
* update docs and help text for $__timeGroup macro
2017-12-08 15:14:10 +01:00
Marcus Efraimsson
b03b360414
dashfolders: Create nav model for folder page client side #10083
2017-12-08 14:08:16 +01:00
bergquist
0c5ef1453d
fixes broken test
2017-12-08 11:33:15 +01:00
bergquist
f0abe696b5
Merge branch 'master' into backend_plugins
...
* master:
improve error handling for datasources as cfg
improve sample datasource.yaml
2017-12-08 10:55:55 +01:00
bergquist
5f5cdad97a
improve error handling for datasources as cfg
2017-12-08 10:50:11 +01:00
Marcus Efraimsson
017b337f00
dashfolders: create folder page
...
Fixes #10085
2017-12-07 19:32:38 +01:00
bergquist
9edd7701b2
fixes failing tests
2017-12-07 18:05:11 +01:00
Marcus Efraimsson
2ea663df78
dashfolders: New Dashboard Folder page
...
Fixes #10083 . Permissions page is just a placeholder
for now.
2017-12-07 17:30:54 +01:00
Ben Whaley
51854ff4fa
Fix go fmt
2017-12-07 16:10:13 +00:00
bergquist
e1d4bf2607
kill plugin processes when grafana shuts down
2017-12-07 16:59:35 +01:00
bergquist
a2d47427ba
separate plugin impl and proto files
2017-12-07 16:33:36 +01:00
bergquist
0bc5bf53ce
correct comments
2017-12-07 16:33:36 +01:00
bergquist
3f5daa5e58
add hclog wrapper for grafanas logger in plugins
2017-12-07 16:33:36 +01:00
bergquist
0f6c470e03
add go-plugin deps to vendor
2017-12-07 16:33:36 +01:00
bergquist
a97360ab27
initial version of proto files
2017-12-07 16:32:17 +01:00
bergquist
5aab6b5c20
removes last pieces of dashboard.json
2017-12-07 16:26:07 +01:00
bergquist
2e610cb256
dashboards as cfg: move dash/ds config files to /provisioning/*
2017-12-07 15:27:01 +01:00
bergquist
361acd3fa1
dashboards as cfg: include cfg files in dist packages
2017-12-07 15:27:01 +01:00
bergquist
1dfa529941
dashboards as cfg: avoid walking fs in parallel
2017-12-07 15:27:01 +01:00
bergquist
b28ea0b407
dashboards as cfg: type
2017-12-07 15:27:01 +01:00
bergquist
099178466d
dashboards as cfg: wire up dashboard repo
2017-12-07 15:27:01 +01:00
bergquist
288cc35529
dashboards as cfg: use gocache for caching
2017-12-07 15:27:01 +01:00
bergquist
f5eac2e91d
dashboards as cfg: expose dashboard service as interface
2017-12-07 15:27:01 +01:00
bergquist
16f072b320
dashboards as cfg: move saving logic for dashboards into its own service
2017-12-07 15:27:01 +01:00
bergquist
9cebb23e01
dashboards as cfg: revert minor changes
2017-12-07 15:27:01 +01:00
bergquist
74e12c260f
dashboards as cfg: move dashboard saving into its own service
2017-12-07 15:27:01 +01:00
bergquist
09cb0f378b
dashboards as cfg: minor tweaks
2017-12-07 15:27:01 +01:00
bergquist
93e1d8a19c
dashboards as cfg: make dashboard none editable by default
2017-12-07 15:27:01 +01:00
bergquist
7f3a7ea128
dashboards as cfg: more tests
2017-12-07 15:27:01 +01:00
bergquist
dc0fb8be06
dashboards as cfg: code cleanup
2017-12-07 15:27:01 +01:00
bergquist
d69b63cbc0
dashboards as cfg: read first cfg version
2017-12-07 15:27:01 +01:00
Torkel Ödegaard
beb9f8ee74
Merge remote-tracking branch 'origin/master' into develop
2017-12-07 14:14:50 +01:00
Adilet Maratov
50daf7463d
Solves problem with Github authentication restriction by organization membership when the organization's access policy is set to "Access restricted". "Access restricted" policy should not stop user to authenticate.
...
How it is solved:
* Take organizations_url field data from user basic data response
* Make another request to get all organization the user is a member of (public membership)
* Authenticate user if appropriate organization found in that list
2017-12-07 16:13:49 +06:00
Ben Whaley
fe88658bdd
Resolves grafana/grafana:#9309
2017-12-07 03:43:32 +00:00
Sven Klemm
c80eadcdf4
handle native postgres datetime types in annotation queries ( #9986 )
2017-12-06 18:12:24 +01:00
Sven Klemm
373389c920
treat any text column in timeseries query as metric name unless column ( #9985 )
...
named metric is present
2017-12-06 18:04:33 +01:00
Torkel Ödegaard
90bcec8178
nav: updated nav item id for manage dashboards
2017-12-05 12:25:59 +01:00
Torkel Ödegaard
90da964a14
refactoring PR #10068
2017-12-05 12:19:01 +01:00
bergquist
35232a77e6
removes unused properties
...
the dsType property caused some confusion about what datasource is
beeing used. I just removed it since it not beeing used.
closes #10072
2017-12-05 08:26:43 +01:00
Alexander Zobnin
4d7ff4de15
move import menu item to the original place
2017-12-04 18:00:22 +03:00
Alexander Zobnin
44ea0ff71d
Move import dashboard from modal to the page
2017-12-04 15:55:37 +03:00
bergquist
d6d64c53cd
typo 💥
2017-12-01 16:23:55 +01:00
Carl Bergquist
89fb60a956
Merge pull request #10020 from jomenxiao/master
...
fix render http[get] params error
2017-12-01 16:22:47 +01:00
bergquist
9282182805
influxdb: pass tags to alerting from influxdb client
...
closes #10046
2017-12-01 16:16:49 +01:00
bergquist
17bf87fb62
typo 💥
2017-12-01 14:05:47 +01:00
bergquist
7a497fd617
move systemd ready notification to server.go
2017-12-01 14:02:05 +01:00
Torkel Ödegaard
68580f06a3
page header now on 99% of pages
2017-12-01 13:49:15 +01:00
Carl Bergquist
820abef82d
Merge pull request #10025 from jgrassler/systemd-sdnotify
...
Use systemd notification where applicable
2017-12-01 13:26:13 +01:00
Torkel Ödegaard
6bff416430
navigation: more progress on new page header
2017-12-01 12:51:46 +01:00
Torkel Ödegaard
75bb894485
ux: new page-header design, most pages beside admin done
2017-12-01 11:32:00 +01:00
Torkel Ödegaard
e53b55479a
ux: made plugins page work
2017-12-01 10:47:21 +01:00
Johannes Grassler
d28ca54129
Use systemd notification where applicable
...
With this change in place, the grafana service will signal
readiness to serve by writing "READY=1" to the path specified
through the NOTIFY_SOCKET environment variable. If this
environment variable is not present or empty, no notification
will happen. This notification is the standard systemd
mechanism for indicating a service is ready to serve. For
Grafana this may be a couple of seconds from startup due to
database migrations. This change also adjusts the Grafana
systemd service definition to make use of this feature.
2017-12-01 10:31:58 +01:00
Torkel Ödegaard
6f5a9bf768
ux: new page header progress
2017-11-30 17:28:24 +01:00
Torkel Ödegaard
b2add1977a
ux: progress on new page header
2017-11-30 16:35:27 +01:00
Andrei Kalasok
68d4211c50
grafana-10039: fix query time range ends in the past
2017-11-30 15:50:35 +01:00
Torkel Ödegaard
74ceb76ec0
ux: work on page header
2017-11-30 15:37:03 +01:00
Torkel Ödegaard
645f49eda4
ux: updating header design for pages
2017-11-30 11:31:38 +01:00
Marcus Efraimsson
1e10fcad83
test: fix failing postgres test
...
Should use case insensitive matching when searching for users
2017-11-29 15:17:31 +01:00
Daniel Lee
554c7ba96f
notifier: Fixes path for uploaded image for Slack notifier
...
Fixes #10012
2017-11-29 11:16:45 +01:00
jomenxiao
3f95180c98
fix render http[get] params error
2017-11-28 22:20:22 +08:00
bergquist
c0e087640b
test: close file before deleting
2017-11-28 15:05:53 +01:00
Marcus Efraimsson
a335150ad1
dashfolders: Add a helper for creating a dashboard folder
2017-11-28 12:51:40 +01:00
Marcus Efraimsson
82cd24491e
dashfolders: revert automatic creation of folders for plugins
2017-11-28 12:51:40 +01:00
Marcus Efraimsson
368a4d7aed
dashfolders: don't create app folder on dashboard import if already exists
2017-11-27 18:23:57 +01:00
Daniel Lee
4356e980f0
dashfolders: create app folder on dashboard import
2017-11-27 17:08:39 +01:00
Torkel Ödegaard
bc81298d4c
worked on search
2017-11-24 16:18:56 +01:00
Torkel Ödegaard
93d21bec75
Merge branch 'master' into develop
2017-11-24 09:25:14 +01:00
Torkel Ödegaard
b7a8db4937
Merge branch 'develop' of github.com:grafana/grafana into develop
2017-11-22 14:51:53 +01:00
THIERRY SALLE
658109e0d6
Optimized number of lines fetching in log file initialisation
...
Added unit tests for file logging line counting
Remove file after unit test
2017-11-22 14:25:39 +01:00
Carl Bergquist
79e788e46f
Merge pull request #9937 from saady/gcs-path
...
[GCS] Support for gcs path
2017-11-21 19:46:53 +01:00
saady
767b460ff1
[GCS] Support for gcs path
2017-11-21 17:22:40 +00:00
Daniel Lee
3dc2e06a33
dashboard: fix test for folderIds
2017-11-21 16:41:08 +01:00
Torkel Ödegaard
9fc22e5a66
Merge branch 'master' of github.com:grafana/grafana into develop
2017-11-21 16:05:18 +01:00
bergquist
3a772c7f7f
allows head requests for /api/health endpoint
...
closes #9955
2017-11-21 15:03:04 +01:00
Daniel Lee
5dd9582520
mysql: add data source support for Azure MySql
...
Fixes #9649
2017-11-21 13:21:19 +01:00
Torkel Ödegaard
ccbdb29f07
fixed unit tests
2017-11-21 11:53:56 +01:00
Torkel Ödegaard
0d12b37dfd
fix: alert list panel now works correctly after adding manual annotation on dashboard, fixes #9951
2017-11-21 11:28:17 +01:00
Torkel Ödegaard
fc1d8416a7
working on dashboard search
2017-11-20 12:47:03 +01:00
Tom Wilkie
0015183a7b
Don't import JSON dashboards from hidden directories.
2017-11-17 17:21:49 +00:00
Torkel Ödegaard
7b17d134fc
Merge branch 'develop' of github.com:grafana/grafana into develop
2017-11-17 15:49:47 +01:00
Torkel Ödegaard
0e44fe082b
Merge branch 'master' into develop
2017-11-17 15:49:17 +01:00
Daniel Lee
7c74111187
search: add expanded folders
2017-11-17 15:30:21 +01:00
Torkel Ödegaard
98b4074c16
refactoring: minor refactor of clean up dashboard history PR #9882
2017-11-17 14:41:44 +01:00
Torkel Ödegaard
aaa465a100
Merge branch 'feat-9671' of https://github.com/alexanderzobnin/grafana into alexanderzobnin-feat-9671
2017-11-17 14:16:49 +01:00
Torkel Ödegaard
303e3de488
fix: fix for avatar images when gzip is turned on, fixes #5952
2017-11-17 13:13:58 +01:00
Alexander Zobnin
a55be07ea5
dashboard history clean up: avoid potential SQL injections
2017-11-17 10:51:50 +03:00
Daniel Lee
f47673ab5c
search: refactor search sql into a builder class
2017-11-17 00:16:33 +01:00
bergquist
0f69e06fcf
removes invalid comment
2017-11-16 16:55:02 +01:00
Marcus Efraimsson
909601d6ab
api: fix so that datasources functions returns Response
2017-11-16 16:29:05 +01:00
Marcus Efraimsson
89b27b35ba
fix: Use Response as return type
2017-11-16 16:19:01 +01:00
Marcus Efraimsson
540d540ea9
fix: return id from api when creating new annotation/graphite annotation, fixes #9798
...
When creating a region annotation the response will include both
id (region start id) and endId (region end id), if not only id.
2017-11-16 16:19:01 +01:00
Carl Bergquist
9ea5af578e
Merge pull request #9504 from grafana/datasource_as_cfg
...
Datasources as configuration
2017-11-16 16:13:02 +01:00
bergquist
87983021e2
datasources as cfg: convert yaml map into json for jsonData
2017-11-16 13:23:42 +01:00
Sven Klemm
26ab25b7c0
dont loose subsecond precision when dealing with timestamp or ( #9851 )
...
timestamptz
2017-11-15 14:50:32 +01:00
bergquist
6267ef1391
datasource as cfg: fixes typos
2017-11-15 14:30:32 +01:00
bergquist
ebbfc529e0
datasource as cfg: support globbing
2017-11-15 14:30:32 +01:00
bergquist
0f136a940c
datasource as cfg: enable editable ds's
2017-11-15 14:30:32 +01:00
bergquist
36676e23c1
datasource as cfg: adds readonly datasources
2017-11-15 14:30:32 +01:00
bergquist
c6a6ae261f
datasource as cfg: refactor to use bus
2017-11-15 14:30:32 +01:00
bergquist
dc002abe4c
datasource as cfg: test for reading all properties
2017-11-15 14:30:32 +01:00
bergquist
665df676a5
datasource as cfg: rename feature to provisioning
2017-11-15 14:30:32 +01:00
bergquist
c9bfa781fd
datasource as cfg: improve name for this feature
2017-11-15 14:30:32 +01:00
bergquist
ba4bbd1d47
datasource as cfg: refactor tests to use yaml files
2017-11-15 14:30:32 +01:00
bergquist
3f0eb52389
datasource as cfg: ignore datasource all ready exist for inserts
2017-11-15 14:30:32 +01:00
bergquist
5910411845
datasource as cfg: add support for securedata field
2017-11-15 14:30:32 +01:00
bergquist
930da63173
datasource as cfg: setting for purging datasources not in cfg
2017-11-15 14:30:32 +01:00
bergquist
0f29b8ac83
datasources as cfg: tests for insert/updating datasources
2017-11-15 14:30:32 +01:00
bergquist
39b6c04643
datasource as cfg: basic implementation
2017-11-15 14:30:32 +01:00
Daniel Lee
0d85c63fff
middleware: recovery handles panics in all handlers
...
Also, changes the order of the middleware so that recovery is after the
gzip middleware. Otherwise, a 200 OK is returned instead of a 500 error.
2017-11-15 13:57:33 +01:00
Daniel Lee
b2fbb2691b
sql: small fix to error handling
2017-11-15 13:57:33 +01:00
Alexander Zobnin
59d89e422b
dashboard history clean up: add tests
2017-11-15 13:38:44 +03:00
Alexander Zobnin
a0a1f4aacd
dashboard history: refactor after review
2017-11-15 13:36:36 +03:00
Carl Bergquist
5d6ed6c45f
prom: add support for default step param ( #9866 )
...
Alerting for prometheus have been depending on the step parameter from each query.
In https://github.com/grafana/grafana/pull/9226 we changed the behavior for step in the
frontend which caused problems for alerting. This commit fixes that by introducing a default
min interval value so alerting always have something to depend on.
closes #9777
2017-11-15 11:22:00 +01:00
Sven Klemm
9e6a7dcb90
properly escape components of connection string ( #9850 )
2017-11-15 10:55:08 +01:00
Torkel Ödegaard
1a3170373a
Merge branch 'alertList-notOK'
2017-11-15 10:48:20 +01:00
Torkel Ödegaard
ba8c02f594
refactor: changed string slicing to strings.TrimPrefix, #9862
2017-11-15 10:48:03 +01:00
Alexander Zobnin
08e2bbef83
dashboard history: clean up dashboard version history
2017-11-14 18:22:18 +03:00
Sven Klemm
108f582ec4
sync documentation, add remark about to_timestamp and redshift ( #9841 )
2017-11-14 11:33:55 +01:00
bergquist
3bb704144d
teams: removes print statement
2017-11-14 11:05:01 +01:00
Anton Huck
fd2451823b
Add Microsoft Teams notifier
2017-11-14 11:05:01 +01:00
Mitsuhiro Tanda
52e1c4113b
fix cloudwatch ec2_instance_attribute ( #9718 )
...
* fix cloudwatch ec2_instance_attribute
* add test
* minor fix
2017-11-13 13:07:46 +01:00
Patrick O'Carroll
9ad186bcc9
not ok option to alert list, fixes : #9754
2017-11-13 10:30:11 +01:00
Carl Bergquist
c44f6e2ec2
Merge pull request #9854 from drenalin23/drenalin-add-networkelb-cloudwatch
...
Add AWS/NetworkELB to cloudwatch definitions
2017-11-13 07:50:45 +01:00
Mitsuhiro Tanda
6488ccd113
return empty array for no datapoints
2017-11-12 00:48:54 +09:00
Scott Nelson Windels
343143e95f
Add AWS/NetworkELB to cloudwatch definitions
2017-11-10 15:13:09 -08:00
Carl Bergquist
48d77ea2a8
Merge pull request #9785 from certusoft/mysql_performance
...
MySQL Performance when using GF_DATABASE_URL
2017-11-09 18:07:22 +01:00
Carl Bergquist
56fe1308ce
Merge pull request #9826 from agnivade/hexencoding
...
Use hex.EncodeToString to encode to hex
2017-11-09 17:58:35 +01:00
bergquist
d4e8e22fda
test: adds tests for password encodiing
2017-11-09 17:55:12 +01:00
Agniva De Sarker
143b56b5ac
Use hex.EncodeToString to encode to hex
...
Using the EncodeToString function from the encoding/hex package
is much faster than calling the fmt.Sprintf with %x
Benchmark results below with the following code
func BenchmarkHexPrint(b *testing.B) {
data := []byte("hellothere")
for n := 0; n < b.N; n++ {
// _ = fmt.Sprintf("%x", data)
_ = hex.EncodeToString(data)
}
}
name old time/op new time/op delta
HexPrint-4 188ns ± 1% 99ns ± 1% -47.40% (p=0.008 n=5+5)
name old alloc/op new alloc/op delta
HexPrint-4 64.0B ± 0% 64.0B ± 0% ~ (all equal)
name old allocs/op new allocs/op delta
HexPrint-4 2.00 ± 0% 2.00 ± 0% ~ (all equal)
2017-11-08 22:44:31 +05:30
Furtchet
a51b1e8951
Update the config key to database_log_queries so it is more descriptive, as suggested in #9785 .
2017-11-06 08:01:31 -06:00
Furtchet
5fdfa3ff7e
MySQL Performance when using GF_DATABASE_URL
...
Set MaxIdleConn and MaxOpenConn when using the GF_DATABASE_URL configuration. Also added GF_DATABASE_DEBUG flag to print SQL statements and SQL execution times.
See #9784 for the details.
2017-11-03 14:05:32 -05:00
Torkel Ödegaard
10fcf2f5be
Merge branch 'master' into develop
2017-11-02 15:56:09 +01:00
Carl Bergquist
17492c091a
Merge pull request #9752 from mtanda/cw_alias_fix
...
[bug fix] (cloudwatch) fix default alias format
2017-11-02 07:45:26 +01:00
Torkel Ödegaard
97cc454ded
ux: minor changes
2017-11-01 14:23:46 +01:00
Carl Bergquist
c783bdac39
Merge pull request #9753 from mtanda/cw_period
...
(cloudwatch) add period alias
2017-11-01 14:02:41 +01:00
Mitsuhiro Tanda
4a63d696ff
fix default alias
2017-11-01 18:48:30 +09:00
Mitsuhiro Tanda
ebcb8be19a
add period alias
2017-11-01 18:47:21 +09:00
Torkel Ödegaard
c3bd07f9b4
testdata: added manual entry mode to test data
2017-11-01 09:59:24 +01:00
Torkel Ödegaard
84b10df887
Merge branch 'develop' of github.com:grafana/grafana into develop
2017-10-31 16:14:40 +01:00
Sven Klemm
a503c1d39c
change default sslmode for postgres to verify-full ( #9736 )
2017-10-31 13:55:32 +01:00
Bart Van Bos
1a8d05bbcb
Correct help message of api_dataproxy_request_all_milliseconds
2017-10-30 12:50:57 +01:00
Daniel Lee
752453f204
dashboards: fix link to bulk edit
2017-10-29 20:20:51 +01:00
Sven Klemm
34da0711ab
add __timeGroup macro for mysql ( #9596 )
...
* add __timeGroup macro for mysql
* put example __timeGroup query in frontend help
* do __timeGroup interval parsing in go similar to mysql
* ignore whitespace around interval
2017-10-27 11:26:25 +02:00
Torkel Ödegaard
cae852a1a2
updated icons
2017-10-27 08:33:04 +02:00
Torkel Ödegaard
9605ab4475
Merge branch 'master' into develop
2017-10-26 15:59:50 +02:00
Daniel Lee
7f3293ce80
dashfolders: rough draft of bulk edit
2017-10-25 16:12:03 +02:00
Carl Bergquist
c91a1e994b
Merge pull request #9594 from bergquist/datasources_optimistic_concurrency
...
datasources: change to optimistic concurrency
2017-10-25 12:44:36 +02:00
bergquist
d68bfaa8be
datasource as cfg: typo
2017-10-25 12:21:06 +02:00
bergquist
da6430ac01
datasource as cfg: explain why cmd.version can be higher
2017-10-25 09:39:27 +02:00
xjewer
bddebf4c82
add a phantomjs execution status to log if errors happens, e.g. OOM killer kills it ( #9644 )
...
fixes #9643
2017-10-25 08:14:14 +02:00
Torkel Ödegaard
a299118c92
Merge branch 'develop' of github.com:grafana/grafana into develop
2017-10-24 20:29:53 +02:00
Daniel Lee
f70fb7dbf3
dashboard: fix home dashboard getting started panel
2017-10-24 19:22:56 +02:00
bergquist
dea631bedc
tech: remove rabbitmq event publisher
...
closes #9645
2017-10-24 14:10:23 +02:00
bergquist
2f35759346
asscoiate comment with name
2017-10-24 13:40:38 +02:00
bergquist
9b6535cca1
alerting: only editors can pause rules
...
closes #9640
2017-10-24 11:01:08 +02:00
Torkel Ödegaard
b44daaabf2
Merge branch 'master' into develop
2017-10-24 09:06:09 +02:00
stuart nelson
93ac6680ab
update log15 ( #9622 )
...
* Update log15 and go-isatty
* Update usage in pkg log
2017-10-23 19:57:19 +02:00
Daniel Lee
7863a0417c
plugins: fixes path issue on Windows
...
When loading a plugin and setting the path, an extra backslash sneaks
when running on Windows. Fixes #9597
2017-10-23 13:03:06 +02:00
Torkel Ödegaard
9cce5217d0
build: fixed gofmt issue and addd mock response feature
2017-10-23 09:57:28 +02:00
bergquist
139f077453
prometheus: enable gzip for /metrics endpoint
...
closes #9464
2017-10-23 09:35:46 +02:00
Torkel Ödegaard
1fd2270a93
build: split circle test shell scripts
2017-10-23 09:06:50 +02:00
bergquist
89923bf77a
datasources: change to optimisic concurrency
...
prerequisite for #9504
2017-10-23 07:55:16 +02:00
Torkel Ödegaard
fff0fa2aee
Merge branch 'master' into develop
2017-10-22 11:51:14 +02:00
bergquist
b3a8d93dca
mysql: add usage stats for mysql
2017-10-19 10:30:54 +02:00
Sven Klemm
b2d880c6de
modify $__timeGroup macro so it can be used in select clause ( #9527 )
...
* modify $__timeGroup macro so it can be used in select clause
* fix $__interval_ms for postgres datasource
* use $__timeGroup macro in documentation
* fix annotation template query
remove title since its no longer used and add tags instead
* change __timeFilter macro to work on postgresql < 8.1 and redshift
2017-10-18 18:10:01 +02:00
Carl Bergquist
43f039859a
Merge pull request #9573 from cjchand/master
...
When Messasge field is set for an alert, map it to the output field i…
2017-10-18 12:10:42 +02:00
Alexander Zobnin
74e90d01ec
Fixes for annotations API ( #9577 )
...
* annotations: throw error if no text specified and set default time to Now() if empty, #9571
* annotations: fix saving graphite event with empty string tags
* docs: add /api/annotations/graphite endpoint docs, #9571
2017-10-18 10:13:02 +02:00
Torkel Ödegaard
6f71af449b
ux: new fixes
2017-10-18 09:48:37 +02:00
Chris Chandler
204fe007b7
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"
2017-10-17 16:22:56 -05:00
Torkel Ödegaard
d8230f8fa7
Merge branch 'master' into develop
2017-10-17 11:17:28 +02:00
krise3k
45a572ebd8
annotations: quote reserved fields ( #9550 )
2017-10-17 11:03:19 +02:00
Daniel Lee
5f6ab1e370
styleguide: fix link in index
2017-10-16 14:11:52 +02:00
Daniel Lee
b866383ec0
api: fix for dashboard version history
2017-10-16 14:09:52 +02:00
Eric Dahl
888d608090
CloudWatch: Add ALB RequestCountPerTarget metric
...
This commit adds the new ALB metric `RequestCountPerTarget` which was
released in July 2017.
2017-10-14 21:50:23 -07:00
Torkel Ödegaard
a3bd761b0c
ux: testing out new icons
2017-10-14 21:17:16 +02:00
bergquist
ec14fa58b5
alerting: add count_non_null reducer
...
makes it possible to have a second condition requering
at least X points of data.
2017-10-13 09:47:10 +02:00
Torkel Ödegaard
48c8e4d627
fix: various fixes for new grid
2017-10-12 17:38:49 +02:00
Torkel Ödegaard
88ceb19d96
Merge branch 'master' into develop
2017-10-12 16:32:44 +02:00
bergquist
b5727949fd
logging: dont use cli logger in http_server
2017-10-12 15:29:01 +02:00
bergquist
88f55b01d8
oauth: raise error if session state is missing
...
ref #9476
2017-10-12 15:25:27 +02:00
bergquist
0848ba2e9c
oauth: provide more logging for failed oauth requests
2017-10-12 15:25:27 +02:00
Carl Bergquist
b63725033e
Merge pull request #9450 from utkarshcmu/kafka_alert
...
Kafka alerting
2017-10-12 12:11:13 +02:00
Carl Bergquist
ee5f69beb4
metrics: disable gzip for /metrics endpoint ( #9468 )
...
Prometheus client lib support gzip by itself. Which caused the
response to be double gzipped sometimes. We should use the Grafana
middle ware instead.
closes #9464
2017-10-12 12:02:36 +02:00
Carl Bergquist
9d53653647
Merge pull request #9378 from mattbostock/verify_tls
...
Bugfix: Always verify TLS unless explicitly told otherwise
2017-10-12 11:11:02 +02:00
bergquist
4ca3cc90dd
Merge branch 'mattbostock-verify_datasource_tls'
2017-10-12 10:39:07 +02:00
Torkel Ödegaard
81a4df1372
fix: alert api limit param did not work and caused SQL syntax error, fixes #9492
2017-10-12 10:22:53 +02:00
bergquist
c0d257a0ee
Merge branch 'verify_datasource_tls' of https://github.com/mattbostock/grafana into mattbostock-verify_datasource_tls
2017-10-12 10:15:32 +02:00
Alexander Zobnin
04ea7efac9
annotations: add endpoint for writing graphite-like events ( #9495 )
...
* annotations: add endpoint for writing graphite-like events
* annotations: fix new line handling in tooltip
* annotations: support tags in prior to Graphite 0.10.0 format
2017-10-12 10:12:15 +02:00
Torkel Ödegaard
3a089dd04c
newgrid: various fixes
2017-10-11 21:36:03 +02:00
Torkel Ödegaard
9358d0c6f7
Merge branch 'develop' of github.com:grafana/grafana into develop
2017-10-11 16:48:30 +02:00
Torkel Ödegaard
ad1d69861e
Merge branch 'master' of github.com:grafana/grafana into develop
2017-10-11 16:47:16 +02:00
Torkel Ödegaard
d4ebcc82b4
Merge branch 'develop' of github.com:grafana/grafana into develop
2017-10-11 13:52:59 +02:00
Torkel Ödegaard
2bc57d856c
fix: set lastSeenAt date when creating users to then years in past insteasd of empty date, fixes #9260
2017-10-11 11:29:17 +02:00
Matt Bostock
4f3856adfb
Retain old name for TLS client auth
...
I renamed `tlsAuth` to `tlsClientAuth` to better describe the fact that
this variable is used to enable TLS client authentication (as opposed to
server authentication) in c04d95f35.
However, changing the name breaks backwards compatibility for existing
installations using this feature and Grafana does not have a
standardised way of migrating changes in the schema:
https://github.com/grafana/grafana/pull/9377#issuecomment-333063543
For reasons of expediency given the severity of the bug (not verifying
TLS), keep the old name.
2017-10-11 08:18:04 +01:00
Matt Bostock
f6aa0e41e5
Return error if datasource TLS CA not parsed
2017-10-11 08:18:03 +01:00
Matt Bostock
5d312be419
Datasource HTTP settings: Add TLS skip verify
...
In c04d95f35 I changed the default for datasource HTTP requests so that
TLS is always verified.
This commit adds a checkbox to allow an admin to explicitly skip TLS
verification, for testing purposes.
2017-10-11 08:18:03 +01:00
Matt Bostock
a286ffa5f2
Alias macron package in app_routes.go
...
...to make this file compatible with goimports:
https://godoc.org/golang.org/x/tools/cmd/goimports
2017-10-11 08:18:03 +01:00
Matt Bostock
43169e4302
Verify datasource TLS and split client auth and CA
2017-10-11 08:18:03 +01:00
Matt Bostock
592c46c8b5
Tests: Clarify what InsecureSkipVerify does
2017-10-11 08:18:03 +01:00
Daniel Lee
cd6a18ec62
search: fix search to limit dashboards better
...
Change the query to first select the dashboards, apply the limit then
join with tags. Means the limit will apply to the number of dashboards
returned in the search. The disadvantage is that the query will return
more rows than the limit, no. of dashboards x no. of tags. So hard limit
set to 5000 for all rows.
2017-10-10 20:56:05 +02:00
Torkel Ödegaard
df61558018
grid: fixed geting started panel pos
2017-10-10 19:48:06 +02:00
Daniel Lee
d1c9760fa8
Postgres Data Source ( #9475 )
...
* add postgresql datasource
* add rest of files for postgres datasource
* fix timeseries query, remove unused code
* consistent naming, refactoring
* s/mysql/postgres/
* s/mysql/postgres/
* couple more tests
* tests for more datatypes
* fix macros for postgres
* add __timeSec macro
* add frontend for postgres datasource
* adjust documentation
* fix formatting
* add proper plugin description
* merge editor changes from mysql
* port changes from mysql datasource
* set proper defaultQuery for postgres
* add time_sec to timeseries query
accept int for value for timeseries query
* revert allowing time_sec and handle int or float values as unix
timestamp for "time" column
* fix tslint error
* handle decimal values in timeseries query
* allow setting sslmode for postgres datasource
* use type switch for handling data types
* fix value for timeseries query
* refactor timeseries queries to make them more flexible
* remove debug statement from inner loop in type conversion
* use plain for loop in getTypedRowData
* fix timeseries queries
* adjust postgres datasource to tsdb refactoring
* adjust postgres datasource to frontend changes
* update lib/pq to latest version
* move type conversion to getTypedRowData
* handle address types cidr, inet and macaddr
* adjust response parser and docs for annotations
* convert unknown types to string
* add documentation for postgres datasource
* add another example query with metric column
* set more helpful default query
* update help text in query editor
* handle NULL in value column of timeseries query
* add __timeGroup macro
* add test for __timeGroup macro
* document __timeGroup and set proper default query for annotations
* fix typos in docs
* add postgres to list of datasources
* add postgres to builtInPlugins
* mysql: refactoring as prep for merging postgres
Refactors out the initialization of the xorm engine and the query logic
for an sql data source.
* mysql: rename refactoring + test update
* postgres:refactor to use SqlEngine(same as mysql)
Refactored to use a common base class with the MySql data source.
Other changes from the original PR:
- Changed time column to be time_sec to allow other time units in the
future and to be the same as MySQL
- Changed integration test to test the main Query method rather than
the private transformToTable method
- Changed the __timeSec macro name to __timeEpoch
- Renamed PostgresExecutor to PostgresQueryEndpoint
Fixes #9209 (the original PR)
* postgres: encrypt password on config page
With some other cosmetic changes to the config page:
- placeholder texts
- reset button for the password after it has been encrypted.
- default value for the sslmode field.
* postgres: change back col name to time from time_sec
* postgres mysql: remove annotation title
Title has been removed from annotations
* postgres: fix images for docs page
* postgres mysql: fix specs
2017-10-10 15:19:14 +02:00
Alexander Zobnin
473c47cd1c
snapshots: improve snapshot listing performance, #9314 ( #9477 )
...
exclude dashboard field from snapshot list search
2017-10-10 14:25:19 +02:00
utkarshcmu
da47dc8947
Fixed failing go tests
2017-10-09 18:56:05 -07:00
utkarshcmu
a562dc7c2b
gofmt fixes
2017-10-09 18:27:04 -07:00
utkarshcmu
138bee99ef
Added tests
2017-10-09 18:27:04 -07:00
utkarshcmu
d60339a9b1
Kafka REST Proxy works with Grafana
2017-10-09 18:27:04 -07:00
Torkel Ödegaard
647a3cc5ae
Merge branch 'master' into develop
2017-10-09 16:01:54 +02:00
Daniel Lee
8423260f58
gzip: plugin readme content set explicitly
...
Macaron's gzip middleware tries to automatically figure out the content
type for a file when gzipped and seems to mostly fail with plugin
readmes. This change sets the content type to plain text.
Fixes #9344 . Ref #5952 .
2017-10-09 10:17:45 +02:00