Sven Klemm
26ab25b7c0
dont loose subsecond precision when dealing with timestamp or ( #9851 )
...
timestamptz
2017-11-15 14:50: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
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
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
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
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
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
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
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
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
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
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
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
krise3k
45a572ebd8
annotations: quote reserved fields ( #9550 )
2017-10-17 11:03:19 +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
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