Commit Graph

6427 Commits

Author SHA1 Message Date
Sarah Zinger
493d35ccc6
Azure monitor: ensure that time column has a name (#36144)
Fixes bug when switching from Timeseries to Table view when viewing Azure Monitor Metrics Data.
2021-06-28 08:28:56 -04:00
Ester Martí Vilaseca
81a79aef23
Elasticsearch: add rate aggregation (#33311)
* Elasticsearch: add first version of rate aggregation

* Add test for rate aggreation settings editor

* Fix unit

* Add default value for mode for rate agg

* Add todo

* Revert "Add default value for mode for rate agg"

This reverts commit a44c985d8b.

* Fix width when select is empty

* Add rate aggregation to elasticsearch models

* Remove rate aggregation from extended stats

* Move elastic2 docker block & add elastic (latest)

* Add versionRange to rate aggregation

* add 7.10 elasticsearch version option

* Set supportsInlineScript to true for rate aggregation

* Remove fixed width from select

* Change seconds label for rate aggregation unit options dropdown

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

Co-authored-by: Elfo404 <me@giordanoricci.com>
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-06-28 11:55:31 +01:00
Piotr Jamróz
faf25bc4ea
Graphite: Interpolate Graphite alerts with tags (#35887) 2021-06-27 23:58:50 +02:00
Ryan McKinley
035eec1502
Testdata: use UTC time and circle alcatraz for streaming flight sample 2021-06-27 10:17:01 -07:00
Dimitris Sotirakis
4f3bc71caa
Chore: Update tests to prevent test-backend step from failing the pipeline (#36155)
* Chore: Update flight-simple-X.txt

* Fix api_notification_channel_test.go failing test
2021-06-25 10:32:01 +02:00
Ganesh Vernekar
8fe58fc2e3
Alerting: Add additional newlines to Microsoft Teams notification message where necessary (#36126)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2021-06-24 20:52:00 +05:30
Ganesh Vernekar
f2bb3faea8
Alerting: Add integration test case for email channel (#36029)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2021-06-24 20:31:29 +05:30
Alexander Emelin
98893c0420
Live: experimental HA with Redis (#34851) 2021-06-24 11:07:09 +03:00
Kyle Brandt
19f764739b
Alerting: Change __value__ label to __value_string__ annotation and add ValueString variable in notifications (#36032)
* Alerting: Allow __value__ label in notifications
was being removed by removePrivateItems
discoverd in #36020, but issue is not about that specifically

* __value__ label to __value_string__ annotation
and .ValueString extended property for notifications
2021-06-24 12:45:49 +05:30
Alexander Emelin
5bbf45592e
Live: rely on app url for origin check (#35983) 2021-06-23 19:51:03 +03:00
Ryan McKinley
8ad9834019
TestData: add simple scenario with GPS and altitude coordinates (#36011) 2021-06-22 14:19:29 -07:00
Ganesh Vernekar
9a5c1f06df
Alerting: Template all possible variables in notification channels (#35749)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2021-06-22 15:12:54 +05:30
Sofia Papagiannaki
91cf062d0b
Alerting: fix conflicting folder and dashboard permissions during migration (#35967)
* Alerting: Fix conflicting user and team permissions

* Avoid duplicate perrmissions

* Fix lint

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

Co-authored-by: Ganesh Vernekar <ganeshvern@gmail.com>
2021-06-22 12:07:52 +05:30
ying-jeanne
73fdd9dc22
[MYSQL] convert explicitely smallint and tinyint (#35897)
* [MYSQL] convert explicitely smallint and tinyint

* clean up code

* fix comments
2021-06-22 00:10:45 +08:00
Tom Pickles
b05b5d5e3b
AzureMonitor: Fix queries with Microsoft.NetApp/../../volumes resources (#32661)
* Extend description of existing tests (#28350)

* Tests for building MetricNamespaces URL (#28350)

* Added tests that break the URL builder (#28350)

* Arbitrary length of metric definition (#28350)

* Change var to const as requested (#32661)

* Adding tests to datasource url builder (#28350)

* Fixes to datasource url builder (#28350)

* Fixed linting issue that broke build (#28350)
2021-06-21 13:05:13 +01:00
Carl Bergquist
9ef4c21033
add context to getsignedinUser calls (#35963)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2021-06-21 07:51:33 +02:00
Ganesh Vernekar
33d6e11175
Alerting: Decouple default template from channel tests (#35239)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2021-06-21 07:59:09 +05:30
Dimitris Sotirakis
0d08881876
Elasticsearch: Convert Timeseries and Tables to Dataframes (#34710)
* Rebase (broken tests)

* Removed tables - refactored processAggregationDocs func

* Tests cleanup

* Nit - add space in percentile legend titles

* Fix labels naming - use metricAggType map

* Fix bug which appended same fields over and over again

* Replace test with dataframes

* Fix tests

* Add nolint:gocyclo - will need refactoring

* Move frames tags assignment

* Add failing test fo when ES server is booting up

* Revert "Add failing test fo when ES server is booting up"

This reverts commit fd14a1fd5e.

Co-authored-by: Elfo404 <me@giordanoricci.com>
2021-06-18 13:26:19 +03:00
Ryan McKinley
1d6e99bc95
SQL: Fixes issues with showing value column name prefix in legends (#35839)
* rename strategy

* Update pkg/tsdb/sqleng/sql_engine.go

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>

* more strict constraints

* Fixed so that it works on multi series results

* only apply the logic when original query returns 3 fields

* removed part of comment

* Update mysql test

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2021-06-18 08:05:23 +02:00
David Parrott
4732f832f7
Alerting: recalculate EndsAt (#35830)
* setEndsAt

* one more test case

* add should clause to tests
2021-06-17 10:01:46 -07:00
Sofia Papagiannaki
5e534d212c
Alerting: Fix alert permissions migration (#35869)
* Alerting: Fix alert permissions migration

for MySQL >= 5.7 and PostgreSQL

* Do not use import struct
2021-06-17 15:49:56 +03:00
Marcus Efraimsson
477d4197fb
Chore: Improve save dashboard error messages (#35780)
Includes panel and dashboard id in alert
extractor errors.
Logs all non-400 dashboard errors.

Fixes #35751
2021-06-16 14:56:55 +02:00
Ganesh Vernekar
dcd4bf1615
Alerting: Fill the empty GeneratorURL (#35740)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2021-06-16 15:34:12 +05:30
Sofia Papagiannaki
e5a5b8e3fe
Alerting: Fix updating alert rule properties with missing/zero values (#35512)
* Fix deleting labels and annotations

* Add test

* Keep no data and error start if not provided

* Allow setting interval and for to zero during rule updates
2021-06-15 20:55:25 +03:00
Sofia Papagiannaki
abe35c8c01
Alerting: Add error recovery during rule evaluations (#35450)
* Alerting: Eval recovery after query failure

* Apply suggestions from code review
2021-06-15 19:30:21 +03:00
gotjosh
f7ed35336d
Alerting: Implement /status for the notification system (#33227)
* Alerting: Implement /status for the notification system

Implements the necessary plumbing to have a /status endpoint on the
notification system.

* Add API examples

* Update API specs

* Update prometheus/common dependency

Co-authored-by: Sofia Papagiannaki <sofia@grafana.com>
2021-06-15 19:14:02 +03:00
Carl Bergquist
b40e78a943
Instrumentation: add context.Context to the dashboard get flow. (#34955)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2021-06-15 16:08:27 +02:00
Andres Martinez Gotor
6b786e7f68
Avoid log entry if not set for debug (#35741) 2021-06-15 15:03:24 +02:00
Andrej Ocenas
9a3e3014dd
CloudWatch/Logs: Fix missing response data for log queries (#35724) 2021-06-15 14:42:55 +02:00
Will Browne
adbb15a3a7
Plugins: fix test with bad symlink target (#35737) 2021-06-15 13:53:09 +02:00
Will Browne
303352a89b
Plugins: Ignore symlinked folders when verifying plugin signature (#34434)
* add check + test

* fix test

* add manifest

* fix linter

* add nolint

* separate err cond checks

* only collect relevant plugin files

* skip symlinks

* refactor

* add missing test files + enable scanning Chromium.app/

* remove test since case already covered

* remove unnecessary changes from before

* refactor

* remove comment
2021-06-15 11:55:47 +02:00
Domas
5b5cb94809
Fix: fix loading symbolically linked plugins (#35635) 2021-06-15 09:10:30 +03:00
Sofia Papagiannaki
c997f646cc
Alerting: Fix alert migration RefID generation (#35667)
* Alerting: Fix alert migration RefID generation

if the alert has more than 26 conditions

* Remove TODO comment

* Make similar change under pkg/expr
2021-06-14 22:13:45 +03:00
Tobias Skarhed
7f882eea05
Login: Require user to not be signed in to get request password email (#35421) 2021-06-14 18:02:05 +02:00
Karl Persson
395b942134
Access Control: Add fine-grained access control to GET stats and settings handlers (#35622)
* add accesscontrol action for stats read

* use accesscontrol middleware for stats route

* add fixed role with permissions to read sever stats

* add accesscontrol action for settings read

* use accesscontrol middleware for settings route

* add fixed role with permissions to read settings

* add accesscontrol tests for AdminGetSettings and AdminGetStats

* add ability to scope settings

* add tests for AdminGetSettings
2021-06-14 17:36:48 +02:00
Kyle Brandt
8a3d7b6446
Alerting: Increase alertmanager_conf column size if mysql (#35657)
fixes #35583
2021-06-14 11:02:35 -04:00
Sofia Papagiannaki
423474325a
Alerting: fix postgres migration on conflict (#35556) 2021-06-14 16:43:33 +03:00
Andres Martinez Gotor
7109285ac9
AzureMonitor: Use auth middleware for QueryData requests (#35343) 2021-06-11 17:02:24 +02:00
Karl Persson
36c997a625
Access Control: Add fine-grained access control to ldap handlers (#35525)
* Add new accesscontrol action for ldap config reload

* Update ldapAdminEditRole with new ldap config reload permission

* wrap /ldap/reload with accesscontrol authorize middleware

* document new action and update fixed:ldap:admin:edit with said action

* add fake accesscontrol implementation for tests

* Add accesscontrol tests for ldap handlers

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
2021-06-11 15:58:18 +02:00
Marcus Efraimsson
0611207f3b
Postgres/MySQL/MSSQL: Fix concurrent map writes panic (#35510)
Fixes panic/fatal error concurrent map writes in SQL data sources when multiple 
queries are executed concurrently and you interpolate SQL query before executing it.

Fixes #35469
2021-06-11 14:56:29 +02:00
Javier Palomo
6531424c72
Datasource: Add support for max_conns_per_host in dataproxy settings (#35520)
Allow configuring dataproxy.max_conns_per_host for HTTP data sources.

Ref #35519
Ref #35257
2021-06-11 14:18:08 +02:00
Sofia Papagiannaki
aa8e09d383
Revert "Test datasource: Returns always float values (#34986)" (#35316)
This reverts commit 51afde34bd.
2021-06-11 14:12:11 +03:00
Stephanie Closson
83f26e9ce2
Fix: only recurse a symbolic link if it is a directory (#35455)
* only recurse a symbolic link if it is a directory

* added test for detecting valid plugins using lib dirs with symbolic links in them (like oracle)

* fix linting errors

* added extra checks as per code-review
2021-06-10 10:25:07 -03:00
shuotli
05f3985108
Upgrade ARG API version (#35464) 2021-06-10 12:33:34 +02:00
ying-jeanne
a07c53b671
[dataframe] convert opentsdb response to dataframes (#35307)
* draft pr convert opentsdb response to dataframes

* Add test for parse response and fix go lint

* Add test case for create request

* Use go-cmp in test

* Remove comment

Co-authored-by: Ida Furjesova <ida.furjesova@grafana.com>
2021-06-10 12:14:25 +02:00
Marcus Efraimsson
d15d87db8a
Datasource: Fix storing timeout option as numeric (#35441)
#31871 introduced support for configuring timeout in seconds
for HTTP data sources. That had a bug where backend expected
a numeric timeout value where it was actually stored as a
string. This should resolve this by requiring input to be
numbers, storing input as numeric and falling back to string
value if there's no numeric value.

Ref #31871
2021-06-10 10:27:14 +02:00
Erik Sundell
eff2410bae
Cloudwatch: Fix duplicated time series (#35433)
* make sure queries are only ran once

* test aliases

* use correct dates
2021-06-10 10:23:17 +02:00
Ikko Ashimine
e3afb63e62
Chore: Fix typo in nodes.go (#35312)
formating -> formatting
2021-06-09 16:59:44 -07:00
Kyle Brandt
f4e9dcd40b
Alerting/SSE: Fix "count_non_null" reducer validation (#35451)
fixes error "reducer 'count_non_null' in condition 2 is not a valid reducer"
2021-06-09 14:42:48 -04:00
Ryan McKinley
4b8d796c54
Live: avoid panic when type changes (#35394) 2021-06-09 11:15:42 -07:00