Commit Graph

925 Commits

Author SHA1 Message Date
Arve Knudsen
c63bbbaec3
InfluxDB: Close Flux query results (#26917)
* InfluxDB: Drop ctxhttp usage
* InfluxDB: Clean up code
* InfluxDB: Close query results

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-08-13 17:50:53 +02:00
Kyle Brandt
f432e153ca
Dataframe/Alerting: to tsdb.TimeSeriesSlice - accept "empty" time series (#26903)
this is in order to trigger no data when used with alerting.
fixes #26897.

This is perhaps better solved in the SDK but that needs more thought and is tracked in grafana/grafana-plugin-sdk-go#214
2020-08-12 12:30:45 -04:00
Arve Knudsen
b1ddbaa395
CloudWatch: Fix sorting of metrics results (#26835)
* CloudWatch: Fix sorting of metrics results
2020-08-07 11:48:40 +02:00
Arve Knudsen
37c278c8f3
InfluxDB: Less chatty logging (#26850)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-08-07 09:18:57 +02:00
Kyle Brandt
62b103b843
Azuremonitor: do not set unit if literal "Unspecified" (#26839)
part of #26828
2020-08-06 16:03:25 -04:00
Sofia Papagiannaki
41f7bccb24
Cloud monitoring: do not create deep link if there are no timeseries (#26737) 2020-08-03 09:28:03 +03:00
Paul Sneddon
a0c1e53fd0
Flux: Increase series limit for Flux queries (#26746) 2020-07-31 15:14:58 -07:00
Paul Sneddon
ec756f3729
Flux: Ensure connections to InflxuDB are closed (#26735)
* Flux: Ensure connections to InflxuDB are closed
2020-07-31 23:11:51 +02:00
waqark3389
642e904048
Show FileSystemId as a dimension key (#26662)
FileSystemId can be used to filter by filesystem ID if needed. Right now it just returns blank
2020-07-29 09:35:07 +03:00
Arve Knudsen
94d0934e90
CloudWatch: Fix a few API status codes (#26578)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-24 12:34:56 +02:00
Arve Knudsen
2446ee08f1
CloudWatch: Fix passing of namespace for getting custom metrics (#26515)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-24 08:37:24 +02:00
Patrik Karlström
43ef052d57
cloudwatch: Consolidate client logic (#25555)
* cloudwatch: Consolidate client logic

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-23 18:52:22 +02:00
Ruan Bekker
b972963934
Cloudwatch: Add af-south-1 region (#26513)
* Adds af-south-1 region to cloudwatch datasource

* Fix test

Co-authored-by: Sofia Papagiannaki <papagian@gmail.com>
2020-07-23 14:02:25 +03:00
Arve Knudsen
415638cdda
Chore: Use interfaces where possible (#26392)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-23 08:17:20 +02:00
waqark3389
fabd879cbe
CloudWatch: Add FreeStorageCapacity (#26503)
* Add FreeStorageCapacity metric in AWS/FSx namespace
2020-07-22 16:11:53 +02:00
Kyle Brandt
fb5ff6a70f
Azure: Insights metrics - do not sort if no data (#26486)
fixes #26473
2020-07-21 10:24:55 -04:00
Ryan McKinley
5d09e4539c
Azure: convert azure units to grafana units (#26429) 2020-07-20 12:29:13 -07:00
Arve Knudsen
d4e4cb4c71
Chore: Enable Go linter gocritic (#26224)
* Chore: Enable gocritic linter

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-16 14:39:01 +02:00
Kyle Brandt
c980f37509
Azure: Insights Analytics, fix possible panics and return error body (#26361)
missing return statements can result in panic
2020-07-15 15:55:10 -04:00
Sofia Papagiannaki
9d8ae39108
Cloud monitoring: Add query parameter (#26354) 2020-07-15 19:31:17 +03:00
Kyle Brandt
590702c497
Azure: Handle real type nan/inf values in Log/Insights Analytics (#26342)
Before this, if the user were to divide by 0.0, "Infinity" would be returned in the result and the user would get an error: "unexpected type, expected json.Number but got string". Now these values are properly set as Inf values (and also made sure to handle NaN as well).
2020-07-15 09:39:41 -04:00
Ryan McKinley
1f271d06e9
InfluxDB: flux query result can cause crash (#26329) 2020-07-14 11:06:27 -07:00
kay delaney
54ad5b869e
CloudWatch Logs: Fixes grouping of results by numeric field (#26298)
* CloudWatch Logs: Fixes grouping of results by numeric field
Closes #25721
2020-07-14 11:13:03 +01:00
Arve Knudsen
c863fd3da9
CloudWatch: Clean up code (#26259)
* CloudWatch: Clean up code
2020-07-14 08:23:23 +02:00
Ryan McKinley
07f8178995
InfluxDB: include sample response data for each test case (#26248) 2020-07-13 11:15:36 -07:00
Kyle Brandt
c1ede4fc71
backend: use latest go plugin sdk (0.74.0) to sort wide frames (#26207)
This makes it so results are more stable between refreshes of data and fixes sorting issues with Azure Application Insights service as well as the two Azure Analytics services.

fixes #22937
2020-07-10 12:22:50 -04:00
Arve Knudsen
d28d495235
Chore: Enable PR testing in Drone (#26189)
* Add Drone configuration

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Add more steps

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Add more steps

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Build front-end before testing it

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Upgrade grafana/build-container

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Add packaging step

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Trigger on push

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Remove some steps

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Enable steps

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Install Dockerize

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Use node image for test-frontend

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Increase number of test workers

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Make plugin installation depend on frontend tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Make integration tests depend on frontend tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Use grafana/build-container also for front-end tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Upgrade dependencies in order to fix front-end tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Depend on es-check

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Dont' depend on tests before building front-end

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Add more steps

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix packaging

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Simplify

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Try to build images

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix e2e tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Remove steps

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Install netcat

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Include golangci-lint with grafana/build-container

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Build storybook and docs website

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix e2e tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Use build image with root user

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Drop CircleCI dependencies

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix e2e tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix e2e under Drone

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Execute e2e server separately

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Use own plugin for building Docker images

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Use Starlark to configure Drone

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Add enterprise steps to pipeline

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Add more enterprise steps to pipeline

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Maintain Yarn cache

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Build enterprise Docker images

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Build Ubuntu Docker images

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Refactor

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Add Postgres integration test

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Add MySQL integration test

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix integration tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Parameterize integration test DB connections

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Categorize integration tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Use grabpl integration-tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Remove unintended change

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Drone: Disable Ubuntu Docker images for PR pipeline

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Regenerate yarn.lock

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Upgrade grabpl

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Restore Yarn cache before installing in grafana-enterprise

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Use separate pipelines for OSS and enterprise

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Let OSS builds depend on tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Restore Go cache before building back-end

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Reduce number of variants built for PRs

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix building of Docker images

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Drone: Simplify logic

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Drone: Use Starlark

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Drone: Fix syntax error

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Convert .drone.star to YAML

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Upgrade AWS Go SDK

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Drone: Fix Go linting

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Undo irrelevant changes

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Revert "Undo irrelevant changes"

This reverts commit 5152f65972.

* Undo irrelevant changes

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* e2e: Support Circle

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Remove unused script

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* TypeScript fixes

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* TypeScript fixes

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Remove unused script

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* More Drone support

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Remove unused script

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix build on Circle

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Remove TODO comment

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-10 16:09:21 +02:00
Andrej Ocenas
64bc85963b
Explore: Unification of logs/metrics/traces user interface (#25890)
Removes "Metrics"/"Logs" mode switcher from Explore, allowing for both
metrics and logs queries at the same time.

Co-authored-by: kay delaney <kay@grafana.com>
2020-07-09 15:14:55 +01:00
Marcelo Nunes Alves
be961c5466
Elasticsearch: Fix using multiple bucket script aggregations when only grouping by terms (#24064)
* In the parser when it was configurate more bucket it put the formula in name column

* Tests

* Tests

* Tests

* Tests

* Tests

* Tests

* Process/Tests - backend (Go)

* Update pkg/tsdb/elasticsearch/response_parser.go

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* reverse

* Update pkg/tsdb/elasticsearch/response_parser.go

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2020-07-09 15:21:19 +02:00
Arve Knudsen
9285595c50
tsdb/postgres: Support Unix socket for host (#25778)
* tsdb/postgres: Support Unix socket for host

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix host regex

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix host regex

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Remove panic

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix host parsing; add tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Add test

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Use strings.HasPrefix to detect Unix socket host

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Remove debug logging

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Escape single quotes and backslashes

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Test generateConnectionString as requested in review

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Add test case for SSL mode

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-09 14:57:09 +02:00
Dominik Prokop
74b2c2acdc
Fix lint (#26130) 2020-07-07 16:48:25 +02:00
Kyle Brandt
9164a35240
Azure: Restore Insights Metrics alias feature (#26098)
also fix case sensitivity for azure monitor metrics
2020-07-07 08:42:03 -04:00
Sofia Papagiannaki
e8a8159085
Cloudwatch: Update AWS/MediaConnect metrics and dimensions (#26093)
* Cloudwatch: Update AWS/MediaConnect dimensions

* Cloudwatch: Update AWS/MetricConnect metrics
2020-07-07 10:16:20 +03:00
Arve Knudsen
41d432b5ae
Chore: Enable whitespace linter (#25903)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-06 20:17:28 +02:00
Dhananjay
3ef06a0c88
Cloudwatch: Add Support for external ID in assume role (#23685)
Co-authored by: Arve Knudsen
2020-07-02 15:24:36 +02:00
Ryan McKinley
3a9a4f4a49
InfluxDB/Flux: support timeseries with a renamed time field (#25910) 2020-06-30 16:56:03 -07:00
Sofia Papagiannaki
bb4b7381fc
Stackdriver: Deep linking from Grafana panels to the Metrics Explorer (#25858)
* Add stackdriver deep link

* No deep link for SLO queries

* Add tests

* Update docs/sources/features/datasources/stackdriver.md

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* Enforce resource type

* Navigate to google account chooser first

* Change renamed image reference

Fix misspelling in image name and change it to conform with the rest cloud monitoring images

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
2020-07-01 01:16:20 +03:00
Kyle Brandt
4be56cde0d
Azure: Multiple dimension support for Azure Monitor Service (#25947)
Azure Monitor (metrics) support multiple dimensions instead of just one.

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2020-06-30 16:26:46 -04:00
Kyle Brandt
72fa5ccb7b
Azure/Log Analytics: return more error information (#25937)
When there is an error message in the HTTP response, this copies that error so it is relayed to the user by being shown in the frontend.

This also makes it so when there is an error the interpolated query string (ExecutedQueryString) is returned so users can see it in the query inspector.
2020-06-30 16:05:53 -04:00
Sofia Papagiannaki
4bb3f66569
Stackdriver: Rename Stackdriver to Google Cloud Monitoring (#25807)
* Update backend

* Update frontend

* Keep old plugin id

* Update docs

* Place doc images to a new directory

* Legacy support for stackdriver-auto alignment

* Consistent plugin name

* Apply suggestions from code review

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>

* Update docs

* Update public/app/plugins/datasource/cloud-monitoring/README.md

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* Add reference to the data source formerly being named Stackdriver

* Update pkg/models/datasource.go

Co-authored-by: Carl Bergquist <carl@grafana.com>

* Fix gofmt

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
Co-authored-by: Carl Bergquist <carl@grafana.com>
2020-06-30 18:47:13 +03:00
Arve Knudsen
3651a8e976
Chore: Disable scopelint for tests (#25923)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-06-30 11:05:47 +02:00
Kyle Brandt
aee5626dca
chore: fix lint breaking build (#25916) 2020-06-29 19:45:50 -04:00
Kyle Brandt
d243cd9421
Backend: use latest Go plugin sdk (#25909)
* backend: use latest go plugin sdk which fixes #25287
* update for Frame.Meta.Custom SDK changes
2020-06-29 16:20:24 -04:00
Kyle Brandt
9a8289b6d9
Azure: Application Insights metrics to Frame and support multiple query dimensions (#25849)
- The Application Insights Service now returns a dataframe. This is a "wide" formatted dataframe with a single time index.
- Multiple "group by" dimensions may now be selected instead of just one with Application Insights.
- Some types are copied / slightly altered from the Azure Go SDK but that SDK is not imported at this time.

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2020-06-29 15:06:58 -04:00
Arve Knudsen
d1e6214a4a
Chore: Enable scopelint Go linter (#25896)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-06-29 17:04:38 +02:00
Arve Knudsen
5070f7a75b
Chore: Start harmonizing linting with plugin SDK (#25854)
* Chore: Harmonize linting with plugin SDK

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Chore: Fix linting issues

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-06-29 14:08:32 +02:00
Eder Nucci
c22940fe35
MSSQL: Fix parsing of uniqueidentifier type (#25751)
Closes #17084

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2020-06-26 10:11:43 +02:00
Kyle Brandt
bc9c53389c
Azure: Split insights into two services (#25410)
Azure Application Insights Analytics is no longer accessed by the edit button from within the Application Insights service. Instead, there is now an Insights Analytics option in the Service drop down.

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2020-06-25 12:48:18 -04:00
Ilya Stoliar
8ca28de305
CloudWatch: Added AWS ServiceCatalog metrics and dimensions (#25812) 2020-06-25 01:26:41 +02:00
Ilya Stoliar
1e38a24b88
CloudWatch: Added AWS MediaStore metrics and dimensions (#25492)
* CloudWatch: Added AWS MediaStore metrics and dimensions

* Camel case dimensions

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2020-06-24 11:06:57 +03:00