Compare commits

..

160 Commits

Author SHA1 Message Date
Grot (@grafanabot)
010f20c1c8 Elasticsearch: Fix query initialization logic & query transformation from Promethous/Loki (#31322) (#31441)
* Elasticsearch: Fix query initialization logic

* Only import prometheus & loki queries as log queries

(cherry picked from commit 4429f2cf58)

Co-authored-by: Giordano Ricci <gio.ricci@grafana.com>
2021-02-24 11:29:10 +01:00
Grot (@grafanabot)
0587281d99 Streaming: Fixes an issue with time series panel and streaming data source when scrolling back from being out of view (#31431) (#31442)
* Streaming: Fixes an issue with time series panel and streaming data source when scrolling back from being out of view

* Slight tweak

(cherry picked from commit 59c060f1f1)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-02-24 11:13:40 +01:00
Grot (@grafanabot)
beff0fbda8 test: allow check for Table as well as Graph for Explore e2e flow (#31290) (#31349)
* use table for explore flow screenshot

* reverse logic

* update matchExploreTable type

(cherry picked from commit 7f8fb2b55f)

Co-authored-by: Vicky Lee <36230812+vickyyyyyyy@users.noreply.github.com>
2021-02-22 17:23:45 +00:00
Grot (@grafanabot)
d0f940c268 QueryEditor: handle query.hide changes in angular based query-editors (#31336) (#31385)
* handle query.hide changes in angular query-editors

* better comment

(cherry picked from commit 7ccba047c6)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-02-22 16:48:35 +01:00
Arve Knudsen
59b730c372 Chore: Remove gotest.tools dependency (#31391) (#31395)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit 6e549bc95d)
2021-02-22 14:20:28 +01:00
Grot (@grafanabot)
d4090a1d12 AdHocVariables: Fixes crash when values are stored as numbers (#31382) (#31386)
(cherry picked from commit 6f3088ae85)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-02-22 10:54:24 +01:00
Grot (@grafanabot)
e106dfdaad DatasourceSrv: Fix instance retrieval when datasource variable value set to "default" (#31347) (#31348)
* Failing tests

* Fixed

(cherry picked from commit 0d6e5298b7)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-02-19 12:59:46 +01:00
Grot (@grafanabot)
0423d54afd DashboardLinks: Fixes another issue where dashboard links cause full page reload (#31334) (#31343)
(cherry picked from commit 2b7628c69e)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-02-19 12:11:19 +01:00
Grot (@grafanabot)
3457c0aa76 SAML: single logout only enabled in enterprise (#31325) (#31344)
(cherry picked from commit fe74c51d68)

Co-authored-by: Leonard Gram <leo@xlson.com>
2021-02-19 10:19:22 +01:00
Grot (@grafanabot)
a41238959c LibraryPanels: Syncs panel title with name (#31311) (#31342)
(cherry picked from commit 0a4c3b8779)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-02-19 06:35:17 +01:00
Grot (@grafanabot)
111f5234a2 Table: Fixes issue with fixed min and auto max with bar gauge cell (#31316) (#31329)
(cherry picked from commit e9576853c1)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-02-18 17:26:45 +01:00
Grot (@grafanabot)
29e75ad97b Make Datetime local (No date if today) working (#31274) (#31275)
(cherry picked from commit 0253685304)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-02-17 12:39:25 +01:00
Grot (@grafanabot)
0cc1a4369a "Release: Updated versions in package to 7.4.2" (#31272) 2021-02-17 12:38:23 +01:00
Jack Westbrook
ef677f34b1 [v7.4.x] Chore: grafana-toolkit uses grafana-ui and grafana-data workspaces (#31269)
* Chore: grafana-toolkit uses grafana-ui and grafana-data workspaces (#30701)

* chore(grafana-toolkit): use workspace versions of grafana/ui and grafana/data

* chore: replace references to popperjs 1 typings with popperjs 2 typings

(cherry picked from commit 4b25310941)

* revert(grafana-toolkit): put back 7.4 version of eslint-config (2.1.0)
2021-02-17 11:05:27 +01:00
Grot (@grafanabot)
064546f382 Snapshots: Disallow anonymous user to create snapshots (#31263) (#31266)
(cherry picked from commit 8f20b13f1c)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-02-17 10:12:44 +01:00
Grot (@grafanabot)
b85da0cc0a only update usagestats every 30min (#31131) (#31262)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
(cherry picked from commit b5cbbc3db1)

Co-authored-by: Carl Bergquist <carl.bergquist@gmail.com>
2021-02-17 09:33:25 +01:00
Grot (@grafanabot)
8b4c370752 Prometheus: Fix enabling of disabled queries when editing in dashboard (#31055) (#31248)
* Fix disable bug by passing hide prop

* Make more universal fix

* Revert to original fix

* Update public/app/plugins/datasource/prometheus/components/PromQueryEditor.tsx

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
(cherry picked from commit 4f61edd28d)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-02-16 16:55:02 +01:00
Grot (@grafanabot)
44008445b8 CloudWatch: Ensure empty query row errors are not passed to the panel (#31172) (#31245)
* ensure empty errors are not passed to the panel

* make it a oneliner

(cherry picked from commit 92ae019f8e)

Co-authored-by: Erik Sundell <erik.sundell@grafana.com>
2021-02-16 16:23:17 +01:00
Grot (@grafanabot)
65d8420007 StatPanels: Fixes to palette color scheme is not cleared when loading panel (#31126) (#31246)
(cherry picked from commit b3c32277dd)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-02-16 16:09:07 +01:00
Grot (@grafanabot)
0e60372c09 QueryEditors: Fixes issue that happens after moving queries then editing would update other queries (#31193) (#31244)
(cherry picked from commit 0c3c17592e)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-02-16 16:05:02 +01:00
Grot (@grafanabot)
dafb37e819 LibraryPanels: Disconnect before connect during dashboard save (#31235) (#31238)
* LibraryPanels: Disconnect before connect during dashboard save

* Tests: fixed test

* Chore: updates after PR comments

* Chore: changes from context.Background() to c.Context.Req.Context()

* Chore: fixes lint issue

(cherry picked from commit 06e6bcf091)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-02-16 13:27:19 +01:00
Grot (@grafanabot)
170b0f329c SqlDataSources: Fixes the Show Generated SQL button in query editors (#31236) (#31239)
* SqlDataSources: Fixes the Show Generated SQL button in query editors

* No need to protect against duplicate events now that the event emitter is isolated for each editor

(cherry picked from commit e4672906f0)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-02-16 13:12:06 +01:00
Grot (@grafanabot)
1c4712aeeb Variables: Adds back default option for data source variable (#31208) (#31232)
* Variables: Adds back default option for data source variable

* Chore: updates after PR comments

(cherry picked from commit f993f2c7cc)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-02-16 07:51:01 +01:00
Grot (@grafanabot)
c4774ec6ae IPv6: Support host address configured with enclosing square brackets (#31226) (#31228)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit d27a72f859)

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-02-15 18:21:47 +01:00
Grot (@grafanabot)
dda38c55e5 Postgres: Fix timeGroup macro converts long intervals to invalid numbers when TimescaleDB is enabled (#31179) (#31224)
Fixes #27253

(cherry picked from commit d56c5285e2)

Co-authored-by: Ricky Putra <kurokochin@users.noreply.github.com>
2021-02-15 17:51:39 +01:00
Grot (@grafanabot)
d087a69e2e Remove last synchronisation field from LDAP debug view (#30984) (#31221)
* Remove last synchronisation field from LDAP debug view

* Apply review comments

(cherry picked from commit f9a293afea)

Co-authored-by: Tania B <yalyna.ts@gmail.com>
2021-02-15 17:58:18 +02:00
Torkel Ödegaard
1adce1fcfc [v7.4.x]: Sync drone config from master to stable release branch (#31213) 2021-02-15 12:26:43 +01:00
Grot (@grafanabot)
dbad6a9182 DataSourceSrv: Filter out non queryable data sources by default (#31144) (#31214)
(cherry picked from commit 50faeb3078)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-02-15 12:06:27 +01:00
Grot (@grafanabot)
3efcb19cb2 Alerting: Fix modal text for deleting obsolete notifier (#31171) (#31209)
(cherry picked from commit dde11215e9)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-02-15 11:01:51 +02:00
Grot (@grafanabot)
6e68a7ac59 Variables: Fixes missing empty elements from regex filters (#31156) (#31201)
* Variables: Fixes missing empty elements from regex filters

* Chore: cleanup comment

* Chore: removes unused import

(cherry picked from commit 39993a6884)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-02-15 06:24:57 +01:00
Grot (@grafanabot)
b0f6cf8669 DashboardLinks: Fixes links always cause full page reload (#31178) (#31181)
(cherry picked from commit 9629dded42)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-02-12 18:14:45 +01:00
Grot (@grafanabot)
e42d6931c4 DashboardListPanel: Fixes issue with folder picker always showing All and using old form styles (#31160) (#31162)
(cherry picked from commit a17661d198)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-02-12 16:36:35 +01:00
Grot (@grafanabot)
c8a7044504 Permissions: Fix team and role permissions on folders/dashboards not displayed for non Grafana Admin users (#31132) (#31176)
* Cfg: fix hidden users initialization

* add tests

* do not call isHiddenUser function for non-user permission

* do not call isHiddenUser function for non-user permission

(cherry picked from commit 7f1f559929)

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2021-02-12 16:32:35 +01:00
Grot (@grafanabot)
5f20a59b85 Prometheus: Multiply exemplars timestamp to follow api change (#31143) (#31170)
(cherry picked from commit 8c35ed4014)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-02-12 15:16:18 +01:00
Grot (@grafanabot)
07649d1313 "Release: Updated versions in package to 7.4.1" (#31128) 2021-02-11 12:08:13 +00:00
Grot (@grafanabot)
994326759e Transforms: Fixes Outer join issue with duplicate field names not getting the same unique field names as before (#31121) (#31127)
* Transformations: Fixed duplicate name issue in outer join transform

* Think this is working

* Updated tests

* Updated snapshot

* Fix broken tests (#31123)

* Fix broken tests

* Fix remaining faling tests

Co-authored-by: Giordano Ricci <gio.ricci@grafana.com>
(cherry picked from commit 699724581d)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-02-11 11:58:55 +00:00
Grot (@grafanabot)
2c3eb7ddae MuxWriter: Handle error for already closed file (#31119) (#31120)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit 7394c98d38)

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-02-11 11:06:32 +01:00
Grot (@grafanabot)
b9d92efdff Logging: sourcemap transform asset urls from CDN in logged stacktraces (#31115) (#31117)
(cherry picked from commit 5c9a10d423)

Co-authored-by: Domas <domasx2@gmail.com>
2021-02-11 11:20:11 +02:00
Grot (@grafanabot)
ba9ab09ad6 Exemplars: Change CTA style (#30880) (#31105)
* Exemplars: Change CTA style

* Address review feedbacks

* Fix table column aligning

* Minor alignments + uncontrolled component warning fix

(cherry picked from commit cc463f30a4)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-02-10 18:46:58 +01:00
Grot (@grafanabot)
14a89707e6 test: add support for timeout to be passed in for addDatasource (#30736) (#31090)
* add support for timeout to be passed in for addDatasource

* fix merge update

(cherry picked from commit 25bcbb7d8e)

Co-authored-by: Vicky Lee <36230812+vickyyyyyyy@users.noreply.github.com>
2021-02-10 15:51:21 +00:00
Andrej Ocenas
fada9fcbff Influx: Make max series limit configurable and show the limiting message if applied (#31025) (#31100)
* Add configuration in ConfigEditor and default to 1000

* Show data in explore if any even if there is an error

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

* Better handling of defaults

* Add test for runQuery to show data even with error

* Update public/app/store/configureStore.ts

Co-authored-by: Giordano Ricci <gio.ricci@grafana.com>

* Update public/app/plugins/datasource/influxdb/components/ConfigEditor.tsx

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

* Update tooltip

* Update input

* Lint fixes

* Update snapshots

* Update decorator tests

Co-authored-by: Giordano Ricci <gio.ricci@grafana.com>
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
(cherry picked from commit e0448513eb)
2021-02-10 16:01:21 +01:00
Grot (@grafanabot)
762c694092 Elasticsearch: fix log row context erroring out (#31088) (#31094)
(cherry picked from commit c7e007d199)

Co-authored-by: Giordano Ricci <gio.ricci@grafana.com>
2021-02-10 13:57:00 +00:00
Grot (@grafanabot)
02cd1faf88 test: update addDashboard flow for v7.4.0 changes (#31059) (#31084)
* update addDashboard flow for v7.4.0 changes

* remove hide flow and if around set time range

(cherry picked from commit cff6f5fec3)

Co-authored-by: Vicky Lee <36230812+vickyyyyyyy@users.noreply.github.com>
2021-02-10 12:11:07 +01:00
Grot (@grafanabot)
368bd2d7bb Usage stats: Adds source/distributor setting (#31039) (#31076)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
(cherry picked from commit d1b9fddb4f)

Co-authored-by: Carl Bergquist <carl.bergquist@gmail.com>
2021-02-10 11:08:14 +01:00
Grot (@grafanabot)
97f8bc7250 DashboardLinks: Fixes crash when link has no title (#31008) (#31050)
* DashboardLinks: Fixes crash when link misses title

* Chore: updates after PR comments

(cherry picked from commit 297ff9a168)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-02-10 06:08:11 +01:00
Grot (@grafanabot)
73f933b691 Make value mappings correctly interpret numeric-like strings (#30893) (#30912)
* Make value mappings corectly interprete numeric-like strings

* More tests

* Update packages/grafana-data/src/utils/valueMappings.ts

* Update packages/grafana-data/src/utils/valueMappings.ts

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>

* Fix issue detected by singlestat test

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
(cherry picked from commit f47b72304c)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-02-09 18:03:44 +01:00
Grot (@grafanabot)
7924e6fec6 Elasticsearch: Fix alias field value not being shown in query editor (#30992) (#31037)
* Make imports relative

* Fix Alias field value not being shown

(cherry picked from commit b46235715d)

Co-authored-by: Giordano Ricci <gio.ricci@grafana.com>
2021-02-09 17:56:04 +01:00
Grot (@grafanabot)
cefbec44fb BarGauge: Improvements to value sizing and table inner width calculations (#30990) (#31032)
* BarGauge: Increase min value width and fix height when setting manual text size

* updated snapshot

* Big improvement to bar gauge value sizing and fixing table gauge sizing

* removed unused const

* added a unit test

(cherry picked from commit 39d7ebc7d1)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-02-09 17:51:50 +01:00
Grot (@grafanabot)
a200db0d05 convert path to posix by default (#31045) (#31053)
(cherry picked from commit da3f963987)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-02-09 16:28:02 +01:00
Grot (@grafanabot)
989f6933cd Alerting: Fixes so notification channels are properly deleted (#31040) (#31046)
(cherry picked from commit f43d834a59)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-02-09 15:50:13 +01:00
Arve Knudsen
4d74e49285 Drone: Fix deployment image (#31027) (#31029)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit d963c6d868)
2021-02-09 14:05:10 +01:00
Grot (@grafanabot)
b98b3cf260 Graph: Fixes so graph is shown for non numeric time values (#30972) (#31014)
* Graph: Fixes so graph is shown for non numeric time values

* Tests: changes times to UTC

* Tests: forgot one value in time array

* GraphNG: make time series panel work with string time stamps (#30981)

* Make Time series panel work with data that time is represented as string

* Map to for

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
(cherry picked from commit bd28512d29)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-02-09 10:05:11 +01:00
Grot (@grafanabot)
9a4fe5d17f instrumentation: make the first database histogram bucket smaller (#30995) (#31001)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
(cherry picked from commit 49e394e167)

Co-authored-by: Carl Bergquist <carl.bergquist@gmail.com>
2021-02-09 09:54:13 +01:00
Grot (@grafanabot)
840b55926b Build: Releases e2e and e2e-selectors too (#31006) (#31007)
(cherry picked from commit 410ab72bc4)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-02-09 07:53:13 +01:00
Grot (@grafanabot)
7e7f90ed6c TextPanel: Fixes so panel title is updated when variables change (#30884) (#31005)
* TextPanel: Fixes so panel title is updated when variables change

* Tests: fixes tests

* Chore: updates after PR comments

(cherry picked from commit f42bb84cbf)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-02-09 06:23:22 +01:00
Grot (@grafanabot)
68597e8cfb StatPanel: Fixes issue formatting date values using unit option (#30979) (#30991)
(cherry picked from commit 907d3a2aac)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-02-08 17:24:47 +01:00
Grot (@grafanabot)
a4f8c56a0a Units: Fixes formatting of duration units (#30982) (#30986)
(cherry picked from commit 3a6af0a639)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-02-08 13:23:33 +01:00
Grot (@grafanabot)
e7ea30c8fd Elasticsearch: Show Size setting for raw_data metric (#30980) (#30983)
(cherry picked from commit 0a7c6c689f)

Co-authored-by: Giordano Ricci <gio.ricci@grafana.com>
2021-02-08 11:13:12 +00:00
Grot (@grafanabot)
b4181a077f Logging: sourcemap support for frontend stacktraces (#30590) (#30976)
(cherry picked from commit 21817055bd)

Co-authored-by: Domas <domasx2@gmail.com>
2021-02-08 12:09:34 +02:00
Grot (@grafanabot)
bc1f03403b e2e: extends selector factory to plugins (#30932) (#30934)
(cherry picked from commit 32dde95a7b)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-02-05 14:23:48 +01:00
Grot (@grafanabot)
8b79f0d7c5 Variables: Adds queryparam formatting option (#30858) (#30924)
* Variables: Adds queryparam formatting option

* Chore: fixes strict errors

* Chore: changes after PR comments

(cherry picked from commit 2a3aa95163)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-02-05 08:04:45 +01:00
Grot (@grafanabot)
8c52f69395 Exemplars: change api to reflect latest changes (#30910) (#30915)
(cherry picked from commit 48334ab863)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-02-04 20:21:26 +01:00
Grot (@grafanabot)
c2203b9859 "Release: Updated versions in package to 7.4.0" (#30898) 2021-02-04 11:11:00 +00:00
Grot (@grafanabot)
089d84cf5c DataSourceSettings: Adds info box and link to Grafana Cloud (#30891) (#30896)
* Updated

* DataSourceSettings: Adds info box and link to Grafana Cloud

* Updated wording

* Less words

* use variables

* Fixing ts issues

* fixed import

(cherry picked from commit 56ef7c4a4c)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-02-04 11:58:02 +01:00
Grot (@grafanabot)
0c3bee2530 GrafanaUI: Add a way to persistently close InfoBox (#30716) (#30895)
* GrafanaUI: Add a way to persistently close InfoBox

InfoBox and FeatureInfoBox can take up a lot of screen realestate. This makes it easy to let the user close the boxes.

* Migrate InfoBox story to controls

(cherry picked from commit 99acad4448)

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2021-02-04 11:31:31 +01:00
Peter Holmberg
403b7c6177 [7.4.x] AlertingNG: List saved Alert definitions in Alert Rule list (30890)(30603) 2021-02-04 10:34:52 +01:00
Grot (@grafanabot)
3cfa2c12db Alerting: Fixes alert panel header icon not showing (#30840) (#30885)
* Alerting: Fixes alert panel header icon not showing

* Remove as any

(cherry picked from commit 01b10ab436)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-02-04 09:18:19 +01:00
Leonard Gram
fdf52dd45c Plugins: Requests validator (#30445) (#30877)
* Introduce PluginRequestValidator abstraction with a NoOp implementation

* Update PluginRequestValidator abstraction to use the dsURL instead

* Inject PluginRequestValidator into the HTTPServer and validate requests going through data source proxy

* Inject PluginRequestValidator into the BackendPluginManager and validate requests going through it

* Validate requests going through QueryMetrics & QueryMetricsV2

* Validate BackendPluginManager health requests

* Fix backend plugins manager tests

* Validate requests going through alerting service

* Fix tests

* fix tests

* goimports

Co-authored-by: Leonard Gram <leo@xlson.com>
(cherry picked from commit 6415d2802e)

Co-authored-by: Joan López de la Franca Beltran <joanjan14@gmail.com>
2021-02-04 08:05:18 +01:00
Grot (@grafanabot)
87cb290cbd PanelLibrary: Adds library panel meta information to dashboard json (#30770) (#30883)
(cherry picked from commit 179f35a537)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-02-04 06:53:07 +01:00
Grot (@grafanabot)
39aae712cf bump grabpl version to 0.5.36 (#30874) (#30878)
* bump grabpl version to 0.5.36

* 2 missing shell script

(cherry picked from commit c24a4c1803)

Co-authored-by: ying-jeanne <74549700+ying-jeanne@users.noreply.github.com>
2021-02-03 23:20:57 +01:00
Grot (@grafanabot)
dd957acc5b Chore: remove __debug_bin (#30725) (#30857)
(cherry picked from commit e0356f7b13)

Co-authored-by: 大可 <hnlq.sysu@gmail.com>
2021-02-03 18:49:54 +02:00
Grot (@grafanabot)
b6e65e8b3c Grafana-ui: fixes closing modals with escape key (#30745) (#30873)
* feat(grafana-ui): add an escape key listener to Modal

* Update packages/grafana-ui/src/components/Modal/Modal.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* feat(grafana-ui): add closeOnEscape prop to control Modal behaviour

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
(cherry picked from commit 3066b38c5e)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-02-03 17:23:05 +01:00
Grot (@grafanabot)
5fa729804a DashboardLinks: Support variable expression in to tooltip - Issue #30409 (#30569) (#30852)
* add compile variable in tooltip link

* test(link_srv): introduce getAnchorInfo test

* test(link_srv): introduce tests for getLinkUrl

* test(link_srv): refer to anchorInfo.url rather than hardcode expected

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
(cherry picked from commit 141202f518)

Co-authored-by: Ha. Huynh Sam <huynhha12798@gmail.com>
2021-02-03 17:22:00 +01:00
Grot (@grafanabot)
299759c1ba Add alt text to plugin logos (#30710) (#30872)
(cherry picked from commit 3390c6a852)

Co-authored-by: Besart Berisha <besart.ber@gmail.com>
2021-02-03 17:17:06 +01:00
Grot (@grafanabot)
0cf5d1c561 InfluxDB: Add http configuration when selecting InfluxDB v2 flavor (#30827) (#30870)
* Add dev env block for influx2

* Add http settings to influx config

* Update devenv/docker/blocks/influxdb2/docker-compose.yaml

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
(cherry picked from commit 7db00ed6a0)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2021-02-03 17:15:54 +01:00
Grot (@grafanabot)
6a74859ca1 Prometheus: Set type of labels to string (#30831) (#30835)
(cherry picked from commit 0427df8f60)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-02-03 17:11:10 +01:00
Grot (@grafanabot)
d2dc8416f6 AlertingNG: change API permissions (#30781) (#30814)
(cherry picked from commit 5d029abc42)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-02-03 17:35:44 +02:00
Grot (@grafanabot)
bf9940b3b2 Grafana-ui: fixes no data message in Table component (#30821) (#30855)
* Wip

* fix(grafana-ui): add no data message to Table component

(cherry picked from commit 4f684cc498)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-02-03 10:29:27 +01:00
Grot (@grafanabot)
6c3abc6d01 Prometheus: Add tooltip to explain possibility to use patterns in text and title fields in annotations (#30825) (#30843)
* Add tip for using pattern

* Update public/app/plugins/datasource/prometheus/partials/annotations.editor.html

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

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit 25ef563a53)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-02-03 09:33:22 +01:00
Grot (@grafanabot)
45bad20884 Chore: add more docs annotations (#30847) (#30851)
(cherry picked from commit 3a343aa547)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-02-02 22:45:53 -08:00
Grot (@grafanabot)
a612211ce3 BarChart: inside-align strokes, upgrade uPlot to 1.6.4. (#30806) (#30846)
(cherry picked from commit b5400922e2)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-02-02 15:09:25 -06:00
Grot (@grafanabot)
1108da9574 Transforms: allow boolean in field calculations (#30802) (#30845)
(cherry picked from commit c9c7bfbcaa)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-02-02 12:51:28 -08:00
Grot (@grafanabot)
880c78f1d7 CDN: Fixes cdn path when Grafana is under sub path (#30822) (#30823)
(cherry picked from commit 64254eaa82)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-02-02 14:03:17 +01:00
Grot (@grafanabot)
22171be811 bump cypress to 6.3.0 (#30644) (#30819)
* bump cypress to 6.3.0

* fix inspect-drawer spec

* fix panelEdit_base spec

* fix select-focus spec

* Apply suggestions from code review

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>

* add be.visible assertion to new-query-variable spec to avoid flakiness

* increase waits in new-query-variable spec to avoid flakiness

* increase waits in new-query-variable spec by another 500

* remove be.visible assertion added before

* Chore: trying to fix flakiness

* skip the new-variable-query e2e test

* Chore: refactor so we might avoid flakiness

* Revert "skip the new-variable-query e2e test"

This reverts commit 203c1875c2.

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
(cherry picked from commit b8dd50c297)

Co-authored-by: Vicky Lee <36230812+vickyyyyyyy@users.noreply.github.com>
2021-02-02 11:56:39 +01:00
Grot (@grafanabot)
5428200593 Expressions: Measure total transformation requests and elapsed time (#30514) (#30789)
* Measure transformation number and elapsed time

* Change histogram to summary

* Apply suggestions from code review

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
(cherry picked from commit 2f394a219b)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-02-02 12:49:00 +02:00
Grot (@grafanabot)
a39c19dfa5 Grafana-UI: Add story/docs for ErrorBoundary (#30304) (#30811)
(cherry picked from commit eb83135ba9)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-02-02 12:05:00 +02:00
Torkel Ödegaard
9dc3574cc1 [v7.4.x]: Menu: Mark menu components as internal (#30801) 2021-02-02 10:19:59 +01:00
Grot (@grafanabot)
0f6d0f40ff Graph: Fixes auto decimals issue in legend and tooltip (#30628) (#30635)
* Graph: Fixes auto decimals issue in legend and tooltip

* Updated decimals

(cherry picked from commit f109f06485)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-02-02 09:54:17 +01:00
Grot (@grafanabot)
e489013ae1 GraphNG: Disable Plot logging by default (#30390) (#30500)
* Disable Plot loggging by default

* Fix

(cherry picked from commit ffa68f6f91)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-02-02 09:54:03 +01:00
Grot (@grafanabot)
3969177094 Storybook: Migrate card story to use controls (#30535) (#30549)
(cherry picked from commit 9c20698dfe)

Co-authored-by: Peter Holmberg <peterholmberg@users.noreply.github.com>
2021-02-02 09:53:55 +01:00
Grot (@grafanabot)
f2d07b6b8e GraphNG: add bar alignment option (#30499) (#30790)
* GraphNG: add bar alignment option

* Fix builders

(cherry picked from commit 820866e425)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-02-02 09:53:30 +01:00
Grot (@grafanabot)
2b3f48a44c Variables: Clears drop down state when leaving dashboard (#30810) (#30812)
(cherry picked from commit 6994f19d1f)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-02-02 09:37:55 +01:00
Grot (@grafanabot)
8b1c6ed1b3 Add missing callback dependency (#30797) (#30809)
(cherry picked from commit 64a1003a28)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-02-02 10:05:53 +02:00
Grot (@grafanabot)
6c9e8549ca GraphNG: improve behavior when switching between solid/dash/dots (#30796) (#30799)
(cherry picked from commit fcac59107c)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-02-01 10:07:17 -08:00
Grot (@grafanabot)
4fc57f13ab Add width for Variable Editors (#30791) (#30795)
(cherry picked from commit 76f77f86c5)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-02-01 17:12:08 +01:00
Grot (@grafanabot)
d1c95055ca Panels: Fixes so panels are refreshed when scrolling past them fast (#30784) (#30792)
(cherry picked from commit 08eee87148)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-02-01 15:25:25 +01:00
Grot (@grafanabot)
264f790728 PanelEdit: Trigger refresh when changing data source (#30744) (#30767)
(cherry picked from commit a8a3e02699)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-02-01 12:18:17 +01:00
Grot (@grafanabot)
60e7db2346 AlertingNG: Enable UI to Save Alert Definitions (#30394) (#30548)
* transform state to what the api expects

* add expr prop to dataquery

* Add evalutate field

* add refid picker to options

* minor fix to enable save

* fix  import

* more fixes after merge

* use default datasource if not changed

* replace name with title

* Change name in ui as well

* remove not used loadDataSources function

* prettier fixes

* look up datasource

* correct datasource per query model

* revert dataquery change, use expressionid const

* fix for type

* fix faulty const

* description readonly

(cherry picked from commit 529f564bd4)

Co-authored-by: Peter Holmberg <peterholmberg@users.noreply.github.com>
2021-02-01 11:49:52 +01:00
Grot (@grafanabot)
7374a963be CDN: Fix passing correct prefix to GetContentDeliveryURL (#30777) (#30779)
(cherry picked from commit 561a0a2995)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-02-01 11:42:45 +01:00
Grot (@grafanabot)
64c13cd46b CDN: Adds support for serving assets over a CDN (#30691) (#30776)
* CDN: Initial poc support for serving assets over a CDN

* Minor fix

* added build path and test

* fix lint error

* Added edition to cdn path

* Move master builds to a separate path

* Added error handling for the url parsing, changed setting name, and added docs

* Updated sample.ini

* Some property renames

* updated

* Minor update to html

* index template improvements

* Update docs/sources/administration/configuration.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>

* Added ContentDeliveryPrefix to Licence service

* updated docs

* Updated test mock

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit c04bc805b5)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-02-01 11:00:46 +01:00
Grot (@grafanabot)
5bb9731a84 Explore: Update styling of buttons (#30493) (#30508)
* Switch deprecared toggle group for radio buttons

* Create transparent version of field, label and witch

* Replace divs wiith components

* Move styling from scss to js

* Update buttons

* Remove log generating file

* Update level button

(cherry picked from commit 56fb04e94c)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-02-01 10:56:17 +01:00
Grot (@grafanabot)
836a07a670 Loki: Append refId to logs uid (#30418) (#30537)
* Append refId to Loki uid, add tests

* Fix linting

* Fix linting

* Hopefully finally fix linting errors

(cherry picked from commit 6692e1c332)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-02-01 10:28:42 +01:00
Grot (@grafanabot)
b78166f8df skip symlinks to directories when generating plugin manifest (#30721) (#30738)
(cherry picked from commit 06061c8741)

Co-authored-by: Dan Cech <dcech@grafana.com>
2021-01-29 13:43:57 -08:00
Grot (@grafanabot)
563e98d334 Mobile: Fixes issue scrolling on mobile in chrome (#30746) (#30750)
(cherry picked from commit 5e37361182)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-01-29 13:43:11 -08:00
Grot (@grafanabot)
12a9097742 BarChart: add alpha bar chart panel (#30323) (#30754)
(cherry picked from commit 26b168f7eb)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-01-29 13:42:20 -08:00
Grot (@grafanabot)
021ef24ea9 Datasource: Use json-iterator configuration compatible with standard library (#30732) (#30739)
This will make sure that any map keys in JSON is ordered in /api/ds/query response.

(cherry picked from commit f62eb28f3e)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-01-29 16:17:03 +01:00
Grot (@grafanabot)
1e8019aff5 Variables: Fixes so text format will show All instead of custom all (#30730) (#30731)
(cherry picked from commit 8744ad361b)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-01-29 09:45:55 +01:00
Grot (@grafanabot)
cd4524aba0 AlertingNG: pause/unpause definitions via the API (#30627) (#30672)
* AlertingNG: pause/unpause definitions via the API

* Apply suggestions from code review

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>

* Enable pausing/unpausing multiple definitions

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
(cherry picked from commit 1c158744e8)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-01-29 10:01:03 +02:00
Grot (@grafanabot)
a2e638352b PanelLibrary: better handling of deleted panels (#30709) (#30726)
(cherry picked from commit 0b1f5c5e32)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-01-29 06:39:42 +01:00
Grot (@grafanabot)
91f5cd23c2 Transform: improve the "outer join" performance/behavior (#30407) (#30722)
(cherry picked from commit db9a8bf04a)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-01-28 16:34:15 -08:00
Grot (@grafanabot)
7aa169af9e DashboardPicker: switch to promise-based debounce, return dashboard UID (#30706) (#30714)
* Use uid in dashboard picker

* Set both id and uid from picker

* Use debounce-promise

* Simplify logic

* Use exact package versions

(cherry picked from commit e36b035c05)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-01-28 20:12:51 +02:00
Grot (@grafanabot)
b22ecf33f1 Use connected GraphNG in Explore (#30707) (#30708)
(cherry picked from commit 78433032ab)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-01-28 14:55:35 +01:00
Grot (@grafanabot)
31df45f316 PanelLibrary: changes casing of responses and adds meta property (#30668) (#30711)
* PanelLibrary: changes casing of responses and adds meta property

* Chore: updates comments

* Chore: updates after PR comments

* Chore: changes casing of orgId

(cherry picked from commit 0a8eae2c12)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-01-28 14:52:08 +01:00
Grot (@grafanabot)
5e20794cfe DeployImage: Switch base images to Debian (#30684) (#30699)
* DeployImage: Switch base images to Debian

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit fdd6a84d82)

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-01-28 13:49:32 +01:00
Grot (@grafanabot)
b768649a10 Trace: trace to logs design update (#30637) (#30702)
* Add new icon to custom icons

* Show button in span detail

(cherry picked from commit 4147c3b907)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-01-28 12:56:42 +01:00
Grot (@grafanabot)
007efb3691 Influx: Show all datapoints for dynamically windowed flux query (#30688) (#30703)
(cherry picked from commit 1bdd3eb3dd)

Co-authored-by: David <david.kaltschmidt@gmail.com>
2021-01-28 12:16:22 +01:00
Grot (@grafanabot)
d38179bc79 ci(npm-publish): add missing github package token to env vars (#30665) (#30673)
(cherry picked from commit 54b1ce2cdb)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-01-28 09:49:56 +01:00
Ivana Huckova
05f18add0b Loki: Improve live tailing errors and fix Explore's logs container type errors (#30517) (#30681)
* If error - catch and show, if no logs - return null

* Refactor LogsContainer to use ConnectedProps

* Fix typescript error

* Remove no logs check

* Include review feedback

* Add SplitOpen type to createSpanLink and TraceView

(cherry picked from commit 347343f583)
2021-01-28 09:07:07 +01:00
Grot (@grafanabot)
b3425159e1 Grafana-UI: Fix setting default value for MultiSelect (#30671) (#30687)
* Grafana-ui: Default value to undefned vs empty array

* Grafana-ui: Remove log

* Grafana-ui: Update tests

(cherry picked from commit aad7d495ec)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-01-28 09:39:00 +02:00
Grot (@grafanabot)
89d5428954 Explore: Fix jumpy live tailing (#30650) (#30677)
* Fix jumpy live tailing

* Fix test

(cherry picked from commit e34d9e1c32)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-01-27 16:41:54 +01:00
Grot (@grafanabot)
844c5a14e8 Docs: Refer to product docs in whats new for alerting templating feature (#30652) (#30670)
* Docs: Refer to product docs in whats new for alerting templating feature

* move link below image

* remove whitespace

(cherry picked from commit bdf00d3a59)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-01-27 15:25:58 +01:00
Grot (@grafanabot)
7d670ee7e1 Variables: Fixes display value when using capture groups in regex (#30636) (#30661)
* Variables: Fixes display value for variables with regex

* Chore: adds a test for getAllMatches

(cherry picked from commit b5d7f1e7d8)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-01-27 07:13:17 +01:00
Grot (@grafanabot)
b6acd8b685 Docs: Fix expressions enabled description (#30589) (#30651)
(cherry picked from commit 94a29759ab)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-01-26 10:16:44 -08:00
Grot (@grafanabot)
b4cc173235 Licensing Docs: Adding license restrictions docs (#30216) (#30648)
(cherry picked from commit 12a7b342b9)

Co-authored-by: Vardan Torosyan <vardants@gmail.com>
2021-01-26 18:22:16 +01:00
Grot (@grafanabot)
0664013253 DashboardSettings: fixes vertical scrolling (#30640) (#30643)
* fix(dashboardsettings): allow view to scroll vertically

* refactor(dashboardsettings): use theme bg colour instead of palette colour

(cherry picked from commit aaa6ebb231)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-01-26 16:01:57 +01:00
Jack Westbrook
365c008d70 chore: bump redux toolkit to 1.5.0 for immer 8.0.1 vulnerability fix (#30605) (#30631)
(cherry picked from commit 10aabe8ce3)
2021-01-26 14:08:34 +01:00
Grot (@grafanabot)
ca6a767dc0 Explore: Fix loading visualisation on the top of the new time series panel (#30553) (#30557)
* Fix loading for time series graph panel

* Fix test by adding loading prop to dummyProps

(cherry picked from commit 5d52e50f6f)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-01-26 13:48:24 +01:00
Grot (@grafanabot)
aadbb1ebf4 Footer: Fixes layout issue in footer (#30443) (#30494)
* Footer: Fixes missing icon issue causing footer layout issue

* Another fix

(cherry picked from commit 5c8d662bfc)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-01-26 13:47:45 +01:00
Grot (@grafanabot)
3875ae2319 Variables: Fixes so queries work for numbers values too (#30602) (#30624)
* Variables: Fixes so queries work for numbers values too

* Chore: refactor after PR comments

(cherry picked from commit fad81e1696)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-01-26 09:06:14 +01:00
Grot (@grafanabot)
5052887efb Admin: Fixes so form values are filled in from backend (#30544) (#30623)
* Admin: Fixes so form values are filled in from backend

* Chore: tidy up the imports

(cherry picked from commit a8056e2c9d)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-01-26 08:09:20 +01:00
Grot (@grafanabot)
3e02e2c12c Docs: Update 7.4 What's New to use more correct description of alerting notification template feature (#30502) (#30614)
* use more correct description of feature

* reference variable templating

* add word

(cherry picked from commit ad7d75c14d)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-01-25 11:41:05 -08:00
Grot (@grafanabot)
c6df872d4a NodeGraph: Add docs (#30504) (#30613)
* Add draft docs

* Update node-graph.md

* Update whats-new-in-v7-4.md

* Update images and add x-ray link

* Update docs/sources/panels/visualizations/node-graph.md

* Update docs/sources/panels/visualizations/node-graph.md

* Update node-graph.md

* Add definition of node and edge

* Update docs/sources/panels/visualizations/node-graph.md

* Update docs/sources/panels/visualizations/node-graph.md

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
(cherry picked from commit abf2410d16)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2021-01-25 11:19:02 -08:00
Grot (@grafanabot)
e1f512181f Cloud Monitoring: Fix legend naming with display name override (#30440) (#30503)
* Cloud Monitoring: Fix legend naming with display name override

* include MQL queries

* cover all bases

* refactor

(cherry picked from commit 7562c6749d)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-01-25 20:17:16 +01:00
Grot (@grafanabot)
fcfb12d0b3 Expressions: Add option to disable feature (#30541) (#30558)
* Expressions: Add option to disable feature

* Apply suggestions from code review

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit 9ada4b6052)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-01-25 15:58:52 +02:00
Grot (@grafanabot)
7592031b36 OldGraph: Fix height issue in Firefox (#30565) (#30582)
(cherry picked from commit 15683319e0)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-01-25 08:40:28 +01:00
Grot (@grafanabot)
77e924295b XY Chart: fix editor error with empty frame (no fields) (#30573) (#30577)
(cherry picked from commit 08312897c8)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-01-24 08:59:39 -08:00
Grot (@grafanabot)
5a07677422 XY Chart: share legend config with timeseries (#30559) (#30566)
(cherry picked from commit 8c1a79f24b)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-01-22 15:20:12 -08:00
Grot (@grafanabot)
b6a9ef0919 DataFrame: cache frame/field index in field state (#30529) (#30560)
(cherry picked from commit f2327baf66)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-01-22 10:46:41 -08:00
Grot (@grafanabot)
b31aed4283 Prometheus: Fix show query instead of Value if no __name__ and metric (#30511) (#30556)
Fixes #29466

(cherry picked from commit 38c1d45035)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-01-22 18:31:06 +01:00
Grot (@grafanabot)
045f4f4f4a Decimals: Big Improvements to auto decimals and fixes to auto decimals bug found in 7.4-beta1 (#30519) (#30550)
* Decimals: Nukes scaledDecimals from the earth it was an abomination

* Moved move tests

* Fixed test

* Updated tests

* Updated test

(cherry picked from commit 6bdc9fac45)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-01-22 17:16:23 +01:00
Jack Westbrook
14d44553c5 chore: update packages dependent on dot-prop to fix security vulnerability (#30432) (#30487)
(cherry picked from commit e4d8cdfcdf)
2021-01-22 10:18:59 +01:00
Grot (@grafanabot)
f02dd1c6aa GraphNG: uPlot 1.6.3 (fix bands not filling below 0). close #30523. (#30527) (#30528)
(cherry picked from commit 92a0ad7273)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-01-21 20:40:58 -08:00
Grot (@grafanabot)
13f4755ac2 GraphNG: uPlot 1.6.2 (#30521) (#30522)
(cherry picked from commit 87ef5598e6)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-01-21 18:21:26 -06:00
Grot (@grafanabot)
18bcbc4903 Chore: Upgrade grabpl version (#30486) (#30513)
(cherry picked from commit bb1f84dbc7)

Co-authored-by: Tania B <yalyna.ts@gmail.com>
2021-01-21 19:28:03 +02:00
Grot (@grafanabot)
db9ec5ccae grafana/ui: Fix internal import from grafana/data (#30439) (#30507)
(cherry picked from commit c7e6d14d34)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2021-01-21 17:58:43 +01:00
Grot (@grafanabot)
6b8e230f45 prevent field config from being overwritten (#30437) (#30442)
(cherry picked from commit d9d27340b5)

Co-authored-by: Erik Sundell <erik.sundell@grafana.com>
2021-01-21 15:50:50 +01:00
Grot (@grafanabot)
5abe8852c1 Chore: upgrade NPM security vulnerabilities (#30397) (#30495)
* chore: bump serialize-javascript dependents to use 3.1.0+

* chore: manually bump is-my-json-valid to 2.20.5

* chore: resolve kind-of@6 to 6.0.3

* chore: bump webpack-dev-server to solve faye-websocket vulnerability

(cherry picked from commit 930c19eb09)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-01-21 15:29:43 +01:00
Grot (@grafanabot)
8b9cb9d034 TimeSeriesPanel: Fixed default value for gradientMode (#30484) (#30492)
(cherry picked from commit 59ef36812e)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-01-21 14:24:38 +01:00
Grot (@grafanabot)
804c3a9be0 Admin: Fixes so whole org drop down is visible when adding users to org (#30481) (#30497)
* Modal: Admin: Fixes so whole org drop down is visible

* Tests: fixes failing tests

* Chore: cleans up the return type

* Chore: changes after PR comments

* Chore: changes after PR comments

(cherry picked from commit ffd39933d4)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-01-21 14:19:56 +01:00
Grot (@grafanabot)
648efa9391 Chore: adds wait to e2e test (#30488) (#30490)
(cherry picked from commit de511b0f48)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-01-21 12:55:52 +01:00
Grot (@grafanabot)
83f0acfc03 Graph: Fixes so only users with correct permissions can add annotations (#30419) (#30466)
* Graph: Fixes so only users with edit permissions can add annotations

* Tests: corrects test message text

* Chore: changes after PR comments

(cherry picked from commit e1243e07ca)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-01-21 08:25:39 +01:00
Grot (@grafanabot)
88c70cd762 Alerting: Hides threshold handle for percentual thresholds (#30431) (#30467)
(cherry picked from commit 98406d6c42)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-01-21 08:03:42 +01:00
Grot (@grafanabot)
fed65b983a Timeseries: only migrage point size when configured (#30461) (#30470)
(cherry picked from commit 2ec4784190)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-01-21 07:49:26 +01:00
Grot (@grafanabot)
39c5f1705e Expressions: Fix button icon (#30444) (#30450)
(cherry picked from commit b9fd4dba36)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-01-21 06:06:22 +01:00
Grot (@grafanabot)
45f71a94f8 PanelModel: Make sure the angular options are passed to react panel type changed handler (#30441) (#30451)
(cherry picked from commit 05e37e9253)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-01-21 06:05:58 +01:00
Grot (@grafanabot)
18f5bb15b7 Docs: Fix img link for alert notification template (#30436) (#30447)
* fix img link

* update image name

(cherry picked from commit 0c67ceadb8)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-01-21 05:59:10 +01:00
Grot (@grafanabot)
594733024a Chore: Upgrade build pipeline tool (#30456) (#30457)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit bd71eb23df)

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-01-20 22:04:00 +01:00
Grot (@grafanabot)
f666d108b4 PanelOptions: Refactoring applying panel and field options out of PanelModel and add property clean up for properties not in field config registry (#30389) (#30438)
* PanelOptions: Refactoring on applying panel and field options from PanelModel

* Progress

* Filtering out props

* downgraded prettier

* Fixes

* Initial simple remember and restore for custom and overrides

* clearing custom options and overrides and restoring works

* actually use the function

* Added type for options cache

* minor fix

* Updated with new prettier

* Added old field config to panel type change handler

* Update public/app/features/dashboard/state/getPanelOptionsWithDefaults.test.ts

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
(cherry picked from commit 15033d0011)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-01-20 18:27:19 +01:00
Grot (@grafanabot)
228d804962 "Release: Updated versions in package to 7.4.0-beta.1" (#30427) 2021-01-20 11:09:55 +00:00
Giordano Ricci
e9242cf546 Chore: Update what's new URL (#30423) 2021-01-20 10:51:35 +00:00
1194 changed files with 21394 additions and 45147 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -11,7 +11,8 @@
"overrides": [
{
"files": [
"packages/grafana-ui/src/components/uPlot/**/*.{ts,tsx}",
"packages/grafana-ui/**/*/!(*.story).{ts,tsx}",
"packages/jaeger-ui-components/**/*.{ts,tsx,js}",
"public/app/**/*.{ts,tsx}"
],
"rules": {

15
.github/CODEOWNERS vendored
View File

@@ -22,15 +22,6 @@
go.mod @grafana/backend-platform
go.sum @grafana/backend-platform
#Cloud Datasources backend code
/pkg/tsdb/cloudwatch @grafana/cloud-datasources
/pkg/tsdb/azuremonitor @grafana/cloud-datasources
/pkg/tsdb/cloudmonitoring @grafana/cloud-datasources
# Database migrations
/pkg/services/sqlstore/migrations @grafana/backend-platform @grafana/hosted-grafana-team
*_mig.go @grafana/backend-platform @grafana/hosted-grafana-team
# Backend code docs
/contribute/style-guides/backend.md @grafana/backend-platform
@@ -57,9 +48,9 @@ lerna.json @grafana/grafana-frontend-platform
/packages/jaeger-ui-components/ @grafana/observability-squad
# Core datasources
/public/app/plugins/datasource/cloudwatch @grafana/cloud-datasources @grafana/observability-squad
/public/app/plugins/datasource/cloudwatch @grafana/backend-platform @grafana/observability-squad
/public/app/plugins/datasource/elasticsearch @grafana/observability-squad
/public/app/plugins/datasource/grafana-azure-monitor-datasource @grafana/cloud-datasources
/public/app/plugins/datasource/grafana-azure-monitor-datasource @grafana/backend-platform
/public/app/plugins/datasource/graphite @grafana/observability-squad
/public/app/plugins/datasource/influxdb @grafana/observability-squad
/public/app/plugins/datasource/jaeger @grafana/observability-squad
@@ -69,7 +60,7 @@ lerna.json @grafana/grafana-frontend-platform
/public/app/plugins/datasource/opentsdb @grafana/backend-platform
/public/app/plugins/datasource/postgres @grafana/backend-platform
/public/app/plugins/datasource/prometheus @grafana/observability-squad
/public/app/plugins/datasource/cloud-monitoring @grafana/cloud-datasources
/public/app/plugins/datasource/cloud-monitoring @grafana/backend-platform
/public/app/plugins/datasource/zipkin @grafana/observability-squad
# Cloud middleware

View File

@@ -35,7 +35,7 @@
"action": "updateLabels",
"addLabel": "needs more info",
"removeLabel": "bot/needs more info",
"comment": "Thanks for creating this issue! We think it's missing some basic information. \r\n\r\nFollow the issue template and add additional information that will help us replicate the problem. \r\nFor data visualization issues: \r\n- Query results from the inspect drawer (data tab & query inspector)\r\n- Panel settings can be extracted in the panel inspect drawer JSON tab\r\n\r\nFor dashboard related issues: \r\n- Dashboard JSON can be found in the dashboard settings JSON model view\r\n\r\nFor authentication, provisioning and alerting issues, Grafana server logs are useful. \r\n\r\nHappy graphing!"
"comment": "Thanks for creating this issue! We think it's missing some basic information. \r\n\r\nFollow the issue template and add additional information that will help us replicate the problem. \r\nFor data visualization issues: \r\n- Query results from the inspect drawer (data tab & query inspector)\r\n- Panel settings can be extracted in the panel inspect drawer JSON tab\r\n\r\nFor dashboard related issues: \r\n- Dashboard JSON can be found in the dashboard settings JSON model view\r\n\r\nFor authentication and alerting issues, Grafana server logs are useful. \r\n\r\nHappy graphing!"
},
{
"type": "label",

View File

@@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v1
- run: git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.GH_BOT_ACCESS_TOKEN }}@github.com/grafana/website-sync ./.github/actions/website-sync
- uses: actions/cache@v2.1.4
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

1
.gitignore vendored
View File

@@ -15,7 +15,6 @@ awsconfig
.yarnrc
.yarn/
vendor/
/docs/menu.yaml
# Enterprise emails
/emails/templates/enterprise_*

View File

@@ -7,5 +7,3 @@ public/vendor/
vendor/
data/
e2e/tmp
public/build/
devenv/

View File

@@ -1,136 +1,20 @@
<!-- 7.4.3 START -->
# 7.4.3 (2021-02-24)
### Bug fixes
* **AdHocVariables**: Fixes crash when values are stored as numbers. [#31382](https://github.com/grafana/grafana/pull/31382), [@hugohaggmark](https://github.com/hugohaggmark)
* **DashboardLinks**: Fix an issue where the dashboard links were causing a full page reload. [#31334](https://github.com/grafana/grafana/pull/31334), [@torkelo](https://github.com/torkelo)
* **Elasticsearch**: Fix query initialization logic & query transformation from Prometheus/Loki. [#31322](https://github.com/grafana/grafana/pull/31322), [@Elfo404](https://github.com/Elfo404)
* **QueryEditor**: Fix disabling queries in dashboards. [#31336](https://github.com/grafana/grafana/pull/31336), [@gabor](https://github.com/gabor)
* **Streaming**: Fix an issue with the time series panel and streaming data source when scrolling back from being out of view. [#31431](https://github.com/grafana/grafana/pull/31431), [@torkelo](https://github.com/torkelo)
* **Table**: Fix an issue regarding the fixed min and auto max values in bar gauge cell. [#31316](https://github.com/grafana/grafana/pull/31316), [@torkelo](https://github.com/torkelo)
<!-- 7.4.3 END -->
<!-- 7.4.2 START -->
# 7.4.2 (2021-02-17)
### Features and enhancements
* **Explore**: Do not show non queryable data sources in data source picker. [#31144](https://github.com/grafana/grafana/pull/31144), [@torkelo](https://github.com/torkelo)
* **Snapshots**: Do not allow an anonymous user to create snapshots. [#31263](https://github.com/grafana/grafana/pull/31263), [@marefr](https://github.com/marefr)
### Bug fixes
* **CloudWatch**: Ensure empty query row errors are not passed to the panel. [#31172](https://github.com/grafana/grafana/pull/31172), [@sunker](https://github.com/sunker)
* **DashboardLinks**: Fix the links that always cause a full page to reload. [#31178](https://github.com/grafana/grafana/pull/31178), [@torkelo](https://github.com/torkelo)
* **DashboardListPanel**: Fix issue with folder picker always showing All and using old form styles. [#31160](https://github.com/grafana/grafana/pull/31160), [@torkelo](https://github.com/torkelo)
* **IPv6**: Support host address configured with enclosing square brackets. [#31226](https://github.com/grafana/grafana/pull/31226), [@aknuds1](https://github.com/aknuds1)
* **Permissions**: Fix team and role permissions on folders/dashboards not displayed for non Grafana Admin users. [#31132](https://github.com/grafana/grafana/pull/31132), [@AgnesToulet](https://github.com/AgnesToulet)
* **Postgres**: Fix timeGroup macro converts long intervals to invalid numbers when TimescaleDB is enabled. [#31179](https://github.com/grafana/grafana/pull/31179), [@kurokochin](https://github.com/kurokochin)
* **Prometheus**: Fix enabling of disabled queries when editing in dashboard. [#31055](https://github.com/grafana/grafana/pull/31055), [@ivanahuckova](https://github.com/ivanahuckova)
* **QueryEditors**: Fix an issue that happens after moving queries then editing would update other queries. [#31193](https://github.com/grafana/grafana/pull/31193), [@torkelo](https://github.com/torkelo)
* **SqlDataSources**: Fix the Show Generated SQL button in query editors. [#31236](https://github.com/grafana/grafana/pull/31236), [@torkelo](https://github.com/torkelo)
* **StatPanels**: Fix an issue where the palette color scheme is not cleared when loading panel. [#31126](https://github.com/grafana/grafana/pull/31126), [@torkelo](https://github.com/torkelo)
* **Variables**: Add the default option back for the data source variable. [#31208](https://github.com/grafana/grafana/pull/31208), [@hugohaggmark](https://github.com/hugohaggmark)
* **Variables**: Fix missing empty elements from regex filters. [#31156](https://github.com/grafana/grafana/pull/31156), [@hugohaggmark](https://github.com/hugohaggmark)
<!-- 7.4.2 END -->
<!-- v7.4.2 START -->
<!-- v7.4.2 END -->
<!-- 7.4.1 START -->
# 7.4.1 (2021-02-11)
### Features and enhancements
* **Influx**: Make max series limit configurable and show the limiting message if applied. [#31025](https://github.com/grafana/grafana/pull/31025), [@aocenas](https://github.com/aocenas)
* **Make value mappings correctly interpret numeric-like strings**. [#30893](https://github.com/grafana/grafana/pull/30893), [@dprokop](https://github.com/dprokop)
* **Variables**: Adds queryparam formatting option. [#30858](https://github.com/grafana/grafana/pull/30858), [@hugohaggmark](https://github.com/hugohaggmark)
### Bug fixes
* **Alerting**: Fixes so notification channels are properly deleted. [#31040](https://github.com/grafana/grafana/pull/31040), [@hugohaggmark](https://github.com/hugohaggmark)
* **BarGauge**: Improvements to value sizing and table inner width calculations. [#30990](https://github.com/grafana/grafana/pull/30990), [@torkelo](https://github.com/torkelo)
* **DashboardLinks**: Fixes crash when link has no title. [#31008](https://github.com/grafana/grafana/pull/31008), [@hugohaggmark](https://github.com/hugohaggmark)
* **Elasticsearch**: Fix alias field value not being shown in query editor. [#30992](https://github.com/grafana/grafana/pull/30992), [@Elfo404](https://github.com/Elfo404)
* **Elasticsearch**: Fix log row context errors. [#31088](https://github.com/grafana/grafana/pull/31088), [@Elfo404](https://github.com/Elfo404)
* **Elasticsearch**: Show Size setting for raw_data metric. [#30980](https://github.com/grafana/grafana/pull/30980), [@Elfo404](https://github.com/Elfo404)
* **Graph**: Fixes so graph is shown for non numeric time values. [#30972](https://github.com/grafana/grafana/pull/30972), [@hugohaggmark](https://github.com/hugohaggmark)
* **Logging**: Ignore 'file already closed' error when closing file. [#31119](https://github.com/grafana/grafana/pull/31119), [@aknuds1](https://github.com/aknuds1)
* **Plugins**: Fix plugin signature validation for manifest v2 on Windows. [#31045](https://github.com/grafana/grafana/pull/31045), [@wbrowne](https://github.com/wbrowne)
* **TextPanel**: Fixes so panel title is updated when variables change. [#30884](https://github.com/grafana/grafana/pull/30884), [@hugohaggmark](https://github.com/hugohaggmark)
* **Transforms**: Fixes Outer join issue with duplicate field names not getting the same unique field names as before. [#31121](https://github.com/grafana/grafana/pull/31121), [@torkelo](https://github.com/torkelo)
<!-- 7.4.1 END -->
<!-- 7.4.0 START -->
# 7.4.0 (2021-02-04)
### Features and enhancements
* **CDN**: Adds support for serving assets over a CDN. [#30691](https://github.com/grafana/grafana/pull/30691), [@torkelo](https://github.com/torkelo)
* **DashboardLinks**: Support variable expression in to tooltip - Issue #30409. [#30569](https://github.com/grafana/grafana/pull/30569), [@huynhsamha](https://github.com/huynhsamha)
* **Explore**: Set Explore's GraphNG to be connected. [#30707](https://github.com/grafana/grafana/pull/30707), [@ivanahuckova](https://github.com/ivanahuckova)
* **InfluxDB**: Add http configuration when selecting InfluxDB v2 flavor. [#30827](https://github.com/grafana/grafana/pull/30827), [@aocenas](https://github.com/aocenas)
* **InfluxDB**: Show all datapoints for dynamically windowed flux query. [#30688](https://github.com/grafana/grafana/pull/30688), [@davkal](https://github.com/davkal)
* **Loki**: Improve live tailing errors. [#30517](https://github.com/grafana/grafana/pull/30517), [@ivanahuckova](https://github.com/ivanahuckova)
### Bug fixes
* **Admin**: Fixes so form values are filled in from backend. [#30544](https://github.com/grafana/grafana/pull/30544), [@hugohaggmark](https://github.com/hugohaggmark)
* **Admin**: Fixes so whole org drop down is visible when adding users to org. [#30481](https://github.com/grafana/grafana/pull/30481), [@hugohaggmark](https://github.com/hugohaggmark)
* **Alerting**: Hides threshold handle for percentual thresholds. [#30431](https://github.com/grafana/grafana/pull/30431), [@hugohaggmark](https://github.com/hugohaggmark)
* **CloudWatch**: Prevent field config from being overwritten. [#30437](https://github.com/grafana/grafana/pull/30437), [@sunker](https://github.com/sunker)
* **Decimals**: Big Improvements to auto decimals and fixes to auto decimals bug found in 7.4-beta1. [#30519](https://github.com/grafana/grafana/pull/30519), [@torkelo](https://github.com/torkelo)
* **Explore**: Fix jumpy live tailing. [#30650](https://github.com/grafana/grafana/pull/30650), [@ivanahuckova](https://github.com/ivanahuckova)
* **Explore**: Fix loading visualisation on the top of the new time series panel. [#30553](https://github.com/grafana/grafana/pull/30553), [@ivanahuckova](https://github.com/ivanahuckova)
* **Footer**: Fixes layout issue in footer. [#30443](https://github.com/grafana/grafana/pull/30443), [@torkelo](https://github.com/torkelo)
* **Graph**: Fixes so only users with correct permissions can add annotations. [#30419](https://github.com/grafana/grafana/pull/30419), [@hugohaggmark](https://github.com/hugohaggmark)
* **Mobile**: Fixes issue scrolling on mobile in chrome. [#30746](https://github.com/grafana/grafana/pull/30746), [@torkelo](https://github.com/torkelo)
* **PanelEdit**: Trigger refresh when changing data source. [#30744](https://github.com/grafana/grafana/pull/30744), [@torkelo](https://github.com/torkelo)
* **Panels**: Fixes so panels are refreshed when scrolling past them fast. [#30784](https://github.com/grafana/grafana/pull/30784), [@hugohaggmark](https://github.com/hugohaggmark)
* **Prometheus**: Fix show query instead of Value if no __name__ and metric. [#30511](https://github.com/grafana/grafana/pull/30511), [@zoltanbedi](https://github.com/zoltanbedi)
* **TimeSeriesPanel**: Fixes default value for Gradient mode. [#30484](https://github.com/grafana/grafana/pull/30484), [@torkelo](https://github.com/torkelo)
* **Variables**: Clears drop down state when leaving dashboard. [#30810](https://github.com/grafana/grafana/pull/30810), [@hugohaggmark](https://github.com/hugohaggmark)
* **Variables**: Fixes display value when using capture groups in regex. [#30636](https://github.com/grafana/grafana/pull/30636), [@hugohaggmark](https://github.com/hugohaggmark)
* **Variables**: Fixes so queries work for numbers values too. [#30602](https://github.com/grafana/grafana/pull/30602), [@hugohaggmark](https://github.com/hugohaggmark)
* **Variables**: Fixes so text format will show All instead of custom all value. [#30730](https://github.com/grafana/grafana/pull/30730), [@hugohaggmark](https://github.com/hugohaggmark)
### Plugin development fixes & changes
* **Plugins**: Fix failing plugin builds because of wrong internal import. [#30439](https://github.com/grafana/grafana/pull/30439), [@aocenas](https://github.com/aocenas)
<!-- 7.4.0 END -->
<!-- 7.4.0-beta1 START -->
# 7.4.0-beta1 (2021-01-20)
# 7.4.0-beta1 (unreleased)
### Features and enhancements
* **API**: Add ID to snapshot API responses. [#29600](https://github.com/grafana/grafana/pull/29600), [@AgnesToulet](https://github.com/AgnesToulet)
* **AlertListPanel**: Add options to sort by Time(asc) and Time(desc). [#29764](https://github.com/grafana/grafana/pull/29764), [@dboslee](https://github.com/dboslee)
* **AlertListPanel**: Changed alert url to to go the panel view instead of panel edit. [#29060](https://github.com/grafana/grafana/pull/29060), [@zakiharis](https://github.com/zakiharis)
* **Alerting**: Add support for Sensu Go notification channel. [#28012](https://github.com/grafana/grafana/pull/28012), [@nixwiz](https://github.com/nixwiz)
* **Alerting**: Add support for alert notification query label interpolation. [#29908](https://github.com/grafana/grafana/pull/29908), [@wbrowne](https://github.com/wbrowne)
* **Annotations**: Remove annotation_tag entries as part of annotations cleanup. [#29534](https://github.com/grafana/grafana/pull/29534), [@dafydd-t](https://github.com/dafydd-t)
* **Azure Monitor**: Add Microsoft.Network/natGateways. [#29479](https://github.com/grafana/grafana/pull/29479), [@JoeyLemur](https://github.com/JoeyLemur)
* **Backend plugins**: Support Forward OAuth Identity for backend data source plugins. [#27055](https://github.com/grafana/grafana/pull/27055), [@billoley](https://github.com/billoley)
* **Cloud Monitoring**: MQL support. [#26551](https://github.com/grafana/grafana/pull/26551), [@mtanda](https://github.com/mtanda)
* **CloudWatch**: Add 'EventBusName' dimension to CloudWatch 'AWS/Events' namespace. [#28402](https://github.com/grafana/grafana/pull/28402), [@tomdaly](https://github.com/tomdaly)
* **CloudWatch**: Add support for AWS DirectConnect ConnectionErrorCount metric. [#29583](https://github.com/grafana/grafana/pull/29583), [@haeringer](https://github.com/haeringer)
* **CloudWatch**: Add support for AWS/ClientVPN metrics and dimensions. [#29055](https://github.com/grafana/grafana/pull/29055), [@marefr](https://github.com/marefr)
* **CloudWatch**: Added HTTP API Gateway specific metrics and dimensions. [#28780](https://github.com/grafana/grafana/pull/28780), [@karlatkinson](https://github.com/karlatkinson)
* **Configuration**: Add an option to hide certain users in the UI. [#28942](https://github.com/grafana/grafana/pull/28942), [@AgnesToulet](https://github.com/AgnesToulet)
* **Currency**: Adds Indonesian IDR currency. [#28363](https://github.com/grafana/grafana/pull/28363), [@hiddenrebel](https://github.com/hiddenrebel)
* **Dashboards**: Delete related data (permissions, stars, tags, versions, annotations) when deleting a dashboard or a folder. [#28826](https://github.com/grafana/grafana/pull/28826), [@AgnesToulet](https://github.com/AgnesToulet)
* **Dependencies**: Update angularjs to 1.8.2. [#28736](https://github.com/grafana/grafana/pull/28736), [@torkelo](https://github.com/torkelo)
@@ -146,16 +30,12 @@
* **Field overrides**: Added matcher to match all fields returned by a specific query. [#28872](https://github.com/grafana/grafana/pull/28872), [@mckn](https://github.com/mckn)
* **Graph**: Add support for spline interpolation (smoothing) added in new time series panel. [#4303](https://github.com/grafana/grafana/issues/4303)
* **Instrumentation**: Add histograms for database queries. [#29662](https://github.com/grafana/grafana/pull/29662), [@dafydd-t](https://github.com/dafydd-t)
* **Jaeger**: Remove browser access mode. [#30349](https://github.com/grafana/grafana/pull/30349), [@zoltanbedi](https://github.com/zoltanbedi)
* **LogsPanel**: Don't show scroll bars when not needed. [#28972](https://github.com/grafana/grafana/pull/28972), [@aocenas](https://github.com/aocenas)
* **Loki**: Add query type and line limit to query editor in dashboard. [#29356](https://github.com/grafana/grafana/pull/29356), [@ivanahuckova](https://github.com/ivanahuckova)
* **Loki**: Add query type selector to query editor in Explore. [#28817](https://github.com/grafana/grafana/pull/28817), [@ivanahuckova](https://github.com/ivanahuckova)
* **Loki**: Retry web socket connection when connection is closed abnormally. [#29438](https://github.com/grafana/grafana/pull/29438), [@ivanahuckova](https://github.com/ivanahuckova)
* **MS SQL**: Integrated security. [#30369](https://github.com/grafana/grafana/pull/30369), [@daniellee](https://github.com/daniellee)
* **Middleware**: Add CSP support. [#29740](https://github.com/grafana/grafana/pull/29740), [@aknuds1](https://github.com/aknuds1)
* **OAuth**: Configurable user name attribute. [#28286](https://github.com/grafana/grafana/pull/28286), [@alexanderzobnin](https://github.com/alexanderzobnin)
* **PanelEditor**: Render panel field config categories as separate option group sections. [#30301](https://github.com/grafana/grafana/pull/30301), [@dprokop](https://github.com/dprokop)
* **Postgres**: SSL certification. [#30352](https://github.com/grafana/grafana/pull/30352), [@ying-jeanne](https://github.com/ying-jeanne)
* **Prometheus**: Add support for Exemplars. [#28057](https://github.com/grafana/grafana/pull/28057), [@zoltanbedi](https://github.com/zoltanbedi)
* **Prometheus**: Improve autocomplete performance and remove disabling of dynamic label lookup. [#30199](https://github.com/grafana/grafana/pull/30199), [@ivanahuckova](https://github.com/ivanahuckova)
* **Prometheus**: Update default query type option to "Both" in Explore query editor. [#28935](https://github.com/grafana/grafana/pull/28935), [@ivanahuckova](https://github.com/ivanahuckova)
@@ -168,15 +48,12 @@
* **Templating**: Custom variable edit UI, change options input into textarea. [#28322](https://github.com/grafana/grafana/pull/28322), [@darrylsepeda](https://github.com/darrylsepeda)
* **TimeSeriesPanel**: The new graph panel now supports y-axis value mapping. [#30272](https://github.com/grafana/grafana/pull/30272), [@torkelo](https://github.com/torkelo)
* **Tracing**: Tag spans with user login and datasource name instead of id. [#29183](https://github.com/grafana/grafana/pull/29183), [@bergquist](https://github.com/bergquist)
* **Transformations**: Add "Rename By Regex" transformer. [#29281](https://github.com/grafana/grafana/pull/29281), [@simianhacker](https://github.com/simianhacker)
* **Transformations**: Added new transform for excluding and including rows based on their values. [#26884](https://github.com/grafana/grafana/pull/26884), [@Totalus](https://github.com/Totalus)
* **Transforms**: Add sort by transformer. [#30370](https://github.com/grafana/grafana/pull/30370), [@ryantxu](https://github.com/ryantxu)
* **Variables**: Add deprecation warning for value group tags. [#30160](https://github.com/grafana/grafana/pull/30160), [@torkelo](https://github.com/torkelo)
* **Variables**: Added __user.email to global variable. [#28853](https://github.com/grafana/grafana/pull/28853), [@mckn](https://github.com/mckn)
* **Variables**: Adds description field. [#29332](https://github.com/grafana/grafana/pull/29332), [@hugohaggmark](https://github.com/hugohaggmark)
* **Variables**: Adds variables inspection. [#25214](https://github.com/grafana/grafana/pull/25214), [@hugohaggmark](https://github.com/hugohaggmark)
* **Variables**: New Variables are stored immediately. [#29178](https://github.com/grafana/grafana/pull/29178), [@hugohaggmark](https://github.com/hugohaggmark)
* **Zipkin**: Remove browser access mode. [#30360](https://github.com/grafana/grafana/pull/30360), [@zoltanbedi](https://github.com/zoltanbedi)
### Bug fixes
@@ -191,7 +68,6 @@
* **Decimals**: Improving auto decimals logic for high numbers and scaled units. [#30262](https://github.com/grafana/grafana/pull/30262), [@torkelo](https://github.com/torkelo)
* **Elasticsearch**: Fix date histogram auto interval handling for alert queries. [#30049](https://github.com/grafana/grafana/pull/30049), [@simianhacker](https://github.com/simianhacker)
* **Elasticsearch**: Fix index pattern not working with multiple base sections. [#28348](https://github.com/grafana/grafana/pull/28348), [@tomdaly](https://github.com/tomdaly)
* **Explore**: Clear errors after running a new query. [#30367](https://github.com/grafana/grafana/pull/30367), [@ivanahuckova](https://github.com/ivanahuckova)
* **Graph**: Fixes stacking issues like floating bars when data is not aligned. [#29051](https://github.com/grafana/grafana/pull/29051), [@torkelo](https://github.com/torkelo)
* **Graph**: Staircase and null value=null calculates auto Y-Min incorrectly (fixed in new Time series panel). [#12995](https://github.com/grafana/grafana/issues/12995)
* **Graph**: Staircase mode, do now draw line segment from zero when drawing null values as null (Fixed in new Time series panel). [#17838](https://github.com/grafana/grafana/issues/17838)
@@ -201,7 +77,6 @@
* **Logs Panel**: Fixes problem dragging scrollbar inside logs panel. [#28974](https://github.com/grafana/grafana/pull/28974), [@aocenas](https://github.com/aocenas)
* **Loki**: Fix hiding of series in table if labels have number values. [#30185](https://github.com/grafana/grafana/pull/30185), [@ivanahuckova](https://github.com/ivanahuckova)
* **Loki**: Lower min step to 1ms. [#30135](https://github.com/grafana/grafana/pull/30135), [@ivanahuckova](https://github.com/ivanahuckova)
* **Loki**: Remove showing of unique labels with the empty string value. [#30363](https://github.com/grafana/grafana/pull/30363), [@ivanahuckova](https://github.com/ivanahuckova)
* **Loki**: Timeseries should not produce 0-values for missing data. [#30116](https://github.com/grafana/grafana/pull/30116), [@davkal](https://github.com/davkal)
* **Plugins**: Fix panic when using complex dynamic URLs in app plugin routes. [#27977](https://github.com/grafana/grafana/pull/27977), [@cinaglia](https://github.com/cinaglia)
* **Prometheus**: Fix link to Prometheus graph in dashboard. [#29543](https://github.com/grafana/grafana/pull/29543), [@ivanahuckova](https://github.com/ivanahuckova)
@@ -240,12 +115,10 @@ This option to group query variable values into groups by tags has been an exper
### Plugin development fixes & changes
* **AngularPlugins**: Angular controller events emitter is now a separate emitter and not the same as PanelModel events emitter. [#30379](https://github.com/grafana/grafana/pull/30379), [@torkelo](https://github.com/torkelo)
* **FieldConfig API**: Add ability to hide field option or disable it from the overrides. [#29879](https://github.com/grafana/grafana/pull/29879), [@dprokop](https://github.com/dprokop)
* **Select**: Changes default menu placement for Select from auto to bottom. [#29837](https://github.com/grafana/grafana/pull/29837), [@hugohaggmark](https://github.com/hugohaggmark)
* **Collapse**: Allow component children to use height: 100% styling. [#29776](https://github.com/grafana/grafana/pull/29776), [@aocenas](https://github.com/aocenas)
* **DataSourceWithBackend**: Throw error if health check fails in DataSourceWithBackend. [#29743](https://github.com/grafana/grafana/pull/29743), [@aocenas](https://github.com/aocenas)
* **NodeGraph**: Add node graph visualization. [#29706](https://github.com/grafana/grafana/pull/29706), [@aocenas](https://github.com/aocenas)
* **FieldColor**: Handling color changes when switching panel types. [#28875](https://github.com/grafana/grafana/pull/28875), [@dprokop](https://github.com/dprokop)
* **CodeEditor**: Added support for javascript language. [#28818](https://github.com/grafana/grafana/pull/28818), [@ae3e](https://github.com/ae3e)
* **grafana/toolkit**: Allow builds with lint warnings. [#28810](https://github.com/grafana/grafana/pull/28810), [@dprokop](https://github.com/dprokop)

View File

@@ -1,4 +1,4 @@
FROM node:14.15.5-alpine3.13 as js-builder
FROM node:14.15.1-alpine3.12 as js-builder
WORKDIR /usr/src/app/
@@ -16,7 +16,7 @@ COPY emails emails
ENV NODE_ENV production
RUN yarn build
FROM golang:1.16.1-alpine3.13 as go-builder
FROM golang:1.15.1-alpine3.12 as go-builder
RUN apk add --no-cache gcc g++
@@ -32,7 +32,7 @@ COPY build.go package.json ./
RUN go run build.go build
# Final stage
FROM alpine:3.13
FROM alpine:3.12
LABEL maintainer="Grafana team <hello@grafana.com>"

View File

@@ -4,7 +4,7 @@
-include local/Makefile
.PHONY: all deps-go deps-js deps build-go build-server build-cli build-js build build-docker-dev build-docker-full lint-go revive golangci-lint test-go test-js test run run-frontend clean devenv devenv-down revive-strict protobuf help
.PHONY: all deps-go deps-js deps build-go build-server build-cli build-js build build-docker-dev build-docker-full lint-go revive golangci-lint tidy-check test-go test-js test run run-frontend clean devenv devenv-down revive-strict protobuf help
GO = GO111MODULE=on go
GO_FILES ?= ./pkg/...
@@ -95,7 +95,11 @@ golangci-lint: scripts/go/bin/golangci-lint
--config ./scripts/go/configs/.golangci.toml \
$(GO_FILES)
lint-go: golangci-lint revive revive-strict # Run all code checks for backend.
tidy-check:
@echo "check whether go.mod and go.sum are consistent"
@scripts/tidy-check.sh
lint-go: golangci-lint revive revive-strict tidy-check # Run all code checks for backend.
# with disabled SC1071 we are ignored some TCL,Expect `/usr/bin/env expect` scripts
shellcheck: $(SH_FILES) ## Run checks for shell scripts.

View File

@@ -69,10 +69,6 @@ socket = /tmp/grafana.sock
# CDN Url
cdn_url =
# Sets the maximum time in minutes before timing out read of an incoming request and closing idle connections.
# `0` means there is no timeout for reading the request.
read_timeout = 0
#################################### Database ############################
[database]
# You can configure the database connection by specifying type, host, name, user and password
@@ -509,19 +505,6 @@ allow_sign_up = true
sync_cron = "0 0 1 * * *"
active_sync_enabled = true
#################################### AWS ###########################
[aws]
# Enter a comma-separated list of allowed AWS authentication providers.
# Options are: default (AWS SDK Default), keys (Access && secret key), credentials (Credentials field), ec2_iam_role (EC2 IAM Role)
allowed_auth_providers = default,keys,credentials
# Allow AWS users to assume a role using temporary security credentials.
# If true, assume role will be enabled for all AWS authentication providers that are specified in aws_auth_providers
assume_role_enabled = true
# Specify max no of pages to be returned by the ListMetricPages API
list_metrics_page_limit = 500
#################################### SMTP / Emailing #####################
[smtp]
enabled = false
@@ -689,9 +672,6 @@ max_annotation_age =
max_annotations_to_keep =
#################################### Annotations #########################
[annotations]
# Configures the batch size for the annotation clean-up job. This setting is used for dashboard, API, and alert annotations.
cleanupjob_batchsize = 100
[annotations.dashboard]
# Dashboard annotations means that annotations are associated with the dashboard they are created on.

View File

@@ -70,10 +70,6 @@
# CDN Url
;cdn_url =
# Sets the maximum time using a duration format (5s/5m/5ms) before timing out read of an incoming request and closing idle connections.
# `0` means there is no timeout for reading the request.
;read_timeout = 0
#################################### Database ####################################
[database]
# You can configure the database connection by specifying type, host, name, user and password
@@ -499,16 +495,6 @@
;sync_cron = "0 0 1 * * *"
;active_sync_enabled = true
#################################### AWS ###########################
[aws]
# Enter a comma-separated list of allowed AWS authentication providers.
# Options are: default (AWS SDK Default), keys (Access && secret key), credentials (Credentials field), ec2_iam_role (EC2 IAM Role)
; allowed_auth_providers = default,keys,credentials
# Allow AWS users to assume a role using temporary security credentials.
# If true, assume role will be enabled for all AWS authentication providers that are specified in aws_auth_providers
; assume_role_enabled = true
#################################### SMTP / Emailing ##########################
[smtp]
;enabled = false
@@ -679,9 +665,6 @@
;max_annotations_to_keep =
#################################### Annotations #########################
[annotations]
# Configures the batch size for the annotation clean-up job. This setting is used for dashboard, API, and alert annotations.
;cleanupjob_batchsize = 100
[annotations.dashboard]
# Dashboard annotations means that annotations are associated with the dashboard they are created on.

View File

@@ -43,10 +43,6 @@ Pull requests for Redux contributions must:
- Not contain code that mutates state in reducers or thunks.
- Not contain code that accesses the reducers state slice directly. Instead, the code should use state selectors to access state.
### Backend-specific guidelines
Please refer to the [backend style guidelines](/contribute/style-guides/backend.md).
## Code review
Once you've created a pull request, the next step is to have someone review your change. A review is a learning opportunity for both the reviewer and the author of the pull request.
@@ -97,11 +93,3 @@ The Grafana team _squashes_ all commits into one when we accept a pull request.
We use the pull request title when we generate change logs for releases. As such, we strive to make the title as informative as possible.
Make sure that the title for your pull request uses the same format as the subject line in the commit message.
## Configuration changes
If your PR includes configuration changes, all of the following files must be changed correspondingly:
* conf/defaults.ini
* conf/sample.ini
* docs/sources/administration/configuration.md

View File

@@ -25,10 +25,6 @@ brew install node@14
npm install -g yarn
```
### Windows
If you are running Grafana on Windows 10, we recommend installing the Windows Subsystem for Linux (WSL). For installation instructions, refer to the [Microsoft WSL Installation Guide](https://docs.microsoft.com/en-us/windows/wsl/install-win10).
## Download Grafana
We recommend using the Git command-line interface to download the source code for the Grafana project:
@@ -83,7 +79,7 @@ When you log in for the first time, Grafana asks you to change your password.
The Grafana backend includes SQLite which requires GCC to compile. So in order to compile Grafana on Windows you need to install GCC. We recommend [TDM-GCC](http://tdm-gcc.tdragon.net/download). Eventually, if you use [Scoop](https://scoop.sh), you can install GCC through that.
You can simply build the back-end as follows: `go run build.go build`. The Grafana binaries will be in bin\\windows-amd64.
Alternately, if you wish to use the `make` command, install [Make for Windows](http://gnuwin32.sourceforge.net/packages/make.htm) and use it in a Unix shell (f.ex. Git Bash).
Alternately, if you wish to use the `make` command, install [Make for Windows](http://gnuwin32.sourceforge.net/packages/make.htm) and use it in a Unix shell (f.ex. Git Bash).
## Test Grafana
@@ -106,7 +102,6 @@ go test -v ./pkg/...
```
#### On Windows
Running the backend tests on Windows currently needs some tweaking, so use the build.go script:
```

View File

@@ -1,17 +0,0 @@
# Grafana technical terminology
<!-- Keep terms in alphabetical order: -->
This document defines technical terms used in Grafana.
## TLS/SSL
The acronyms [TLS](https://en.wikipedia.org/wiki/Transport_Layer_Security) (Transport Layer Security and
[SSL](https://en.wikipedia.org/wiki/SSL) (Secure Socket Layer) are both used to describe the HTTPS security layer,
and are in practice synonymous. However, TLS is considered the current name for the technology, and SSL is considered
[deprecated](https://tools.ietf.org/html/rfc7568).
As such, while both terms are in use (also in our codebase) and are indeed interchangeable, TLS is the preferred term.
That said however, we have at Grafana Labs decided to use both acronyms in combination when referring to this type of
technology, i.e. _TLS/SSL_. This is in order to not confuse those who may not be aware of them being synonymous,
and SSL still being so prevalent in common discourse.

View File

@@ -2,11 +2,9 @@
This style guide applies to all documentation created for Grafana products.
For information about how to write technical documentation, refer to the following resources:
For information about how to write technical documentation, we suggest reviewing the content of the [Google Technical Writing courses](https://developers.google.com/tech-writing).
* [Google Technical Writing courses](https://developers.google.com/tech-writing)
* [Divio documentation system](https://documentation.divio.com/)
* [Vue writing principles](https://v3.vuejs.org/guide/contributing/writing-guide.html#principles)
The [Divio documentation system](https://documentation.divio.com/) site and the [Vue writing principles](https://v3.vuejs.org/guide/contributing/writing-guide.html#principles) are also good resources.
## Contributing
@@ -14,61 +12,60 @@ The *Documentation style guide* is a living document. Add to it whenever a style
## Published guides
For all items that are not covered in this guide, refer to the [Microsoft Style Guide](https://docs.microsoft.com/en-us/style-guide/welcome/) and the [Chicago Manual of Style](https://www.chicagomanualofstyle.org/home.html).
For all items not covered in this guide, refer to the [Microsoft Style Guide](https://docs.microsoft.com/en-us/style-guide/welcome/) and the [Chicago Manual of Style](https://www.chicagomanualofstyle.org/home.html).
## Spelling
To catch common misspellings, the [codespell](https://github.com/codespell-project/codespell) tool is run for every change.
The [codespell](https://github.com/codespell-project/codespell) tool is run for every change to catch common misspellings.
## Inclusive language
Avoid using charged language.
This section provides guidelines on how to avoid using charged language in documentation.
### Allowing and blocking
When referring to _allowing_ or _blocking_ content or traffic, use a form of _allow_ or _block_:
Don't use "whitelist" or "blacklist" when referring to allowing or blocking content or traffic.
- (noun) _allowlist_ or _blocklist_
- (verb) _allow_ or _block_
- When used as a noun, use "allowlist" or "blocklist".
- When used as a verb, use "allow" or "block"
Example: _To **allow** outgoing traffic, add the IP to the **allowlist**._
Avoid _whitelist_ or _blacklist_.
### Leader and follower
### Primary and secondary
Don't use "master" or "slave" to describe relationships between nodes or processes.
To describe relationships between nodes or processes, there are several options:
- Use "leader", "main" or "primary," instead of "master."
- Use "follower" or "secondary," instead of "slave."
- Use _primary_, _main_, or _parent_, instead of _master_.
- Use _secondary_, _replica_, or _child_, instead of _slave_.
### Exceptions
Avoid _master_ or _slave_.
When referring to a configuration or settings used by third-party libraries och technologies outside the Grafana project, prefer the original name to avoid confusion.
For example, use "master" when referring to the default Git branch.
## Grafana-specific style
The following guidelines are specific to Grafana documentation. For the most part, these are *guidelines* are not rigid rules. If you have questions, ask in the #docs channel of Grafana Slack.
The following sections provide general guidelines on topics specific to Grafana documentation. Note that for the most part, these are *guidelines*, not rigid rules. If you have questions, ask in the #docs channel of Grafana Slack.
### General
- Use active voice:
- Active: Grafana displays the heatmap visualization.
- Passive: The heatmap visualization is displayed.
- Write directly to the reader:
- Use active voice. Avoid passive voice.
- Use active: Grafana displays the heatmap visualization.
- Avoid passive: The heatmap visualization is displayed.
- Write directly to the reader.
- Use: "After you create a dashboard, you can add a panel to it."
- Avoid: "After you create a dashboard, it is possible to add a panel to it."
- Write in the imperative second person:
- "Click the panel."
- "Close the window."
- Write in present tense:
- Use: "The panel opens."
- Avoid: "The panel will open."
- Do not use an ampersand (&) as an abbreviation for _and_.
- Write in the imperative second person. Examples: You can write a query. Click the panel. Close the window.
- Write in present tense.
- Use: The panel opens. Grafana opens the panel.
- Not: The panel will open.
- Do not use an ampersand (&) as an abbreviation for "and."
- **Exceptions:** If an ampersand is used in the Grafana UI, then match the UI.
- Avoid using internal jargon or slang.
- Do not use two spaces after a period; use one space after a sentence.
- Remove any extra space characters at the end of a paragraph.
- Aim for your sentences to be fewer than 25 words. Instead, use smaller complete phrases or change the format, such as using a list.
- Aim for paragraphs to be three sentences or fewer. Make the text more concise, use more headings, or both.
- Avoid using internal slang and jargon in technical documentation.
- Do not use two spaces after a period. Only add one space after each sentence. Do not add a space at the end of the paragraph.
- Sentence length should be 25 words or less. If your thought is longer than 25 words, consider breaking up the sentence or changing the format to a list.
- Paragraphs should be three sentences or fewer. Break up long paragraphs.
### File naming conventions
@@ -147,18 +144,6 @@ The first letter of the name of an integration is always capitalized, even if th
- Etcd Integration
- I installed an integration on my local Grafana.
#### Kubernetes objects
Capitalize Kubernetes objects such as Job, Pod, and StatefulSet when it is clear you are specifically talking about them and not generic jobs, pods, or whatever.
Introduce the object as "Kubernetes XX" on the first usage, then just the object in subsequent uses.
**Example:**
Create the Kubernetes Job and check the logs to retrieve the generated token:
The Job requires the token be submitted as …
### Links and references
When referencing another document, use "Refer to" rather than alternatives such as "See" or "Check out."
@@ -303,13 +288,6 @@ When referencing the Prometheus data source exporters, always use "node_exporter
**Correct:** node_exporter, windows_exporter
**Incorrect:** Node Exporter, node exporter, Windows Exporter, Windows exporter, windows exporter.
#### web server
Two words, not one.
**Correct:** webserver
**Incorrect:** web server
### MS SQL Server
Always use "MS SQL" when referring to MS SQL Server application.

View File

@@ -27,32 +27,28 @@ const ComponentA = () => (
To access the theme in your styles, use the `useStyles` hook. It provides basic memoization and access to the theme object.
> Please remember to put `getStyles` function at the end of the file!
```tsx
import React, { FC } from 'react';
import { GrafanaTheme } from '@grafana/data';
import { useStyles } from '@grafana/ui';
import { css } from 'emotion';
const Foo: FC<FooProps> = () => {
const styles = useStyles(getStyles);
// Use styles with classNames
return <div className={styles}>...</div>
};
const getStyles = (theme: GrafanaTheme) => css`
const getComponentStyles = (theme: GrafanaTheme) => css`
padding: ${theme.spacing.md};
`;
const Foo: FC<FooProps> = () => {
const styles = useStyles(getComponentsStyles);
// Use styles with className
};
```
### Styling complex components
In more complex cases, especially when you need to style multiple DOM elements in one component, or when using styles that depend on properties and/or state, you should create a helper function that returns an object of styles. This function should also be wrapped in the `stylesFactory` helper function, which will provide basic memoization.
Let's say you need to style a component that has a different background depending on the `isActive` property :
Let's say you need to style a component that has a different background depending on the theme:
```tsx
import React from 'react';
@@ -60,26 +56,8 @@ import { css } from 'emotion';
import { GrafanaTheme } from '@grafana/data';
import { selectThemeVariant, stylesFactory, useTheme } from '@grafana/ui';
interface ComponentAProps {
isActive: boolean
}
const ComponentA: React.FC<ComponentAProps> = ({isActive}) => {
const theme = useTheme();
const styles = getStyles(theme, isActive);
return (
<div className={styles.wrapper}>
As red as you can get
<i className={styles.icon} />
</div>
);
};
// Mind, that you can pass multiple arguments, theme included
const getStyles = stylesFactory((theme: GrafanaTheme, isActive: boolean) => {
const backgroundColor = isActive ? theme.colors.red : theme.colors.blue;
const getStyles = stylesFactory((theme: GrafanaTheme) => {
const backgroundColor = selectThemeVariant({ light: theme.colors.red, dark: theme.colors.blue }, theme.type);
return {
wrapper: css`
@@ -90,6 +68,18 @@ const getStyles = stylesFactory((theme: GrafanaTheme, isActive: boolean) => {
`,
};
});
const ComponentA = () => {
const theme = useTheme();
const styles = getStyles(theme);
return (
<div className={styles.wrapper}>
As red as you can get
<i className={styles.icon} />
</div>
);
};
```
For more information about themes at Grafana please see the [themes guide](./themes.md).

View File

@@ -32,19 +32,6 @@ datasources:
timeInterval: "15s"
secureJsonData:
password: grafana
- name: gdev-influxdb2
type: influxdb
access: proxy
url: http://localhost:8087
user: grafana
secureJsonData:
token: mytoken
password: grafana12345
jsonData:
version: Flux
organization: myorg
defaultBucket: mybucket
- name: gdev-influxdb-telegraf
type: influxdb
@@ -56,7 +43,7 @@ datasources:
timeInterval: "10s"
secureJsonData:
password: grafana
- name: gdev-opentsdb
type: opentsdb
access: proxy
@@ -240,6 +227,20 @@ datasources:
defaultRegion: eu-west-2
customMetricsNamespaces: "CWAgent"
# Keep to test old /api/prom API
- name: gdev-loki-0.3
type: loki
access: proxy
url: http://localhost:3103
editable: false
# First version with new v1 API (remove once v1 is out)
- name: gdev-loki-0.4
type: loki
access: proxy
url: http://localhost:3104
editable: false
- name: gdev-loki
type: loki
access: proxy

View File

@@ -34,17 +34,6 @@ datasources:
secureJsonData:
password: grafana
- name: gdev-influxdb2
type: influxdb
access: proxy
url: http://influxdb2:8086
secureJsonData:
token: mytoken
jsonData:
version: Flux
organization: myorg
defaultBucket: mybucket
- name: gdev-influxdb-telegraf
type: influxdb
access: proxy
@@ -238,6 +227,20 @@ datasources:
authType: credentials
defaultRegion: eu-west-2
# Keep to test old /api/prom API
- name: gdev-loki-0.3
type: loki
access: proxy
url: http://loki0.3:3100
editable: false
# First version with new v1 API (remove once v1 is out)
- name: gdev-loki-0.4
type: loki
access: proxy
url: http://loki0.4:3100
editable: false
- name: gdev-loki
type: loki
access: proxy

File diff suppressed because it is too large Load Diff

View File

@@ -19,9 +19,7 @@
{
"icon": "external link",
"tags": ["gdev", "graph-ng"],
"type": "dashboards",
"asDropdown": true,
"title": "Graph Tests"
"type": "dashboards"
}
],
"panels": [

View File

@@ -16,15 +16,7 @@
"gnetId": null,
"graphTooltip": 0,
"id": 391,
"links": [
{
"icon": "external link",
"tags": ["gdev", "graph-ng"],
"type": "dashboards",
"asDropdown": true,
"title": "Graph Tests"
}
],
"links": [],
"panels": [
{
"datasource": null,

View File

@@ -19,9 +19,7 @@
{
"icon": "external link",
"tags": ["gdev", "graph-ng"],
"type": "dashboards",
"asDropdown": true,
"title": "Graph Tests"
"type": "dashboards"
}
],
"panels": [

View File

@@ -19,9 +19,7 @@
{
"icon": "external link",
"tags": ["gdev", "graph-ng"],
"type": "dashboards",
"asDropdown": true,
"title": "Graph Tests"
"type": "dashboards"
}
],
"panels": [

View File

@@ -1,470 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"links": [
{
"icon": "external link",
"tags": ["gdev", "graph-ng"],
"type": "dashboards",
"asDropdown": true,
"title": "Graph Tests"
}
],
"panels": [
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 41,
"gradientMode": "opacity",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false
},
"lineInterpolation": "smooth",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": true
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 8,
"x": 0,
"y": 0
},
"id": 2,
"maxDataPoints": 50,
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "hidden",
"placement": "bottom"
},
"tooltipOptions": {
"mode": "single"
}
},
"pluginVersion": "7.5.0-pre",
"timeFrom": "1s",
"timeShift": null,
"title": "Sub second range ",
"type": "timeseries"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 17,
"gradientMode": "opacity",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false
},
"lineInterpolation": "smooth",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": true
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 8,
"x": 8,
"y": 0
},
"id": 3,
"maxDataPoints": 50,
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "hidden",
"placement": "bottom"
},
"tooltipOptions": {
"mode": "single"
}
},
"pluginVersion": "7.5.0-pre",
"timeFrom": "1m",
"timeShift": null,
"title": "Sub minute range",
"type": "timeseries"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 30,
"gradientMode": "opacity",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false
},
"lineInterpolation": "smooth",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": true
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 8,
"x": 16,
"y": 0
},
"id": 4,
"maxDataPoints": 50,
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "hidden",
"placement": "bottom"
},
"tooltipOptions": {
"mode": "single"
}
},
"pluginVersion": "7.5.0-pre",
"timeFrom": "1h",
"timeShift": null,
"title": "Sub hour range",
"type": "timeseries"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 37,
"gradientMode": "opacity",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false
},
"lineInterpolation": "smooth",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": true
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 8,
"x": 0,
"y": 9
},
"id": 5,
"maxDataPoints": 50,
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "hidden",
"placement": "bottom"
},
"tooltipOptions": {
"mode": "single"
}
},
"pluginVersion": "7.5.0-pre",
"timeFrom": "1d",
"timeShift": null,
"title": "Sub day range",
"type": "timeseries"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 37,
"gradientMode": "opacity",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false
},
"lineInterpolation": "smooth",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": true
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 8,
"x": 8,
"y": 9
},
"id": 6,
"maxDataPoints": 50,
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "hidden",
"placement": "bottom"
},
"tooltipOptions": {
"mode": "single"
}
},
"pluginVersion": "7.5.0-pre",
"timeFrom": "2d",
"timeShift": null,
"title": "Last days (shows date)",
"type": "timeseries"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 37,
"gradientMode": "opacity",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false
},
"lineInterpolation": "smooth",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": true
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 8,
"x": 16,
"y": 9
},
"id": 7,
"maxDataPoints": 50,
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "hidden",
"placement": "bottom"
},
"tooltipOptions": {
"mode": "single"
}
},
"pluginVersion": "7.5.0-pre",
"timeFrom": "5y",
"timeShift": null,
"title": "Last 5 days (year only)",
"type": "timeseries"
}
],
"schemaVersion": 27,
"style": "dark",
"tags": ["gdev", "panel-tests", "graph-ng"],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Panel Tests - GraphNG - Time Axis",
"uid": "sd27_CPGz",
"version": 3
}

View File

@@ -19,9 +19,7 @@
{
"icon": "external link",
"tags": ["gdev", "graph-ng"],
"type": "dashboards",
"asDropdown": true,
"title": "Graph Tests"
"type": "dashboards"
}
],
"panels": [

View File

@@ -19,9 +19,7 @@
{
"icon": "external link",
"tags": ["gdev", "graph-ng"],
"type": "dashboards",
"asDropdown": true,
"title": "Graph Tests"
"type": "dashboards"
}
],
"panels": [

View File

@@ -1,518 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": 479,
"links": [],
"panels": [
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {},
"decimals": 1,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 14,
"w": 8,
"x": 0,
"y": 0
},
"id": 2,
"options": {
"displayLabels": [
"name"
],
"legend": {
"values": [],
"displayMode": "list",
"placement": "right"
},
"pieType": "donut",
"reduceOptions": {
"calcs": [
"mean"
],
"fields": "",
"values": false
},
"showLegend": true,
"strokeWidth": 1,
"text": {}
},
"pluginVersion": "7.3.0-pre",
"targets": [
{
"alias": "__house_locations",
"refId": "A",
"scenarioId": "random_walk",
"seriesCount": 5
}
],
"timeFrom": null,
"timeShift": null,
"title": "Donut name",
"type": "piechart"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {},
"decimals": 1,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 14,
"w": 8,
"x": 8,
"y": 0
},
"id": 11,
"options": {
"displayLabels": [
"name",
"percent"
],
"legend": {
"values": [
"percent"
],
"displayMode": "list",
"placement": "right"
},
"pieType": "pie",
"reduceOptions": {
"calcs": [
"mean"
],
"fields": "",
"values": false
},
"showLegend": true,
"strokeWidth": 1,
"text": {}
},
"pluginVersion": "7.3.0-pre",
"targets": [
{
"alias": "__house_locations",
"refId": "A",
"scenarioId": "random_walk",
"seriesCount": 5
}
],
"timeFrom": null,
"timeShift": null,
"title": "Name and Percent",
"type": "piechart"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 14,
"w": 8,
"x": 16,
"y": 0
},
"id": 8,
"options": {
"displayLabels": [
"name"
],
"legend": {
"values": [],
"displayMode": "hidden",
"placement": "right"
},
"pieType": "pie",
"reduceOptions": {
"calcs": [
"mean"
],
"fields": "",
"values": false
},
"showLegend": false,
"strokeWidth": 1,
"text": {}
},
"pluginVersion": "7.3.0-pre",
"targets": [
{
"alias": "__server_names",
"refId": "A",
"scenarioId": "random_walk",
"seriesCount": 4
}
],
"timeFrom": null,
"timeShift": null,
"title": "Name & No legend",
"type": "piechart"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 5,
"x": 0,
"y": 14
},
"id": 3,
"options": {
"displayLabels": [
"percent"
],
"legend": {
"values": [
"percent"
],
"displayMode": "table",
"placement": "bottom"
},
"pieType": "pie",
"reduceOptions": {
"calcs": [
"mean"
],
"fields": "",
"values": false
},
"showLegend": false,
"strokeWidth": 1,
"text": {}
},
"pluginVersion": "7.3.0-pre",
"targets": [
{
"alias": "__server_names",
"refId": "A",
"scenarioId": "random_walk",
"seriesCount": 4
}
],
"timeFrom": null,
"timeShift": null,
"title": "Percent",
"type": "piechart"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 5,
"x": 5,
"y": 14
},
"id": 9,
"options": {
"displayLabels": [
"value"
],
"legend": {
"values": [
"value"
],
"displayMode": "table",
"placement": "bottom"
},
"pieType": "pie",
"reduceOptions": {
"calcs": [
"mean"
],
"fields": "",
"values": false
},
"showLegend": false,
"strokeWidth": 1,
"text": {}
},
"pluginVersion": "7.3.0-pre",
"targets": [
{
"alias": "__server_names",
"refId": "A",
"scenarioId": "random_walk",
"seriesCount": 4
}
],
"timeFrom": null,
"timeShift": null,
"title": "Value",
"type": "piechart"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 6,
"x": 10,
"y": 14
},
"id": 6,
"options": {
"displayLabels": [
"name"
],
"legend": {
"values": [],
"displayMode": "list",
"placement": "bottom"
},
"pieType": "pie",
"reduceOptions": {
"calcs": [
"mean"
],
"fields": "",
"values": false
},
"showLegend": false,
"strokeWidth": 1,
"text": {}
},
"pluginVersion": "7.3.0-pre",
"targets": [
{
"alias": "__server_names",
"refId": "A",
"scenarioId": "random_walk",
"seriesCount": 4
}
],
"timeFrom": null,
"timeShift": null,
"title": "Name",
"type": "piechart"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 8,
"x": 16,
"y": 14
},
"id": 10,
"options": {
"displayLabels": [],
"legend": {
"values": ["percent", "value"],
"displayMode": "table",
"placement": "bottom"
},
"pieType": "pie",
"reduceOptions": {
"calcs": [
"mean"
],
"fields": "",
"values": false
},
"showLegend": false,
"strokeWidth": 1,
"text": {}
},
"pluginVersion": "7.3.0-pre",
"targets": [
{
"alias": "__server_names",
"refId": "A",
"scenarioId": "random_walk",
"seriesCount": 4
}
],
"timeFrom": null,
"timeShift": null,
"title": "Memory",
"type": "piechart"
}
],
"schemaVersion": 27,
"style": "dark",
"tags": [
"gdev",
"panel-tests"
],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Panel Tests - Pie chart",
"uid": "lVE-2YFMz",
"version": 9
}

View File

@@ -33,13 +33,9 @@
"datasource": "gdev-testdata",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "center",
"displayMode": "color-background",
"filterable": false
"displayMode": "color-background"
},
"mappings": [],
"thresholds": {
@@ -132,7 +128,7 @@
}
]
},
"pluginVersion": "7.5.0-pre",
"pluginVersion": "7.1.0-pre",
"targets": [
{
"refId": "A",
@@ -148,11 +144,7 @@
{
"id": "reduce",
"options": {
"reducers": [
"max",
"mean",
"last"
]
"reducers": ["max", "mean", "last"]
}
}
],
@@ -162,12 +154,8 @@
"datasource": "gdev-testdata",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": null,
"filterable": false
"align": null
},
"mappings": [],
"thresholds": {
@@ -188,7 +176,7 @@
{
"matcher": {
"id": "byName",
"options": "A"
"options": "Value"
},
"properties": [
{
@@ -263,7 +251,7 @@
}
]
},
"pluginVersion": "7.5.0-pre",
"pluginVersion": "7.1.0-pre",
"targets": [
{
"refId": "A",
@@ -299,12 +287,8 @@
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": null,
"filterable": false
"align": null
},
"mappings": [],
"thresholds": {
@@ -325,7 +309,7 @@
{
"matcher": {
"id": "byName",
"options": "A"
"options": "Value"
},
"properties": [
{
@@ -351,7 +335,7 @@
"showHeader": true,
"sortBy": []
},
"pluginVersion": "7.5.0-pre",
"pluginVersion": "7.1.0-pre",
"targets": [
{
"refId": "A",
@@ -403,13 +387,9 @@
"datasource": "gdev-testdata",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "center",
"displayMode": "color-text",
"filterable": false
"displayMode": "color-text"
},
"decimals": 2,
"mappings": [],
@@ -479,7 +459,7 @@
"options": {
"showHeader": true
},
"pluginVersion": "7.5.0-pre",
"pluginVersion": "7.1.0-pre",
"targets": [
{
"alias": "S1",
@@ -521,13 +501,9 @@
"datasource": "gdev-testdata",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "center",
"displayMode": "auto",
"filterable": false
"displayMode": "auto"
},
"mappings": [],
"thresholds": {
@@ -571,7 +547,7 @@
}
]
},
"pluginVersion": "7.5.0-pre",
"pluginVersion": "7.1.0-pre",
"targets": [
{
"refId": "A",
@@ -606,12 +582,9 @@
"type": "table"
}
],
"schemaVersion": 27,
"schemaVersion": 25,
"style": "dark",
"tags": [
"gdev",
"panel-tests"
],
"tags": ["gdev", "panel-tests"],
"templating": {
"list": []
},
@@ -620,20 +593,10 @@
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
]
"refresh_intervals": ["10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"]
},
"timezone": "",
"title": "Panel Tests - React Table",
"uid": "U_bZIMRMk",
"version": 1
}
"version": 17
}

View File

@@ -1,40 +1,39 @@
influxdb2:
influxdb:
image: quay.io/influxdb/influxdb:v2.0.3
container_name: influxdb2
ports:
- '8087:8086'
- '8086:8086'
environment:
INFLUXDB_REPORTING_DISABLED: 'true'
volumes:
- ./docker/blocks/influxdb2/influxdb.conf:/etc/influxdb/influxdb.conf
# Use the influx cli to set up an influxdb instance.
influxdb2_cli:
influxdb_cli:
links:
- influxdb2
- influxdb
image: quay.io/influxdb/influxdb:v2.0.3
# Use these same configurations parameters in your telegraf configuration, mytelegraf.conf.
entrypoint: influx setup --bucket mybucket -t mytoken -o myorg --username=grafana --password=grafana12345 --host=http://influxdb2:8086 -f
entrypoint: influx setup --bucket mybucket -t mytoken -o myorg --username=grafana --password=grafana12345 --host=http://influxdb:8086 -f
# Wait for the influxd service in the influxdb container has fully bootstrapped before trying to setup an influxdb instance with the influxdb_cli service.
restart: on-failure:10
depends_on:
- influxdb2
- influxdb
fake-influxdb2-data:
fake-influxdb-data:
image: grafana/fake-data-gen
links:
- influxdb2
- influxdb
environment:
FD_SERVER: influxdb2
FD_DATASOURCE: influxdb
FD_PORT: 8086
telegraf2:
telegraf:
image: telegraf
links:
- influxdb2
- influxdb
depends_on:
- influxdb2_cli
- influxdb_cli
volumes:
- ./docker/blocks/influxdb2/telegraf.conf:/etc/telegraf/telegraf.conf:ro
- /var/log:/var/log

View File

@@ -90,7 +90,7 @@
## urls will be written to each interval.
# urls = ["unix:///var/run/influxdb.sock"]
# urls = ["udp://127.0.0.1:8089"]
urls = ["http://influxdb2:8086"]
urls = ["http://influxdb:8086"]
token = "mytoken"
organization = "myorg"
bucket = "mybucket"

View File

@@ -10,6 +10,7 @@ client:
scrape_configs:
- job_name: system
entry_parser: raw
static_configs:
- targets:
- localhost
@@ -17,6 +18,7 @@ scrape_configs:
job: varlogs
__path__: /var/log/*log
- job_name: grafana
entry_parser: raw
static_configs:
- targets:
- localhost

View File

@@ -0,0 +1,27 @@
server:
http_listen_port: 9080
grpc_listen_port: 0
positions:
filename: /tmp/positions.yaml
client:
url: http://loki0.3:3100/api/prom/push
scrape_configs:
- job_name: system
entry_parser: raw
static_configs:
- targets:
- localhost
labels:
job: varlogs
__path__: /var/log/*log
- job_name: grafana
entry_parser: raw
static_configs:
- targets:
- localhost
labels:
job: grafana
__path__: /var/log/grafana/*log

View File

@@ -0,0 +1,15 @@
# datasource URL: http://localhost:3103/
loki0.3:
image: grafana/loki:v0.3.0
ports:
- "3103:3100"
command: -config.file=/etc/loki/local-config.yaml
promtail0.3:
image: grafana/promtail:v0.3.0
volumes:
- ./docker/blocks/loki0.3/config.yaml:/etc/promtail/docker-config.yaml
- /var/log:/var/log
- ../data/log:/var/log/grafana
command:
-config.file=/etc/promtail/docker-config.yaml

View File

@@ -0,0 +1,27 @@
server:
http_listen_port: 9080
grpc_listen_port: 0
positions:
filename: /tmp/positions.yaml
client:
url: http://loki0.4:3100/api/prom/push
scrape_configs:
- job_name: system
entry_parser: raw
static_configs:
- targets:
- localhost
labels:
job: varlogs
__path__: /var/log/*log
- job_name: grafana
entry_parser: raw
static_configs:
- targets:
- localhost
labels:
job: grafana
__path__: /var/log/grafana/*log

View File

@@ -0,0 +1,15 @@
# datasource URL: http://localhost:3104/
loki0.4:
image: grafana/loki:v0.4.0
ports:
- "3104:3100"
command: -config.file=/etc/loki/local-config.yaml
promtail0.4:
image: grafana/promtail:v0.4.0
volumes:
- ./docker/blocks/loki0.4/config.yaml:/etc/promtail/docker-config.yaml
- /var/log:/var/log
- ../data/log:/var/log/grafana
command:
-config.file=/etc/promtail/docker-config.yaml

View File

@@ -1,4 +1,4 @@
FROM prom/prometheus:latest
FROM prom/prometheus:v2.7.2
ADD prometheus.yml /etc/prometheus/
ADD recording.yml /etc/prometheus/
ADD alert.yml /etc/prometheus/

View File

@@ -1,7 +1,7 @@
FROM golang:latest
FROM golang:latest
ADD main.go /
WORKDIR /
RUN GO111MODULE=off go build -o main .
RUN go build -o main .
EXPOSE 3011
ENTRYPOINT ["/main"]

View File

@@ -1,7 +1,7 @@
FROM golang:latest
FROM golang:latest
ADD main.go /
WORKDIR /
RUN GO111MODULE=off go build -o main .
RUN go build -o main .
EXPOSE 3011
ENTRYPOINT ["/main"]

View File

@@ -1,21 +1,5 @@
# Generate traffic by hitting http://localhost:8081
frontend-example:
image: ghcr.io/openzipkin/brave-example
entrypoint: start-frontend
ports:
- 8081:8081
depends_on:
backend-example:
condition: service_healthy
zipkin:
condition: service_started
# Serves the /api endpoint the frontend uses
backend-example:
image: ghcr.io/openzipkin/brave-example
entrypoint: start-backend
depends_on:
zipkin:
condition: service_started
# There is no data generator for this so easiest way to get some data here is run this example app
# https://github.com/openzipkin/zipkin-js-example/tree/master/web
zipkin:
image: openzipkin/zipkin:latest
ports:

View File

@@ -64,7 +64,7 @@ usage() {
main() {
echo -e "------------------------------------------------------------------"
echo -e "This script sets up provisioning for dev datasources and dashboards"
echo -e "This script setups provisioning for dev datasources and dashboards"
echo -e "------------------------------------------------------------------"
echo -e "\n"

View File

@@ -1,24 +1,14 @@
.PHONY: docs docs-no-pull docs-test docs-local-static
.PHONY: docs docs-no-pull docs-test
IMAGE = grafana/grafana-docs-dev:latest
CONTENT_PATH = /hugo/content/docs/grafana/latest
LOCAL_STATIC_PATH = ../../website/static
PORT = 3002:3002
docs:
docker pull $(IMAGE)
docker run -v $(shell pwd)/sources:$(CONTENT_PATH):Z -p $(PORT) --rm -it $(IMAGE)
docker run -v $(shell pwd)/sources:/hugo/content/docs/grafana/latest -p 3002:3002 --rm -it $(IMAGE)
docs-no-pull:
docker run -v $(shell pwd)/sources:$(CONTENT_PATH):Z -p $(PORT) --rm -it $(IMAGE)
docker run -v $(shell pwd)/sources:/hugo/content/docs/grafana/latest -p 3002:3002 --rm -it $(IMAGE)
docs-test:
docker pull $(IMAGE)
docker run -v $(shell pwd)/sources:$(CONTENT_PATH):Z --rm -it $(IMAGE) /bin/bash -c 'make prod'
# expects that you have grafana/website checked out in same path as the grafana repo.
docs-local-static:
docker pull $(IMAGE)
if [ ! -d "$(LOCAL_STATIC_PATH)" ]; then echo "local path (website project) $(LOCAL_STATIC_PATH) not found"]; exit 1; fi
docker run -v $(shell pwd)/sources:$(CONTENT_PATH):Z \
-v $(shell pwd)/$(LOCAL_STATIC_PATH):/hugo/static:Z -p $(PORT) --rm -it $(IMAGE)
docker run -v $(shell pwd)/sources:/hugo/content/docs/grafana/latest --rm -it $(IMAGE) /bin/bash -c 'make prod'

View File

@@ -12,8 +12,6 @@ Yarn >= 1.22.4
1. On the command line, first change to the docs folder: `cd docs`.
1. Run `make docs`. This launches a preview of the docs website at `http://localhost:3002/docs/grafana/latest/` which will refresh automatically when changes are made to content in the `sources` directory.
If you have the grafana/website repo checked out in the same directory as the grafana repo, then you can run `make docs-local-static` to use local assets (such as images).
---
## Content guidelines

View File

@@ -60,8 +60,8 @@ aliases = ["/docs/grafana/v1.1", "/docs/grafana/latest/guides/reference/admin",
<h4>Provisioning</h4>
<p>Learn how to automate your Grafana configuration.</p>
</a>
<a href="{{< relref "whatsnew/whats-new-in-v7-5.md" >}}" class="nav-cards__item nav-cards__item--guide">
<h4>What's new in v7.5</h4>
<a href="{{< relref "whatsnew/whats-new-in-v7-3.md" >}}" class="nav-cards__item nav-cards__item--guide">
<h4>What's new in v7.3</h4>
<p>Explore the features and enhancements in the latest release.</p>
</a>
@@ -86,7 +86,7 @@ aliases = ["/docs/grafana/v1.1", "/docs/grafana/latest/guides/reference/admin",
<img src="/img/docs/logos/icon_prometheus.svg" >
<h5>Prometheus</h5>
</a>
<a href="{{< relref "datasources/google-cloud-monitoring/_index.md" >}}" class="nav-cards__item nav-cards__item--ds">
<a href="{{< relref "datasources/cloudmonitoring.md" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/img/docs/logos/icon_cloudmonitoring.svg">
<h5>Google Cloud Monitoring</h5>
</a>

View File

@@ -8,7 +8,9 @@ weight = 40
This section includes information for Grafana administrators, team administrators, and users performing administrative tasks:
- [Change password]({{< relref "change-your-password" >}})
- [Change Preferences]({{< relref "preferences" >}})
- [Configuration]({{< relref "configuration" >}})
- [Configure Docker image]({{< relref "configure-docker" >}})
- [Security]({{< relref "security" >}})

View File

@@ -0,0 +1,53 @@
+++
title = "Change the default home dashboard"
description = "How to replace the default home dashboard"
keywords = ["grafana", "configuration", "documentation", "home"]
weight = 100
+++
# Change the default home dashboard
You can change the default dashboard on the organization, team and user level. The home dashboard you set for the whole organization is the one all users will see by default. The team dashboard applies to all users assigned to the team in Grafana. The team dashboard overrides the organization dashboard settings. Personal dashboard settings override team dashboard settings.
## Set the home dashboard for your organization
### Set the default dashboard through preferences
1. Navigate to the dashboard you want to set as the home dashboard.
1. Star this dashboard by clicking on the star next to the dashboard title.
1. On the left menu, hover your cursor over the **Configuration** (gear) icon and then click **Preferences**.
1. In the **Home Dashboard** field, select the dashboard you want to use for your home dashboard. Options include all starred dashboards.
### Set the default dashboard through configuration
If preferences are set as described above, then they override this value.
You can provide your own JSON file to change the home dashboard. No user will be able to update this dashboard in Grafana.
#### [Optional] Convert an existing dashboard into a JSON file
1. Navigate to your dashboard page.
1. Click the **Share dashboard** icon next to the dashboard title.
1. In the **Export** tab, click on **Save to file**.
#### Use a JSON file as the home dashboard
1. Save your JSON file somewhere that Grafana can access it, for example, in the Grafana `data` folder of Grafana.
1. Update your configuration file to set the path to the JSON file. Read how to update this file in the [configuration]({{< relref "./configuration.md">}}) documentation.
```ini
[dashboards]
# Path to the default home dashboard. If this value is empty, then Grafana uses StaticRootPath + "dashboards/home.json"
default_home_dashboard_path = data/main-dashboard.json
```
## Set home dashboard for your team
1. Navigate to the dashboard you want to set as the home dashboard.
1. Star this dashboard by clicking on the star next to the dashboard title.
1. On the left menu, hover your cursor over the **Configuration** (gear) icon and then click **Teams**.
1. Click on the team you want to change the home dashboard for and then navigate to the **Settings** tab.
1. In the **Home Dashboard** field, select the dashboard you want to use for your home dashboard. Options include all starred dashboards.
## Set your personal home dashboard
1. Navigate to the dashboard you want to set as the home dashboard.
1. Star this dashboard by clicking on the star next to the dashboard title.
1. On the left menu, hover your cursor over your avatar and then click **Preferences**.
1. In the **Home Dashboard** field, select the dashboard you want to use for your home dashboard. Options include all starred dashboards.

View File

@@ -2,13 +2,12 @@
title = "Change your password"
description = "How to change your Grafana password"
keywords = ["grafana", "password", "change", "preferences"]
aliases = ["/docs/grafana/latest/administration/change-your-password/"]
weight = 200
weight = 100
+++
# Change your Grafana password
You can change your Grafana password in the Change Password tab.
You can change your password in the Change Password tab.
> **Note:** If your Grafana instance uses an external authentication provider, then you might not be able to change your password. Contact your Grafana administrator for more information.
@@ -19,3 +18,11 @@ You can change your Grafana password in the Change Password tab.
1. Enter your **Old password** to authorize the change.
1. Enter your **New password** and then **Confirm password**.
1. Click **Change Password**.
## Admin user management resources
Grafana admins can use the following tools:
- Use the [User API]({{< relref "../http_api/user.md" >}}) to change your password programmatically or to manage users.
- The [Manage users]({{< relref "../manage-users/_index.md" >}}) section explains how to manage users and teams.

View File

@@ -2,22 +2,30 @@
title = "Grafana CLI"
description = "Guide to using grafana-cli"
keywords = ["grafana", "cli", "grafana-cli", "command line interface"]
weight = 400
weight = 8
+++
# Grafana CLI
Grafana CLI is a small executable that is bundled with Grafana server. It can be executed on the same machine Grafana server is running on. Grafana CLI has `plugins` and `admin` commands, as well as global options.
Grafana CLI is a small executable that is bundled with Grafana server and is supposed to be executed on the same machine Grafana server is running on.
Grafana CLI has `plugins` and `admin` commands, as well as global options.
To list all commands and options:
```
grafana-cli -h
```
## Invoking Grafana CLI
To invoke Grafana CLI, add the path to the grafana binaries in your `PATH` environment variable. Alternately, if your current directory is the `bin` directory, use `./grafana-cli`. Otherwise, you can specify full path to the CLI. For example, on Linux `/usr/share/grafana/bin/grafana-cli` and on Windows `C:\Program Files\GrafanaLabs\grafana\bin\grafana-cli.exe`.
**Linux users**
Some commands, such as installing or removing plugins, require `sudo` in order to run.
>**Note:** Some commands, such as installing or removing plugins, require `sudo` on Linux. If you are on Windows, run Windows PowerShell as Administrator.
**Windows users**
Some commands, such as installing or removing plugins, require you to run Windows PowerShell as Administrator.
Before you enter commands, `cd` into the Grafana bin directory. The default path is:
```
cd "C:\Program Files\GrafanaLabs\grafana\bin"
```
## Grafana CLI command syntax
@@ -114,7 +122,7 @@ Sets the path for the Grafana install/home path, defaults to working directory.
**Example:**
```bash
grafana-cli --homepath "/usr/share/grafana" admin reset-admin-password <new password>
grafana-cli --homepath "c:\Program Files\grafana" admin reset-admin-password mynewpassword
```
### Override config file
@@ -194,7 +202,7 @@ If there are two flags being used to set the homepath and the config file path,
To correct this, use the `--homepath` global option to specify the Grafana default homepath for this command:
```bash
grafana-cli --homepath "/usr/share/grafana" admin reset-admin-password <new password>
grafana-cli admin reset-admin-password --homepath "/usr/share/grafana" <new password>
```
If you have not lost the admin password, we recommend that you change the user password either in the User Preferences or in the Server Admin > User tab.

View File

@@ -3,7 +3,7 @@ title = "Configuration"
description = "Configuration documentation"
keywords = ["grafana", "configuration", "documentation"]
aliases = ["/docs/grafana/latest/installation/configuration/"]
weight = 150
weight = 300
+++
# Configuration
@@ -12,7 +12,7 @@ Grafana has a number of configuration options that you can specify in a `.ini` c
> **Note:** You must restart Grafana for any configuration changes to take effect.
To see all settings currently applied to the Grafana server, refer to [View server settings]({{< relref "view-server/view-server-settings.md" >}}).
To see all settings currently applied to the Grafana server, refer to [View server settings]({{< relref "view-server-settings.md" >}}).
## Config file locations
@@ -268,11 +268,6 @@ Specify a full HTTP URL address to the root of your Grafana CDN assets. Grafana
For example, given a cdn url like `https://cdn.myserver.com` grafana will try to load a javascript file from
`http://cdn.myserver.com/grafana-oss/v7.4.0/public/build/app.<hash>.js`.
### read_timeout
Sets the maximum time using a duration format (5s/5m/5ms) before timing out read of an incoming request and closing idle connections.
`0` means there is no timeout for reading the request.
<hr />
## [database]
@@ -522,14 +517,6 @@ Set to `true` to enable the X-Content-Type-Options response header. The X-Conten
Set to `false` to disable the X-XSS-Protection header, which tells browsers to stop pages from loading when they detect reflected cross-site scripting (XSS) attacks. The default value is `false` until the next minor release, `6.3`.
### content_security_policy
Set to `true` to add the Content-Security-Policy header to your requests. CSP allows to control resources that the user agent can load and helps prevent XSS attacks.
### content_security_policy_template
Set Content Security Policy template used when adding the Content-Security-Policy header to your requests. `$NONCE` in the template includes a random nonce.
<hr />
## [snapshots]
@@ -645,10 +632,6 @@ The duration in time a user invitation remains valid before expiring.
This setting should be expressed as a duration. Examples: 6h (hours), 2d (days), 1w (week).
Default is `24h` (24 hours). The minimum supported duration is `15m` (15 minutes).
### hidden_users
This is a comma-separated list of usernames. Users specified here are hidden in the Grafana UI. They are still visible to Grafana administrators and to themselves.
<hr>
## [auth]
@@ -659,15 +642,13 @@ Grafana provides many ways to authenticate users. Refer to the Grafana [Authenti
The cookie name for storing the auth token. Default is `grafana_session`.
### login_maximum_inactive_lifetime_duration
### login_maximum_inactive_lifetime_days
The maximum lifetime (duration) an authenticated user can be inactive before being required to login at next visit. Default is 7 days (7d).
This setting should be expressed as a duration, e.g. 5m (minutes), 6h (hours), 10d (days), 2w (weeks), 1M (month). The lifetime resets at each successful token rotation (token_rotation_interval_minutes).
The lifetime (days) an authenticated user can be inactive before being required to log in at next visit. Default is 7 days.
### login_maximum_lifetime_duration
### login_maximum_lifetime_days
The maximum lifetime (duration) an authenticated user can be logged in since login time before being required to login. Default is 30 days (30d).
This setting should be expressed as a duration, e.g. 5m (minutes), 6h (hours), 10d (days), 2w (weeks), 1M (month).
The maximum lifetime (days) an authenticated user can be logged in before being required to login. Default is 30 days.
### token_rotation_interval_minutes
@@ -777,26 +758,6 @@ Refer to [Auth proxy authentication]({{< relref "../auth/auth-proxy.md" >}}) for
Refer to [LDAP authentication]({{< relref "../auth/ldap.md" >}}) for detailed instructions.
## [aws]
You can configure core and external AWS plugins.
### allowed_auth_providers
Specify what authentication providers the AWS plugins allow. For a list of allowed providers, refer to the data-source configuration page for a given plugin. If you configure a plugin by provisioning, only providers that are specified in `allowed_auth_providers` are allowed.
Options: `default` (AWS SDK default), `keys` (Access and secret key), `credentials` (Credentials file), `ec2_iam_role` (EC2 IAM role)
### assume_role_enabled
Set to `false` to disable AWS authentication from using an assumed role with temporary security credentials. For details about assume roles, refer to the AWS API reference documentation about the [AssumeRole](https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html) operation.
If this option is disabled, the **Assume Role** and the **External Id** field are removed from the AWS data source configuration page. If the plugin is configured using provisioning, it is possible to use an assumed role as long as `assume_role_enabled` is set to `true`.
### list_metrics_page_limit
Use the [List Metrics API](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_ListMetrics.html) option to load metrics for custom namespaces in the CloudWatch data source. By default, the page limit is 500.
<hr />
## [smtp]
@@ -1091,12 +1052,6 @@ Configures max number of alert annotations that Grafana stores. Default value is
<hr>
## [annotations]
### cleanupjob_batchsize
Configures the batch size for the annotation clean-up job. This setting is used for dashboard, API, and alert annotations.
## [annotations.dashboard]
Dashboard annotations means that annotations are associated with the dashboard they are created on.
@@ -1127,7 +1082,7 @@ Configures max number of API annotations that Grafana keeps. Default value is 0,
## [explore]
For more information about this feature, refer to [Explore]({{< relref "../explore/_index.md" >}}).
For more information about this feature, refer to [Explore]({{< relref "../explore/index.md" >}}).
### enabled
@@ -1135,7 +1090,7 @@ Enable or disable the Explore section. Default is `enabled`.
## [metrics]
For detailed instructions, refer to [Internal Grafana metrics]({{< relref "view-server/internal-metrics.md" >}}).
For detailed instructions, refer to [Internal Grafana metrics]({{< relref "metrics.md" >}}).
### enabled
@@ -1561,9 +1516,6 @@ Set this to `true` to have date formats automatically derived from your browser
Used as the default time zone for user preferences. Can be either `browser` for the browser local time zone or a time zone name from the IANA Time Zone database, such as `UTC` or `Europe/Amsterdam`.
## [expressions]
> **Note:** This feature is available in Grafana v7.4 and later versions.
### enabled
Set this to `false` to disable expressions and hide them in the Grafana UI. Default is `true`.

View File

@@ -3,7 +3,7 @@ title = "Configure Grafana Docker image"
description = "Guide for configuring the Grafana Docker image"
keywords = ["grafana", "configuration", "documentation", "docker"]
aliases = ["/docs/grafana/latest/installation/configure-docker/"]
weight = 200
weight = 400
+++
# Configure a Grafana Docker image

View File

@@ -2,7 +2,7 @@
title = "Image rendering"
description = ""
keywords = ["grafana", "image", "rendering", "plugin"]
weight = 300
weight = 8
+++
# Image rendering

View File

@@ -2,7 +2,7 @@
title = "Jaeger instrumentation"
description = "Jaeger traces emitted and propagation by Grafana"
keywords = ["grafana", "jaeger", "tracing"]
weight = 900
weight = 9
+++
# Jaeger instrumentation

View File

@@ -2,15 +2,14 @@
title = "Internal Grafana metrics"
description = "Internal metrics exposed by Grafana"
keywords = ["grafana", "metrics", "internal metrics"]
aliases = ["/docs/grafana/latest/admin/metrics/"]
weight = 200
weight = 8
+++
# Internal Grafana metrics
Grafana collects some metrics about itself internally. Grafana supports pushing metrics to Graphite or exposing them to be scraped by Prometheus.
For more information about configuration options related to Grafana metrics, refer to [metrics]({{< relref "../../administration/configuration/#metrics" >}}) and [metrics.graphite]({{< relref "../../administration/configuration/#metrics-graphite" >}}) in [Configuration]({{< relref "../../administration/configuration.md" >}}).
For more information about configuration options related to Grafana metrics, refer to [metrics]({{< relref "../administration/configuration/#metrics" >}}) and [metrics.graphite]({{< relref "../administration/configuration/#metrics-graphite" >}}) in [Configuration]({{< relref "../administration/configuration.md" >}}).
## Available metrics

View File

@@ -1,14 +1,15 @@
+++
title = "User account profile"
description = "View and edit your Grafana user profile"
weight = 100
title = "Change your preferences"
description = "How to change your Grafana preferences"
keywords = ["grafana", "profile", "change", "preferences"]
weight = 200
+++
# Grafana user account profile
# Change your Grafana preferences
You can edit and view important information about your Grafana user account, including your assigned organizations, your sessions, and the information associated with your account.
You can perform several tasks in the Preferences tab. You can edit your profile, change your Grafana preferences, and view information about your profile and Grafana usage.
## Edit your profile
## Edit your Grafana profile
Your profile includes your name, user name, and email address.
@@ -19,6 +20,19 @@ Your profile includes your name, user name, and email address.
- **Username -** Edit this field to change your user name.
1. Click **Save**.
## Edit your Grafana preferences
Your Grafana preferences include whether uses the dark or light theme, your home dashboard, and your timezone.
> **Note:** Settings on your personal instance override settings made by your administrator at the instance or team level.
1. Navigate to the Preferences tab. Hover your cursor over your user icon in the lower left corner of the screen, and then click **Preferences.**
1. In the Preferences section, you can edit any of the following:
- **UI Theme -** Click to set the **Dark** or **Light** to select a theme. **Default** is either the dark theme or the theme selected by your Grafana administrator.
- **Home Dashboard -** Refer to [Set your personal home dashboard]({{< relref "change-home-dashboard.md#set-your-personal-home-dashboard" >}}) for more information.
- **Timezone -** Click to select an option in the **Timezone** list. **Default** is either the browser local timezone or the timezone selected by your Grafana administrator. Refer to [Time range controls]({{< relref "../dashboards/time-range-controls.md" >}}) for more information about Grafana time settings.
1. Click **Save**.
## View your assigned organizations
Every user is a member of at least one organization. You can have different roles in every organization that you are a member of.
@@ -26,8 +40,8 @@ Every user is a member of at least one organization. You can have different role
1. Navigate to the Preferences tab. Hover your cursor over your user icon in the lower left corner of the screen, and then click **Preferences.**
1. Scroll down to the Organizations section.
- **Name -** The name of the organizations you are a member of in that Grafana instance.
- **Role -** The role you are assigned in the organization. Refer to [Organization roles]({{< relref "../../permissions/organization_roles.md" >}}) about permissions assigned to each role.
- **Current -** Grafana tags the organization that you are currently signed in to as _Current_. If you are part of multiple organizations, then you can click **Select** to switch to that organization.
- **Role -** The role you are assigned in the organization. Refer to [Organization roles]({{< relref "../permissions/organization_roles.md" >}}) about permissions assigned to each role.
- **Current -** Grafana tags the organization that you are currently signed in to as _Current_.
## View your Grafana sessions
@@ -39,4 +53,4 @@ Grafana logs your sessions in each Grafana instance. You can review this section
- **Logged on -** The date you logged on to the current Grafana instance.
- **IP address -** The IP address that you logged on from.
- **Browser & OS -** The web browser and operating system used to log on to Grafana.
- If you are a Grafana Admin for the instance, then you can revoke a session by clicking the red signout icon in the session row.
- If you are a Grafana Admin for the instance, then you can revoke a session by clicking the red signout icon in the session row.

View File

@@ -1,20 +0,0 @@
+++
title = "Preferences"
aliases =["/docs/grafana/latest/administration/preferences.md"]
weight = 50
+++
# Grafana preferences
Grafana preferences are basic settings. They control the Grafana UI theme, home dashboard, time zone, and so on.
Preferences are sometimes confusing because they can be set at four different levels, listed from highest level to lowest:
- **Server -** Affects all users on the Grafana server. Set by a [Grafana Server Admin]({{< relref "../../permissions/_index.md#grafana-server-admin-role" >}}).
- **Organization -** Affects all users in an organization. Set by an [Organization Admin]({{< relref "../../permissions/organization_roles.md#organization-admin-role" >}}).
- **Team -** Affects all users assigned to a team. Set by an Organization Admin or Team Admin. To learn more about these roles, refer to [Organization roles]({{< relref "../../permissions/organization_roles.md" >}}).
- **User account -** Affects the individual user. Set by the user on their own account.
The lowest level always takes precedence. For example, if a user sets their theme to **Light**, then their visualization of Grafana displays the light theme. Nothing at any higher level can override that.
If the user is aware of the change and intended it, then that's great! But if the user is a Server Admin who made the change to their user preferences a long time ago, they might have forgotten they did that. Then, if that Server Admin is trying to change the theme at the server level, they'll get frustrated as none of their changes have any effect that they can see. (Also, the users on the server might be confused, because _they_ can see the server-level changes!)

View File

@@ -1,53 +0,0 @@
+++
title = "Change name and email"
keywords = ["grafana", "configuration", "documentation", "home"]
weight = 100
+++
# Change Grafana name and email
In Grafana, you can change your names and emails associated with groups or accounts in the Settings or Preferences. This topic provides instructions for each task.
{{< docs/shared "preferences/some-tasks-require-permissions.md" >}}
## Change organization name
Grafana server administrators and organization administrators can change organization names.
### Grafana Server Admin change organization name
Follow these instructions if you are a Grafana Server Admin.
{{< docs/list >}}
{{< docs/shared "manage-users/view-server-org-list.md" >}}
1. In the organization list, click the name of the organization that you want to change.
1. In **Name**, enter the new organization name.
1. Click **Update**.
{{< /docs/list >}}
### Organization Admin change organization name
If you are an Organization Admin, follow these steps:
{{< docs/list >}}
{{< docs/shared "preferences/org-preferences-list.md" >}}
1. In **Organization name**, enter the new name.
1. Click **Update organization name**.
{{< /docs/list >}}
## Change team name or email
Organization administrators and team administrators can change team names and email addresses.
To change the team name or email, follow these steps:
1. Hover your cursor over the **Configuration** (gear) icon in the side menu.
1. Click **Teams**. Grafana displays the team list.
1. In the team list, click the name of the team that you want to change.
1. Click the **Settings** tab.
1. In the Team Settings section, you can edit the following:
- **Name -** Edit this field to change the display name associated with the team.
- **Email -** Edit this field to change the email address associated with the team.
1. Click **Update**.
## Change user name or email
To learn how to edit your user information, refer to [Grafana user account profile]({{< relref "../../manage-users/user-admin/user-profile.md" >}}).

View File

@@ -1,66 +0,0 @@
+++
title = "Change UI theme"
description = "How to set the Grafana UI theme"
keywords = ["grafana", "configuration", "documentation", "home"]
weight = 200
+++
# Change Grafana UI theme
In Grafana, you can modify the UI theme configured in the Settings or Preferences. Set the UI theme for the server, an organization, a team, or your personal user account using the instructions in this topic.
{{< docs/shared "preferences/some-tasks-require-permissions.md" >}}
## Theme options
The theme affects how Grafana displays graphs, menus, other UI elements.
### Default
**Default** is either the dark theme or the theme selected in a higher level. For example, if an Organization administrator set the **Light** theme, then that is the default for all the teams in that organization.
### Dark
Here is an example of the dark theme.
![Dark theme example](/img/docs/preferences/dark-theme-7-4.png)
### Light
Here is an example of the light theme.
![Light theme example](/img/docs/preferences/light-theme-7-4.png)
## Change server UI theme
Grafana server administrators can change the Grafana UI theme for all users on the server by setting the [default_theme]({{< relref "../configuration.md#default-theme" >}}) option in the Grafana configuration file.
To see what the current settings are, refer to [View server settings]({{< relref "../view-server/view-server-settings.md" >}}).
## Change organization UI theme
Organization administrators can change the UI theme for all users in an organization.
{{< docs/list >}}
{{< docs/shared "preferences/org-preferences-list.md" >}}
{{< docs/shared "preferences/select-ui-theme-list.md" >}}
{{< /docs/list >}}
## Change team UI theme
Organization and team administrators can change the UI theme for all users in a team.
{{< docs/list >}}
{{< docs/shared "manage-users/view-team-list.md" >}}
1. Click on the team that you want to change the UI theme for and then navigate to the **Settings** tab.
{{< docs/shared "preferences/select-ui-theme-list.md" >}}
{{< /docs/list >}}
## Change your personal UI theme
You can change the UI theme for your user account. This setting overrides UI theme settings at higher levels.
{{< docs/list >}}
{{< docs/shared "preferences/navigate-user-preferences-list.md" >}}
{{< docs/shared "preferences/select-ui-theme-list.md" >}}
{{< /docs/list >}}

View File

@@ -1,44 +0,0 @@
+++
title = "Change default timezone"
description = "How to change your Grafana timezone"
keywords = ["grafana", "configuration", "documentation", "home"]
weight = 400
+++
# Change the Grafana default timezone
By default, Grafana uses the timezone in your web browser. However, you can override this setting at the server, organization, team, or individual user level. This topic provides instructions for each task.
{{< docs/shared "preferences/some-tasks-require-permissions.md" >}}
## Set server timezone
Grafana server administrators can choose a default timezone for all users on the server by setting the [default_timezone]({{< relref "../configuration.md#default-timezone" >}}) option in the Grafana configuration file.
## Set organization timezone
Organization administrators can choose a default timezone for their organization.
{{< docs/list >}}
{{< docs/shared "preferences/org-preferences-list.md" >}}
{{< docs/shared "preferences/select-timezone-list.md" >}}
{{< /docs/list >}}
## Set team timezone
Organization administrators and team administrators can choose a default timezone for all users in a team.
{{< docs/list >}}
{{< docs/shared "manage-users/view-team-list.md" >}}
1. Click on the team you that you want to change the timezone for and then navigate to the **Settings** tab.
{{< docs/shared "preferences/select-timezone-list.md" >}}
{{< /docs/list >}}
## Set your personal timezone
You can change the timezone for your user account. This setting overrides timezone settings at higher levels.
{{< docs/list >}}
{{< docs/shared "preferences/navigate-user-preferences-list.md" >}}
{{< docs/shared "preferences/select-timezone-list.md" >}}
{{< /docs/list >}}

View File

@@ -1,72 +0,0 @@
+++
title = "Change home dashboard"
description = "How to replace the default home dashboard"
keywords = ["grafana", "configuration", "documentation", "home"]
aliases = ["/docs/grafana/latest/administration/change-home-dashboard/"]
weight = 300
+++
# Change the default home dashboard
The home dashboard you set is the one all users will see by default when they log in. You can set the home dashboard for the server, an organization, a team, or your personal user account. This topic provides instructions for each task.
{{< docs/shared "preferences/some-tasks-require-permissions.md" >}}
## Navigate to the home dashboard
The home dashboard is the first dashboard a user sees when they sign in to Grafana. You can also navigate to the home dashboard manually.
1. Hover your cursor over the **Dashboards** (four squares) icon.
1. Click **Home**.
## Set the home dashboard for the server
Users with the Grafana Server Admin flag on their account or access to the configuration file can define a JSON file to use as the home dashboard for all users on the server.
### [Optional] Convert an existing dashboard into a JSON file
1. Navigate to the page of the dashboard you want to use as the home dashboard.
1. Click the **Share dashboard** icon next to the dashboard title.
1. In the Export tab, click **Save to file**. Grafana converts the dashboard to a JSON file and saves it locally.
### Use a JSON file as the home dashboard
1. Save your JSON file somewhere that Grafana can access it. For example, in the Grafana `data` folder of Grafana.
1. Update your configuration file to set the path to the JSON file. Refer to [default_home_dashboard_path]({{< relref "../configuration.md">}}) for more information about modifying the Grafana configuration files.
```ini
[dashboards]
# Path to the default home dashboard. If this value is empty, then Grafana uses StaticRootPath + "dashboards/home.json"
default_home_dashboard_path = data/main-dashboard.json
```
## Set the home dashboard for your organization
Organization administrators can choose a home dashboard for their organization.
{{< docs/list >}}
{{< docs/shared "preferences/navigate-to-the-dashboard-list.md" >}}
{{< docs/shared "preferences/org-preferences-list.md" >}}
{{< docs/shared "preferences/select-home-dashboard-list.md" >}}
{{< /docs/list >}}
## Set home dashboard for your team
Organization administrators and Team Admins can choose a home dashboard for a team.
{{< docs/list >}}
{{< docs/shared "preferences/navigate-to-the-dashboard-list.md" >}}
{{< docs/shared "manage-users/view-team-list.md" >}}
1. Click on the team that you want to change the home dashboard for and then navigate to the **Settings** tab.
{{< docs/shared "preferences/select-home-dashboard-list.md" >}}
{{< /docs/list >}}
## Set your personal home dashboard
You can choose your own personal home dashboard. This setting overrides all home dashboards set at higher levels.
{{< docs/list >}}
{{< docs/shared "preferences/navigate-to-the-dashboard-list.md" >}}
{{< docs/shared "preferences/navigate-user-preferences-list.md" >}}
{{< docs/shared "preferences/select-home-dashboard-list.md" >}}
{{< /docs/list >}}

View File

@@ -3,7 +3,7 @@ title = "Provisioning"
description = ""
keywords = ["grafana", "provisioning"]
aliases = ["/docs/grafana/latest/installation/provisioning"]
weight = 800
weight = 8
+++
# Provisioning Grafana
@@ -148,9 +148,8 @@ Since not all datasources have the same configuration settings we only have the
| tlsSkipVerify | boolean | _All_ | Controls whether a client verifies the server's certificate chain and host name. |
| serverName | string | _All_ | Optional. Controls the server name used for certificate common name/subject alternative name verification. Defaults to using the data source URL. |
| graphiteVersion | string | Graphite | Graphite version |
| timeInterval | string | Prometheus, Elasticsearch, InfluxDB, MySQL, PostgreSQL and MSSQL | Lowest interval/step value that should be used for this data source. |
| timeInterval | string | Prometheus, Elasticsearch, InfluxDB, MySQL, PostgreSQL and MSSQL | Lowest interval/step value that should be used for this data source. |
| httpMode | string | Influxdb | HTTP Method. 'GET', 'POST', defaults to GET |
| maxSeries | number | Influxdb | Max number of series/tables that Grafana processes |
| httpMethod | string | Prometheus | HTTP Method. 'GET', 'POST', defaults to GET |
| esVersion | number | Elasticsearch | Elasticsearch version as a number (2/5/56/60/70) |
| timeField | string | Elasticsearch | Which field that should be used as timestamp |
@@ -172,7 +171,6 @@ Since not all datasources have the same configuration settings we only have the
| tsdbVersion | string | OpenTSDB | Version |
| tsdbResolution | string | OpenTSDB | Resolution |
| sslmode | string | PostgreSQL | SSLmode. 'disable', 'require', 'verify-ca' or 'verify-full' |
| tlsConfigurationMethod | string | PostgreSQL | SSL Certificate configuration, either by 'file-path' or 'file-content' |
| sslRootCertFile | string | PostgreSQL | SSL server root certificate file, must be readable by the Grafana user |
| sslCertFile | string | PostgreSQL | SSL client certificate file, must be readable by the Grafana user |
| sslKeyFile | string | PostgreSQL | SSL client key file, must be readable by _only_ the Grafana user |
@@ -423,17 +421,13 @@ The following sections detail the supported settings and secure settings for eac
#### Alert notification `pushover`
| Name | Secure setting |
| -------- | -------------- |
| apiToken | yes |
| userKey | yes |
| device | |
| priority | |
| okPriority | |
| retry | |
| expire | |
| sound | |
| okSound | |
| Name | Secure setting |
| -------- | -------------- |
| apiToken | yes |
| userKey | yes |
| device | |
| retry | |
| expire | |
#### Alert notification `slack`

View File

@@ -0,0 +1,21 @@
+++
title = "View server settings"
description = "How to view server settings in the Grafana UI"
keywords = ["grafana", "configuration", "server", "settings"]
weight = 350
+++
# View Grafana server settings
If you are a Grafana server admin, then you can use the Settings tab to view the settings applied to your Grafana server by the [Configuration]({{< relref "configuration.md#config-file-locations" >}}) file and any environmental variables.
> **Note:** Only Grafana server admins can access the **Server Admin** menu. For more information about about admin permissions, refer to [Grafana server admin]({{< relref "../permissions/_index.md" >}}).
## View server settings
1. Log in to your Grafana server with an account that has the Grafana Admin flag set.
1. Hover your cursor over the **Server Admin** (shield) icon in the side menu and then click the **Settings** tab.
## Available settings
For a full list of server settings, refer to [Configuration]({{< relref "configuration.md" >}}).

View File

@@ -1,15 +1,14 @@
+++
title = "View server stats"
keywords = ["grafana", "server", "statistics"]
aliases = ["/docs/grafana/latest/admin/view-server-stats/"]
weight = 400
weight = 1150
+++
# View Grafana server stats
If you are a Grafana server admin, then you can view useful statistics about your Grafana server in the Stats tab.
> **Note:** Only Grafana server administrators can access the **Server Admin** menu. For more information about about administrative permissions, refer to [Grafana server admin]({{< relref "../../permissions/_index.md" >}}).
> **Note:** Only Grafana server admins can access the **Server Admin** menu. For more information about about admin permissions, refer to [Grafana server admin]({{< relref "../permissions/_index.md" >}}).
## View server stats

View File

@@ -1,8 +0,0 @@
+++
title = "View server"
weight = 100
+++
# View server information
This setting contains information about tools that Grafana Server Admins can use to learn more about their Grafana servers.

View File

@@ -1,22 +0,0 @@
+++
title = "View server settings"
description = "How to view server settings in the Grafana UI"
keywords = ["grafana", "configuration", "server", "settings"]
aliases = ["/docs/grafana/latest/admin/view-server-settings/"]
weight = 300
+++
# View Grafana server settings
If you are a Grafana server administrator, use the Settings tab to view the settings that are applied to your Grafana server via the [Configuration]({{< relref "../configuration.md#config-file-locations" >}}) file and any environmental variables.
> **Note:** Only Grafana server administrators can access the **Server Admin** menu. For more information about about administrative permissions, refer to [Grafana server admin]({{< relref "../../permissions/_index.md" >}}).
## View server settings
1. Log in to your Grafana server with an account that has the Grafana Admin flag set.
1. Hover your cursor over the **Server Admin** (shield) icon in the side menu and then click the **Settings** tab.
## Available settings
For a full list of server settings, refer to [Configuration]({{< relref "../configuration.md" >}}).

View File

@@ -42,7 +42,7 @@ of core Grafana. Only some data sources are supported right now. They include `G
## Metrics from the alert engine
The alert engine publishes some internal metrics about itself. You can read more about how Grafana publishes [internal metrics]({{< relref "../administration/view-server/internal-metrics.md" >}}).
The alert engine publishes some internal metrics about itself. You can read more about how Grafana publishes [internal metrics]({{< relref "../administration/metrics/" >}}).
Description | Type | Metric name
---------- | ----------- | ----------
@@ -50,3 +50,4 @@ Total number of alerts | counter | `alerting.active_alerts`
Alert execution result | counter | `alerting.result`
Notifications sent counter | counter | `alerting.notifications_sent`
Alert execution timer | timer | `alerting.execution_time`

View File

@@ -20,4 +20,4 @@ This topic explains how you can use alert query labels in alert notifications.
1. Refer to the alert query labels in the alert rule name and/or alert notification message field by using the `${Label}` syntax.
1. Click **Save** in the upper right corner to save the alert rule and the dashboard.
![Alerting notification template](/img/docs/alerting/alert-notification-template-7-4.png)
![Alerting notification template](/img/docs/alerting/notification_template.png)

View File

@@ -62,7 +62,7 @@ Microsoft Teams | `teams` | yes, external only | no
OpsGenie | `opsgenie` | yes, external only | yes
[Pagerduty](#pagerduty) | `pagerduty` | yes, external only | yes
Prometheus Alertmanager | `prometheus-alertmanager` | yes, external only | yes
[Pushover](#pushover) | `pushover` | yes | no
Pushover | `pushover` | yes | no
Sensu | `sensu` | yes, external only | no
[Sensu Go](#sensu-go) | `sensugo` | yes, external only | no
[Slack](#slack) | `slack` | yes | no
@@ -129,27 +129,7 @@ This might break custom event rules in your PagerDuty rules if you rely on the f
Move any existing rules using `custom_details.myMetric` to `custom_details.queries.myMetric`.
This behavior will become the default in a future version of Grafana.
> **Note:** The `dedup_key` tag overrides the Grafana-generated `dedup_key` with a custom key.
> **Note:** The `state` tag overrides the current alert state inside the `custom_details` payload.
### Pushover
To set up Pushover, you must provide a user key and an API token. Refer to [What is Pushover and how do I use it](https://support.pushover.net/i7-what-is-pushover-and-how-do-i-use-it) for instructions on how to generate them.
Setting | Description
---------- | -----------
API Token | Application token
User key(s) | A comma-separated list of user keys
Device(s) | A comma-separated list of devices
Priority | The priority alerting nottifications are sent
OK priority | The priority OK notifications are sent; if not set, then OK notifications are sent with the priority set for alerting notifications
Retry | How often (in seconds) the Pushover servers send the same notification to the user. (minimum 30 seconds)
Expire | How many seconds your notification will continue to be retried for (maximum 86400 seconds)
Alerting sound | The sound for alerting notifications
OK sound | The sound for OK notifications
> Using `dedup_key` tag will override Grafana generated `dedup_key` with a custom key.
### Webhook
The webhook notification is a simple way to send information about a state change over HTTP to a custom endpoint.
@@ -219,6 +199,10 @@ Once these two properties are set, you can send the alerts to Kafka for further
Notifications can be sent by setting up an incoming webhook in Google Hangouts chat. For more information about configuring a webhook, refer to [webhooks](https://developers.google.com/hangouts/chat/how-tos/webhooks).
### Squadcast
Squadcast helps you get alerted via Phone call, SMS, Email and Push notifications and lets you take actions on those alerts. Grafana notifications can be sent to Squadcast via a simple incoming webhook. Refer the official [Squadcast support documentation](https://support.squadcast.com/docs/grafana) for configuring these webhooks.
### Prometheus Alertmanager
Alertmanager handles alerts sent by client applications such as Prometheus server or Grafana. It takes care of deduplicating, grouping, and routing them to the correct receiver. Grafana notifications can be sent to Alertmanager via a simple incoming webhook. Refer to the official [Prometheus Alertmanager documentation](https://prometheus.io/docs/alerting/alertmanager) for configuration information.

View File

@@ -75,10 +75,6 @@ Customize user login using `login_attribute_path` configuration option. Order of
You can customize the attribute name used to extract the ID token from the returned OAuth token with the `id_token_attribute_name` option.
You can set the user's display name with JMESPath using the `name_attribute_path` configuration option. It operates the same way as the `login_attribute_path` option.
> **Note:** `name_attribute_path` is available in Grafana 7.4+.
## Set up OAuth2 with Auth0
1. Create a new Client in Auth0

View File

@@ -61,7 +61,7 @@ At this stage, you have optimized your dashboard management use with a consisten
- Actively reducing sprawl.
- Regularly review existing dashboards to make sure they are still relevant.
- Only approved dashboards added to master dashboard list.
- Tracking dashboard use. If you're an Enterprise user, you can take advantage of [Usage insights]({{< relref "../enterprise/usage-insights/_index.md" >}}).
- Tracking dashboard use. If you're an Enterprise user, you might take advantage of [Usage insights]({{< relref "../enterprise/usage-insights.md" >}}).
- Consistency by design.
- Use scripting libraries to generate dashboards, ensure consistency in pattern and style.
- grafonnet (Jsonnet)

View File

@@ -9,11 +9,11 @@ weight = 1200
A dashboard in Grafana is represented by a JSON object, which stores metadata of its dashboard. Dashboard metadata includes dashboard properties, metadata from panels, template variables, panel queries, etc.
To view the JSON of a dashboard:
To view the JSON of a dashboard, follow the steps mentioned below:
1. Navigate to a dashboard.
1. In the top navigation menu, click the **Dashboard settings** (gear) icon.
1. Click **JSON Model**.
1. Go to a dashboard
1. Click on `Manage dashboard` menu on the top navigation bar
1. Select `View JSON` from the dropdown menu
## JSON fields

View File

@@ -19,7 +19,7 @@ The following data sources are officially supported:
- [AWS CloudWatch]({{< relref "cloudwatch.md" >}})
- [Azure Monitor]({{< relref "azuremonitor.md" >}})
- [Elasticsearch]({{< relref "elasticsearch.md" >}})
- [Google Cloud Monitoring]({{< relref "google-cloud-monitoring/_index.md" >}})
- [Google Cloud Monitoring]({{< relref "cloudmonitoring.md" >}})
- [Graphite]({{< relref "graphite.md" >}})
- [InfluxDB]({{< relref "influxdb.md" >}})
- [Loki]({{< relref "loki.md" >}})

View File

@@ -165,7 +165,69 @@ Grafana alerting is supported for the Azure Monitor service. This is not Azure A
{{< docs-imagebox img="/img/docs/v60/azuremonitor-alerting.png" class="docs-image--no-shadow" caption="Azure Monitor Alerting" >}}
## Query the Logs service
## Query the Application Insights Service
{{< docs-imagebox img="/img/docs/azuremonitor/insights_metrics_multi-dim.png" class="docs-image--no-shadow" caption="Application Insights Query Editor" >}}
As of Grafana 7.1, you can select more than one group by dimension.
### Formatting legend keys with aliases for Application Insights
The default legend formatting is:
`metricName{dimensionName=dimensionValue,dimensionTwoName=DimensionTwoValue}`
In the Legend Format field, the aliases which are defined below can be combined any way you want.
Application Insights examples:
- `city: {{ client/city }}`
- `{{ metric }} [Location: {{ client/countryOrRegion }}, {{ client/city }}]`
### Alias patterns for Application Insights
- `{{ groupbyvalue }}` = _Legacy as of 7.1+ (for backwards compatibility)_ replaced with the first dimension's key/label (as sorted by the key/label)
- `{{ groupbyname }}` = _Legacy as of 7.1+ (for backwards compatibility)_ replaced with first dimension's value (as sorted by the key/label) (e.g. BlockBlob)
- `{{ metric }}` = replaced with metric name (e.g. requests/count)
- `{{ arbitraryDim }}` = _Available in 7.1+_ replaced with the value of the corresponding dimension. (e.g. `{{ client/city }}` becomes Chicago)
### Filter expressions for Application Insights
The filter field takes an OData filter expression.
Examples:
- `client/city eq 'Boydton'`
- `client/city ne 'Boydton'`
- `client/city ne 'Boydton' and client/city ne 'Dublin'`
- `client/city eq 'Boydton' or client/city eq 'Dublin'`
### Templating with variables for Application Insights
Use the one of the following queries in the `Query` field in the Variable edit view.
Check out the [Templating]({{< relref "../variables/_index.md" >}}) documentation for an introduction to the templating feature and the different types of template variables.
| Name | Description |
| ---------------------------------- | ------------------------------------------------------------ |
| `AppInsightsMetricNames()` | Returns a list of metric names. |
| `AppInsightsGroupBys(aMetricName)` | Returns a list of "group bys" for the specified metric name. |
Examples:
- Metric Names query: `AppInsightsMetricNames()`
- Passing in metric name variable: `AppInsightsGroupBys(requests/count)`
- Chaining template variables: `AppInsightsGroupBys($metricnames)`
{{< docs-imagebox img="/img/docs/v60/appinsights-service-variables.png" class="docs-image--no-shadow" caption="Nested Application Insights Template Variables" >}}
### Application Insights alerting
Grafana alerting is supported for Application Insights. This is not Azure Alerts support. For more information about Grafana alerting, refer to [Alerts overview]({{< relref "../alerting/_index.md" >}}).
{{< docs-imagebox img="/img/docs/v60/azuremonitor-alerting.png" class="docs-image--no-shadow" caption="Azure Monitor Alerting" >}}
## Querying the Logs service
Queries are written in the [Kusto Query Language](https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/). A Logs query can be formatted as time series data or as table data.
@@ -311,68 +373,6 @@ If you're not currently logged in to the Azure Portal, then the link opens the l
Grafana alerting is supported for Application Insights. This is not Azure Alerts support. Read more about how alerting in Grafana works in [Alerting rules]({{< relref "../alerting/_index.md" >}}).
## Query Application Insights service
{{< docs-imagebox img="/img/docs/azuremonitor/insights_metrics_multi-dim.png" class="docs-image--no-shadow" caption="Application Insights Query Editor" >}}
As of Grafana 7.1, you can select more than one group by dimension.
### Format legend keys with aliases for Application Insights
The default legend formatting is:
`metricName{dimensionName=dimensionValue,dimensionTwoName=DimensionTwoValue}`
In the Legend Format field, the aliases which are defined below can be combined any way you want.
Application Insights examples:
- `city: {{ client/city }}`
- `{{ metric }} [Location: {{ client/countryOrRegion }}, {{ client/city }}]`
### Alias patterns for Application Insights
- `{{ groupbyvalue }}` = _Legacy as of 7.1+ (for backwards compatibility)_ replaced with the first dimension's key/label (as sorted by the key/label)
- `{{ groupbyname }}` = _Legacy as of 7.1+ (for backwards compatibility)_ replaced with first dimension's value (as sorted by the key/label) (e.g. BlockBlob)
- `{{ metric }}` = replaced with metric name (e.g. requests/count)
- `{{ arbitraryDim }}` = _Available in 7.1+_ replaced with the value of the corresponding dimension. (e.g. `{{ client/city }}` becomes Chicago)
### Filter expressions for Application Insights
The filter field takes an OData filter expression.
Examples:
- `client/city eq 'Boydton'`
- `client/city ne 'Boydton'`
- `client/city ne 'Boydton' and client/city ne 'Dublin'`
- `client/city eq 'Boydton' or client/city eq 'Dublin'`
### Templating with variables for Application Insights
Use the one of the following queries in the `Query` field in the Variable edit view.
Check out the [Templating]({{< relref "../variables/_index.md" >}}) documentation for an introduction to the templating feature and the different types of template variables.
| Name | Description |
| ---------------------------------- | ------------------------------------------------------------ |
| `AppInsightsMetricNames()` | Returns a list of metric names. |
| `AppInsightsGroupBys(aMetricName)` | Returns a list of "group bys" for the specified metric name. |
Examples:
- Metric Names query: `AppInsightsMetricNames()`
- Passing in metric name variable: `AppInsightsGroupBys(requests/count)`
- Chaining template variables: `AppInsightsGroupBys($metricnames)`
{{< docs-imagebox img="/img/docs/v60/appinsights-service-variables.png" class="docs-image--no-shadow" caption="Nested Application Insights Template Variables" >}}
### Application Insights alerting
Grafana alerting is supported for Application Insights. This is not Azure Alerts support. For more information about Grafana alerting, refer to [Alerts overview]({{< relref "../alerting/_index.md" >}}).
{{< docs-imagebox img="/img/docs/v60/azuremonitor-alerting.png" class="docs-image--no-shadow" caption="Azure Monitor Alerting" >}}
## Query the Application Insights Analytics service
If you change the service type to **Insights Analytics**, then a similar editor to the Log Analytics service is available. This service also uses the Kusto language, so the instructions for querying data are identical to [querying the log analytics service]({{< relref "#querying-the-azure-log-analytics-service" >}}), except that you query Application Insights Analytics data instead.
@@ -409,11 +409,3 @@ datasources:
logAnalyticsClientSecret: <log-analytics-client-secret>
version: 1
```
## Deprecating Application Insights and Insights Analytics
Application Insights and Insights Analytics are two ways to query the same Azure Application Insights data. That same data can also be queried from Metrics. In the upcoming Grafana 8.0 release, the Logs query type will be improved to allow querying of Application Insights data using KQL.
> **Note** In Grafana 8.0, Application Insights and Insights Analytics will be deprecated and made read-only in favor of querying this data through Metrics and Logs. Existing queries will continue to work, but you cannot edit them.
To prepare for this upcoming change, Application Insights queries can now be made in Metrics, under the "microsoft.insights/components" Namespace. Insights Analytics queries cannot be made within Logs with KQL at this time.

View File

@@ -1,26 +1,34 @@
+++
title = "Google Cloud Monitoring"
title = "Cloud Monitoring"
description = "Guide for using Google Cloud Monitoring in Grafana"
keywords = ["grafana", "stackdriver", "google", "guide", "cloud", "monitoring"]
aliases = ["/docs/grafana/latest/features/datasources/stackdriver", "/docs/grafana/latest/datasources/cloudmonitoring/", "/docs/grafana/latest/features/datasources/cloudmonitoring/"]
aliases = ["/docs/grafana/latest/features/datasources/stackdriver", "/docs/grafana/latest/features/datasources/cloudmonitoring/"]
weight = 200
+++
# Using Google Cloud Monitoring in Grafana
Grafana ships with built-in support for Google Cloud Monitoring. Just add it as a data source and you are ready to build dashboards for your Google Cloud Monitoring metrics. Refer to [Add a data source]({{< relref "../add-a-data-source.md" >}}) for instructions on how to add a data source to Grafana. Only users with the organization admin role can add data sources.
> Officially released in Grafana v6.0.0
> **Note** Before Grafana v7.1, Google Cloud Monitoring was referred to as Google Stackdriver.
> Before Grafana v7.1 this data source was named Google Stackdriver.
## Google Cloud Monitoring settings
Grafana ships with built-in support for Google Cloud Monitoring. Just add it as a data source and you are ready to build dashboards for your Google Cloud Monitoring metrics.
To access Google Cloud Monitoring settings, hover your mouse over the **Configuration** (gear) icon, then click **Data Sources**, and then click the Google Cloud Monitoring data source.
## Adding the data source
1. Open the side menu by clicking the Grafana icon in the top header.
1. In the side menu under the `Dashboards` link you should find a link named `Data Sources`.
1. Click the `+ Add data source` button in the top header.
1. Select `Google Cloud Monitoring` from the _Type_ dropdown.
1. Upload or paste in the Service Account Key file. See below for steps on how to create a Service Account Key file.
> **Note:** If you're not seeing the `Data Sources` link in your side menu, then your current user account does not have the `Admin` role for the current organization.
| Name | Description |
| --------------------- | ------------------------------------------------------------------------------------- |
| `Name` | The data source name. This is how you refer to the data source in panels and queries. |
| `Default` | Default data source means that it will be pre-selected for new panels. |
| `Service Account Key` | Upload or paste in the Service Account Key file for a GCP Project. Refer to [Using a Google Service Account Key File](#using-a-google-service-account-key-file) for details.|
| `Service Account Key` | Service Account Key File for a GCP Project. Instructions below on how to create it. |
## Authentication
@@ -39,31 +47,31 @@ The following APIs need to be enabled first:
Click on the links above and click the `Enable` button:
{{< docs-imagebox img="/img/docs/v71/cloudmonitoring_enable_api.png" max-width="450px" class="docs-image--no-shadow" caption="Enable GCP APIs" >}}
{{< docs-imagebox img="/img/docs/v71/cloudmonitoring_enable_api.png" class="docs-image--no-shadow" caption="Enable GCP APIs" >}}
#### Create a GCP Service Account for a Project
1. Navigate to the [APIs and Services Credentials page](https://console.cloud.google.com/apis/credentials).
1. Click on the `Create credentials` dropdown/button and choose the `Service account key` option.
{{< docs-imagebox img="/img/docs/v71/cloudmonitoring_create_service_account_button.png" max-width="500px" class="docs-image--no-shadow" caption="Create service account button" >}}
{{< docs-imagebox img="/img/docs/v71/cloudmonitoring_create_service_account_button.png" class="docs-image--no-shadow" caption="Create service account button" >}}
1. On the `Create service account key` page, choose key type `JSON`. Then in the `Service Account` dropdown, choose the `New service account` option:
{{< docs-imagebox img="/img/docs/v71/cloudmonitoring_create_service_account_key.png" max-width="500px" class="docs-image--no-shadow" caption="Create service account key" >}}
{{< docs-imagebox img="/img/docs/v71/cloudmonitoring_create_service_account_key.png" class="docs-image--no-shadow" caption="Create service account key" >}}
1. Some new fields will appear. Fill in a name for the service account in the `Service account name` field and then choose the `Monitoring Viewer` role from the `Role` dropdown:
{{< docs-imagebox img="/img/docs/v71/cloudmonitoring_service_account_choose_role.png" max-width="600px" class="docs-image--no-shadow" caption="Choose role" >}}
{{< docs-imagebox img="/img/docs/v71/cloudmonitoring_service_account_choose_role.png" class="docs-image--no-shadow" caption="Choose role" >}}
1. Click the Create button. A JSON key file will be created and downloaded to your computer. Store this file in a secure place as it allows access to your Google Cloud Monitoring data.
1. Upload it to Grafana on the data source Configuration page. You can either upload the file or paste in the contents of the file.
{{< docs-imagebox img="/img/docs/v71/cloudmonitoring_grafana_upload_key.png" max-width="550px" class="docs-image--no-shadow" caption="Upload service key file to Grafana" >}}
{{< docs-imagebox img="/img/docs/v71/cloudmonitoring_grafana_upload_key.png" class="docs-image--no-shadow" caption="Upload service key file to Grafana" >}}
1. The file contents will be encrypted and saved in the Grafana database. Don't forget to save after uploading the file!
{{< docs-imagebox img="/img/docs/v71/cloudmonitoring_grafana_key_uploaded.png" max-width="600px" class="docs-image--no-shadow" caption="Service key file is uploaded to Grafana" >}}
{{< docs-imagebox img="/img/docs/v71/cloudmonitoring_grafana_key_uploaded.png" class="docs-image--no-shadow" caption="Service key file is uploaded to Grafana" >}}
### Using GCE Default Service Account
@@ -173,18 +181,9 @@ Example Alias By: `{{resource.type}} - {{metric.type}}`
Example Result: `gce_instance - compute.googleapis.com/instance/cpu/usage_time`
#### Deep linking from Grafana panels to the Metrics Explorer in Google Cloud Console
> **Note:** Available in Grafana v7.1 and later versions.
{{< docs-imagebox img="/img/docs/v71/cloudmonitoring_deep_linking.png" max-width="500px" class="docs-image--right" caption="Google Cloud Monitoring deep linking" >}}
Click on a time series in the panel to see a context menu with a link to View in Metrics Explorer in Google Cloud Console. Clicking that link opens the Metrics Explorer in the Google Cloud Console and runs the query from the Grafana panel there.
The link navigates the user first to the Google Account Chooser and after successfully selecting an account, the user is redirected to the Metrics Explorer. The provided link is valid for any account, but it only displays the query if your account has access to the GCP project specified in the query.
### SLO (Service Level Objective) queries
> **Note:** Available in Grafana v7.0 and later versions.
> Only available in Grafana v7.0+
{{< docs-imagebox img="/img/docs/v70/slo-query-builder.png" max-width= "400px" class="docs-image--right" >}}
@@ -225,7 +224,7 @@ SLO queries use the same [alignment period functionality as metric queries]({{<
### MQL (Monitoring Query Language) queries
> **Note:** Available in Grafana v7.4 and later versions.
> **Note:** Only available in Grafana v7.4+.
The MQL query builder in the Google Cloud Monitoring data source allows you to display MQL results in time series format. To get an understanding of the basic concepts in MQL, refer to [Introduction to Monitoring Query Language](https://cloud.google.com/monitoring/mql).
@@ -250,7 +249,7 @@ Instead of hard-coding things like server, application and sensor name in your m
Variables are shown as dropdown select boxes at the top of the dashboard. These dropdowns make it easy to change the data
being displayed in your dashboard.
Check out the [Templating]({{< relref "../../variables/_index.md" >}}) documentation for an introduction to the templating feature and the different
Check out the [Templating]({{< relref "../variables/_index.md" >}}) documentation for an introduction to the templating feature and the different
types of template variables.
### Query Variable
@@ -283,7 +282,7 @@ Why two ways? The first syntax is easier to read and write but does not allow yo
{{< docs-imagebox img="/img/docs/v71/cloudmonitoring_annotations_query_editor.png" max-width= "400px" class="docs-image--right" >}}
[Annotations]({{< relref "../../dashboards/annotations.md" >}}) allow you to overlay rich event information on top of graphs. You add annotation
[Annotations]({{< relref "../dashboards/annotations.md" >}}) allow you to overlay rich event information on top of graphs. You add annotation
queries via the Dashboard menu / Annotations view. Annotation rendering is expensive so it is important to limit the number of rows returned. There is no support for showing Google Cloud Monitoring annotations and events yet but it works well with [custom metrics](https://cloud.google.com/monitoring/custom-metrics/) in Google Cloud Monitoring.
With the query editor for annotations, you can select a metric and filters. The `Title` and `Text` fields support templating and can use data returned from the query. For example, the Title field could have the following text:
@@ -305,7 +304,7 @@ Example Result: `monitoring.googleapis.com/uptime_check/http_status has this val
## Configure the data source with provisioning
You can configure data sources using config files with Grafana's provisioning system. Read more about how it works and all the settings you can set for data sources on the [provisioning docs page]({{< relref "../../administration/provisioning/#datasources" >}})
It's now possible to configure data sources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for data sources on the [provisioning docs page]({{< relref "../administration/provisioning/#datasources" >}})
Here is a provisioning example using the JWT (Service Account key file) authentication type.
@@ -342,3 +341,35 @@ datasources:
jsonData:
authenticationType: gce
```
## Deep linking from Grafana panels to the Metrics Explorer in Google Cloud Console
Only available in Grafana v7.1+.
{{< docs-imagebox img="/img/docs/v71/cloudmonitoring_deep_linking.png" max-width="500px" class="docs-image--right" caption="Google Cloud Monitoring deep linking" >}}
> **Note:** This feature is only available for Metric queries.
Click on a time series in the panel to see a context menu with a link to View in Metrics Explorer in Google Cloud Console. Clicking that link opens the Metrics Explorer in the Google Cloud Console and runs the query from the Grafana panel there.
The link navigates the user first to the Google Account Chooser and after successfully selecting an account, the user is redirected to the Metrics Explorer. The provided link is valid for any account, but it only displays the query if your account has access to the GCP project specified in the query.
## Out-of-the-box dashboards
> Only available in Grafana v7.3+.
The updated Cloud Monitoring data source ships with pre-configured dashboards for five of the most popular GCP services:
1. BigQuery
1. Cloud Load Balancing
1. Cloud SQL
1. Google Compute Engine `GCE`
1. Google Kubernetes Engine `GKE`
To import the pre-configured dashboards, go to the configuration page of a Cloud monitoring data source and click on the `Dashboards` tab. Click `Import` for the dashboard you would like to use.
The datasource of the newly created dashboard panels will be the one selected above.
The dashboards have a template variable which is populated with the projects accessible by the configured service account every time the dashboard is loaded. After the dashboard is loaded, you can select the project you prefer from the drop-down list.
To customize the dashboard, we recommend saving the dashboard under a different name, because otherwise the dashboard will be overwritten when a new version of the dashboard is released.
{{< docs-imagebox img="/img/docs/v73/cloud-monitoring-dashboard-import.png" caption="Cloud Monitoring dashboard import" >}}

View File

@@ -105,10 +105,6 @@ Here is a minimal policy example:
The `Assume Role ARN` field allows you to specify which IAM role to assume, if any. When left blank, the provided credentials are used directly and the associated role or user should have the required permissions. If this field is non-blank, on the other hand, the provided credentials are used to perform an [sts:AssumeRole](https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html) call.
### Endpoint
The `Endpoint` field allows you to specify a custom endpoint URL that overrides the default generated endpoint for the CloudWatch API. Leave this field blank if you want to use the default generated endpoint. For more information on why and how to use Service endpoints, refer to the [AWS service endpoints documentation](https://docs.aws.amazon.com/general/latest/gr/rande.html).
### EKS IAM roles for service accounts
The Grafana process in the container runs as user 472 (called "grafana"). When Kubernetes mounts your projected credentials, they will by default only be available to the root user. In order to allow user 472 to access the credentials (and avoid it falling back to the IAM role attached to the EC2 instance), you will need to provide a [security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) for your pod.
@@ -375,22 +371,6 @@ To request a quota increase, visit the [AWS Service Quotas console](https://cons
Please see the AWS documentation for [Service Quotas](https://docs.aws.amazon.com/servicequotas/latest/userguide/intro.html) and [CloudWatch limits](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_limits.html) for more information.
## Configure the data source with grafana.ini
In the [Grafana configuration](https://grafana.com/docs/grafana/latest/administration/configuration/#aws) there's an `AWS` section that allows you to customize the data source.
### allowed_auth_providers
Specify which authentication providers are allowed for the CloudWatch data source. The following providers are enabled by default in OSS Grafana: `default` (AWS SDK default), keys (Access and secret key), credentials (Credentials file), ec2_iam_role (EC2 IAM role).
### assume_role_enabled
Allows you to disable `assume role (ARN)` in the CloudWatch data source. By default, assume role (ARN) is enabled for OSS Grafana.
### list_metrics_page_limit
When a custom namespace is specified in the query editor, the [List Metrics API](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_ListMetrics.html) is used to populate the _Metrics_ field and the _Dimension_ fields. The API is paginated and returns up to 500 results per page. The CloudWatch data source also limits the number of pages to 500. However, you can change this limit using the `list_metrics_page_limit` variable in the [grafana configuration file](https://grafana.com/docs/grafana/latest/administration/configuration/#aws).
## Configure the data source with provisioning
It's now possible to configure data sources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for data sources on the [provisioning docs page]({{< relref "../administration/provisioning/#datasources" >}})

View File

@@ -49,7 +49,7 @@ http.cors.allow-origin: "*"
### Index settings
![Elasticsearch data source details](/img/docs/elasticsearch/elasticsearch-ds-details-7-4.png)
![Elasticsearch data source details](/img/docs/elasticsearch/elasticsearch_ds_details.png)
Here you can specify a default for the `time field` and specify the name of your Elasticsearch index. You can use
a time pattern for the index name or a wildcard.
@@ -100,7 +100,7 @@ Each data link configuration consists of:
## Metric Query editor
![Elasticsearch Query Editor](/img/docs/elasticsearch/query-editor-7-4.png)
![Elasticsearch Query Editor](/img/docs/elasticsearch/query_editor.png)
The Elasticsearch query editor allows you to select multiple metrics and group by multiple terms or filters. Use the plus and minus icons to the right to add/remove
metrics or group by clauses. Some metrics and group by clauses haves options, click the option text to expand the row to view and edit metric or group by options.
@@ -119,7 +119,7 @@ You can control the name for time series via the `Alias` input field.
Some metric aggregations are called Pipeline aggregations, for example, *Moving Average* and *Derivative*. Elasticsearch pipeline metrics require another metric to be based on. Use the eye icon next to the metric to hide metrics from appearing in the graph. This is useful for metrics you only have in the query for use in a pipeline metric.
![Pipeline aggregation editor](/img/docs/elasticsearch/pipeline-aggregation-editor-7-4.png)
![](/img/docs/elasticsearch/pipeline_metrics_editor.png)
## Templating
@@ -169,7 +169,7 @@ There are two syntaxes:
Why two ways? The first syntax is easier to read and write but does not allow you to use a variable in the middle of a word. When the *Multi-value* or *Include all value*
options are enabled, Grafana converts the labels from plain text to a lucene compatible condition.
![Query with template variables](/img/docs/elasticsearch/elastic-templating-query-7-4.png)
![](/img/docs/v43/elastic_templating_query.png)
In the above example, we have a lucene query that filters documents based on the `@hostname` property using a variable named `$hostname`. It is also using
a variable in the *Terms* group by field input box. This allows you to use a variable to quickly change how the data is grouped.

View File

@@ -1,24 +0,0 @@
+++
title = "Preconfigured dashboards"
description = "Guide for using Google Cloud Monitoring in Grafana"
keywords = ["grafana", "stackdriver", "google", "guide", "cloud", "monitoring"]
aliases = ["/docs/grafana/latest/features/datasources/stackdriver", "/docs/grafana/latest/features/datasources/cloudmonitoring/"]
weight = 10
+++
# Preconfigured Cloud Monitoring dashboards
Google Cloud Monitoring data source ships with pre-configured dashboards for some of the most popular GCP services. These curated dashboards are based on similar dashboards in the GCP dashboard samples repository. See also, [Using Google Cloud Monitoring in Grafana]({{< relref "./_index.md" >}}) for detailed instructions on how to add and configure the Google Cloud Monitoring data source.
## Curated dashboards
To import the curated dashboards:
1. On the configuration page of your Cloud Monitoring data source, click the **Dashboards** tab.
1. Click **Import** for the dashboard you would like to use.
The data source of the newly created dashboard panels will be the one selected above. The dashboards have a template variable that is populated with the projects accessible by the configured service account every time the dashboard is loaded. After the dashboard is loaded, you can select the project you prefer from the drop-down list.
In case you want to customize a dashboard, we recommend that you save it under a different name. Otherwise the dashboard will be overwritten when a new version of the dashboard is released.
{{< docs-imagebox img="/img/docs/google-cloud-monitoring/curated-dashboards-7-4.png" max-width= "650px" >}}

View File

@@ -12,7 +12,7 @@ Grafana has an advanced Graphite query editor that lets you quickly navigate the
change function parameters and much more. The editor can handle all types of graphite queries. It can even handle complex nested
queries through the use of query references.
Refer to [Add a data source]({{< relref "add-a-data-source.md" >}}) for instructions on how to add a data source to Grafana. Only organization admins can add data sources. To learn more about the Graphite data source, refer to Graphite's [product documentation](https://graphite.readthedocs.io/en/stable/).
Refer to [Add a data source]({{< relref "add-a-data-source.md" >}}) for instructions on how to add a data source to Grafana. Only organization admins can add data sources.
## Graphite settings
@@ -70,8 +70,6 @@ a function is selected, it will be added and your focus will be in the text box
Some functions like aliasByNode support an optional second argument. To add an argument, hover your mouse over the first argument and then click the `+` symbol that appears. To remove the second optional parameter, click on it and leave it blank and the editor will remove it.
To learn more, refer to [Graphite's documentation on functions](https://graphite.readthedocs.io/en/latest/functions.html).
### Sort labels
If you want consistent ordering, use sortByName. This can be particularly annoying when you have the same labels on multiple graphs, and they are both sorted differently and using different colors. To fix this, use `sortByName()`.
@@ -200,7 +198,7 @@ specify a tag or wildcard (leave empty should also work)
## Get Grafana metrics into Graphite
Grafana exposes metrics for Graphite on the `/metrics` endpoint. For detailed instructions, refer to [Internal Grafana metrics]({{< relref "../administration/view-server/internal-metrics.md">}}).
Grafana exposes metrics for Graphite on the `/metrics` endpoint. For detailed instructions, refer to [Internal Grafana metrics]({{< relref "../administration/metrics.md">}}).
## Configure the data source with provisioning

View File

@@ -33,8 +33,6 @@ Name | Description
`User` | Name of your database user
`Password` | Database user's password
`HTTP mode` | How to query the database (`GET` or `POST` HTTP verb). The `POST` verb allows heavy queries that would return an error using the `GET` verb. Default is `GET`.
`Min time interval` | Refer to [Min time interval]({{< relref "#min-time-interval" >}}).
`Max series`| Limits the number of series/tables that Grafana processes. Lower this number to prevent abuse, and increase it if you have lots of small time series and not all are shown. Defaults to 1000.
Access mode controls how requests to the data source will be handled. Server should be the preferred way if nothing else stated.
@@ -132,8 +130,6 @@ Name | Description
`Organization` | The [Influx organization](https://v2.docs.influxdata.com/v2.0/organizations/) that will be used for Flux queries. This is also used to for the `v.organization` query macro
`Token` | The authentication token used for Flux queries. With Influx 2.0, use the [influx authentication token to function](https://v2.docs.influxdata.com/v2.0/security/tokens/create-token/). For influx 1.8, the token is `username:password`
`Default Bucket` | The [Influx bucket](https://v2.docs.influxdata.com/v2.0/organizations/buckets/) that will be used for the `v.defaultBucket` macro in Flux queries
`Min time interval` | Refer to [Min time interval]({{< relref "#min-time-interval" >}}).
`Max series`| Limits the number of series/tables that Grafana processes. Lower this number to prevent abuse, and increase it if you have lots of small time series and not all are shown. Defaults to 1000.
You can use the [Flux query and scripting language](https://www.influxdata.com/products/flux/). Grafana's Flux query editor is a text editor for raw Flux queries with Macro support.

View File

@@ -9,7 +9,7 @@ weight = 800
# Jaeger data source
Grafana ships with built-in support for Jaeger, which provides open source, end-to-end distributed tracing.
Just add it as a data source and you are ready to query your traces in [Explore]({{< relref "../explore/_index.md" >}}).
Just add it as a data source and you are ready to query your traces in [Explore]({{< relref "../explore/index.md" >}}).
## Add data source
@@ -28,7 +28,7 @@ To access Jaeger settings, click the **Configuration** (gear) icon, then click *
> **Note:** This feature is available in Grafana 7.4+.
This is a configuration for the [trace to logs feature]({{< relref "../explore/trace-integration" >}}). Select target data source (at this moment limited to Loki data sources) and select which tags will be used in the logs query.
This is a configuration for the [trace to logs feature]({{< relref "../explore/index.md#trace-to-logs" >}}). Select target data source (at this moment limited to Loki data sources) and select which tags will be used in the logs query.
- **Data source -** Target data source.
- **Tags -** The tags that will be used in the Loki query. Default is `'cluster', 'hostname', 'namespace', 'pod'`.
@@ -37,7 +37,7 @@ This is a configuration for the [trace to logs feature]({{< relref "../explore/t
## Query traces
You can query and display traces from Jaeger via [Explore]({{< relref "../explore/_index.md" >}}).
You can query and display traces from Jaeger via [Explore]({{< relref "../explore/index.md" >}}).
{{< docs-imagebox img="/img/docs/v70/jaeger-query-editor.png" class="docs-image--no-shadow" caption="Screenshot of the Jaeger query editor" >}}

View File

@@ -39,7 +39,7 @@ The Derived Fields configuration allows you to:
- Add fields parsed from the log message.
- Add a link that uses the value of the field.
You can use this functionality to link to your tracing backend directly from your logs, or link to a user profile page if a userId is present in the log line. These links appear in the [log details](/explore/logs-integration/#labels-and-detected-fields).
You can use this functionality to link to your tracing backend directly from your logs, or link to a user profile page if a userId is present in the log line. These links appear in the [log details](/explore/#labels-and-detected-fields).
{{< docs-imagebox img="/img/docs/v65/loki_derived_fields.png" class="docs-image--no-shadow" caption="Screenshot of the derived fields configuration" >}}
Each derived field consists of:

View File

@@ -19,22 +19,20 @@ Grafana ships with a built-in PostgreSQL data source plugin that allows you to q
### Data source options
Name | Description
----------------- | -------------
`Name` | The data source name. This is how you refer to the data source in panels and queries.
`Default` | Default data source means that it will be pre-selected for new panels.
`Host` | The IP address/hostname and optional port of your PostgreSQL instance. _Do not_ include the database name. The connection string for connecting to Postgres will not be correct and it may cause errors.
`Database` | Name of your PostgreSQL database.
`User` | Database user's login/username
`Password` | Database user's password
`SSL Mode` | Determines whether or with what priority a secure SSL TCP/IP connection will be negotiated with the server. When SSL Mode is disabled, SSL Method and Auth Details would not be visible.
`SSL Auth Details Method` | Determines whether the SSL Auth details will be configured as a file path or file content. Grafana v7.5+
`SSL Auth Details Value` | File path or file content of SSL root certificate, client certificate and client key
`Max open` | The maximum number of open connections to the database, default `unlimited` (Grafana v5.4+).
`Max idle` | The maximum number of connections in the idle connection pool, default `2` (Grafana v5.4+).
`Max lifetime` | The maximum amount of time in seconds a connection may be reused, default `14400`/4 hours (Grafana v5.4+).
`Version` |Determines which functions are available in the query builder (only available in Grafana 5.3+).
`TimescaleDB` |A time-series database built as a PostgreSQL extension. When enabled, Grafana uses `time_bucket` in the `$__timeGroup` macro to display TimescaleDB specific aggregate functions in the query builder (only available in Grafana 5.3+).
Name | Description
-------------- | -------------
`Name` | The data source name. This is how you refer to the data source in panels and queries.
`Default` | Default data source means that it will be pre-selected for new panels.
`Host` | The IP address/hostname and optional port of your PostgreSQL instance. _Do not_ include the database name. The connection string for connecting to Postgres will not be correct and will cause errors.
`Database` | Name of your PostgreSQL database.
`User` | Database user's login/username
`Password` | Database user's password
`SSL Mode` | This option determines whether or with what priority a secure SSL TCP/IP connection will be negotiated with the server.
`Max open` | The maximum number of open connections to the database, default `unlimited` (Grafana v5.4+).
`Max idle` | The maximum number of connections in the idle connection pool, default `2` (Grafana v5.4+).
`Max lifetime` | The maximum amount of time in seconds a connection may be reused, default `14400`/4 hours (Grafana v5.4+).
`Version` | This option determines which functions are available in the query builder (only available in Grafana 5.3+).
`TimescaleDB` | TimescaleDB is a time-series database built as a PostgreSQL extension. If enabled, Grafana will use `time_bucket` in the `$__timeGroup` macro and display TimescaleDB specific aggregate functions in the query builder (only available in Grafana 5.3+).
### Min time interval

View File

@@ -26,9 +26,6 @@ To access Prometheus settings, hover your mouse over the **Configuration** (gear
| `Scrape interval` | Set this to the typical scrape and evaluation interval configured in Prometheus. Defaults to 15s. |
| `Disable metrics lookup` | Checking this option will disable the metrics chooser and metric/label support in the query field's autocomplete. This helps if you have performance issues with bigger Prometheus instances. |
| `Custom Query Parameters` | Add custom parameters to the Prometheus query URL. For example `timeout`, `partial_response`, `dedup`, or `max_source_resolution`. Multiple parameters should be concatenated together with an '&amp;'. |
| `Label name` | Add the name of the field in the label object. |
| `URL` | If the link is external, then enter the full link URL. You can interpolate the value from the field with `${__value.raw }` macro. |
| `Internal link` | Select if the link is internal or external. In the case of an internal link, a data source selector allows you to select the target data source. Supports tracing data sources only. |
## Prometheus query editor
@@ -45,13 +42,12 @@ Open a graph in edit mode by clicking the title > Edit (or by pressing `e` key w
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Query expression` | Prometheus query expression, check out the [Prometheus documentation](http://prometheus.io/docs/querying/basics/). |
| `Legend format` | Controls the name of the time series, using name or pattern. For example `{{hostname}}` is replaced with the label value for the label `hostname`. |
| `Min step` | An additional lower limit for the [`step` parameter of Prometheus range queries](https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries) and for the `$__interval` and `$__rate_interval` variables. The limit is absolute, it cannot modified by the _Resolution_ setting. |
| `Min step` | An additional lower limit for the [`step` parameter of Prometheus range queries](https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries) and for the `$__interval` and `$__rate_interval` variables. The limit is absolute and not modified by the _Resolution_ setting. |
| `Resolution` | `1/1` sets both the `$__interval` variable and the [`step` parameter of Prometheus range queries](https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries) such that each pixel corresponds to one data point. For better performance, lower resolutions can be picked. `1/2` only retrieves a data point for every other pixel, and `1/10` retrieves one data point per 10 pixels. Note that both _Min time interval_ and _Min step_ limit the final value of `$__interval` and `step`. |
| `Metric lookup` | Search for metric names in this input field. |
| `Format as` | Switch between `Table`, `Time series`, or `Heatmap`. `Table` will only work in the Table panel. `Heatmap` is suitable for displaying metrics of the Histogram type on a Heatmap panel. Under the hood, it converts cumulative histograms to regular ones and sorts series by the bucket bound. |
| `Format as` | Switch between `Table`, `Time series`, or `Heatmap`. `Table` will only work in the Table panel. `Heatmap` is suitable for displaying metrics of the Histogram type on a Heatmap panel. Under the hood, it converts cumulative histograms to regular ones and sorts series by the bucket bound. |
| `Instant` | Perform an "instant" query, to return only the latest value that Prometheus has scraped for the requested time series. Instant queries return results much faster than normal range queries. Use them to look up label sets. |
| `Min time interval` | This value multiplied by the denominator from the _Resolution_ setting sets a lower limit to both the `$__interval` variable and the [`step` parameter of Prometheus range queries](https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries). Defaults to _Scrape interval_ as set in the data source options. |
| `Exemplars` | Run and show exemplars in the graph. |
> **Note:** Grafana modifies the request dates for queries to align them with the dynamically calculated step. This ensures consistent display of metrics data, but it can result in a small gap of data at the right edge of a graph.
@@ -68,12 +64,11 @@ To show a horizontal line across the whole graph, add a series override and sele
### Query editor in Explore
| Name | Description |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Query expression` | Prometheus query expression, check out the [Prometheus documentation](http://prometheus.io/docs/querying/basics/). |
| `Step` | [`Step` parameter of Prometheus range queries](https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries). Time units can be used here, for example: 5s, 1m, 3h, 1d, 1y. Default unit if no unit specified is `s` (seconds). |
| Name | Description |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Query expression` | Prometheus query expression, check out the [Prometheus documentation](http://prometheus.io/docs/querying/basics/). |
| `Step` | [`Step` parameter of Prometheus range queries](https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries). Time units can be used here, for example: 5s, 1m, 3h, 1d, 1y. Default unit if no unit specified is `s` (seconds). |
| `Query type` | `Range`, `Instant`, or `Both`. When running **Range query**, the result of the query is displayed in graph and table. Instant query returns only the latest value that Prometheus has scraped for the requested time series and it is displayed in the table. When **Both** is selected, both instant query and range query is run. Result of range query is displayed in graph and the result of instant query is displayed in the table. |
| `Exemplars` | Run and show exemplars in the graph. |
## Templating
@@ -89,13 +84,13 @@ types of template variables.
Variable of the type _Query_ allows you to query Prometheus for a list of metrics, labels or label values. The Prometheus data source plugin
provides the following functions you can use in the `Query` input field.
| Name | Description |
| ----------------------------- | ----------------------------------------------------------------------- |
| `label_names()` | Returns a list of label names. |
| `label_values(label)` | Returns a list of label values for the `label` in every metric. |
| `label_values(metric, label)` | Returns a list of label values for the `label` in the specified metric. |
| `metrics(metric)` | Returns a list of metrics matching the specified `metric` regex. |
| `query_result(query)` | Returns a list of Prometheus query result for the `query`. |
| Name | Description |
| -------------------------------- | ----------------------------------------------------------------------- |
| `label_names()` | Returns a list of label names. |
| `label_values(label)` | Returns a list of label values for the `label` in every metric. |
| `label_values(metric, label)` | Returns a list of label values for the `label` in the specified metric. |
| `metrics(metric)` | Returns a list of metrics matching the specified `metric` regex. |
| `query_result(query)` | Returns a list of Prometheus query result for the `query`. |
For details of what _metric names_, _label names_ and _label values_ are please refer to the [Prometheus documentation](http://prometheus.io/docs/concepts/data_model/#metric-names-and-labels).
@@ -129,7 +124,7 @@ Regex:
> **Note:** Available in Grafana 7.2 and above
The `$__rate_interval` variable is meant to be used in the rate function. It is defined as max( `$__interval` + _Scrape interval_, 4 \* _Scrape interval_), where _Scrape interval_ is the Min step setting (AKA query*interval, a setting per PromQL query), if any is set, and otherwise the \_Scrape interval* as set in the Prometheus data source (but ignoring any Min interval setting in the panel, because the latter is modified by the resolution setting).
The `$__rate_interval` variable is meant to be used in the rate function. It is defined as max( `$__interval` + _Scrape interval_, 4 \* _Scrape interval_), where _Scrape interval_ is the Min step setting (AKA query_interval, a setting per PromQL query), if any is set, and otherwise the _Scrape interval_ as set in the Prometheus data source (but ignoring any Min interval setting in the panel, because the latter is modified by the resolution setting).
### Using variables in queries
@@ -141,11 +136,6 @@ There are two syntaxes:
Why two ways? The first syntax is easier to read and write but does not allow you to use a variable in the middle of a word. When the _Multi-value_ or _Include all value_
options are enabled, Grafana converts the labels from plain text to a regex compatible string. Which means you have to use `=~` instead of `=`.
### Ad hoc filters variable
Prometheus supports the special [ad hoc filters]({{< relref "../variables/variable-types/add-ad-hoc-filters.md" >}}) variable type. It allows you to specify any number of label/value filters on the fly. These filters are automatically
applied to all your Prometheus queries.
## Annotations
[Annotations]({{< relref "../dashboards/annotations.md" >}}) allow you to overlay rich event information on top of graphs. You add annotation
@@ -162,7 +152,7 @@ The step option is useful to limit the number of events returned from your query
Grafana exposes metrics for Prometheus on the `/metrics` endpoint. We also bundle a dashboard within Grafana so you can get started viewing your metrics faster. You can import the bundled dashboard by going to the data source edit page and click the dashboard tab. There you can find a dashboard for Grafana and one for Prometheus. Import and start viewing all the metrics!
For detailed instructions, refer to [Internal Grafana metrics]({{< relref "../administration/view-server/internal-metrics.md">}}).
For detailed instructions, refer to [Internal Grafana metrics]({{< relref "../administration/metrics.md">}}).
## Prometheus API
@@ -171,7 +161,7 @@ The Prometheus data source works with other projects that implement the [Prometh
- [Cortex](https://cortexmetrics.io/docs/)
- [Thanos](https://thanos.io/v0.17/components/query.md/)
For more information on how to query other Prometheus-compatible projects from Grafana, refer to the specific project documentation.
For more information on how to query other Prometheus-compatible projects from Grafana, refer to the specific project documentation.
## Provision the Prometheus data source
@@ -188,35 +178,14 @@ datasources:
# Access mode - proxy (server in the UI) or direct (browser in the UI).
access: proxy
url: http://localhost:9090
jsonData:
exemplarTraceIdDestinations:
# Field with internal link pointing to data source in Grafana.
# datasourceUid value can be anything, but it should be unique across all defined data source uids.
- datasourceUid: my_jaeger_uid
name: traceID
# Field with external link.
- name: traceID
url: 'http://localhost:3000/explore?orgId=1&left=%5B%22now-1h%22,%22now%22,%22Jaeger%22,%7B%22query%22:%22$${__value.raw}%22%7D%5D'
```
## Amazon Managed Service for Prometheus
The Prometheus data source works with Amazon Managed Service for Prometheus. If you are using an AWS Identity and Access Management (IAM) policy to control access to your Amazon Managed Service for Prometheus domain, then you must use AWS Signature Version 4 (AWS SigV4) to sign all requests to that domain. For more details on AWS SigV4, refer to the [AWS documentation](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html).
The Prometheus data source works with Amazon Managed Service for Prometheus. If you are using an AWS Identity and Access Management (IAM) policy to control access to your Amazon Managed Service for Prometheus domain, then you must use AWS Signature Version 4 (AWS SigV4) to sign all requests to that domain. For more details on AWS SigV4, refer to the [AWS documentation](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html).
> **Note:** Grafana version 7.3.5 or higher is required to use SigV4 authentication.
To connect the Prometheus data source to Amazon Managed Service for Prometheus using SigV4 authentication, refer to the AWS guide to [Set up Grafana open source or Grafana Enterprise for use with AMP](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-onboard-query-standalone-grafana.html).
To connect the Prometheus data source to Amazon Managed Service for Prometheus using SigV4 authentication, refer to the AWS guide to [Set up Grafana open source or Grafana Enterprise for use with AMP](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-onboard-query-standalone-grafana.html).
If you are running Grafana in an Amazon EKS cluster, follow the AWS guide to [Query using Grafana running in an Amazon EKS cluster](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-onboard-query-grafana-7.3.html).
## Exemplars
> **Note:** This feature is available in Prometheus 2.26+ and Grafana 7.4+.
Grafana 7.4 and later versions have the capability to show exemplars data alongside a metric both in Explore and Dashboards.
Exemplars are a way to associate higher cardinality metadata from a specific event with traditional timeseries data.
{{< docs-imagebox img="/img/docs/v74/exemplars.png" class="docs-image--no-shadow" caption="Screenshot showing the detail window of an Exemplar" >}}
Configure Exemplars in the data source settings by adding external or internal links.
{{< docs-imagebox img="/img/docs/v74/exemplars-setting.png" class="docs-image--no-shadow" caption="Screenshot of the Exemplars configuration" >}}

View File

@@ -8,7 +8,7 @@ weight = 1400
# Tempo data source
Grafana ships with built-in support for Tempo a high volume, minimal dependency trace storage, OSS tracing solution from Grafana Labs. Add it as a data source, and you are ready to query your traces in [Explore]({{< relref "../explore/_index.md" >}}).
Grafana ships with built-in support for Tempo a high volume, minimal dependency trace storage, OSS tracing solution from Grafana Labs. Add it as a data source, and you are ready to query your traces in [Explore]({{< relref "../explore/index.md" >}}).
## Add data source
@@ -27,7 +27,7 @@ To access Tempo settings, click the **Configuration** (gear) icon, then click **
> **Note:** This feature is available in Grafana 7.4+.
This is a configuration for the [trace to logs feature]({{< relref "../explore/trace-integration" >}}). Select target data source (at this moment limited to Loki data sources) and select which tags will be used in the logs query.
This is a configuration for the [trace to logs feature]({{< relref "../explore/index.md#trace-to-logs" >}}). Select target data source (at this moment limited to Loki data sources) and select which tags will be used in the logs query.
- **Data source -** Target data source.
- **Tags -** The tags that will be used in the Loki query. Default is `'cluster', 'hostname', 'namespace', 'pod'`.
@@ -36,7 +36,7 @@ This is a configuration for the [trace to logs feature]({{< relref "../explore/t
## Query traces
You can query and display traces from Tempo via [Explore]({{< relref "../explore/_index.md" >}}).
You can query and display traces from Tempo via [Explore]({{< relref "../explore/index.md" >}}).
To query a particular trace, insert its trace ID into the query text input.
{{< docs-imagebox img="/img/docs/v73/tempo-query-editor.png" class="docs-image--no-shadow" caption="Screenshot of the Tempo query editor" >}}

View File

@@ -28,7 +28,7 @@ To access Zipkin settings, click the **Configuration** (gear) icon, then click *
> **Note:** This feature is available in Grafana 7.4+.
This is a configuration for the [trace to logs feature]({{< relref "../explore/trace-integration" >}}). Select target data source (at this moment limited to Loki data sources) and select which tags will be used in the logs query.
This is a configuration for the [trace to logs feature]({{< relref "../explore/index.md#trace-to-logs" >}}). Select target data source (at this moment limited to Loki data sources) and select which tags will be used in the logs query.
- **Data source -** Target data source.
- **Tags -** The tags that will be used in the Loki query. Default is `'cluster', 'hostname', 'namespace', 'pod'`.

View File

@@ -1,8 +1,4 @@
+++
title = "Add query editor help"
+++
# Add a query editor help component
## Add a query editor help component
By adding a help component to your plugin, you can for example create "cheat sheets" with commonly used queries. When the user clicks on one of the examples, it automatically updates the query editor. It's a great way to increase productivity for your users.

View File

@@ -4,7 +4,7 @@ title = "Add support for Explore queries"
# Add support for Explore queries
This guide explains how to improve support for [Explore]({{< relref "../../explore/_index.md" >}}) to an existing data source plugin.
This guide explains how to improve support for [Explore]({{< relref "../../explore/index.md" >}}) to an existing data source plugin.
This guide assumes that you're already familiar with how to [Build a data source plugin]({{< relref "/tutorials/build-a-data-source-plugin.md" >}}).

View File

@@ -41,7 +41,7 @@ Grafana's backend plugin system exposes a couple of different capabilities, or b
### Query data
The query data capability allows a backend plugin to handle data source queries that are submitted from a [dashboard]({{< relref "../../../dashboards/_index.md" >}}), [Explore]({{< relref "../../../explore/_index.md" >}}) or [Grafana Alerting]({{< relref "../../../alerting" >}}). The response contains [data frames]({{< relref "../data-frames.md" >}}), which are used to visualize metrics, logs, and traces. The query data capability is required to implement for a backend data source plugin.
The query data capability allows a backend plugin to handle data source queries that are submitted from a [dashboard]({{< relref "../../../dashboards/_index.md" >}}), [Explore]({{< relref "../../../explore/index.md" >}}) or [Grafana Alerting]({{< relref "../../../alerting" >}}). The response contains [data frames]({{< relref "../data-frames.md" >}}), which are used to visualize metrics, logs, and traces. The query data capability is required to implement for a backend data source plugin.
### Resources

View File

@@ -46,7 +46,7 @@ frame.add({ time: 1589189388597, content: 'user registered' });
frame.add({ time: 1589189406480, content: 'user logged in' });
```
That's all you need to start returning log data from your data source. Go ahead and try it out in [Explore]({{< relref "../../explore/_index.md" >}}) or by adding a [Logs panel]({{< relref "../../panels/visualizations/logs-panel.md" >}}).
That's all you need to start returning log data from your data source. Go ahead and try it out in [Explore]({{< relref "../../explore/index.md" >}}) or by adding a [Logs panel]({{< relref "../../panels/visualizations/logs-panel.md" >}}).
Congratulations, you just wrote your first logs data source plugin! Next, let's look at a couple of features that can further improve the experience for the user.
@@ -75,7 +75,7 @@ frame.add({ time: 1589189406480, content: 'user logged in' });
You can add additional information about each log line by adding more data frame fields.
If a data frame has more than one text field, then Grafana assumes the first field in the data frame to be the actual log line. Any subsequent text fields are treated as [detected fields]({{< relref "../../explore/_index.md#labels-and-detected-fields" >}}).
If a data frame has more than one text field, then Grafana assumes the first field in the data frame to be the actual log line. Any subsequent text fields are treated as [detected fields]({{< relref "../../explore/index.md#labels-and-detected-fields" >}}).
While you can add any number of custom fields to your data frame, Grafana comes with a couple of dedicated fields: `levels` and `id`. Let's have a closer look at each one.

View File

@@ -75,10 +75,6 @@ Grafana uses [RxJS](https://rxjs.dev/) to continuously send data from a data sou
1. Use `subscriber.next()` to send the updated data frame whenever you receive new updates.
```ts
import { LoadingState } from '@grafana/data';
```
```ts
const intervalId = setInterval(() => {
frame.add({ time: Date.now(), value: Math.random() });
@@ -86,7 +82,6 @@ Grafana uses [RxJS](https://rxjs.dev/) to continuously send data from a data sou
subscriber.next({
data: [frame],
key: query.refId,
state: LoadingState.Streaming,
});
}, 500);

View File

@@ -1,120 +0,0 @@
+++
title = "Custom panel option editors"
+++
# Custom panel option editors
The Grafana plugin platform comes with a range of editors that allow your users to customize a panel. The standard editors cover the most common types of options, such as text input and boolean switches. If you don't find the editor you're looking for, you can build your own. In this guide, you'll learn how to build your own panel option editor.
The simplest editor is a React component that accepts two props: `value` and `onChange`. `value` contains the current value of the option, and `onChange` updates it.
The editor in the example below lets the user toggle a boolean value by clicking a button:
**SimpleEditor.tsx**
```ts
import React from 'react';
import { Button } from '@grafana/ui';
import { StandardEditorProps } from '@grafana/data';
export const SimpleEditor: React.FC<StandardEditorProps<boolean>> = ({ value, onChange }) => {
return <Button onClick={() => onChange(!value)}>{value ? 'Disable' : 'Enable'}</Button>;
};
```
To use a custom panel option editor, use the `addCustomEditor` on the `OptionsUIBuilder` object in your `module.ts` file. Configure the editor to use by setting the `editor` property to the `SimpleEditor` component.
**module.ts**
```ts
export const plugin = new PanelPlugin<SimpleOptions>(SimplePanel).setPanelOptions(builder => {
return builder
.addCustomEditor({
id: 'label',
path: 'label',
name: 'Label',
editor: SimpleEditor,
});
});
```
## Add settings to your panel option editor
If you're using your custom editor to configure multiple options, you might want to be able to customize it. Add settings to your editor by setting the second template variable of `StandardEditorProps` to an interface that contains the settings you want to be able to configure.
You can access the editor settings through the `item` prop. Here's an example of an editor that populates a drop-down with a range of numbers. The range is defined by the `from` and `to` properties in the `Settings` interface.
**SimpleEditor.tsx**
```ts
interface Settings {
from: number;
to: number;
}
export const SimpleEditor: React.FC<StandardEditorProps<number, Settings>> = ({ item, value, onChange }) => {
const options: Array<SelectableValue<number>> = [];
// Default values
const from = item.settings?.from ?? 1;
const to = item.settings?.from ?? 10;
for (let i = from; i <= to; i++) {
options.push({
label: i.toString(),
value: i,
});
}
return <Select options={options} value={value} onChange={selectableValue => onChange(selectableValue.value)} />;
};
```
You can now configure the editor for each option, by configuring the `settings` property in the call to `addCustomEditor`.
```ts
export const plugin = new PanelPlugin<SimpleOptions>(SimplePanel).setPanelOptions(builder => {
return builder
.addCustomEditor({
id: 'index',
path: 'index',
name: 'Index',
editor: SimpleEditor,
settings: {
from: 1,
to: 10,
}
});
});
```
## Use query results in your panel option editor
Option editors can access the results from the last query. This lets you update your editor dynamically, based on the data returned by the data source.
> **Note:** This feature was introduced in 7.0.3. Anyone using an older version of Grafana will see an error when using your plugin.
The editor context is available through the `context` prop. The data frames returned by the data source are available under `context.data`.
**SimpleEditor.tsx**
```ts
export const SimpleEditor: React.FC<StandardEditorProps<string>> = ({ item, value, onChange, context }) => {
const options: SelectableValue<string>[] = [];
if (context.data) {
const frames = context.data;
for (let i = 0; i < frames.length; i++) {
options.push({
label: frames[i].name,
value: frames[i].name,
});
}
}
return <Select options={options} value={value} onChange={selectableValue => onChange(selectableValue.value)} />;
};
```
Have you built a custom editor that you think would be useful to other plugin developers? Consider contributing it as a standard editor!

View File

@@ -23,7 +23,6 @@ The plugin.json file is required for all plugins. When Grafana starts, it scans
| `$schema` | string | No | Schema definition for the plugin.json file |
| `alerting` | boolean | No | For data source plugins. If the plugin supports alerting. |
| `annotations` | boolean | No | For data source plugins. If the plugin supports annotation queries. |
| `autoEnabled` | boolean | No | Set to true for app plugins that should be enabled by default in all orgs |
| `backend` | boolean | No | If the plugin has a backend component. |
| `category` | string | No | Plugin category used on the Add data source page. Possible values are: `tsdb`, `logging`, `cloud`, `tracing`, `sql`, `enterprise`, `other`. |
| `executable` | string | No | The first part of the file name of the backend component executable. There can be multiple executables built for different operating system and architecture. Grafana will check for executables named `<executable>_<$GOOS>_<lower case $GOARCH><.exe for Windows>`, e.g. `plugin_linux_amd64`. Combination of $GOOS and $GOARCH can be found here: https://golang.org/doc/install/source#environment. |

View File

@@ -122,10 +122,6 @@
"hiddenQueries": {
"type": "boolean"
},
"autoEnabled": {
"type": "boolean",
"description": "Set to true for app plugins that should be enabled by default in all orgs"
},
"dependencies": {
"type": "object",
"description": "Dependencies needed by the plugin.",
@@ -357,7 +353,8 @@
"properties": {
"url": {
"type": "string",
"description": "For data source plugins. URL to fetch the authentication token."
"description": "For data source plugins. URL to fetch the authentication token.",
"format": "uri"
},
"params": {
"type": "object",

View File

@@ -47,30 +47,27 @@ With Grafana Enterprise, you get access to new features, including:
- [Reporting]({{< relref "reporting.md" >}}) to generate a PDF report from any dashboard and set up a schedule to have it emailed to whoever you choose.
- [Export dashboard as PDF]({{< relref "export-pdf.md" >}})
- [White labeling]({{< relref "white-labeling.md" >}}) to customize Grafana from the brand and logo to the footer links.
- [Usage insights]({{< relref "usage-insights/_index.md" >}}) to understand how your Grafana instance is used.
- [Usage insights]({{< relref "usage-insights.md" >}}) to understand how your Grafana instance is used.
- [Vault integration]({{< relref "vault.md" >}}) to manage your configuration or provisioning secrets with Vault.
- [Auditing]({{< relref "auditing.md" >}}) tracks important changes to your Grafana instance to help you manage and mitigate suspicious activity and meet compliance requirements.
- [Request security]({{< relref "request-security.md" >}}) makes it possible to restrict outgoing requests from the Grafana server.
## Enterprise data sources
## Enterprise plugins
With a Grafana Enterprise license, you get access to premium data sources, including:
With a Grafana Enterprise license, you get access to premium plugins, including:
- [AppDynamics](https://grafana.com/plugins/dlopes7-appdynamics-datasource)
- [DataDog](https://grafana.com/plugins/grafana-datadog-datasource)
- [Dynatrace](https://grafana.com/plugins/grafana-dynatrace-datasource)
- [Gitlab](https://grafana.com/grafana/plugins/grafana-gitlab-datasource)
- [Jira](https://grafana.com/grafana/plugins/grafana-jira-datasource)
- [MongoDB](https://grafana.com/grafana/plugins/grafana-mongodb-datasource)
- [New Relic](https://grafana.com/plugins/grafana-newrelic-datasource)
- [Oracle Database](https://grafana.com/plugins/grafana-oracle-datasource)
- [ServiceNow](https://grafana.com/grafana/plugins/grafana-servicenow-datasource)
- [Snowflake](https://grafana.com/grafana/plugins/grafana-snowflake-datasource)
- [Splunk](https://grafana.com/plugins/grafana-splunk-datasource)
- [Splunk Infrastructure monitoring (SignalFx)](https://grafana.com/grafana/plugins/grafana-splunk-monitoring-datasource)
- [Wavefront](https://grafana.com/grafana/plugins/grafana-wavefront-datasource)
## Try Grafana Enterprise
To purchase or obtain a trial license contact the Grafana Labs [Sales Team](https://grafana.com/contact?about=support&topic=Grafana%20Enterprise).

View File

@@ -80,6 +80,7 @@ GF_SERVER_ROOT_URL=https://grafana.blah.com/
## Step 4. Restart Grafana
To finalize the installation of Grafana Enterprise, restart Grafana to
enable all Grafana Enterprise features. Refer to [restart Grafana]({{< relref "../installation/restart-grafana.md" >}})
topic for more information.
enable all Grafana Enterprise features.
On Linux, when installed as a Systemd service you can restart Grafana
by running `sudo systemctl restart grafana-server.service`.

View File

@@ -22,43 +22,34 @@ Audit logs are JSON objects representing user actions like:
Audit logs contain the following fields. The fields followed by **\*** are always available, the others depends on the type of action logged.
| Field name | Type | Description |
| ---------- | ---- | ----------- |
| `timestamp`\* | string | The date and time the request was made, in coordinated universal time (UTC) using the [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.6) format. |
| `user`\* | object | Information about the user that made the request. Either one of the `UserID` or `ApiKeyID` fields will contain content if `isAnonymous=false`. |
| `user.userId` | number | ID of the Grafana user that made the request. |
| `user.orgId`\* | number | Current organization of the user that made the request. |
| `user.orgRole` | string | Current role of the user that made the request. |
| `user.name` | string | Name of the Grafana user that made the request. |
| `user.tokenId` | number | ID of the user authentication token. |
| `user.apiKeyId` | number | ID of the Grafana API key used to make the request. |
| `user.isAnonymous`\* | boolean | If an anonymous user made the request, `true`. Otherwise, `false`. |
| `action`\* | string | The request action. For example, `create`, `update`, or `manage-permissions`. |
| `request`\* | object | Information about the HTTP request. |
| `request.params` | object | Requests path parameters. |
| `request.query` | object | Requests query parameters. |
| `request.body` | string | Requests body. |
| `result`\* | object | Information about the HTTP response. |
| `result.statusType` | string | If the request action was successful, `success`. Otherwise, `failure`. |
| `result.statusCode` | number | HTTP status of the request. |
| `result.failureMessage` | string | HTTP error message. |
| `result.body` | string | Response body. |
| `resources` | array | Information about the resources that the request action affected. This field can be null for non-resource actions such as `login` or `logout`. |
| `resources[x].id`\* | number | ID of the resource. |
| `resources[x].type`\* | string | The type of the resource that was logged: `alert`, `alert-notification`, `annotation`, `api-key`, `auth-token`, `dashboard`, `datasource`, `folder`, `org`, `panel`, `playlist`, `report`, `team`, `user`, or `version`. |
| `requestUri`\* | string | Request URI. |
| `ipAddress`\* | string | IP address that the request was made from. |
| `userAgent`\* | string | Agent through which the request was made. |
| `grafanaVersion`\* | string | Current version of Grafana when this log is created. |
| `additionalData` | object | Additional information that can be provided about the request. |
The `additionalData` field can contain the following information:
| Field name | Action | Description |
| ---------- | ------ | ----------- |
| `loginUsername` | `login` | Login used in the Grafana authentication form. |
| `extUserInfo` | `login` | User information provided by the external system that was used to log in. |
| `authTokenCount` | `login` | Number of active authentication tokens for the user that logged in. |
| `terminationReason` | `logout` | The reason why the user logged out, such as a manual logout or a token expiring. |
| Field name | Type | Description |
| ----------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `timestamp`\* | string | The date and time the request was made, in coordinated universal time (UTC) using the [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.6) format. |
| `user`\* | object | Information about the user that made the request. At least one of the `UserID` / `ApiKeyID` fields will not be empty if `isAnonymous=false`. |
| `user.userId` | number | ID of the Grafana user that made the request. |
| `user.orgId`\* | number | Current organization of the user that made the request. |
| `user.orgRole` | string | Current role of the user that made the request. |
| `user.name` | string | Name of the Grafana user that made the request. |
| `user.apiKeyId` | number | ID of the Grafana API key used to make the request. |
| `user.isAnonymous`\* | boolean | `true` if an anonymous user made the request, `false` otherwise. |
| `action`\* | string | The request action (eg. `create`, `update`, `manage-permissions`). |
| `request`\* | object | Information about the HTTP request. |
| `request.params` | object | Request path parameters. |
| `request.query` | object | Request query parameters. |
| `request.body` | string | Request body. |
| `result`\* | object | Information about the HTTP response. |
| `result.statusType`\* | string | `success` if the request action was successful, `failure` otherwise. |
| `result.statusCode` | number | HTTP status of the request. |
| `result.failureMessage` | string | HTTP error message. |
| `result.body` | string | Response body. |
| `resources` | array | Information about the resources that the request action impacted. Can be null for non-resource actions like `login` and `logout`. |
| `resources[x].id`\* | number | ID of the resource. |
| `resources[x].type`\* | string | Type of the resource (logged resources are: `alert`, `alert-notification`, `annotation`, `api-key`, `auth-token`, `dashboard`, `datasource`, `folder`, `org`, `panel`, `playlist`, `report`, `team`, `user`, `version`). |
| `requestUri`\* | string | Request URI. |
| `ipAddress`\* | string | IP address that the request was made from. |
| `userAgent`\* | string | Agent through which the request was made. |
| `grafanaVersion`\* | string | Grafana current version when this log is created. |
| `additionalData` | object | Provide additional information on the request. For now, it's only used in `login` actions to log external user information if an external system was used to log in. |
### Recorded actions
@@ -67,7 +58,7 @@ The audit logs include records about the following categories of actions:
**Sessions**
- Log in.
- Log out (manual log out, token expired/revoked, [SAML Single Logout]({{< relref "saml.md#single-logout" >}})).
- Log out.
- Revoke a user authentication token.
- Create or delete an API key.

View File

@@ -69,31 +69,19 @@ Set to complete URL to override Apple/iOS icon.
List the link IDs to use here. Grafana will look for matching link configurations, the link IDs should be space-separated and contain no whitespace.
## [usage_insights.export]
## [meta_analytics]
By [exporting usage logs]({{< relref "usage-insights/export-logs.md" >}}), you can directly query them and create dashboards of the information that matters to you most, such as dashboard errors, most active organizations, or your top-10 most-used queries.
### max_file_age
### enabled
Max age for data files before they get deleted.
Enable the usage insights export feature.
### max_data_directory_size
### storage
Max size in megabytes of the data files directory before files get deleted.
Specify a storage type. Defaults to `loki`.
### data_path
## [usage_insights.export.storage.loki]
### type
Set the communication protocol to use with Loki, which is either `grpc` or `http`. Defaults to `grpc`.
### url
Set the address for writing logs to Loki (format must be host:port).
### tls
Decide whether or not to enable the TLS (Transport Layer Security) protocol when establishing the connection to Loki. Defaults to true.
The directory where events will be stored in.
## [analytics.summaries]
@@ -133,22 +121,6 @@ Maximum number of concurrent calls to the rendering service.
Scale factor for rendering images. Value `2` is enough for monitor resolutions, `4` would be better for printed material. Setting a higher value affects performance and memory.
### fonts_path
Path to the directory containing font files.
### font_regular
Name of the TrueType font file with regular style.
### font_bold
Name of the TrueType font file with bold style.
### font_italic
Name of the TrueType font file with italic style.
## [auditing]
[Auditing]({{< relref "auditing.md" >}}) allows you to track important changes to your Grafana instance. By default, audit logs are logged to file but the auditing feature also supports sending logs directly to Loki.
@@ -304,25 +276,3 @@ Time until expiration for tokens which are renewed. Should have a value higher t
### lease_renewal_increment
New duration for renewed tokens. Vault may be configured to ignore this value and impose a stricter limit.
## [security.egress]
> **Note:** Available in Grafana Enterprise v7.4 and later versions.
Security egress makes it possible to control outgoing traffic from the Grafana server.
### host_deny_list
A list of hostnames or IP addresses separated by spaces for which requests are blocked.
### host_allow_list
A list of hostnames or IP addresses separated by spaces for which requests are allowed. All other requests are blocked.
### header_drop_list
A list of headers that are stripped from the outgoing data source and alerting requests.
### cookie_drop_list
A list of cookies that are stripped from the outgoing data source and alerting requests.

View File

@@ -1,5 +1,5 @@
+++
title = "License expiration"
title = "License Expiration"
description = ""
keywords = ["grafana", "licensing"]
weight = 120
@@ -7,7 +7,7 @@ weight = 120
# License expiration
If your license has expired, most of Grafana keeps working as normal. Some enterprise functionality stops or runs with reduced functionality and Grafana displays a banner informing the users that Grafana is running on an expired license. Your Grafana admin needs to upload a new license file to restore full functionality.
If your license has expired most of Grafana keeps working as normal. Some enterprise functionality stops or runs with reduced functionality and Grafana displays a banner informing the users that Grafana is running on an expired license. Your Grafana admin needs to upload a new license file to restore full functionality.
> Replace your license as soon as possible. Running Grafana Enterprise with an expired license is unsupported and can lead to unexpected consequences.
@@ -47,7 +47,7 @@ SAML authentication is not affected by an expired license.
### Reporting
- You're unable to configure new reports or generate previews.
- Existing reports continue to be sent.
- Scheduled reports are not generated or sent.
### Enterprise plugins
@@ -59,9 +59,7 @@ The white labeling feature is turned off, meaning that any white labeling option
### Usage insights
Exporting usage insights logs to Loki will be turned off for licenses expired for more than 7 days.
All the other usage insights features are turned off as soon as the license expires, meaning that you will not be able to see dashboard usage, presence indicators, or use improved search. Grafana continues to collect usage data and you will have access to it as soon as you update your license.
All the usage insights features are turned off, meaning that you won't be able to look at dashboard usage, presence indicator or to use improved search. Grafana still collects usage data and you will have access to it as soon as you update your license.
### Vault integration

View File

@@ -25,8 +25,6 @@ Restrictions are applied separately for viewers and editors.
When the number of maximum active viewers or editors is reached, Grafana displays a warning banner.
Sometimes it is useful to log in to an account from multiple locations concurrently. With Grafana Enterprise 7.5 and up, accounts are limited to three concurrent sessions.
## Expiration date
The license expiration date is the date when a license is no longer active. As the license expiration date approaches, Grafana Enterprise displays a banner.

View File

@@ -118,9 +118,7 @@ You can send reports programmatically with the [send report]({{< relref "../http
When generating reports, each panel renders separately before being collected in a PDF. The per panel rendering timeout and number of concurrently rendered panels can be configured.
To make a panel more legible, you can set a scale factor for the rendered images. However, a higher scale factor increases the file size of the generated PDF.
You can also specify custom fonts that support different Unicode scripts. The DejaVu font is the default used for PDF rendering.
To modify the panels' clarity you can set a scale factor for the rendered images. A higher scale factor is more legible but will increase the file size of the generated PDF.
These options are available in the [configuration]({{< relref "../administration/configuration.md">}}) file.
@@ -133,14 +131,6 @@ concurrent_render_limit = 4
# Set the scale factor for rendering images. 2 is enough for monitor resolutions
# 4 would be better for printed material. Setting a higher value affects performance and memory
image_scale_factor = 2
# Path to the directory containing font files
fonts_path =
# Name of the TrueType font file with regular style
font_regular = DejaVuSansCondensed.ttf
# Name of the TrueType font file with bold style
font_bold = DejaVuSansCondensed-Bold.ttf
# Name of the TrueType font file with italic style
font_italic = DejaVuSansCondensed-Oblique.ttf
```
## Report time range
@@ -155,12 +145,6 @@ The page header of the report displays the time range for the dashboard's data q
If the time zone is set differently between your Grafana server and its remote image renderer, then the time ranges in the report might be different between the page header and the time axes in the panels. We advise always setting the time zone to UTC for dashboards when using a remote renderer to avoid this.
## Choose template variables
> ** Note:** Available in Grafana Enterprise version 7.5+ (behind `templateVariables` feature flag).
You can configure report-specific template variables for the dashboard on the report page. The variables that you select will override the variables from the dashboard, and they are used when rendering a PDF file of the report. For detailed information about using template variables, refer to the [Templates and variables]({{< relref "../variables/_index.md" >}}) section.
## Reports settings
> Only available in Grafana Enterprise v7.2+.

Some files were not shown because too many files have changed in this diff Show More