Commit Graph

736 Commits

Author SHA1 Message Date
Marcus Efraimsson
32a45077e7
Elasticsearch: Fix pre-v7.0 and alerting error (#16904)
This fixes a regression introduced in #16646 where using Elasticsearch 
pre-v7.0 and alerting resulted in an error when trying to deserialize the 
response of total number of hits.
Total number of hits is not in use by the backend so we're removing it 
for now to make ES 6 and 7 being able to deserialize search responses 
without errors.

Closes #15622
2019-05-06 15:12:18 +02:00
Mark Goodwin
44e6da6b41 build: fix integer overflow in pkg/tsdb tests on 32bit platforms (#16818)
Several pkg/tsdb tests fail to compile on 32bit platforms due to
integer overflow.
2019-05-06 09:27:45 +02:00
Stephen SORRIAUX
3866839b19 Datasources: add support for POST HTTP verb for InfluxDB (#16690)
A new parameter `queryMode` is added to the InfluxDB datasource to provide a way to use POST instead of GET when querying the database. This prevents to get any error when querying the database with a heavy request.
Default configuration is kept to GET for backward compatibility. Tests and documentation have been added for this new behaviour.
2019-05-02 15:30:37 +02:00
Ryan McKinley
470634e2d6
Streaming: support streaming and a javascript test datasource (#16729) 2019-04-25 14:01:02 -04:00
Alcides Viamontes E
cff2be0d66 elasticsearch: add 7.x version support (#16646)
Adds a new version option 7.0+ (70 internally).
Version 7.0+ doesn't include document types in index mappings 
so support for handling this have been added.
Version 7.0+ returns number of hits in a different way so 
support for handling this have been added.
Version 7.0+ doesn't support sending 
max_concurrent_shard_requests in multisearch header so 
support for sending this in query string have been added.
Update elastic6 docker block and dashboards (devenv) to use 
6.7.1 images, filebeat index name is now filebeat-YYYY.MM.DD 
and dashboard include correct tags and links.
Add elastic7 docker block and provisioning (devenv).
Updates documentation regarding new version.

Closes #15622
2019-04-25 09:41:13 +02:00
Utkarsh Bhatnagar
89a01a680c CloudWatch: Use default alias if there is no alias for metrics (#16732)
Fixes #16605
2019-04-24 10:00:02 +02:00
Oleg Gaidarenko
54c1bf0cc9
Chore: a bit of spring cleaning (#16710)
* Chore: use early return technic everywhere

And enable "indent-error-flow" revive rule

* Chore: remove if-return rule from revive config

* Chore: improve error messages

And enable "error-strings" revive rule

* Chore: enable "error-naming" revive rule

* Chore: make linter happy

* Chore: do not duplicate gofmt execution

* Chore: make linter happy

* Chore: address the pull review comments
2019-04-23 11:24:47 +03:00
Carl Bergquist
e4eb0817e4 Cloudwatch: fix for flaky tests (#16649)
The iteration order over maps is not specified and is not guaranteed
to be the same from one iteration to the next. If a map entry that
has not yet been reached is removed during iteration, the corresponding
iteration value will not be produced. If a map entry is created during
iteration, that entry may be produced during the iteration or may be skipped.
The choice may vary for each entry created and from one iteration to
the next. If the map is nil, the number of iterations is 0.

https://golang.org/ref/spec#For_range
2019-04-17 19:06:32 +02:00
Carl Bergquist
3f136e0da9
tech: replace bmizerany/assert with stretchr/testify (#16625)
bmizerany is old and unsupported. so we are replacing it
with stretchr which is an drop in replacement and something
we want to use more in Grafana.
2019-04-17 10:25:58 +02:00
Mitsuhiro Tanda
864a6262fe CloudWatch: GetMetricData refactoring & fix label handling (#16383)
* fix label handling

* SEARCH() results could have multiple namespace, remove from legend

* divide GetMetricStatistics related code

* divide GetMetricData related code

* divide parseGetMetricDataResponse()

* divide parseGetMetricDataQuery()

* divide test code

* add test for GetMetricData

* add test for GetMetricData parse response

* fix bug of terminating gap

* fix gofmt
2019-04-15 17:55:07 +02:00
Andrej Ocenas
66f6e16916
Security: Store datasource passwords encrypted in secureJsonData (#16175)
* Store passwords in secureJsonData

* Revert unnecessary refactors

* Fix for nil jsonSecureData value

* Remove copied encryption code from migration

* Fix wrong field reference

* Remove migration and provisioning changes

* Use password getters in datasource proxy

* Refactor password handling in datasource configs

* Add provisioning warnings

* Update documentation

* Remove migration command, moved to separate PR

* Remove unused code

* Set the upgrade version

* Remove unused code

* Remove double reference
2019-04-15 11:11:17 +02:00
Andrej Ocenas
08ce7f6c93
Chore: Add task to find FocusConvey tests (#16381) 2019-04-04 14:48:11 +02:00
The Rock Guy
335aa7c9f2 CloudWatch: Update AWS/IoT metric and dimensions (#16337)
Closes #16334
2019-04-04 12:54:20 +02:00
Floyd May
33d1d427bc InfluxDB: Fix tag names with periods in alerting (#16255)
Updates regex to match tag names with periods when generating
series names in alerting evaluation (backend).

Fixes #9148
2019-03-27 23:13:12 +07:00
Marcus Efraimsson
6b8e3122f8
chore(influx): no point of reading response when bad status (#16212)
There's no point in reading the body response without using
the result so removing it.

Fixes #9199
Ref #16207
2019-03-26 12:10:24 +07:00
Ramon Carvalho Maciel
d791a6211d fix(InfluxDB): Reads body and close request body even for error status codes (#16207) 2019-03-25 17:42:26 +01:00
Mitsuhiro Tanda
4d8eb76dca update cloudwatch metrics/dimensions list 2019-03-22 00:08:17 +09:00
Mitsuhiro Tanda
56251ca546 Update CloudWatch metrics/dimension list (#16102)
update cloudWatch metrics/dimension list
2019-03-21 11:13:06 +01:00
ryan
bd811b4a95 dont test exists in the test... it will fail if not found 2019-03-15 12:36:55 -07:00
ryan
24ead3a4a4 add random_walk_table scenario 2019-03-15 12:33:45 -07:00
ryan
2b5ac6bafa add test file 2019-03-15 11:07:20 -07:00
ryan
e787176bca add startAt to random walk scenario 2019-03-15 11:02:41 -07:00
Andrej Ocenas
09b9b595b2 Add check for Env before log 2019-03-15 11:53:30 +01:00
bergquist
f13263eb54 reduce loglevel to debug 2019-03-13 09:01:45 +01:00
Torkel Ödegaard
90a3bc2203
Merge pull request #15892 from sandlis/14706-es-weekly-pattern-fix
Fix: #14706 Incorrect index pattern padding in alerting queries
2019-03-11 11:01:22 +01:00
Torkel Ödegaard
3f574d3e57
Merge pull request #15685 from utkarshcmu/fix-#15562
Fixed alias in Cloudwatch Expressions
2019-03-11 10:49:30 +01:00
Bryan T. Richardson
ae23773db3 Added MaximumUsedTransactionIDs metric to list of AWS RDS metrics. 2019-03-04 07:38:36 -07:00
sandeep
e04218e550 Fix: #14706 Incorrect index pattern padding in alerting queries
When weekly index pattern is used, indices names contain single digit week number for week 1-9
This fix makes sure indice names always contain 2 digit week number for weekly pattern
2019-03-03 18:10:38 +05:30
utkarshcmu
37033080b7 Removed commented code 2019-02-27 00:33:40 -08:00
utkarshcmu
8ef3aebc29 Fixed alias in Cloudwatch Expressions 2019-02-27 00:20:29 -08:00
Carl Bergquist
0aa61c8e12
Merge pull request #15629 from bergquist/moves_metrics_to_infra
moves metric package to /infra
2019-02-25 02:44:09 +01:00
bergquist
8a3a3cccc3 moves metric package to /infra
ref #14679
2019-02-24 21:12:51 +01:00
Daniel Lee
d1e249a803 stackdriver: fix for float64 bounds for distribution metrics
Adds support for explicit distribution metrics and float64 bounds

Fixes #14509
2019-02-24 17:37:26 +01:00
z0029c4
13974cdd28 added support for influxdb non_negative_difference function in tsdb 2019-02-13 18:12:35 +05:30
z0029c4
8cb1e5b918 added support for influxdb non_negative_difference function in tsdb for alerting 2019-02-13 17:55:31 +05:30
Daniel Lee
1c364b57b5
Merge pull request #15353 from grafana/14623-azure-monitor-alerting
Adds alerting for the Azure Monitor API in the Azure Monitor datasource
2019-02-11 15:16:32 +01:00
Daniel Lee
ac345312a4 azuremonitor: don't use make for maps and array 2019-02-11 14:42:12 +01:00
Daniel Lee
0b74860f55 azuremonitor: fix auto interval calculation on backend
Not needed for alerting (as the query intervalms will always be 0) but needed
later when being called from the frontend)
2019-02-11 13:27:08 +01:00
Daniel Lee
a54484638d interval: make the FormatDuration function public
A useful function that was ported from kbn.ts and can be used
to convert milliseconds into a kbn unit
2019-02-11 11:25:51 +01:00
Marcus Efraimsson
75f89ecf1f
Merge pull request #14888 from bugficks/8570-mysql-ssl-datasource
MySQL SSL CA in datasource connector
2019-02-11 09:00:18 +01:00
Daniel Lee
d6904ba9b4 azuremonitor: small refactoring 2019-02-11 01:22:15 +01:00
Daniel Lee
60327953a2 azuremonitor: handles timegrain set to auto on backend 2019-02-11 01:17:37 +01:00
Daniel Lee
452c4f5b9b azuremonitor: add test for dimension filter 2019-02-10 01:47:38 +01:00
Daniel Lee
b94de101cd azuremonitor: refactor azure monitor api code into own file 2019-02-10 01:18:16 +01:00
Daniel Lee
b816f35c41 azuremonitor: handle multi-dimensions on backend 2019-02-10 00:23:12 +01:00
Daniel Lee
a5e5db20e1 azuremonitor: add support for aggregations on backend 2019-02-09 21:52:44 +01:00
Connor Patterson
d2aed7e075 Fix formatting 2019-02-09 14:13:15 -05:00
Connor Patterson
2987a47a9b Add aws ec2 api metrics for cloudwatch 2019-02-09 13:47:08 -05:00
Daniel Lee
10194df112 azuremonitor: simple alerting for Azure Monitor API
Lots of edge cases and functionality left to implement but
a simple query works for alerting now.
2019-02-08 18:15:17 +01:00
Marcus Efraimsson
1bc2a0af70
use unique datasource id when registering mysql tls config 2019-02-08 18:08:07 +01:00