Commit Graph

6736 Commits

Author SHA1 Message Date
Joan López de la Franca Beltran
c75737c808
Usage Stats: Decouple from GrafanaLive (#39512)
* Usage Stats: Decouple from GrafanaLive
2021-09-22 16:28:40 +02:00
George Robinson
27609dc2c5
Fix alerts with evaluation interval more than 30 seconds resolving in Alertmanager (#39513) 2021-09-22 14:55:46 +01:00
Gábor Farkas
bf0dc3ef62
influxdb: flux: use more precise start and end timestamps (#39415)
* influxdb: flux: use more precise start and end timestamps

* added unit test
2021-09-22 15:26:36 +02:00
Gabriel MABILLE
1d56c32ab0
AccessControl: Protect /datasources endpoints consistently with NavLinks permissions (#39319) 2021-09-22 13:50:21 +02:00
Uchechukwu Obasi
eb2e1197e9
PlaylistPage: fix search input (#39226)
* PlaylistPage: removes search due to no wildcard support

* PlaylistPage: adds back search input and wildcard search support

* makes banner to appear only when playlist does not exist

* Chore: small refactor

* Chore: some code refactoring to make it readable

* fixes focus leaving input when query is cleared

* adds styling to the emptyQueryList banner

* extracts emptyQueryListBanner component to a separate file

* adds debounce to search

* use new theme for styling

* Chore: some nit fix

* fixes empty list banner showing for a second before the full list is loaded

* Fix: removes search when playlist is empty

Co-authored-by: Ash <ashharrison90@gmail.com>

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2021-09-22 10:45:29 +01:00
Ilya Stoliar
dfb8a4cd13
CloudWatch: Add AWS Gateway ELB metrics and dimensions (#39490) 2021-09-22 10:04:04 +02:00
Alexander Emelin
0bf70b14fd
Live: api to show available pipeline entities (#39469)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-09-21 11:57:58 -07:00
Joan López de la Franca Beltran
a680162792
Usage Stats: Split domain & service packages (#39488) 2021-09-21 20:50:37 +02:00
Yuriy Tseretyan
1910d85ae0
Alerting: Optimization of fetching data in multiorg alertmanager (#39237)
* Add method GetAllLatestAlertmanagerConfiguration to DBStore
* add method ApplyConfig to AlertManager
* update multiorg alert manager to load all alertmanager configs at once
2021-09-21 11:01:23 -04:00
Andres Martinez Gotor
64c8d32fe7
Use sdk pkg for gtime (#39354) 2021-09-21 13:08:52 +02:00
Jeremy Price
5ce5571c73
Add extra fields to OSS types to support enterprise (#39427) 2021-09-21 09:58:35 +02:00
Todd Treece
1781c8ec7d
Chore: Add go-redis v8 dependency (#39442)
* adds redis v8 client dependency

* remove go-redis v5 dependency
2021-09-20 22:21:59 +02:00
gotjosh
fcbcfd232b
Alerting: Move spammy log line to debug in the state manager (#39410) 2021-09-20 16:05:55 +01:00
Marcus Efraimsson
1e4a660ea7
Chore: Propagate context for quotas (#39205)
Propagate context for quotas and queries/commands.

Ref #36734
2021-09-20 17:05:30 +02:00
Ivana Huckova
ffdeb4a57a
Prometheus: Run Explore instant queries trough backend (#39351)
* Prometheus: Add running of instant queries trough backend

* Rename response, keep zero length frames

* Remove debug log

* Simplify and fix value text

* Update duplicated and redundant go test

* Update public/app/plugins/datasource/prometheus/datasource.ts

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Refactor using model to create Promquery

* Fix the response length

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-09-20 16:05:21 +02:00
Hugo Häggmark
2696be49b9
LibraryPanels: Improves export and import of library panels between orgs (#39214)
* Chore: adds tests to reducer

* Refactor: rewrite state

* Refactor: adds library panels to export

* wip

* Refactor: adds import library panels

* Refactor: changes UI

* Chore: pushing drone

* Update public/app/features/manage-dashboards/components/ImportDashboardForm.tsx

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

* Update public/app/features/manage-dashboards/components/ImportDashboardForm.tsx

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

* Chore: reverted unknown merge changes

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-09-20 10:58:24 +02:00
gotjosh
2ad82b9354
Alerting: Move the unified alerting settings to its own struct (#39350) 2021-09-20 10:12:21 +03:00
Marcus Andersson
f3002931f4
PluginsCatalog: adding error information about disabled plugins. (#39171)
* added errors in plugin list.

* added error to details page.

* adding badge on details page.

* added some more tests.

* Renamed to disabled and will handle the scenario in the plugin catalog.

* Update public/app/features/plugins/admin/components/PluginDetailsDisabledError.tsx

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* fixing some nits

* added missing isDisabeld to the mock.

* adding tests to verify scenarios when plugin is disabled.

* fixed issue with formatting after file changed on GH.

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2021-09-20 09:08:00 +02:00
sam boyer
39f2ee7692
Make "dist" version of dashboard scuemata directly importable in CUE (#39251)
* Update embeds with new paths, remove deprefixing

* Add dist dashboard scuemata, in CUE

Also add tests that ensure all panel plugins with models.cue are
imported by this file, so that we can't go out of sync.

* Remove comment detritus

* Check error return

* Remove hardcoded path prefix from cli validator
2021-09-17 16:17:55 -04:00
Yuriy Tseretyan
e1aae0549e
Provide reader to alertmanager silence instead of file path (#39305) 2021-09-17 14:12:27 -04:00
Alexander Emelin
be2b08798b
live: prevent pipeline recursion (#39366) 2021-09-17 21:00:00 +03:00
gotjosh
35e5bfce40
Alerting: Metrics should have the label org instead of user (#39353)
An user within Grafana has a completely different meaning. Multi-tenancy is done via Organizations as a top-level concept.
2021-09-17 17:17:26 +01:00
Sumit Bopche
7d873fa795
namespace should be AWS/Rekognition (#39094) 2021-09-17 17:16:22 +02:00
Alexander Emelin
e1f1773036
Live: pipeline subscriber interface (#39299) 2021-09-17 16:40:32 +03:00
Ivana Huckova
81756cd702
Prometheus: Run Explore range queries trough backend (#39133)
* Run Explore range queries trough backend

* Remove trailing comma

* Add timeRange step alignment to backend

* Remove creation of instant query on backend as it is not supported ATM

* Remove non-related frontend changes

* Pass offset to calculate aligned range trough prom query

* Update order in query error message

* tableRefIds shouldn't contain undefined refIds

* Remove cloning of dataframes when processing

* Don't mutate response

* Remove ordering of processed frames

* Remove df because not needed
2021-09-17 13:39:26 +02:00
Gábor Farkas
d116b2d71b
influxdb: influxql: more robust resultformat-handling (#39330) 2021-09-17 12:33:09 +02:00
Gabriel MABILLE
4be9ec8f72
AccessControl: Protect org users lookup (#38981)
* Move legacy accesscontrol to middleware layer

* Remove bus usage for this endpoint

* Add tests for legacy accesscontrol

* Fix tests for org user and remove one more bus usage

* Added test for FolderAdmin as suggested in the review
2021-09-17 09:19:36 +02:00
Alexander Emelin
87cdda4106
Live: return pipeline menu, now with feature toggle (#39280) 2021-09-16 08:34:12 -07:00
gotjosh
7db97097c9
Alerting: Support Unified Alerting with Grafana HA (#37920)
* Alerting: Support Unified Alerting in Grafana's HA mode.
2021-09-16 15:33:51 +01:00
Torkel Ödegaard
95fd659bfc
SideMenu: Remove live section from main side menu (#39278) 2021-09-16 10:12:54 +02:00
Santiago
c3cf95f383
Revert "Alerting: add template funcs (#38404)" (#39258)
This reverts commit d6fb0181fb.
2021-09-15 19:47:22 -03:00
Santiago
0d2e68537c
Alerting: Cleanup template, silence and notification files created du… (#39007)
* Alerting: Cleanup template, silence and notification files created during tests

* Create tempdir for testing, delete afterwards and check for errors

* Refactoring error checks

* Update docs/sources/enterprise/access-control/fine-grained-access-control-references.md

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

* Update docs/sources/administration/configuration.md

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

* Update docs/sources/enterprise/access-control/fine-grained-access-control-references.md

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

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-09-15 18:48:52 -03:00
Santiago
d6fb0181fb
Alerting: add template funcs (#38404)
* Alerting: (wip) add template funcs

* Alerting: (wip) numeric template functions

* Alerting: (wip) template functions

* Test for the "args" function

* Alerting: (wip) Documentation for template functions

* Alerting: template functions - refactor

* code review changes

* disable linter error

* Use Prometheus implementation of TemplateExpander

* Update docs/sources/alerting/unified-alerting/alerting-rules/create-grafana-managed-rule.md

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

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-09-15 18:48:29 -03:00
Marcus Efraimsson
e31b8f4d33
Chore: Remove SQL engine cache (#39254)
Fix bug with engine cache not updating after data source updated, introduced in #36635.
Removes the SQL engine cache because since #36635 we already have instance caching in place using the SDK instance manager.
This also adds support for disposing cached SQL/xorm engines before a query happens to a data source that has been updated. Done by letting the SQL engine implementing the InstanceDisposer interface.

Fixes #37299
2021-09-15 23:03:25 +02:00
Atif Shoukat Ali
64ff15c157
Live: default to constant label value for pipeline (#39211) 2021-09-15 13:10:52 -07:00
Dan Cech
f8ae71af5b
Usage Stats Updates (#39235)
* add randomly-generated anonymous id to usage reports
* include uptime in stats
* add last_sent tracking, remove metricsLogger
2021-09-15 11:47:44 -04:00
Erik Sundell
9d3f4f5983
Analytics: Instrument Azure Application Insights (#38553)
* add backend

* read config and pass to backend

* update config docs

* change var name

* use connection string instead of instrumentation key

* add config for endpoint url. update docs

* update default ini

* add spaces

* remove space

* Update docs/sources/administration/configuration.md

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

* Update conf/defaults.ini

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

* Update conf/defaults.ini

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

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-09-15 13:00:38 +02:00
Serge Zaitsev
6005e6572d
Chore: fix param names in ctx.ParamsInt64 (#39223) 2021-09-15 12:14:15 +02:00
Dimitris Sotirakis
fdc681788b
InfluxDB: Fix regex to identify / as separator (#39185)
* Fix regex to identify / as separator

* Update regex
2021-09-15 09:37:33 +01:00
Alexander Emelin
15e278e9e1
Live: search for pipeline files in data folder (#39198)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-09-14 22:27:51 +02:00
Serge Zaitsev
063160aae2
Chore: pass url parameters through context.Context (#38826)
* pass url parameters through context.Context

* fix url param names without colon prefix

* change context params to vars

* replace url vars in tests using new api

* rename vars to params

* add some comments

* rename seturlvars to seturlparams
2021-09-14 18:34:56 +02:00
Marcus Efraimsson
fa9857499b
Chore: GetDashboardQuery should be dispatched using DispatchCtx (#36877)
* Chore: GetDashboardQuery should be dispatched using DispatchCtx

* Fix after merge

* Changes after review

* Various fixes

* Use GetDashboardCtx function instead of GetDashboard
2021-09-14 16:08:04 +02:00
gotjosh
2b1d3d27e4
Alerting: Fix bug not creating filepath for silences/nflog if it does not exist (#39174)
We created this filepath just as we're about persist the templates - with the latest change, we now need to create it sooner.
2021-09-14 14:40:59 +01:00
Dimitris Sotirakis
f5ecf5c2d9
Cast fields to int64 (#39179) 2021-09-14 14:57:12 +02:00
gotjosh
a2f4344bf2
Alerting: Refactor & fix unified alerting metrics structure (#39151)
* Alerting: Refactor & fix unified alerting metrics structure

Fixes and refactors the metrics structure we have for the ngalert service. Now, each component has its own metric struct that includes the JUST the metrics it uses. Additionally, I have fixed the configuration metrics and added new metrics to determine if we have discovered and started all the necessary configurations of an instance.

This allows us to alert on `grafana_alerting_discovered_configurations - grafana_alerting_active_configurations != 0` to know whether an alertmanager instance did not start successfully.
2021-09-14 12:55:01 +01:00
Emil Tullstedt
ad971cc9be
LDAP: Search all DNs for users (#38891) 2021-09-14 10:49:37 +02:00
An
45e67630e8
Live: admin config UI (#39103)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Atif Ali <atifshoukatali@yahoo.com>
2021-09-13 21:09:55 -07:00
Marcus Efraimsson
2cc0788187
Chore: Disable backend test for now since it adds 10 minutes extra in CI (#39150)
Ref #38586
2021-09-13 19:37:26 +02:00
Peter Leitzen
4f70113ea0
OAuth: Support role mapping for GitLab OAuth (#30025)
* Support `role_attribute_path` for GitLab OAuth

Allow role mapping for GitLab accounts.

Example:

  [auth.gitlab]
  role_attribute_path = is_admin && 'Admin' || 'Viewer'

* Support `role_attribute_path` for GitLab OAuth

Allow role mapping for GitLab accounts.

Example:

  [auth.gitlab]
  role_attribute_path = is_admin && 'Admin' || 'Viewer'

* docs: add docs for role_attribute_path

* Apply suggestions from code review

Co-authored-by: Peter Leitzen <splattael@users.noreply.github.com>

* docs: update example

example should suggest a full configuration

* Apply suggestions from code review

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

* Apply suggestions from code review

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* docs: add suggestions from tech writers

Co-authored-by: Henry Sachs <Henry.Sachs@deutschebahn.com>
Co-authored-by: Henry Sachs <henrysachs@gmail.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
2021-09-13 12:44:37 -04:00
David Lamb
89878dae1b
OAuth: clarify role & group paths prefer id_token over userinfo api (#39066)
* OAuth: clarify role & group paths prefer id_token over userinfo api (#39066)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
2021-09-13 18:15:15 +02:00