Commit Graph

5477 Commits

Author SHA1 Message Date
Ryan McKinley
6b0f56b726
InfluxDB: Alerting issue, reasonable defaults for interval and maxDataPoints (#27463) 2020-09-09 09:34:17 +02:00
Carl Bergquist
f9752f0e7a
Instrumentation: Adds instrumentation for outgoing datasource requests (#27427) 2020-09-09 07:47:05 +02:00
Kyle Brandt
9bab551d8b
AzureMonitor: change filterDimensions property to match what is stored (#27459)
Changes the dimensionsFilters property to dimensionsFilter in the Azure Monitor Datasource's AzureMonitor service to make what is sent to match the saved model.

Before this, the property that the backend was expecting was not available in the case of alerting, where the stored model is fetched.

This also fixes a panic when there is a dimension alias but no dimension
2020-09-08 15:12:08 -04:00
Arve Knudsen
581d2eaaf4
Revert "Convert CloudWatch to use dataframes (#26702)" (#27448)
This reverts commit 7762839853.
2020-09-08 15:06:58 +02:00
Arve Knudsen
7762839853
Convert CloudWatch to use dataframes (#26702)
* CloudWatch: Convert metrics queries to return data frames

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-09-08 13:35:17 +02:00
Ato Araki
561920f18b
Cloud monitoring: fix missing title and text from cloud monitoring annotations (#27187)
* cloudmonitoring: fix empty title and text annotation

* cloudmonitoring: use metricQuery value
2020-09-08 13:18:41 +03:00
Torkel Ödegaard
5c31f07904
Settings: Remove unnessary error handling code (#27420)
* Settings: Remove unnecessary error handling code

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

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-09-08 11:33:04 +02:00
Emil Tullstedt
10141c5e6c
Stats: Use more efficient SQL and add timeouts (#27390) 2020-09-08 09:52:08 +02:00
robert lestak
d0e980c2fa
Alerting: Change Panel Edit link to Panel View link (#27378)
Enables alerts to be sent to users who do not have edit permissions.

Addresses Issue: https://github.com/grafana/grafana/issues/26014
2020-09-08 07:01:48 +02:00
Arve Knudsen
4b1eb6e5c7
Chore: Enable gocyclo linter (#26395)
* Chore: Enable gocyclo linter

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

* API: Fix linting issue

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

* API: Refactor to reduce complexity

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

* Fix type assertion

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-09-07 22:10:06 +02:00
Marcos Mendez
4e94c0959a
Image Store: Add support for using signed URLs when uploading images to GCS (#26840)
Enables creating signed URLs when uploading images to Google Cloud Storage. 
By using signed urls, not only is the public URL expiration configurable but the 
images in the bucket are not publicly accessible.

Fixes #26773

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
2020-09-07 19:10:14 +02:00
Andrei Lavrov
8253b9ddb3
Alerting: override PagerDuty 'dedup_key' via tags (#27356)
* Alerting: override PagerDuty 'dedup_key' via tags

Added ability to override PagerDuty 'dedup_key' via Alert tags

Updated unit tests

* Updated documentation

* add comma

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

* add space

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

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
2020-09-07 18:42:06 +02:00
Kamal Galrani
f6c31c2e10
Fixes signup workflow and UI (#26263)
* fixes signup flow

* Apply suggestions from code review

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>

* Update ForgottenPassword.tsx

* fixes build failure

* fixes build failure

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2020-09-07 18:24:46 +03:00
Agnès Toulet
6dd109b927
API: return resource ID for auth key creation, folder permissions update and user invite complete endpoints (#27419)
* API: add ID to auth key and folder endpoints

* API: add test for folder permissions update

* API: add created user id for /invite/complete endpoint
2020-09-07 17:06:11 +02:00
Torkel Ödegaard
61bd33c241
System: Date formating options (#27216)
* Add support for local time formats in graph panel

* Enfore 24h format for backward compatibility

* Use existing Intl.DateTimeFormatOptions

* Pre-generate time scale, add tests

* Move localTimeFormat, add local format to units

* updated default fallback

* #25602, use navigator.languages to enforce locale in formatting

* Making options

* Worked new system settings

* things are working

* Local browser time formats working

* Support parsing dates in different formats

* settings updated

* Settings starting to work

* Fixed graph issue

* Logs fix

* refactored settings a bit

* Updated and name change

* Progress

* Changed config names

* Updated

* Updated

* Updated test

* Synced description

* fixed ts issue

* Added version notice

* Ts fix

* Updated heatmap and test

* Updated snapshot

* Updated

* fixed ts issue

* Fixes

Co-authored-by: Alex Shpak <alex-shpak@users.noreply.github.com>
2020-09-07 16:19:33 +02:00
Bill Oley
b70fefe642
OAuth2: Handle DEFLATE compressed JWT payloads for generic OAuth (#26969) 2020-09-07 11:42:11 +02:00
Agnès Toulet
a9daaadd50
API: send Login actions (#27249)
* API: first version to send events about login actions

* API: improve login actions events

* Login: update auth test with new behavior

* Login: update auth test for auth module

* Login OAuth: improve functions structure

* API: make struct public to use for saml

* API: add send login log tests for grafana and ldap login

* API: remove log from tests

* Login API: fix test linting

* Update pkg/api/login_oauth.go

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>

* Login API: refactor using defer

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2020-09-04 14:54:59 +02:00
Ryan McKinley
ae385983f4
InfluxDB: support flux editor for template queries (#27370) 2020-09-03 14:11:39 -07:00
Szymon Szypulski
a8db544e85
Cloudwatch: Update list of AmazonMQ metrics and dimensions (#27332)
Update list of AmazonMQ metrics and Dimensions based on the current list
from the official AWS documentation.

Also, change InflightCount to InFlightCount.
2020-09-02 21:32:43 +02:00
Carl Bergquist
20747015f6
Annotation: Add clean up job for old annotations (#26156)
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-09-02 08:07:31 +02:00
Ryan McKinley
0bc67b032a
InfluxDB: return a table rather than an error when timeseries is missing time (#27320) 2020-09-01 15:06:38 -07:00
Carl Bergquist
8faaa1a520
OAuth: Increase state cookie max age (#27258)
60s can be too short if the oauth provider is slow
for some reason and its defintly too slow if the
OAuth provider requires 2FA.

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
2020-09-01 10:57:43 +02:00
Kyle Brandt
06323b8e52
AzureMonitor: select plugin route from cloudname (#27273)
* AzureMonitor: select plugin route from cloudname
fixes #27243
2020-08-31 11:10:31 -04:00
Joan López de la Franca Beltran
57b2d08755
Core: Add go-grpc-middleware dependency (#27231) 2020-08-28 15:33:21 +02:00
Arve Knudsen
4cd42ed898
Chore: Simplify settings loading code (#26404)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-08-26 13:11:57 +02:00
Amir Szekely
c5a7afce44
Fix AWS action name (#27205)
The action name is `tag:GetResources`, not `tags:GetResources`. This creates a confusing error message that can have the user add the wrong permission to the IAM role.
2020-08-26 11:01:50 +02:00
Will Browne
9feaa91bf5
Alerting: Store sensitive settings encrypted for Telegram notifier (#27122)
* encrypt bot token

* update docs

* re-add uploadImage to docs
2020-08-25 14:35:57 +02:00
Joan López de la Franca Beltran
c91bfd8299
Core: Add loki/logproto dependency (#27124)
* Add grafana/loki dependency and update its dependencies

* Update grpcplugin log_wrapper to implement the latest version of hclog.Logger

* Remove panic handling + test case no longer needed since the source of panics (bug) was fixed
2020-08-25 11:52:21 +02:00
Emil Tullstedt
d5687cce11
Stats: Correct the number of arguments for SQL call (#27182)
* Stats: Correct the number of arguments for SQL call

* Stats: Run admin stats call as integration test
2020-08-25 08:59:44 +02:00
Ryan McKinley
cd9a773427
InfluxDB: use converters from SDK (#27138) 2020-08-24 13:19:32 -07:00
Will Browne
daaa3e571b
Alerting: Store sensitive settings encrypted for Threema notifier (#27160)
* encrypt API secret

* update docs
2020-08-24 16:49:45 +02:00
Will Browne
30d6405c53
Alerting: Store sensitive settings encrypted for Pushover notifier (#27159)
* encrypt api + user keys

* update docs

* fix decrypt steps
2020-08-24 16:49:30 +02:00
Will Browne
bbbbf9ac42
Alerting: Store sensitive settings encrypted for LINE notifier (#27157)
* encrypt token

* update docs
2020-08-24 16:49:10 +02:00
Will Browne
ed6f0663c2
Alerting: Store sensitive settings encrypted for Sensu notifier (#27131)
* encrypt password

* update docs
2020-08-24 16:48:55 +02:00
Kyle Brandt
1778e9f034
Alerting: remove LongToWide call in alerting (#27140)
causing issues and currently as we use it, the query
should be requesting it as part of the query model via fromat as time series
fixes #27132
2020-08-24 10:05:52 -04:00
Emil Tullstedt
954a2811b3
Stats: Stop counting the same user multiple times (#26777)
* Stats: Cache based stats implementation

* Stats: Correct logic and add larger scale test

* Stats: linter

* Stats: SQL implementation

* Stats: cleanup SQL

* Stats: Tab -> Spaces

* Update pkg/services/sqlstore/stats.go

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>

* Stats: Quote 'user' table with dialect.Quote

* Stats: Ensure test is run as integration test

* Stats: Use boolean value

...because if (v) { true } else { false } is unnecessary at best.

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2020-08-24 11:23:14 +02:00
Arve Knudsen
c207ea12a4
InfluxDB: Clean up tests (#27135)
* InfluxDB: Clean up tests

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

* InfluxDB: Platform agnostic paths

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-08-21 18:34:21 +02:00
Kyle Brandt
c724449d3d
AzureMonitor: fix panic introduced in 7.1.4 (#27113)
happens when unit was "Unspecified" and alias is being used
2020-08-21 11:37:30 -04:00
Arve Knudsen
d53fe64913
Server: Support custom TCP listener (#27066)
* Server: Support custom TCP listener

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-08-21 10:41:10 +02:00
Arve Knudsen
45adfe7732
Data sources: Use SQL store directly, not via bus (#27000)
* Server: Make it possible to avoid getting SQL store via bus

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2020-08-21 09:30:06 +02:00
Ryan McKinley
a2a6b9448f
InfluxDB: exclude result and table column from Flux table results (#27081) 2020-08-20 10:52:46 -07:00
Will Browne
9f2386a219
Alerting: Store sensitive settings encrypted for OpsGenie notifier (#27074)
* encrypt OpsGenie API key

* make whitespace consistent

* update docs
2020-08-20 16:05:48 +02:00
Hugo Häggmark
9e357d84a4
BackendSrv: Queues data source requests but passes through api requests (#26947)
* Refactor: initial commit

* wip

* Refactor: getting into a simpler model

* Refactor: adds some comments

* Refactor: renames statuses according to PR comments

* Refactor: adds more comments

* Tests: adds tests for FetchQueue

* Tests: adds tests for ResponseQueue

* Tests: adds tests for FetchQueueWorker

* Tests: simplified the tests for ResponseQueue

* Refactor: adds http2 scenario

* Refactor: using Cfg instead of global variable

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Refactor: reverted change in frontendsettings.go

* Tests: fix test mocks

* Fix: changes how cfg.Protocol gets its value

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-08-20 11:32:10 +02:00
Kyle Brandt
660510084c
AzureAnalytics: Use fillmode Null with format as time series (#27054)
previously was using fillmode previous, which is not what we want here.
Also we do not have fill missing with this data source anyways
Fixes #27013
2020-08-19 10:42:54 -04:00
kay delaney
a1f90521a0
CloudWatch Logs: Move query response stats to appropriate FrameMeta property (#26732)
* CloudWatch Logs: Move query response stats to appropriate FrameMeta property
2020-08-19 15:18:04 +01:00
Kyle Brandt
96babf1268
Alerting: copy queryType prop to tsdb.Query (#27053)
fixes #27048
2020-08-19 10:03:39 -04:00
Arve Knudsen
1717476984
Server: Add protocol to Cfg (#27071)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-08-19 14:39:13 +02:00
Arve Knudsen
0e1e85656b
InfluxDB: Upgrade InfluxDB in devenv (#26983)
* InfluxDB: Upgrade InfluxDB in devenv
* InfluxDB: De-export symbols
* InfluxDB: Remove unused code
* devenv: Make InfluxDB version configurable

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-08-19 09:23:11 +02:00
Arve Knudsen
a2fbffe48a
Server: Add health check route (#26999)
* Server: Add health check route

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

* Server: Remove health check middleware

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-08-18 14:58:08 +02:00
Arve Knudsen
7896836deb
Chore: Reduce TSDB Go code complexity (#26401)
* tsdb: Make code less complex
2020-08-18 14:43:18 +02:00