Commit Graph

291 Commits

Author SHA1 Message Date
Santiago
c3cf95f383
Revert "Alerting: add template funcs (#38404)" (#39258)
This reverts commit d6fb0181fb.
2021-09-15 19:47:22 -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
Alexander Emelin
548b4daa49
Live: up centrifuge to v0.18.4 (#39139) 2021-09-14 11:31:04 -07:00
Alexander Emelin
f74421b892
update centrifuge to v0.18.3 (#39085) 2021-09-10 17:20:05 +03:00
Alexander Emelin
5fcc9fe193
temporary switch to alternative jsonpath implementation (#39090)
to work with go1.16 and avoid replace in go.mod
2021-09-10 16:24:31 +03:00
Alexander Emelin
e78d880db3
tmp replace of ojg lib to fix builds on 32-bit CPU (#39074) 2021-09-10 13:14:16 +03:00
Sergey Kostrukov
06a616e630
Update Azure SDK with bug fixes (#38952) 2021-09-09 17:32:36 +01:00
gotjosh
39a3bb8a1c
Alerting: Persist notification log and silences to the database (#39005)
* Alerting: Persist notification log and silences to the database

This removes the dependency of having persistent disk to run grafana alerting. Instead of regularly flushing the notification log and silences to disk we now flush the binary content of those files to the database encoded as a base64 string.
2021-09-09 17:25:22 +01:00
Alexander Emelin
3ee861f57e
Live: declarative processing pipeline, input -> frames -> output, toggle protected POC (#37644) 2021-09-09 19:19:29 +03:00
Alexander Emelin
84e821bdef
Chore: update plugin sdk to v0.113.0 (#39040) 2021-09-09 08:18:07 -07:00
Alexander Emelin
342b1426e5
live: update centrifuge to v0.18.2 (#38925) 2021-09-07 21:05:24 +03:00
Serge Zaitsev
c3ab2fdeb7
Macaron: remove custom Request type (#37874)
* remove macaron.Request, use http.Request instead

* remove com dependency from bindings module

* fix another c.Req.Request
2021-09-01 11:18:30 +02:00
Dimitris Sotirakis
8e2ee0a1c8
Chore: Update to Golang 1.17 (#38608)
* Update to golang 1.17

* Further updates

* Run go mod tidy on go 1.17

* Apply suggestions from code review

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

* Use build-container:1.4.2

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-08-31 09:19:26 +03: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
Travis Patterson
00709ec1db
Add prometheus remote client (#37755) 2021-08-13 10:44:56 -06:00
Will Browne
45754edfbc
bump plugin-sdk-go to fix tls verify field issue (#37797) 2021-08-11 16:23:07 +02:00
gotjosh
f83cd401e5
Alerting: Send alerts to external Alertmanager(s) (#37298)
* Alerting: Send alerts to external Alertmanager(s)

Within this PR we're adding support for registering or unregistering
sending to a set of external alertmanagers. A few of the things that are
going are:

- Introduce a new table to hold "admin" (either org or global)
  configuration we can change at runtime.
- A new periodic check that polls for this configuration and adjusts the
  "senders" accordingly.
- Introduces a new concept of "senders" that are responsible for
  shipping the alerts to the external Alertmanager(s). In a nutshell,
this is the Prometheus notifier (the one in charge of sending the alert)
mapped to a multi-tenant map.

There are a few code movements here and there but those are minor, I
tried to keep things intact as much as possible so that we could have an
easier diff.
2021-08-06 13:06:56 +01: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
idafurjes
9d496d6f48
SDK: update plugin-sdk to v0.111.0 (#37405) 2021-07-30 16:54:52 +02:00
Marcus Efraimsson
decc2124f3
Chore: Upgrade grafana-plugin-sdk-go to v0.110.0 (#36763) 2021-07-15 09:39:25 +02:00
Serge Zaitsev
9b2d7d6d69
Gradually remove Macaron web framework (#36325)
* add macaron code to the code base

* remove unused secure cookies support from macaron

* clean up modules

* remove com dependency

* fix silly typos

* little cleanup, remove recovery middleware

* remove logger middleware

* remove static handler and remove unused context methods

* bring inject into macaron codebase

* remove unused applicator

* add back macaron license

* more cleanups in macaron code

* remove unused injector Set method

* remove unused context methods: param to int conversion, body helper type, cookie helpers

* remove action from context

* remove complex environment handling, we only use Env variable

* restore ReplaceAllParams to fix the tests
2021-07-08 14:19:40 +02:00
ying-jeanne
5c3c15fa40
update backend-sdk to v0.106.0 (#36543) 2021-07-08 16:51:48 +08:00
Will Browne
719e78f333
bump version (#36430) 2021-07-05 12:19:10 +02:00
Alexander Emelin
98893c0420
Live: experimental HA with Redis (#34851) 2021-06-24 11:07:09 +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
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
Ryan McKinley
4b8d796c54
Live: avoid panic when type changes (#35394) 2021-06-09 11:15:42 -07:00
Dimitris Sotirakis
7cdf8b3705
HTTP Client: Introduce go-conntrack into http client provider (#35314)
* Introduce go-conntrack into http client provider

* Fixes according to reviewer's comments

* Fixes according to reviewer's comments
2021-06-09 18:13:21 +02:00
Sofia Papagiannaki
eeb84d09c2
SSE: Change math expression to accept any value convertible to float (#34996)
* SSE: Change math expression to accept any scalar value

* Apply suggestions from code review

* Update test

* Remove TODO
2021-06-03 18:06:12 +03:00
Marcus Efraimsson
5d41e83896
Chore: Upgrade prometheus/alertmanager dependency to v0.22.2 (#35102)
* Chore: Upgrade prometheus/alertmanager dependency to v0.22.2

* go mod tidy
2021-06-02 16:02:52 +02:00
Ganesh Vernekar
7c25465b3a
Alerting: Migrate paused alerts to silences (#34898)
* Alerting: Migrate paused alerts to silences

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

* Fix lint

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2021-05-31 17:30:58 +05:30
Ryan McKinley
67028af99e
Live: check schema equality between push messages (#34548) 2021-05-27 12:55:42 +03:00
Arve Knudsen
796590a1aa
Chore: Upgrade opentelemetry.io/collector dependency (#34700)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-05-26 10:11:37 +02:00
Arve Knudsen
42f33630c7
Security: Upgrade Thrift dependency (#34698)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-05-26 09:31:19 +02:00
Alexander Emelin
063e1b5ff5
Live: use latest changes in Go SDK to deal with streaming frames (#34668) 2021-05-25 10:29:02 -07:00
Dimitris Sotirakis
91657dad18
HTTP Client: Make ResponseHeaderTimeout default timeout in http client (#34597)
* HTTP Client: Add `ResponseHeaderTimeout` - split from `DialContext` timeout

* Fixes according to reviewer's comments

* Use grafana-plugin-sdk-go v0.100.0
2021-05-25 11:32:41 +03:00
Sergey Kostrukov
a337f70469
AzureMonitor: Fix Azure token provider national clouds (#34615)
* Fix AAD authority for sovereign clouds

* Update Azure SDK with scopes fix

* Credential initialization in cache
2021-05-25 08:19:08 +02:00
Dimitris Sotirakis
6970c9ebfd
Use laher/mergefs - remove custom code (#34571) 2021-05-24 14:17:40 +02:00
Marcus Efraimsson
b76dfc8ed0
Chore: Upgrade loki dependency (#34487)
Upgrades loki dependency to include grafana/loki#3743.
2021-05-20 16:31:53 +02:00
Alexander Emelin
f0ef5e7dcb
Live: channel ID validation (#34215) 2021-05-19 20:47:53 +03:00
Owen Diehl
1d2febfa85
[Alerting] Route validations (#34393)
* more routing validation

* go mod

* recursive route validations
2021-05-19 10:36:28 -04:00
idafurjes
1e8e7e34f1
Plugins: Remove support for deprecated backend plugin protocol version (#34127)
* 33959: Remove support for deprecated backend plugin protocol (v1)

* 33959: Remove unused methods

* 33959: Remove some additional unused code

* 33959: Remove some additional unused code

* 33959: Remove datasource plugin wrapper with test

* 33959:Remove DefaultProtocolVersion
2021-05-19 08:57:48 +02:00
Ryan McKinley
0b44182bbf
SDK: update plugin sdk (#34251) 2021-05-18 18:45:46 +02:00
Sergey Kostrukov
c1b8a10f41
Plugins: Fix Azure token provider cache panic and auth param nil value (#34252)
* More tests for token cache

* Safeguarding from panic and concurrency fixes

* Update Azure dependencies

* Fix interpolation of empty plugin data
2021-05-18 15:36:58 +02:00
Ganesh Vernekar
89c2b5e863
NGAlert: Remove unwanted fields from notification channel config (#34036)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2021-05-18 10:04:47 +02:00
Sergey Kostrukov
81f6c806e1
Azure token provider with support for Managed Identities (#33807)
* Azure token provider

* Configuration for Azure token provider

* Authentication via Azure SDK for Go

* Fix typo

* ConcurrentTokenCache for Azure credentials

* Resolve AAD authority for selected Azure cloud

* Fixes

* Generic AccessToken and fixes

* Tests and wordings

* Tests for getAccessToken

* Tests for getClientSecretCredential

* Tests for token cache
2021-05-14 13:59:07 +02:00
Alexander Emelin
726039a721
live: update live-sdk to v0.0.6 (#34047) 2021-05-13 16:12:54 +03:00
Alexander Emelin
e97750b824
Live: labels column as default frame format (#33984)
* labels columns as default frame format

* update sdk

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-05-13 11:01:20 +02:00
Alexander Emelin
a14ae53347
UseRunStream is a default behaviour (#34021) 2021-05-12 22:17:31 +03:00
Marcus Efraimsson
d1a44044e5
Chore: Upgrade grafana-plugin-sdk-go to v0.96.0 (#34010) 2021-05-12 18:16:21 +02:00