Commit Graph

1231 Commits

Author SHA1 Message Date
Serge Zaitsev
643c7fa0cb
Chore: update all +build statements (#38782) 2021-09-01 17:38:56 +03:00
Will Browne
e39410c094
Cloud-Monitoring: Ensure service gets dependencies (#38788)
* ensure cloud-monitoring gets service dependencies

* all one line
2021-09-01 15:29:21 +02:00
Kai Hayashi
6e0f18b13a
CloudWatch: Update Period auto to take retention into account (#37424)
* now to get it to build

* modified names, added the 455 day case, and added a comment

* removed wireguard override i used for my local

* updated the docs
2021-09-01 09:44:47 +02:00
shuotli
f2c4346cc4
Azure Monitor: Add support for numeric fields in ARG (#38728)
* Fix todouble/toreal not working

* fix test
2021-09-01 09:02:08 +02:00
Gábor Farkas
aa7a6633b8
old-alert: set interval and max-data-points (#38434)
* alerting: old-alerting: handle interval + maxdatapoints better

* fixed failing test

* refactor: use interval instead of tsdb

* fix typo

* added unit-test

* added comment

* refactor
2021-08-31 14:49:30 +02:00
Andres Martinez Gotor
b25eb0aa74
AzureMonitor: Fix wrong merge (#38623) 2021-08-27 11:31:17 +02:00
Marcus Efraimsson
ec88295a0b
Testdata: Fix proper initialization (#38576)
Fixes #38566
2021-08-26 11:39:04 +02:00
Dimitris Sotirakis
12320dda3c
Elasticsearch: Fix metric names for alert queries (#38546)
* Export fieldName to var

* Add empty string as frame name
2021-08-26 09:20:38 +02:00
Arve Knudsen
78596a6756
Migrate to Wire for dependency injection (#32289)
Fixes #30144

Co-authored-by: dsotirakis <sotirakis.dim@gmail.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Ida Furjesova <ida.furjesova@grafana.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
Co-authored-by: spinillos <selenepinillos@gmail.com>
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
Co-authored-by: Leonard Gram <leo@xlson.com>
2021-08-25 15:11:22 +02:00
Will Browne
1618d5ad6f
use most appropriate func for registering core plugins (#38497) 2021-08-25 10:08:48 +02:00
Domas
2e8a7c1161
set basic auth for prometheus backend ds requests (#38496) 2021-08-25 10:05:17 +03:00
Ivana Huckova
74fef637af
Prometheus: Use default POST method if no httpMethod provided (#38446)
* Prometheus: If no httpMethod, use default POST method

* Use http.MethodPost
2021-08-23 15:25:40 +02:00
idafurjes
769b7a5865
Bug: Register OpenTSDB with correct service name (#37581)
* Bug: Register OpenTSDB with correct service name

* USe Register instead of RegisterAndStart
2021-08-23 14:56:53 +02:00
Piotr Jamróz
f7501ff77f
Graphite: Convert tag values returned as numbers to strings (#37882)
* Convert tag values returned as numbers to string

This is a bug in Graphite <= 1.1.7. Since 1.1.8 all values are converted to strings.

* Simplify type conversions

* Fix linting errors
2021-08-19 08:40:13 -07:00
Andrej Ocenas
60a0c5da05
CloudWatch/Logs: Don't group dataframes for non time series queries (#37998)
* Don't split response when there is no time field

* Refactor grouping to separate function

* Add test
2021-08-18 15:05:06 +02:00
Sergey Kostrukov
c6356c5bba
Fix scopes mutation by cloning original array (#37981) 2021-08-18 10:05:14 +02:00
Dimitris Sotirakis
050dc7bc8f
Cloudwatch: Unwrap errors - throw error from upstream (#36334)
* Unwrap errors - throw error from upstream

* Fixes according to reviewer's comments

* Fix linting

* Remove unused code
2021-08-18 10:37:13 +03:00
Evan Sosenko
5d74c47cf8
Add missing AWS/Cognito metrics (#37768)
* Add missing AWS/Cognito metrics

https://docs.aws.amazon.com/cognito/latest/developerguide/metrics-for-cognito-user-pools.html

* Add missing Cognito dimensions

* Remove Cognito usage metrics
2021-08-16 20:44:32 +02:00
Olof Bourghardt
d26f3cdd03
Loki: add support for resolution (#36710)
* Add input to specify min step

* Add stepInterval to as input to component

* Add onBlur to Input component

* Loki: add functionality for min step

* Loki: change name on props to step to make it more clear

* Loki: add resolution as a query option

* Loki: Add min,max,exact as step options

* Loki: add functionality for different step modes

* Loki: fix bug where step function isn't working

* Loki: fix bug where exact step isn't working

* Loki: change width of step input field

* Loki: add tests for adjustInterval function

* Loki: add check for max step oprio to make sure it's not below the safe interval

* Loki: fix bug with some tests

* Loki: fix bug with tests

* Explore: add tooltip to loki step function

* Loki: remove resolution as a logs option

* Loki: update snapshots

* Fix failing tests

* Loki: add select component for choosing resolution

* Loki: add functionality for calculating correct interval with resolution applied

* Loki: remove functionality for step mode

* Loki: remove tests for step mode

* Loki: add tooltip to line limit and resolution

* Loki: add backend support for resolution

* Loki: fixed backend bug where resolution was undefined

* Loki: add check for resolution
2021-08-16 14:02:13 +02:00
Dimitris Sotirakis
1aeafa34d1
Elasticsearch: Fix metric names for alert queries (#37871)
* Use props names as metrics names

* Make aliases work
2021-08-16 14:45:20 +03:00
Sherwin Daganato
118c811c61
CloudWatch: Add AWS/EC2 MetadataNoToken metric (#37427) 2021-08-16 10:04:21 +02:00
Gábor Farkas
668f397a8e
Prometheus/Alerting: handle datasource.timeRange is nil case (#37888) 2021-08-16 09:20:58 +02:00
shuotli
6ecf401cd1
AzureMonitor: Add data links to deep link to Azure Portal Azure Resource Graph (#35591)
* Add deep link in ARG

* add soverigh clouds

* add query to Azure portal link

* move deep link to backend

* cloud specific to ARG

* Add unit test

* fix lint

* fix escape issue

* use constant & fix test

* fix constant & use pathEscape

* use cmp.Equal for test
2021-08-13 16:21:24 +01:00
Andrej Ocenas
b5f7df3e62
CloudWatch/Logs: Fix crash when time column has nil values (#37708) 2021-08-12 10:36:06 +02:00
Gábor Farkas
4afa74232f
prometheus: alerting: respect datasource.scrapeInterval (#37799) 2021-08-11 20:34:51 +02:00
Serge Zaitsev
377b323faf
truncate float64 values to a lower precision to look the same on all platforms (#37677) 2021-08-10 09:03:01 +02:00
Dimitris Sotirakis
27c71a1f09
Prometheus: Migrate to use SDK contracts (#37358)
* Use SDK contracts (test needs fixing)

* Fix tests

* Add customQueryParametersMiddleware

* Fix merge conflicts
2021-08-09 11:11:19 +02:00
Zoltán Bedi
e0010860bd
Tempo: add ability to upload trace json (#37407)
* Tempo: upload json

* Add test for upload

* Minor changes

* Add docs

* Update docs/sources/datasources/tempo.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Add graphframes as well to upload

* Add comments to code

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-08-05 15:13:44 +02:00
idafurjes
7ff16c47e1
Chore: Refactor tempo using SDK contracts (#37440)
* Refactor tempo using SDK contracts

* Remove commented code

* Removing simplejson use

* Unmarshal JSON
2021-08-05 11:14:17 +02:00
idafurjes
0563bc68fc
Chore: Refactor loki to use SDK contracts (#37400)
* Refactor loki to use SDK contracts

* Register with service name

* Initialize interval calculator

* Return always created result

* Use go library instead of simplejson

* Update pkg/tsdb/loki/loki.go

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* Remove newline

* Merge with main

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-08-05 10:25:31 +02:00
Ivana Huckova
1083bef030
Prometheus: Implement stepMode for alerting queries (#36796)
* Add select component for choosing step option

* Add onStepChange

* Add functionality for max step

* Rename minInterval to stepInterval to describe min, max and exact step interval

* Change select option from standard to exact

* Add new type StepType for better type safety

* Add tests for adjustInterval

* Add functionality and tests for exact step option

* Prometheus: Spell out min and max in select component

* Prometheus: Change width of step select component and add placeholder

* Prometheus: Adjust for the factor in exact step

* Prometheus: Update tooltip of step lable to include max and exact options and add padding to select component to give it some breathing room from other components

* Update snapshot for step tooltip

* Prometheus: make tooltip more informative

* Prometheus: add tooltip to interval input element

* Prometheus: extract default step option

* Prometheus: update snapshot for PromQueryEditor

* Prometheus: change step labels to uppercase

* Prometheus: define a default step option

* Prometheus: use default step option in both ui component and logic

* Prometheus: update snapshot for PromQueryEditor

* Prometheus: refactor datasource.ts for better readability

* Prometheus: change tool tip for step

* Prometheus: update snapshots

* Prometheus: add correct styling

* Prometheus: update snapshots

* Prometheus change variable name to something less superfluous

* Prometheus: refactor

* Prometheus: add new test for adjustInterval

* Docs: Update docummentation on the step parameter for prometheus

* Prometheus: make step input field smaller and change placeholder text to 15s

* Prometheus: update snapshots

* Prometheus: Make stepMode uniform in all places in the code

* Adjust step based on stepMode

* Adjust comment

* Check if we have queryInterval

* Refactor, add safe interval

* Fix merge resolutions

* Fix tests and add tests

* Update snapshot

* Update docs/sources/datasources/prometheus.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update docs/sources/datasources/prometheus.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update docs/sources/datasources/prometheus.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update docs/sources/datasources/prometheus.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update docs/sources/datasources/prometheus.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update docs/sources/datasources/prometheus.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update docs/sources/datasources/prometheus.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Implement calculation with intervalMode in calculator.go

* Update tests, add calculate safe interval method

* Replace panic with error

* Update pkg/tsdb/interval/interval_test.go

Co-authored-by: idafurjes <36131195+idafurjes@users.noreply.github.com>

* Update pkg/tsdb/calculator_test.go

Co-authored-by: idafurjes <36131195+idafurjes@users.noreply.github.com>

* Impotrt require

* Remove lint errors

Co-authored-by: Olof Bourghardt <ob655088@gmail.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: idafurjes <36131195+idafurjes@users.noreply.github.com>
2021-08-05 09:09:49 +02:00
ying-jeanne
fcd0dac814
Dependency: update collector to v.31.0 (#37546)
* update collector to v.31.0

* Change protobuf unmarshal function after upgrade

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-08-04 17:41:07 +02:00
Ilya Stoliar
b62fe58cac
CloudWatch: Add AWS LookoutMetrics (#37329) 2021-07-29 09:31:04 +02:00
idafurjes
180b1973e0
SQL: Fix SQL dataframe resampling (fill mode + time intervals) (#36937)
* Refactor resample logic

* Adjust test to have one more timestamp out of range

* adjust test + ensure filling

* revert flag flip

* Undo logic - should be timeseries only

* change data calculation based on previous interval

* fix the logics

* fix typo

* fix resample start time, to reuse what sql api returned

* calculate the start point with from truncate by interval

Co-authored-by: Will Browne <will.browne@grafana.com>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
Co-authored-by: Ying WANG <ying.wang@grafana.com>
2021-07-29 08:38:41 +02:00
Ilya Stoliar
59c691a777
CloudWatch: Add AWS IVS metrics and dimensions (#37178) 2021-07-26 14:53:18 +02:00
Sergey Kostrukov
c1963024ec
Infra: Azure authentication in HttpClientProvider (#36932)
* Azure middleware in HttpClientProxy

* Azure authentication under feature flag

* Minor fixes

* Add prefixes to not clash with JsonData

* Return error if JsonData cannot be parsed

* Return original string if URL invalid

* Tests for datasource_cache
2021-07-22 21:43:10 +01:00
Ilya Stoliar
7efbcf3fbc
CloudWatch: Add AWS CodeGuruProfiler metric (#37084) 2021-07-22 09:35:10 +02:00
idafurjes
1a52dd57cf
Fix parse duration for day (#36942) 2021-07-21 16:16:10 +02:00
Kyle Brandt
3ab9249f16
SQL Datasources: Allow multiple string/labels columns with time series (#36485)
for #36370
2021-07-20 12:42:54 -04:00
idafurjes
cec12676e7
Chore: Refactor influxdb to use SDK contracts (#36189)
* Use backend SDK for influxdb

* Remove BasicAuth condition, some comments

* Remove not used fields from datasource info

* Register InfluxDBService

* Fix casting and make HTTPClientProvider exported

* Remove unused function

* Remove empty line

* Update pkg/tsdb/influxdb/flux/query_models.go

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

* Read interval from TimeRange instead of Interval

* Change pkg name from datasource->models, minor changes

* Use testify instead of convey

* Add new calculator logic and fix pointer semantic for dsInfo

* Initialise parsers, use tsdb interval pkg

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-07-19 11:32:33 +02:00
Ilya Stoliar
0cfc135c4b
CloudWatch: Add AWS CertificateManager metric (#36881) 2021-07-19 10:41:12 +02:00
Andres Martinez Gotor
96efbbaed1
Azure Monitor: Implement CallResourceHandler in the backend (#35581) 2021-07-16 12:47:26 +02:00
dannyfreak
67b977fd63
Added missing metrics for Consumer Lag dimension (#36821)
Co-authored-by: Fryc, Daniel <Daniel.Fryc@Pearson.com>
2021-07-16 11:10:40 +02:00
Dimitris Sotirakis
0df1b33d71
Plugins: Migrate Elasticsearch to backend plugin SDK (#36132)
* Migrate Elasticsearch to backend plugin SDK

* Fix linting

* Move away from Convey!

* Rebase commit

* Small logger fix

* Fixes according to reviewer's comments

* Fixes according to reviewer's comments

* Fixes according to reviewer's comments

* More cleanup

* Move things around - small refactoring

* Fix typo

* Update calculator - add tests

* Fixes according to reviewer's comments
2021-07-15 16:45:59 +02:00
Giordano Ricci
f6b83a4f47
Elasticsearch: Add frozen indices search support (#36018)
* Revert "Revert "Elasticsearch: add frozen indices search support (#27472)" (#27726)"

This reverts commit 4c7131425b.

* Make label width a bit more consistent

* Add documentation for X-Pack & Frozen Indices support in Elasticsearch

* Change UI & docs casing

* create default empty dataframe

* Remove backticks and simplify regex

* small doc improvement
2021-07-15 15:52:02 +02:00
Marcus Efraimsson
10c892fa5b
Postgres/MySQL/MSSQL: Fix name of time field should be named Time for time series queries (#36720)
Name of time field changed in v8 for time series queries from Time to the name of the selected 
time column, i.e. time or time_sec. These changes should make sure that the name of time field 
is always returned as Time for time series queries.

Fixes #36059

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-07-14 11:29:51 +02:00
Andres Martinez Gotor
114f6714c4
AzureMonitor: Fail rather than warn if Log credentials are set (#36652) 2021-07-14 09:53:24 +02:00
Torkel Ödegaard
702fd1cad9
Visualizations: Dynamically set any config (min, max, unit, color, thresholds) from query results (#36548)
* initial steps for config from data

* Moving to core and separate transforms

* Progress

* Rows to fields are starting to work

* Config from query transform working

* UI progress

* More scenarios working

* Update public/app/core/components/TransformersUI/rowsToFields/rowsToFields.ts

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* transform all

* Refactor

* UI starting to work

* Add matcher UI to transform

* Apply to self

* Adding a reducer option

* Value mapping via new all values reducer

* value mappings workg add -A

* Minor changes

* Improving UI and adding test dashboards

* RowsToFieldsTransformerEditor tests

* Added tests for FieldToConfigMapping Editor

* Added test for ConfigFromQueryTransformerEditor

* Minor UI tweaks

* Added missing test

* Added label extraction

* unified mapping

* Progress refactoring

* Updates

* UI tweaks

* Rename

* Updates

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-07-13 10:51:34 +02:00
idafurjes
5d01add7da
Fix Postgres query handling null values for smallint (#36648)
* Fix Postgres query handling null values for smallint

* Fix converting to int16
2021-07-13 09:36:24 +02:00
Brent Cetinich
37c3e6f9b9
Add StreamName dimension for AWS/KinesisVideo namespace (#36655) 2021-07-12 14:24:10 +02:00