Commit Graph

1339 Commits

Author SHA1 Message Date
Ryan McKinley
546818819b
Loki: use queryType rather than range|instant flags (#43727) 2022-01-07 10:00:11 -08:00
Emil Tullstedt
fdd196a627
Datemath: Remove unused functions (#43665) 2022-01-07 12:53:31 +01:00
Travis Patterson
20b3b2a448
Forward oauth tokens after prometheus datasource migration (#43686)
* create the prom client

* implement lru cache of prometheus clients based on auth headers

* linter
2022-01-05 13:55:55 -07:00
Ivana Huckova
d7d6c10664
Prometheus: Fill missing steps with null values (#43622)
* Prometheus: Add empty points when data points missing

* Remove newline

* Add comments

* Improve/Fix test

* Remove unused variable
2022-01-05 11:40:32 +01:00
Travis Patterson
c4c05a5b71
refactor promethueus package into sub packages (#43634) 2022-01-04 07:22:33 -07:00
Emil Tullstedt
df4e9ca12b
Datemath: Support fiscal years (#43558) 2022-01-04 13:56:34 +01:00
David Henderson
575eb68828
CloudWatch: Add Missing Elasticache Host-level metrics (#43455)
Add missing host-level Elasticache metrics from https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheMetrics.HostLevel.html

Follows from https://github.com/grafana/grafana/pull/43336#issuecomment-999367311
2021-12-22 14:02:52 +01:00
idafurjes
b8852ef6a3
Chore: Remove context.TODO() (#43409)
* Remove context.TODO() from services

* Fix live test

* Remove context.TODO
2021-12-22 11:02:42 +01:00
Siavash Safi
4c4322f717
CloudWatch: Add all ElastiCache Redis Metrics (#43336)
Add all missing Redis ElastiCache metrics.
https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheMetrics.Redis.html

Signed-off-by: Siavash Safi <siavash.safi@gmail.com>
2021-12-21 09:13:41 +01:00
Gábor Farkas
1879a6855e
prometheus: respect the http-method data source setting (#42753)
* prometheus: respect the http-method data source setting

* removed forgotten if-true section

* refactored json-check
2021-12-20 11:27:18 +01:00
Ilya Stoliar
9cf5623918
CloudWatch: Add Data Lifecycle Manager metrics and dimension (#43310) 2021-12-20 09:48:07 +01:00
Artur Wierzbicki
197f4f81f2
#41993: make it possible to create N random60hz channels (#43295) 2021-12-17 23:42:37 +04:00
Will Browne
e4ba5f17dd
add core plugins thru store (#43085) 2021-12-14 15:22:40 +01:00
Shirley
21656a0491
Remove reference to legacydata package (#43075)
* Remove reference to legacydata package

* Change from and to times
2021-12-14 12:58:31 +01:00
Erik Sundell
043680371f
add all new es metrics (#43034) 2021-12-14 10:12:39 +01:00
Marcus Efraimsson
d6ec6f8ad2
Backport fix to main (#42979)
* fixes

(cherry picked from commit a2c386915ce11b9422f4af8ae181eaa1a22bc5c3)
(cherry picked from commit 06706efbbe)

* fix regex

(cherry picked from commit a259213a3badc9618e969f2c8db0a0143f00faee)
(cherry picked from commit 1d7105c095)

* lint (#42970)

(cherry picked from commit afb9e8e5f3)

Co-authored-by: Will Browne <will.browne@grafana.com>
Co-authored-by: malcolmholmes <42545407+malcolmholmes@users.noreply.github.com>
2021-12-10 16:10:04 +01:00
Gábor Farkas
a4cc1f6b39
loki: alerting: handle curly-braces-style variables (#42933) 2021-12-09 15:16:01 +01:00
Ivana Huckova
2655be61b6
Prometheus: Interpolate curly brackets syntax variable (#42927) 2021-12-09 14:37:24 +01:00
Gábor Farkas
3232ae08c0
loki: removed unused variable (#42909) 2021-12-09 13:16:52 +01:00
Isabella Siu
a2ad0a0fb6
CloudMonitor: Iterate over pageToken for resources (#42546) 2021-12-07 08:54:50 -05:00
Gábor Farkas
6686f8c345
loki: rename ResponseModel to QueryModel (#42794) 2021-12-07 07:57:52 +01:00
Ivana Huckova
21fe78302b
Prometheus: Fix passing of custom params when running queries (#42728)
* Prometheus: Fix passing of custom params

* Remove prints
2021-12-03 16:28:05 +01:00
Yuriy Tseretyan
9139f61105
Alerting: Update alert rule migration to use expanded queries (#42493)
* move targetData to target

* use constants instead of literals.

* Update comments and add tests

Co-authored-by: gotjosh <josue.abreu@gmail.com>
2021-12-01 11:45:27 +00:00
Erik Sundell
bab78a9e64
CloudWatch: Add support for AWS Metric Insights (#42487)
* add support for code editor and builder

* refactor cloudwatch migration

* Add tooltip to editor field (#56)

* add tooltip

* add old tooltips

* Bug bash feedback fixes (#58)

* make ASC the default option

* update sql preview whenever sql changes

* don't allow queries without aggregation

* set default value for aggregation

* use new input field

* cleanup

* pr feedback

* prevent unnecessary rerenders

* use frame error instead of main error

* remove not used snapshot

* Use dimension filter in schema picker  (#63)

* use dimension key filter in group by and schema labels

* add dimension filter also to code editor

* add tests

* fix build error

* fix strict error

* remove debug code

* fix annotation editor (#64)

* fix annotation editor

* fix broken test

* revert annotation backend change

* PR feedback (#67)

* pr feedback

* removed dimension filter from group by

* add spacing between common fields and rest

* do not generate deep link for metric queries (#70)

* update docs (#69)

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>

* fix lint problem caused by merge conflict

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-11-30 10:53:31 +01:00
Ivan Anselmi
cf3105e5be
MSSQL: Change regex to validate Provider connection string (#40248)
* Change the regex to allow to specified other connection attribute for MSSQL connection like ApplicationIntent property

* Docs update

* docs update

* some tests added

* formatting

* Change the regex to allow to specified other connection attribute for MSSQL connection like ApplicationIntent property

* Docs update

* docs update

* some tests added

* formatting

* docs and formatting

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-11-30 09:28:48 +01:00
Will Browne
e440796cb3
only load CSV when data exists (#42441) 2021-11-29 15:21:18 +01:00
Marcus Efraimsson
8927a3ca20
Chore: Query endpoint refactor (#41637)
Get rid of using legacydata.RequestHandler in HTTPServer, /api/tsdb/query and pkg/expr 
with the goal of deprecating /api/tsdb/query and remove it completely eventually. This is 
the first step of cleaning up the HTTP API query endpoint.

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2021-11-29 14:21:54 +01:00
Ivana Huckova
0b5d7067f9
Prometheus: Fix range variables interpolation for time ranges smaller than 1 second (#42242)
* Prometheus: Fix precision for queries with < 1s timeRange

* Update pkg/tsdb/prometheus/time_series_query.go

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-11-29 12:41:23 +01:00
Sriram
70bc0b86e2
TestDataDB: Raw frame input (#42209)
* test datasource raw-frame scenario added

* typo fix in doc
2021-11-25 09:14:34 +00:00
Gábor Farkas
24d4c8a9d1
Loki: alerting: handle variables like __interval and __range (#42126) 2021-11-24 16:56:53 +01:00
Gábor Farkas
fe84454bb0
loki: alerting: simplified config (#42147)
* loki: alerting: simplified config

* adjusted config handling
2021-11-24 11:52:33 +01:00
n2N8Z
eaf46600c4
CloudWatch: Add missing AWS/Events metrics. (#42164)
* Add missing InvocationsFailedToBeSentToDlq metric.

* Add missing InvocationsSentToDlq metric.
2021-11-24 11:35:18 +01:00
Gábor Farkas
037fd9cc8c
Loki: alerting: adjust step-calculation to be the same as in frontend (#42033)
* loki: alerting: adjust step-calculation to be the same as in frontend

* loki: simplified test

* lint fix
2021-11-22 14:28:51 +01:00
Ryan McKinley
f661e20dd7
Testdata: add random labeled stream (#41932) 2021-11-19 09:54:05 -08:00
Gábor Farkas
2fbc6b1d2f
loki: simplify interval calculation (#41857) 2021-11-19 17:20:32 +01:00
Andrej Ocenas
e237ff20a9
CloudWatch Logs: Add retry strategy for hitting max concurrent queries (#39290)
* Add error passing and retry strategy

* Change generic error to specific one

* Make the error more generic

* Refactor retry strategy

* Add retry that handles multiple queries

* Rollback some backend changes

* Remove simple retry strategy

* Add comments

* Add tests

* Small test fixes

* Add log timeout config

* Fix tests

* Fix tests

* Add validation

* Remove commented code and add comment

* Fix snapshots

* Remove unnecessary cast
2021-11-17 21:46:13 +01:00
Giordano Ricci
1b99d88337
Elasticsearch: Add support for Elasticsearch 8.0 (Beta) (#41729)
* use fixed_interval in date_histogram

* Add 8.0 to available versions in datasource settings

* Remove moving_avg from available metric aggregations

* Add ES8 devenv

* Update public/app/plugins/datasource/elasticsearch/components/QueryEditor/MetricAggregationsEditor/utils.ts

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>

* Add FE tests

* Add BE test

* fix FE test

* fix BE test

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-11-17 20:30:53 +01:00
Ivana Huckova
9b9e41e036
Prometheus: Disable exemplar queries for alerting (#41607)
* Prometheus: Dont include empty exempalr frame in results

* Prometheus: Never run exemplar queries for alerting

* Remove exemplar field from alerting and set exemplar to false

* Add tests for frontend

* Add test for backend
2021-11-12 12:49:06 +01:00
Erik Sundell
eb40723bcb
Cloudwatch: Enable dimension filtering when loading dimension values (#41566)
* fix dimension filter

* refactor tests

* add comments

* fix typo
2021-11-11 16:48:35 +01:00
Erik Sundell
fa3261eaf2
ignore empty tags (#41529) 2021-11-11 13:38:04 +01:00
Gábor Farkas
eb47a58029
InfluxDB: fix numeric aliases in queries (#41531)
* influxdb: alerting: handle out-of-range numeric aliases

* influxdb: updated documentation
2021-11-11 09:18:06 +01:00
Isabella Siu
fc3d3ff003
CloudMonitoring: Move data manipulation to backend (#41379) 2021-11-10 08:58:04 -05:00
Marcus Efraimsson
baab021fec
Chore: Refactor usage of legacy data contracts (#41218)
Refactor usage of legacy data contracts. Moves legacy data contracts 
to pkg/tsdb/legacydata package.
Refactor pkg/expr to be a proper service/dependency that can be provided 
to wire to remove some unneeded dependencies to SSE in ngalert and other places.
Refactor pkg/expr to not use the legacydata,RequestHandler and use 
backend.QueryDataHandler instead.
2021-11-10 11:52:16 +01:00
Ilya Stoliar
8e778aa98f
CloudWatch: Add AWS RoboMaker metrics and dimension (#41450) 2021-11-09 08:29:09 +01:00
Leon Sorokin
f0a108afb3
MarketTrend: add new alpha panel (#40909) 2021-11-05 18:01:26 -07:00
Ivana Huckova
2daae9eba8
Prometheus: Fix showing of errors (#41356)
* Prometheus: Fix showing of errors

* Refactor and add comment
2021-11-05 18:00:48 +01:00
Erik Sundell
a852ddc10d
CloudMonitoring: Ignore min and max aggregation in MQL queries (#41302)
* ignore min and max aggregations in mql queries

* refine comment

* moving continuation check to the top of the loop

* remove empty line

* lint issue
2021-11-05 13:09:22 +01:00
Tania B
5652bde447
Encryption: Use secrets service (#40251)
* Use secrets service in pluginproxy

* Use secrets service in pluginxontext

* Use secrets service in pluginsettings

* Use secrets service in provisioning

* Use secrets service in authinfoservice

* Use secrets service in api

* Use secrets service in sqlstore

* Use secrets service in dashboardshapshots

* Use secrets service in tsdb

* Use secrets service in datasources

* Use secrets service in alerting

* Use secrets service in ngalert

* Break cyclic dependancy

* Refactor service

* Break cyclic dependancy

* Add FakeSecretsStore

* Setup Secrets Service in sqlstore

* Fix

* Continue secrets service refactoring

* Fix cyclic dependancy in sqlstore tests

* Fix secrets service references

* Fix linter errors

* Add fake secrets service for tests

* Refactor SetupTestSecretsService

* Update setting up secret service in tests

* Fix missing secrets service in multiorg_alertmanager_test

* Use fake db in tests and sort imports

* Use fake db in datasources tests

* Fix more tests

* Fix linter issues

* Attempt to fix plugin proxy tests

* Pass secrets service to getPluginProxiedRequest in pluginproxy tests

* Fix pluginproxy tests

* Revert using secrets service in alerting and provisioning

* Update decryptFn in alerting migration

* Rename defaultProvider to currentProvider

* Use fake secrets service in alert channels tests

* Refactor secrets service test helper

* Update setting up secrets service in tests

* Revert alerting changes in api

* Add comments

* Remove secrets service from background services

* Convert global encryption functions into vars

* Revert "Convert global encryption functions into vars"

This reverts commit 498eb19859.

* Add feature toggle for envelope encryption

* Rename toggle

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
Co-authored-by: Joan López de la Franca Beltran <joanjan14@gmail.com>
2021-11-04 18:47:21 +02:00
Ilya Stoliar
a5f747104c
CloudWatch: Adde AWS Global Accelerator metrics and dimensions (#41236) 2021-11-03 10:44:49 +01:00
Ilya Stoliar
f5b9515643
CloudWatch: Add AWS Transfer metrics and dimension (#41168)
What this PR does / why we need it:
Adding AWS Transfer metics according to:
https://docs.aws.amazon.com/transfer/latest/userguide/monitoring.html#metrics

Which issue(s) this PR fixes:
No issue

Special notes for your reviewer:
Based on AWS documentation only, I didn't tried to monitor AWS Transfer myself
2021-11-03 08:41:36 +01:00