Commit Graph

243 Commits

Author SHA1 Message Date
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
Owen Diehl
290e00cb6f
bumps am & common libs with json tag support (#33995) 2021-05-12 09:55:32 -04:00
Marcus Efraimsson
6c728d6a78
SQL: Use SDK sqlutil package refactor (#33758)
Upgrades grafana-plugin-sdk-go dependency to v0.94.0 to get 
the refactored sqlutil package. 

Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
2021-05-11 14:59:33 +02:00
Giordano Ricci
e98a8bd11b
Elasticsearch: use semver strings to identify ES version (#33646)
* Elasticsearch: use proper semver strings to identify ES version

* Update BE & tests

* refactor BE tests

* refactor isValidOption check

* update test

* Update pkg/tsdb/elasticsearch/client/client.go

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

* Update pkg/tsdb/elasticsearch/client/search_request_test.go

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

* Remove leftover FIXME comment

* Add new test cases for new version format

* Docs: add documentation about version dropdown

* Update docs/sources/datasources/elasticsearch.md

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

* Update docs/sources/datasources/elasticsearch.md

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

* Update docs/sources/datasources/elasticsearch.md

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

* Update provisioning documentation

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-05-11 09:44:00 +01:00
Owen Diehl
d2676bc649
revendor loki with new Tripperware (#33858) 2021-05-10 12:46:24 -04:00
ying-jeanne
f24596748a
Bump github.com/go-sql-driver/mysql from 1.5.0 to 1.6.0 (#33835)
Bumps [github.com/go-sql-driver/mysql](https://github.com/go-sql-driver/mysql) from 1.5.0 to 1.6.0.
- [Release notes](https://github.com/go-sql-driver/mysql/releases)
- [Changelog](https://github.com/go-sql-driver/mysql/blob/master/CHANGELOG.md)
- [Commits](https://github.com/go-sql-driver/mysql/compare/v1.5.0...v1.6.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-10 18:02:26 +08:00
Alexander Emelin
03e91eb1a6
updated sdk-go to v0.93.0, adapt tests (#33769) 2021-05-06 18:10:51 +03:00
Will Browne
3b10451f9f
version bump (#33784) 2021-05-06 16:40:04 +02:00
dependabot[bot]
1e3d19e483
Chore(deps): Bump github.com/hashicorp/go-hclog from 0.15.0 to 0.16.0 (#32881)
Bumps [github.com/hashicorp/go-hclog](https://github.com/hashicorp/go-hclog) from 0.15.0 to 0.16.0.
- [Release notes](https://github.com/hashicorp/go-hclog/releases)
- [Commits](https://github.com/hashicorp/go-hclog/compare/v0.15.0...v0.16.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-05 18:26:55 +02:00
Owen Diehl
e4d3161690
revendors loki & alertmanager (#33534)
* revendors loki

* revendors alertmanager
2021-04-29 18:29:42 +01:00
dependabot[bot]
8dea72a763
Chore(deps): Bump go.opentelemetry.io/collector from 0.22.0 to 0.25.0 (#33365)
* Chore(deps): Bump go.opentelemetry.io/collector from 0.22.0 to 0.25.0

Bumps [go.opentelemetry.io/collector](https://github.com/open-telemetry/opentelemetry-collector) from 0.22.0 to 0.25.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-collector/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-collector/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-collector/compare/v0.22.0...v0.25.0)

Signed-off-by: dependabot[bot] <support@github.com>

* Apply changes to tempo code

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-04-29 15:01:48 +02:00
Owen Diehl
ec37b4cb87
[Alerting] Automatic request instrumentation (#33444)
* alerting: automatic request instrumentation

* always expose alerting prom metrics

* globally register alerting metrics
2021-04-28 16:59:15 -04:00
ying-jeanne
748778fff0
new endpoint to post/get trimmed dashboard json (#33465)
* new endpoint to post/get trimed dashboard json

* add isdisabled check in dashboard.go
2021-04-28 19:38:33 +08:00
dependabot[bot]
eaf7decf5a
Chore(deps): Bump google.golang.org/api from 0.44.0 to 0.45.0 (#33366)
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.44.0 to 0.45.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/master/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.44.0...v0.45.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-28 08:56:40 +02:00
Alexander Emelin
7501a2deb6
Live: pure websocket push endpoint (#33339) 2021-04-26 13:17:49 +03:00
Ganesh Vernekar
6cc7a20789
NGAlert: Remove all pending references to the old API package (#33269)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2021-04-22 18:36:32 +05:30
dependabot[bot]
0a3e7dea62
Bump github.com/centrifugal/centrifuge from 0.16.0 to 0.17.0 (#33117) 2021-04-19 12:09:10 -07:00
Owen Diehl
e37a780e14
Inhouse alerting api (#33129)
* init

* autogens AM route

* POST dashboards/db spec

* POST alert-notifications spec

* fix description

* re inits vendor, updates grafana to master

* go mod updates

* alerting routes

* renames to receivers

* prometheus endpoints

* align config endpoint with cortex, include templates

* Change grafana receiver type

* Update receivers.go

* rename struct to stop swagger thrashing

* add rules API

* index html

* standalone swagger ui html page

* Update README.md

* Expose GrafanaManagedAlert properties

* Some fixes

- /api/v1/rules/{Namespace} should return a map
- update ExtendedUpsertAlertDefinitionCommand properties

* am alerts routes

* rename prom swagger section for clarity, remove example endpoints

* Add missing json and yaml tags

* folder perms

* make folders POST again

* fix grafana receiver type

* rename fodler->namespace for perms

* make ruler json again

* PR fixes

* silences

* fix Ok -> Ack

* Add id to POST /api/v1/silences (#9)

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>

* Add POST /api/v1/alerts (#10)

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>

* fix silences

* Add testing endpoints

* removes grpc replace directives

* [wip] starts validation

* pkg cleanup

* go mod tidy

* ignores vendor dir

* Change response type for Cortex/Loki alerts

* receiver unmarshaling tests

* ability to split routes between AM & Grafana

* api marshaling & validation

* begins work on routing lib

* [hack] ignores embedded field in generation

* path specific datasource for alerting

* align endpoint names with cloud

* single route per Alerting config

* removes unused routing pkg

* regens spec

* adds datasource param to ruler/prom route paths

* Modifications for supporting migration

* Apply suggestions from code review

* hack for cleaning circular refs in swagger definition

* generates files

* minor fixes for prom endpoints

* decorate prom apis with required: true where applicable

* Revert "generates files"

This reverts commit ef7e975584.

* removes server autogen

* Update imported structs from ngalert

* Fix listing rules response

* Update github.com/prometheus/common dependency

* Update get silence response

* Update get silences response

* adds ruler validation & backend switching

* Fix GET /alertmanager/{DatasourceId}/config/api/v1/alerts response

* Distinct gettable and postable grafana receivers

* Remove permissions routes

* Latest JSON specs

* Fix testing routes

* inline yaml annotation on apirulenode

* yaml test & yamlv3 + comments

* Fix yaml annotations for embedded type

* Rename DatasourceId path parameter

* Implement Backend.String()

* backend zero value is a real backend

* exports DiscoveryBase

* Fix GO initialisms

* Silences: Use PostableSilence as the base struct for creating silences

* Use type alias instead of struct embedding

* More fixes to alertmanager silencing routes

* post and spec JSONs

* Split rule config to postable/gettable

* Fix empty POST /silences payload

Recreating the generated JSON specs fixes the issue
without further modifications

* better yaml unmarshaling for nested yaml docs in cortex-am configs

* regens spec

* re-adds config.receivers

* omitempty to align with prometheus API behavior

* Prefix routes with /api

* Update Alertmanager models

* Make adjustments to follow the Alertmanager API

* ruler: add for and annotations to grafana alert (#45)

* Modify testing API routes

* Fix grafana rule for field type

* Move PostableUserConfig validation to this library

* Fix PostableUserConfig YAML encoding/decoding

* Use common fields for grafana and lotex rules

* Add namespace id in GettableGrafanaRule

* Apply suggestions from code review

* fixup

* more changes

* Apply suggestions from code review

* aligns structure pre merge

* fix new imports & tests

* updates tooling readme

* goimports

* lint

* more linting!!

* revive lint

Co-authored-by: Sofia Papagiannaki <papagian@gmail.com>
Co-authored-by: Domas <domasx2@gmail.com>
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
Co-authored-by: gotjosh <josue@grafana.com>
Co-authored-by: David Parrott <stomp.box.yo@gmail.com>
Co-authored-by: Kyle Brandt <kyle@grafana.com>
2021-04-19 14:26:04 -04:00
Alexander Emelin
3e3a0a1ea1
bump jaeger-client-go to v2.27.0 (#33134) 2021-04-19 20:38:14 +03:00
Alexander Emelin
d807fbc9e9
Live: Telegraf input modifiers (#32982) 2021-04-19 18:48:43 +03:00
dependabot[bot]
33621e6f9b
Bump github.com/uber/jaeger-client-go from 2.25.0+incompatible to 2.26.0+incompatible (#33106)
* Bump github.com/uber/jaeger-client-go

Bumps [github.com/uber/jaeger-client-go](https://github.com/uber/jaeger-client-go) from 2.25.0+incompatible to 2.26.0+incompatible.
- [Release notes](https://github.com/uber/jaeger-client-go/releases)
- [Changelog](https://github.com/jaegertracing/jaeger-client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/uber/jaeger-client-go/compare/v2.25.0...v2.26.0)

Signed-off-by: dependabot[bot] <support@github.com>

* Fix go.sum

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-04-19 12:33:31 +02:00
dependabot[bot]
58380368af
Bump github.com/mattn/go-sqlite3 from 1.14.6 to 1.14.7 (#33104)
Bumps [github.com/mattn/go-sqlite3](https://github.com/mattn/go-sqlite3) from 1.14.6 to 1.14.7.
- [Release notes](https://github.com/mattn/go-sqlite3/releases)
- [Commits](https://github.com/mattn/go-sqlite3/compare/v1.14.6...v1.14.7)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-19 09:26:51 +02:00
Arve Knudsen
dbe2f1871f
Chore: Sync go.mod and go.sum (#33065)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-04-16 13:41:17 +02:00
Sofia Papagiannaki
6bbb2fd4ba
[Alerting]: Several modifications in alert rules (#32983)
* [Alerting]: Use common properties for all rules

* Add Labels in rules

* Fix update ruleGroup API

Return 400 Bad Request response
when the request contains a UID that does not exist

* Check permissions and return namespace id

* Apply suggestions from code review

Co-authored-by: gotjosh <josue@grafana.com>
2021-04-15 15:54:37 +03:00
Vardan Torosyan
9f82eac833
Access control: Add access control based permissions to admins/users (#32409)
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2021-04-14 16:31:27 +02:00
gotjosh
528ca9134b
Alerting: Use a default configuration and periodically poll for new ones (#32851)
* Alerting: Use a default configuration and periodically poll for new ones

Use a default configuration to make sure we always start the grafana
instance. Then, regularly poll for new ones.

I've also made sure that failures to apply configuration do not stop the
Grafana server but instead keep polling until it is a success.
2021-04-13 13:02:44 +01:00
dependabot[bot]
0c72f50c68
Chore(deps): Bump google.golang.org/api from 0.42.0 to 0.44.0 (#32879)
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.42.0 to 0.44.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/master/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.42.0...v0.44.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-12 13:05:35 +02:00
dependabot[bot]
dfbb11e094
Chore(deps): Bump github.com/aws/aws-sdk-go from 1.38.12 to 1.38.17 (#32880)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.38.12 to 1.38.17.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.38.12...v1.38.17)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-12 13:03:04 +02:00
dependabot[bot]
f247526d6a
Chore(deps): Bump google.golang.org/grpc from 1.36.1 to 1.37.0 (#32878)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.36.1 to 1.37.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.36.1...v1.37.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-12 11:29:59 +03:00
dependabot[bot]
d96e82d5e4
Chore(deps): Bump github.com/benbjohnson/clock from 1.0.3 to 1.1.0 (#32882)
Bumps [github.com/benbjohnson/clock](https://github.com/benbjohnson/clock) from 1.0.3 to 1.1.0.
- [Release notes](https://github.com/benbjohnson/clock/releases)
- [Commits](https://github.com/benbjohnson/clock/compare/v1.0.3...v1.1.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-12 09:56:09 +02:00
Ryan McKinley
b96e45299d
Live: support streaming results out-of-the-box (#32821) 2021-04-09 21:17:22 +02:00
Kyle Brandt
80dfa83380
AlertingNG: Add For+Annotations to Grafana_Alert (#32793)
* add db columns
* Fix deserialisation issue of AlertRule For field (#32848)
* Update to latest alerting-api

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-04-09 16:50:04 +02:00
dependabot[bot]
e9a27ca2ec
Chore(deps): Bump gonum.org/v1/gonum from 0.8.2 to 0.9.1 (#32568)
Bumps gonum.org/v1/gonum from 0.8.2 to 0.9.1.

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-08 15:47:19 +03:00
gotjosh
fe67680c42
Alerting: Allow querying of Alerts from notifications (#32614)
* Alerting: Allow querying of Alerts from notifications

* Wire everything up

* Remove unused functions

* Remove duplicate line
2021-04-08 07:27:59 -04:00
sam boyer
bba4d9bd7f
Introduce "scuemata" system for CUE-based specification of Grafana objects (#32527) 2021-04-08 01:11:11 -07:00
dependabot[bot]
acc8e78c24
Bump github.com/influxdata/influxdb-client-go/v2 from 2.2.2 to 2.2.3 (#32683)
Bumps [github.com/influxdata/influxdb-client-go/v2](https://github.com/influxdata/influxdb-client-go) from 2.2.2 to 2.2.3.
- [Release notes](https://github.com/influxdata/influxdb-client-go/releases)
- [Changelog](https://github.com/influxdata/influxdb-client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/influxdata/influxdb-client-go/compare/v2.2.2...v2.2.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-07 15:18:02 +02:00
Domas
a56293142a
Alerting: unified alerting frontend (#32708) 2021-04-07 08:42:43 +03:00
Alexander Emelin
54ad791c7e
Live: expose HTTP push endpoint that will read influx line protocol and publish to websocket (#32311)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-04-05 19:04:46 +03:00
dependabot[bot]
ec12b344df
Bump github.com/hashicorp/go-version from 1.2.1 to 1.3.0 (#32687)
Bumps [github.com/hashicorp/go-version](https://github.com/hashicorp/go-version) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/hashicorp/go-version/releases)
- [Changelog](https://github.com/hashicorp/go-version/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hashicorp/go-version/compare/v1.2.1...v1.3.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-05 13:39:49 +03:00
dependabot[bot]
6a94ca4dd2
Bump github.com/go-openapi/strfmt from 0.20.0 to 0.20.1 (#32684)
Bumps [github.com/go-openapi/strfmt](https://github.com/go-openapi/strfmt) from 0.20.0 to 0.20.1.
- [Release notes](https://github.com/go-openapi/strfmt/releases)
- [Commits](https://github.com/go-openapi/strfmt/compare/v0.20.0...v0.20.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-05 10:58:13 +03:00
dependabot[bot]
8d3b9878b2
Bump github.com/aws/aws-sdk-go from 1.38.7 to 1.38.12 (#32682)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.38.7 to 1.38.12.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.38.7...v1.38.12)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-05 09:36:22 +02:00
Alexander Emelin
93292f6eef
Live: update Streaming plugin definitions, put frame schema in subscribe result data (#32561)
Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-04-02 19:41:45 +03:00
Ryan McKinley
f67489a1f6
Chore: update centrifuge import (avoid protobuf) (#32616) 2021-04-01 21:47:04 +02:00
Sofia Papagiannaki
ee06970d72
[Alerting]: Grafana managed ruler API implementation (#32537)
* [Alerting]: Grafana managed ruler API impl

* Apply suggestions from code review

* fix lint

* Add validation for ruleGroup name length

* Fix MySQL migration

Co-authored-by: kyle <kyle@grafana.com>
2021-04-01 11:11:45 +03:00
Sofia Papagiannaki
a5e95823b2
[Alerting]: Alertmanager API implementation (#32174)
* Add validation for grafana recipient

* Alertmanager API implementation (WIP)

* Fix encoding/decoding receiver settings from/to YAML

* Save templates together with the configuration

* update POST to apply latest config

* Alertmanager service enabled by the ngalert toggle

* Silence API integration with Alertmanager

* Apply suggestions from code review

Co-authored-by: gotjosh <josue@grafana.com>
Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
2021-03-31 23:00:56 +03:00
Will Browne
6a3faad0b0
Chore: Bump grafana-aws-sdk dep to 0.4.0 (#32563) 2021-03-31 18:30:32 +02:00
Ryan McKinley
1446d094b8
API: return query results as JSON rather than base64 encoded Arrow (#32303) 2021-03-31 08:35:03 -07:00
gotjosh
433f6b91d0
Alerting: Introduce the silencing interface (#32517)
* Alerting: Introduce the silencing interface

The operations introduced are:

- Listing silences
- Retrieving an specific silence
- Deleting a silence
- Creating a silence

Signed-off-by: Josue Abreu <josue@grafana.com>

* Add a comment to listing silences

* Update to upstream alertmanager

* Remove copied code from the Alertmanager
2021-03-31 07:36:36 -04:00
Erik Sundell
f0d6f132ae
SigV4: Add support EC2 IAM role auth and possibility to toggle auth providers (#32444)
* wip: consume aws-sdk config in auth http settings

* fix typings

* use sdk regions

* use latest version of grafana/aws-sdk

* use newest sdk

* add comment

* bump sdk

* fix yarn lock file

* fix storybook issue

* upgrade aws-sdk. also use it in grafana ui

* remove not used config

* add aws-sdk as an external dep for grafana in the grafana ui rollup

Co-authored-by: Will Browne <will.browne@grafana.com>
2021-03-30 12:30:34 +02:00