Compare commits

...

471 Commits

Author SHA1 Message Date
Sofia Papagiannaki
822ff7595e Improve comments and error message. 2021-12-06 09:27:52 +02:00
Kyle Brandt
515ebf4b4c security: fix dir traversal issue 2021-12-03 13:21:53 -05:00
Dimitris Sotirakis
68fe9e3431 [v8.0.x] Backport 36759 to v8.0.x (#36774)
* Delete verify-drone from windows

* Sync drone yaml

* Downgrade grabpl version

* Move publish-frontend-metrics step
2021-07-15 09:49:19 +02:00
Grot (@grafanabot)
beeef8b96b Update queries.md (#31941) (#36765)
* Update queries.md

Completing some examples to allow newbie people to understand relative time and time shift time

* Update docs/sources/panels/queries.md

Co-authored-by: Geshi <ohayo@geshii.moe>

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

Co-authored-by: castillo92 <37965565+castillo92@users.noreply.github.com>
2021-07-14 18:47:21 +02:00
Grot (@grafanabot)
634112e1d4 "Release: Updated versions in package to 8.0.6" (#36750) 2021-07-14 13:15:33 +02:00
Marcus Andersson
1116ef1983 [v8.0.x] Transformations: add 'prepare time series' transformer (#36748)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-07-14 12:23:02 +02:00
Grot (@grafanabot)
dfaae953f8 Postgres/MySQL/MSSQL: Fix name of time field should be named Time for time series queries (#36720) (#36746)
Name of time field changed in v8 for time series queries from Time to the name of the selected
time column, i.e. time or time_sec. These changes should make sure that the name of time field
is always returned as Time for time series queries.

Fixes #36059

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
(cherry picked from commit 10c892fa5b)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-07-14 11:52:27 +02:00
Grot (@grafanabot)
d6135f54a9 change template expansion missing value handling (#36679) (#36715)
(cherry picked from commit 310d3ebe3d)

Co-authored-by: David Parrott <stomp.box.yo@gmail.com>
2021-07-14 10:30:40 +01:00
Grot (@grafanabot)
1d5ca3ae77 fix gzipped plugin asset response (#36721) (#36741)
(cherry picked from commit 7dbe388d4e)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-07-14 10:11:12 +02:00
Alexander Emelin
9fec4a7f80 Live: handle influx input with incomplete/asymmetrical field set (#36664) (#36726)
(cherry picked from commit 607c5d2555)
2021-07-13 22:17:46 +03:00
Alexander Emelin
ad3d82abee Live: avoid panic when type changes (#35394) (#36723)
(cherry picked from commit 4b8d796c54)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-07-13 20:55:18 +03:00
Grot (@grafanabot)
2575e64e8a Add ValueString to the documentation for alerts (#36654) (#36676)
(cherry picked from commit 36cb396568)

Co-authored-by: George Robinson <85952834+gerobinson@users.noreply.github.com>
2021-07-13 14:20:58 +01:00
Grot (@grafanabot)
278c85ca07 Fix Postgres query handling null values for smallint (#36648) (#36688)
* Fix Postgres query handling null values for smallint

* Fix converting to int16

(cherry picked from commit 5d01add7da)

Co-authored-by: idafurjes <36131195+idafurjes@users.noreply.github.com>
2021-07-13 13:49:31 +02:00
Grot (@grafanabot)
d11e65d3ac live: better error logging in push API (#36601) (#36623)
(cherry picked from commit e1358eeb76)

Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2021-07-13 14:43:15 +03:00
Grot (@grafanabot)
028e41b152 Plugins: Improve grafana-cli UX + API response messaging for plugin install incompatibility scenario (#36556) (#36692)
* improve UX for plugin install incompatability

* refactor test

(cherry picked from commit e06335ffe9)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-07-13 10:21:41 +02:00
Grot (@grafanabot)
68374a988a Avoid breaking on fieldConfig without defaults field (#36666) (#36690)
This would result in a `Dashboard init failed` error when migrating
dashboards with a folded panel that has a `fieldConfig` but has not
defined `fieldConfig.defaults`.

(cherry picked from commit 81511e34d9)

Co-authored-by: Gustaf Lindstedt <gustaflindstedt@protonmail.com>
2021-07-13 10:14:05 +02:00
Grot (@grafanabot)
fb60ab66f1 TimeSeries: Improve tooltip positioning when tooltip overflows (#36440) (#36672)
* TimeSeries: Improve tooltip positioning when tooltip overflows

* VizTooltip: Use react-popper, extract positioning calculation into util function + add unit tests

* VizTooltip: Keep ref as tooltipRef

* Use popper only for VizTooltip positioning

* VizTooltip: Set altAxis to true to prevent overflow on y axis

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

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-07-12 18:15:05 +02:00
Grot (@grafanabot)
3d786313c2 Alerting: A better and cleaner way to know if Alertmanager is initialised (#36659) (#36665)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
(cherry picked from commit 8efe1856e2)

Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
2021-07-12 19:22:35 +05:30
Grot (@grafanabot)
a65c0a491e Links: Fixes issue with some links causing full page reload (#36631) (#36649)
(cherry picked from commit 6c5d0db255)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-07-12 15:40:35 +02:00
Grot (@grafanabot)
fea410ebb1 Add StreamName dimension for AWS/KinesisVideo namespace (#36655) (#36663)
(cherry picked from commit 37c3e6f9b9)

Co-authored-by: Brent Cetinich <73208365+brentcetinich@users.noreply.github.com>
2021-07-12 14:46:08 +02:00
Grot (@grafanabot)
fb9e6d3286 Tempo: show hex strings instead of uints for ids (#36471) (#36662)
(cherry picked from commit ee89e51c48)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-07-12 14:33:51 +02:00
Grot (@grafanabot)
e439828db9 Alerting: Fix potential panic in Alertmanager when starting up (#36562) (#36638)
* Alerting: Fix potential panic in Alertmanager when starting up

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

* Fix reviews

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
(cherry picked from commit e19c690426)

Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
2021-07-12 13:52:27 +02:00
Grot (@grafanabot)
1e4cd19824 A11y: ARIA hide image/link duplicate in news panel (#36642) (#36651)
* fix(a11y): Hide image/link duplicate

* fix: proper heading and time markup

(cherry picked from commit b8fbe70c14)

Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
2021-07-12 11:12:27 +02:00
Grot (@grafanabot)
b4e40c3280 influxdb: influxql: better tag-value filtering (#36570) (#36639)
(cherry picked from commit cc460110b1)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-07-12 10:15:32 +02:00
Grot (@grafanabot)
249ad5c256 InfluxDB: Flux: fix backward compatibility for some queries (#36603) (#36615)
* influxdb: flux: better backward-compatibility

* added comment-explanation

(cherry picked from commit e4ece0530a)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-07-12 09:16:49 +02:00
Grot (@grafanabot)
ae7e4811b1 DashboardList: Fix issue not re-fetching dashboard list after variable change (#36591) (#36625)
(cherry picked from commit c7d2d70799)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-07-11 10:59:25 +02:00
Grot (@grafanabot)
bb3432361c Database: Fix incorrect format of isolation level configuration parameter for MySQL (#36565) (#36618)
(cherry picked from commit ca2223f705)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-07-09 20:06:08 +02:00
Grot (@grafanabot)
2dd848c344 Stat: use shared data min/max for y auto-ranging (#36497) (#36617)
(cherry picked from commit bb1dac3c72)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-07-09 18:54:51 +02:00
Grot (@grafanabot)
cb71fddd24 Add AWS/AmazonMQ dimensions (#36573) (#36613)
(cherry picked from commit 1dc5d037e4)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2021-07-09 16:41:04 +02:00
Grot (@grafanabot)
1623150bb5 CloudWatch/Logs: Fix log alerts in new unified alerting (#36558) (#36605)
* Pass FromAlert header from new alerting

* Add better error messages

(cherry picked from commit ea2ba06b93)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2021-07-09 14:58:35 +02:00
Grot (@grafanabot)
1734acbc9f live: better overview in docs (#36506) (#36577)
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
(cherry picked from commit 10a942aad0)

Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2021-07-08 20:28:08 +02:00
Grot (@grafanabot)
2d406f13de ReleaseNotes: Updated changelog and release notes for 8.0.5 (#36554) (#36566)
* ReleaseNotes: Updated changelog and release notes for 8.0.5

* Update _index.md

* Update CHANGELOG.md

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
(cherry picked from commit 6266a9e77a)
2021-07-08 17:38:14 +02:00
Grot (@grafanabot)
6bc37296c7 Alerting: Allow space in label and annotation names (#36549) (#36557)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
(cherry picked from commit 94d2520a84)

Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
2021-07-08 09:54:21 -04:00
Grot (@grafanabot)
cbb2aa5001 Release: Updated versions in package to 8.0.5 (#36553) 2021-07-08 12:30:44 +02:00
Grot (@grafanabot)
4c16d55e11 allow for appropriate content-type to be set (#36545) (#36550)
(cherry picked from commit 2616580bae)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-07-08 11:35:42 +02:00
Grot (@grafanabot)
d9858e0af9 Timeseries Panel: Retain alerts when migrating from old graph (#36514) (#36546)
Closes #36106

(cherry picked from commit 8d66db09bf)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2021-07-08 11:07:16 +02:00
Grot (@grafanabot)
18c547d695 Live: document allowed_origins (#36433) (#36495)
(cherry picked from commit e60950a8c7)

Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2021-07-07 10:56:43 -07:00
Grot (@grafanabot)
2671c7d6cd Alerting API: Restrict access to Alertmanager configuration (#36507) (#36516)
* Alerting API: Restrict access to Alertmanager configuration to viewers

(cherry picked from commit fc90d47863)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-07-07 16:56:00 +03:00
Grot (@grafanabot)
fffbb74aaf Links: Fix links to other apps outside Grafana when under sub path (#36498) (#36515)
(cherry picked from commit eed1f36613)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-07-07 15:49:31 +02:00
Grot (@grafanabot)
074ef08db3 Table: Fixes color for data links (#36446) (#36496)
* Table: add styling for anchor tag

* inherit color from parent to anchor tag

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
(cherry picked from commit 97dca963a9)

Co-authored-by: Tharun Rajendran <rajendrantharun@live.com>
2021-07-07 15:26:46 +02:00
Grot (@grafanabot)
5e83e3862a CloudWatch Logs: If Grafana Live isn't enabled, don't use the Live Channel (#36358) (#36510)
* If Live isn't enabled, don't use the Live Channel

* ..Import Config if you want to use it!

(cherry picked from commit 3e95c3826a)

Co-authored-by: Thomas Cave <github@thomas.cave.dev>
2021-07-07 14:08:35 +02:00
Grot (@grafanabot)
350bb10cdd Plugins: Improve API response for plugin assets (#36352) (#36505)
* improve API response for plugin assets 403

* remove unnecessary newline

(cherry picked from commit 333d520528)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-07-07 12:40:37 +02:00
achatterjee-grafana
5cdd8dfed1 Docs: Removed folder and 3 files within. (#36487) 2021-07-06 21:13:25 +02:00
Will Browne
79e2da441a resolve conflicts (#36431) 2021-07-06 17:44:30 +02:00
Grot (@grafanabot)
0131a8ef05 Docs: Fix Azure Monitor refs (#36458) (#36478)
* Docs: Fix Azure Monitor refs

* more fixes

Co-authored-by: Robby Milo <robbymilo@gmail.com>
(cherry picked from commit eabf3fb674)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2021-07-06 16:47:56 +02:00
Grot (@grafanabot)
cc843e67ae TooltipPlugin: Prevent Tooltip render if field is undefined (#36260) (#36464)
* Tooltip Plugin: Prevent tooltip render if focusedSeriesIdx is out of range

* TooltipPlugin: Also prevent render in multi case

* TooltipPlugin: Return null if field is undefined

(cherry picked from commit 96a3cc3cd8)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-07-06 12:19:40 +02:00
Grot (@grafanabot)
efbfb42f15 AzureMonitor: Fix issue where resource group name is missing on the resource picker button (#36400) (#36462)
* AzureMonitor: Fix issue where resource group name is missing in the UI

* fix

(cherry picked from commit 2a4191a2ee)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2021-07-06 11:46:08 +02:00
Grot (@grafanabot)
fd515d1318 Folders: Return 409 Conflict status when folder already exists (#36429) (#36461)
* Return 409 Conflict when trying to post folder that already exists

* Fix tests

* Update documentation for new error message in folders api

(cherry picked from commit a18d3007a7)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-07-06 11:32:58 +02:00
Grot (@grafanabot)
4efbf432a4 CloudwatchLogs: send error down to client (#36277) (#36438)
* CloudwatchLogs: send error down to client

* Move error handling down to startLiveQuery

(cherry picked from commit 0ae8a85828)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-07-05 16:34:29 +02:00
Grot (@grafanabot)
61ea316f10 DateFormats: Fix reading correct setting key for use_browser_locale (#36428) (#36434)
(cherry picked from commit 4932b9dfa4)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-07-05 15:27:35 +02:00
Leonard Gram
ab26f9c820 Azure OAuth: debug logs for user information (#36389) (#36394)
(cherry picked from commit 09a96ad2ad)
2021-07-05 11:05:49 +02:00
Grot (@grafanabot)
92ab8a4189 TimeSeries: Do not show series in tooltip if it's hidden in the viz (#36353) (#36423)
(cherry picked from commit 7ae656ff16)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-07-05 10:44:33 +02:00
Grot (@grafanabot)
190d7d12e3 Alerting: Fix prometheus API to check folder permissions (#36301) (#36421)
(cherry picked from commit 8a3edf280e)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-07-05 11:31:58 +03:00
Grot (@grafanabot)
6c79c846ba Snapshots: Fixex snapshots absolute time range issue (#36350) (#36382)
(cherry picked from commit 09fed51be5)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-07-05 10:14:38 +02:00
Grot (@grafanabot)
862c9a2c73 fix: #36322 HistoryWrapper constructor history param not work (#36367) (#36399)
(cherry picked from commit 63715dcdef)

Co-authored-by: MeetzhDing <meet.zhding@foxmail.com>
2021-07-05 09:02:35 +02:00
Grot (@grafanabot)
fc45cf178e Allow white labeling loading logo (#36174) (#36386)
* Allow to whitelabeling loading logo

* Add loading_logo to documentation

* Change loading_logo to loading_logo_url

(cherry picked from commit ef05596e07)

Co-authored-by: Selene <selenepinillos@gmail.com>
2021-07-05 09:50:57 +03:00
Grot (@grafanabot)
d03007de01 Dashboards: Add IsFolder field into models.GetDashboardQuery (#36214) (#36388)
* Add IsFolder field into models.GetDashboardQuery

* Reverted folderId - return dummy success when calling get folder with id 0

* Moved condition to upper level - add test

(cherry picked from commit 084c9c8746)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-07-02 19:19:08 +03:00
Grot (@grafanabot)
1b23e38a86 AzureMonitor: Refresh documentation (#35371) (#36397)
* AzureMonitor: Refresh documentation

* logs/kusto

* finish up logs

* variables for log analytics

* Apply suggestions from code review

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

* finish up main topics

* finish docs?

* typos and other review comments

* add link to sample arg queries

* split up azure docs

* workaround weird code duplication issue

* Update docs/sources/datasources/azuremonitor/template-variables.md

Co-authored-by: Sarah Zinger <sarahzinger@users.noreply.github.com>

* Apply suggestions from code review

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

* feedback

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

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2021-07-02 17:17:24 +02:00
Grot (@grafanabot)
7eb704f49d Docs: Update bar-gauge-panel.md (#36250) (#36395)
may be a mistake here?

(cherry picked from commit 379ed0a6f7)

Co-authored-by: dreamChenp12 <86648316+dreamChenp12@users.noreply.github.com>
2021-07-02 17:13:35 +02:00
Grot (@grafanabot)
df2500a928 Docs: Add $__rate_interval variable to global variables (#36378) (#36391)
* Add  variable documentation to global variables

* Update docs/sources/variables/variable-types/global-variables.md

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

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

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-07-02 16:38:24 +02:00
Grot (@grafanabot)
1a598bf75e Docs: Improve title and documentation for share shortened link in Explore (#36380) (#36392)
* Improve title and documentation for share shortened link in Explore

* Update docs/sources/explore/_index.md

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

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

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-07-02 16:34:22 +02:00
Grot (@grafanabot)
bc0c5f118b DashboardQueryRunner: Fixes unrestrained subscriptions being created (#36371) (#36375)
(cherry picked from commit b741245960)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-07-02 11:13:58 +02:00
Grot (@grafanabot)
ef45e1016a Remove AWS CW client cache (#36311) (#36372)
(cherry picked from commit 30dc4025c2)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2021-07-02 10:35:28 +02:00
Grot (@grafanabot)
468523a1ce Docs: Add security warning about using Grafana 8 alerts with multiple organisations (#36308) (#36354)
* Docs: Add security warning about using Grafana 8 alerts with multiple orgs

(cherry picked from commit d525a5a469)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-07-01 18:53:20 +03:00
Grot (@grafanabot)
740aedbcbb ReleaseNotes: Updated changelog and release notes for 8.0.4 (#36347) (#36356)
* ReleaseNotes: Updated changelog and release notes for 8.0.4

* Update _index.md

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
(cherry picked from commit 3cce67c044)
2021-07-01 17:49:17 +02:00
Grot (@grafanabot)
dc4007e7bd TimeSeries: Fixes x-axis time format when tick increment is larger than a year (#36335) (#36348)
* TimeSeries: Fixes x-axis time format when tick increment is larger than a year

* removed modal change

* removed modal change

(cherry picked from commit f152180dc3)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-07-01 14:00:45 +02:00
Grot (@grafanabot)
81fef5b4b4 "Release: Updated versions in package to 8.0.4" (#36343) 2021-07-01 13:35:58 +02:00
Alexander Emelin
acd0d18552 live: add allowed_origins option (#36318) (#36327)
* live: add allowed_origins option (#36318)

(cherry picked from commit 483418dbb0)

* Profile: Fix failing FE reducer test (#36331)

(cherry picked from commit 4434eeaf59)

* update option description to only commit to wilcard symbol for now

* Chore: dummy change to trigger Drone sync

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2021-07-01 13:30:27 +02:00
Grot (@grafanabot)
682d4134d6 Web compat: polyfill MediaQueryList.addEventListener() for Safari < 14 (#36274) (#36321)
(cherry picked from commit b8010ba9f5)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-07-01 11:20:20 +02:00
Grot (@grafanabot)
fd1d0a2a7c Profile: Fix failing FE reducer test (#36331) (#36333)
(cherry picked from commit 4434eeaf59)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-07-01 10:26:48 +02:00
Torkel Ödegaard
f4cf33a81d Graph: Workaround for DashboardQueryRunner race condition (#36254) (#36299)
* Graph: Workaround for DashboardQueryRunner race condition

* Removed deepClone

(cherry picked from commit 6f38883583)
2021-07-01 08:32:03 +02:00
Grot (@grafanabot)
070fc7dbef Prometheus: Fix performance issue in editor when too many ids (#36176) (#36315)
(cherry picked from commit 8aeb1cc030)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-06-30 21:50:59 +02:00
Grot (@grafanabot)
601c113dbf Fix Graph story (#36259) (#36305)
(cherry picked from commit 1ab4ffb03d)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-06-30 16:36:14 +02:00
Grot (@grafanabot)
5f114cb3f0 Elasticsearch: Persist custom value for size option in Terms Bucket Agg (#36194) (#36296)
* Add custom hook to handle creatable select options

* Refactor Terms Settings Editor

* Make props of Bucket Aggregation settings editors consistent

* Rename hook to something more descriptive

* Move render test helper

* Add tests

* small refactor

* Remove useless test

(cherry picked from commit 1490c255f1)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-06-30 11:46:00 +02:00
Grot (@grafanabot)
e97c02ef12 TimeSeries: Bring back axis label padding (#36281) (#36288)
* TimeSeries: bring back some axis label padding

* Update snaps

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

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-06-30 11:32:14 +02:00
Grot (@grafanabot)
d15a70371f Chore: adds buffersize to ReplaySubject (#36286) (#36287)
(cherry picked from commit 3999d670cf)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-06-30 09:27:56 +02:00
Grot (@grafanabot)
d478184e47 Update getTimeRangeParams to return start & end instead of from & to (#36268) (#36275)
(cherry picked from commit abb1c10776)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-06-29 18:28:18 +02:00
Grot (@grafanabot)
2ca6b89d8f Update _index.md (#36248) (#36272)
Spelling error on line 18.
aerts -> alerts

(cherry picked from commit 603d1cddb8)

Co-authored-by: Dawnpool <57010815+Dawnpool@users.noreply.github.com>
2021-06-29 10:32:03 -04:00
Grot (@grafanabot)
469b805515 [Alerting] Update documentation with regards to clustering (#36261) (#36264)
* [Alerting] Update documentation with regards to clustering

* 8.1 not 8.2

(cherry picked from commit 91751d7e38)

Co-authored-by: gotjosh <josue@grafana.com>
2021-06-29 07:56:38 -04:00
Grot (@grafanabot)
16c2a2b6cb Elasticsearch: Allow case sensitive custom options in date_histogram interval (#36168) (#36255)
* Elasticsearch: make interval select handle case-sensitive input

* Elasticsearch: Allow case sensitive custom options in date_histogram interval

* asd is not a good input id

(cherry picked from commit 0a2a6690d9)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-06-29 11:50:18 +01:00
Grot (@grafanabot)
89ac0a79ad Update whats-new-in-v8-0.md (#36249) (#36251)
Double periods to a single period

(cherry picked from commit 228372522b)

Co-authored-by: Dawnpool <57010815+Dawnpool@users.noreply.github.com>
2021-06-29 09:36:48 +02:00
Grot (@grafanabot)
4410fe538d AccessControl: Fix docs link to localhost (#36233) (#36234)
* AccessControl Correct link to localhost

* Removed extra parenthesis in relref definition

(cherry picked from commit d42d874240)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2021-06-28 21:40:31 +02:00
Grot (@grafanabot)
1d2bbce1cf Added note about location of the default home dashboard. (#36231) (#36232)
(cherry picked from commit cdc780e9c6)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-06-28 21:08:36 +02:00
Grot (@grafanabot)
392dfd7e15 Doc: Updated broken relrefs to "Value mappings in topic "State timeline". (#36225) (#36227)
* Updated broken relrefs and adjusted some weights.

* Fixed. There was some issue with ", rendering OK in local build.

(cherry picked from commit 258b3b7078)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-06-28 17:50:58 +02:00
Grot (@grafanabot)
f1db840fe1 Azure monitor: ensure that time column has a name (#36144) (#36217)
Fixes bug when switching from Timeseries to Table view when viewing Azure Monitor Metrics Data.

(cherry picked from commit 493d35ccc6)

Co-authored-by: Sarah Zinger <sarahzinger@users.noreply.github.com>
2021-06-28 11:45:26 -04:00
Grot (@grafanabot)
cbae9dda34 Explore: Fix import of queries between SQL data sources (#36210) (#36224)
* Remove datasource property when importing same ds type queries

* Refactor imported queries

* Update public/app/features/explore/state/query.ts

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

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
(cherry picked from commit a721dd42b3)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-06-28 16:36:09 +02:00
Grot (@grafanabot)
28c0f8c49e fix broken link to play (#36148) (#36183)
closes https://github.com/grafana/grafana/issues/36103

(cherry picked from commit e6e7ba209c)

Co-authored-by: Matt Abrams <37156449+zuchka@users.noreply.github.com>
2021-06-25 20:41:37 +02:00
Grot (@grafanabot)
592cf2ac72 Docs: Document caching defaults in enterprise config (#36181) (#36182)
* Docs: Document caching defaults in enterprise config

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>

* adding missed period

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* more missed periods!

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

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

Co-authored-by: Dave Henderson <dhenderson@gmail.com>
2021-06-25 14:28:26 -04:00
achatterjee-grafana
a1972c0f5b Added note that anonymous access permission is no longer available. (#36142) (#36173) 2021-06-25 11:13:55 -04:00
Grot (@grafanabot)
164148b3de Grafana-UI: allow custom validity checks for creatable selects (#36118) (#36162)
* add actions handling to Select in storybook

* Grafana-UI: allow custom validity checks for creatable selects

(cherry picked from commit 58bbe17d84)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-06-25 12:27:30 +02:00
Grot (@grafanabot)
b5b8d226ad TimeSeries: Preserve RegExp series overrides when transforming from old graph (#36134) (#36158)
(cherry picked from commit b8b90ec74f)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-06-25 11:16:26 +02:00
Grot (@grafanabot)
60074192e9 put environmental variable in inline code (#36100) (#36123)
this puts the code in question in the same style as the other environmental variables on the page

(cherry picked from commit 6b0c75cfd6)

Co-authored-by: Matt Abrams <37156449+zuchka@users.noreply.github.com>
2021-06-24 13:58:49 -04:00
Grot (@grafanabot)
d2a59bd78d Alerting: Add additional newlines to Microsoft Teams notification message where necessary (#36126) (#36137)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
(cherry picked from commit 8fe58fc2e3)

Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
2021-06-24 17:42:44 +02:00
Grot (@grafanabot)
1e77c2941b Docs: Add note about time series replacing graph vis (#36101) (#36135)
(cherry picked from commit 4f84a09286)

Co-authored-by: Ben Bodenmiller <bbodenmiller@gmail.com>
2021-06-24 17:19:19 +02:00
Grot (@grafanabot)
37bef2d0b2 add note about HA limitation (#36112) (#36129)
(cherry picked from commit ea8aee0432)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-06-24 16:40:56 +02:00
Grot (@grafanabot)
3a12aa00c0 Signup: Add verify email route (#36113) (#36115)
(cherry picked from commit 4be9afb7e2)

Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
2021-06-24 13:29:42 +02:00
Grot (@grafanabot)
42471f1031 Alerting: Change __value__ label to __value_string__ annotation and add ValueString variable in notifications (#36032) (#36105)
* Alerting: Allow __value__ label in notifications
was being removed by removePrivateItems
discoverd in #36020, but issue is not about that specifically

* __value__ label to __value_string__ annotation
and .ValueString extended property for notifications

(cherry picked from commit 19f764739b)

Co-authored-by: Kyle Brandt <kyle@grafana.com>
2021-06-24 09:40:48 +02:00
Grot (@grafanabot)
833014d924 fix typo in template (#36082) (#36090)
(cherry picked from commit e91f12bde3)

Co-authored-by: Jan Steinke <jan.steinke@gmail.com>
2021-06-23 14:09:57 -04:00
Grot (@grafanabot)
24c98204e3 Live: rely on app url for origin check (#35983) (#36089)
(cherry picked from commit 5bbf45592e)

Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2021-06-23 20:30:40 +03:00
Grot (@grafanabot)
c447ff2581 Updated content to specify method to use to get keyboard shortcuts wh… (#36084) (#36088)
* Updated content to specify method to use to get keyboard shortcuts when user is on Windows.

* Added changes from doc review.

(cherry picked from commit 5da8f3e258)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-06-23 18:58:16 +02:00
Grot (@grafanabot)
0d33b57428 PieChart: sort legend descending, update placeholder to show default field display values limit (#36062) (#36081)
(cherry picked from commit 15171ffa3b)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-06-23 16:53:58 +02:00
Grot (@grafanabot)
d38a50c2f3 Docs: document cortex/loki data source caveats for alerting (#36074) (#36078)
* Document cortex/loki datasource caveats

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

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

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

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

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

Co-authored-by: Domas <domas.lapinskas@grafana.com>
2021-06-23 10:51:44 -04:00
Grot (@grafanabot)
f0fb1edb7c ReleaseNotes: Updated changelog and release notes for 7.5.9 (#36057) (#36076)
* ReleaseNotes: Updated changelog and release notes for 7.5.9

* Add link to notes

* Apply suggestions from code review

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
(cherry picked from commit 49a64f8d44)
2021-06-23 15:57:18 +02:00
Andres Martinez Gotor
f84f9d5b44 AzureMonitor: Add cloud specific deep linking (#35784) (#36066)
(cherry picked from commit 83860bdcc3)

Co-authored-by: shuotli <63325084+shuotli@users.noreply.github.com>
2021-06-23 14:39:35 +01:00
Grot (@grafanabot)
5f26262655 influxdb: influxql: fix retention-policy handling (#36022) (#36058)
(cherry picked from commit ec9dbdd93c)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-06-23 10:17:08 +02:00
Grot (@grafanabot)
0f9168953b Elasticsearch: Restore fields naming when using variables (#35624) (#36034)
(cherry picked from commit 185bf8f9a2)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-06-22 19:33:22 +02:00
Grot (@grafanabot)
901cc09416 Update custom-panel-option-editors.md (#36005) (#36006)
Variable name fix

(cherry picked from commit f84a74018c)

Co-authored-by: DBaldovskiy <d.baldovskiy@mail.ru>
2021-06-22 09:39:32 -04:00
Grot (@grafanabot)
f98a092a96 Variables: Fix for changing readonly query property (#35992) (#36014)
* Variables: Fix for changing readonly query property

* Docs: adds release

* Docs: adds release

(cherry picked from commit ffc18ebbcf)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-06-22 09:17:22 +02:00
Grot (@grafanabot)
b3611ab407 Alerting: fix conflicting folder and dashboard permissions during migration (#35967) (#36013)
* Alerting: Fix conflicting user and team permissions

* Avoid duplicate perrmissions

* Fix lint

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

Co-authored-by: Ganesh Vernekar <ganeshvern@gmail.com>
(cherry picked from commit 91cf062d0b)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-06-22 09:05:23 +02:00
Grot (@grafanabot)
354727ae32 [MYSQL] convert explicitely smallint and tinyint (#35897) (#35997)
* [MYSQL] convert explicitely smallint and tinyint

* clean up code

* fix comments

(cherry picked from commit 73fdd9dc22)

Co-authored-by: ying-jeanne <74549700+ying-jeanne@users.noreply.github.com>
2021-06-21 18:30:16 +02:00
Grot (@grafanabot)
ec01ce9cae TimeSeries panel: Do not reinitialize plot when thresholds mode change (#35952) (#35978)
(cherry picked from commit 6f3887ca88)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-06-21 09:15:12 +02:00
Grot (@grafanabot)
07bfa64bb4 Alerting: Decouple default template from channel tests (#35239) (#35973)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
(cherry picked from commit 33d6e11175)

Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
2021-06-21 04:54:29 +02:00
Grot (@grafanabot)
46d1c1c112 Templating: Add default ref id for data source variable queries (#35923) (#35946)
* add default ref id for ds variable queries

* cleanup

(cherry picked from commit 7ff26bdfae)

Co-authored-by: Erik Sundell <erik.sundell@grafana.com>
2021-06-18 14:26:20 +02:00
Grot (@grafanabot)
1cbc05abd1 Chore: Refactors flaky Frontend test (#35645) (#35738)
* Chore: Refactors flaky Frontend test

* Refactor: update after PR comments

(cherry picked from commit 3395142ece)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-06-18 13:36:53 +02:00
Grot (@grafanabot)
e9e67c3d98 ReleaseNotes: Updated changelog and release notes for 8.0.3 (#35936) (#35938)
* ReleaseNotes: Updated changelog and release notes for 8.0.3

* Update _index.md

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
(cherry picked from commit fb91302e52)
2021-06-18 13:13:35 +02:00
Giordano Ricci
cd00485304 Update release notes url (#35937) 2021-06-18 12:39:37 +02:00
Grot (@grafanabot)
cae5c5e46b "Release: Updated versions in package to 8.0.3" (#35929) 2021-06-18 10:56:02 +02:00
Grot (@grafanabot)
9ab2fd5ec9 Prometheus: Fixes issue where legend name was replaced with name Value in stat & gauge panels (#35863) (#35905)
(cherry picked from commit 22203fd4df)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-06-18 09:19:26 +01:00
Grot (@grafanabot)
3805f72b6a Dashboard: Fixes blank / empty panels after duplicate and add library panel (#35906) (#35924)
(cherry picked from commit 333932812d)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-06-18 09:12:39 +02:00
Grot (@grafanabot)
a95eca61ff Dashboard: Fix changes doesn't reflect after changing panel sizes in inspect JSON and click on apply (#35276) (#35744)
* Trigger DashboardPanelsChangedEvent from InspectJSONTab if the panel.gridPos changed and if the dashboard needs to re-render, if yes we will  that will update the positioning
* Minor cleanup

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
(cherry picked from commit b774dd9b1a)

Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
2021-06-18 09:06:44 +02:00
Grot (@grafanabot)
276dc632f6 LibraryPanels: Fixes crash in libray panels list when panel plugin is not found (#35907) (#35921)
(cherry picked from commit 941936cf97)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-06-18 08:31:16 +02:00
Grot (@grafanabot)
80db97f134 SQL: Fixes issues with showing value column name prefix in legends (#35839) (#35922)
* rename strategy

* Update pkg/tsdb/sqleng/sql_engine.go

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

* more strict constraints

* Fixed so that it works on multi series results

* only apply the logic when original query returns 3 fields

* removed part of comment

* Update mysql test

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
(cherry picked from commit 1d6e99bc95)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-06-18 08:28:23 +02:00
Grot (@grafanabot)
1f65d8a899 Time series: always show single points if surrounded by nulls (#35845) (#35909)
(cherry picked from commit 503c3b8f66)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-06-17 23:08:54 +02:00
Grot (@grafanabot)
a4808d12ed GraphNG: more precise axis auto-sizing (#35842) (#35903)
(cherry picked from commit e1e2bd545a)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-06-17 20:48:29 +02:00
Grot (@grafanabot)
2745265f99 GraphNG: uPlot 1.6.13 (#35844) (#35902)
(cherry picked from commit 9eac9aefde)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-06-17 20:46:18 +02:00
Grot (@grafanabot)
2b0291f997 Alerting: recalculate EndsAt (#35830) (#35898)
* setEndsAt

* one more test case

* add should clause to tests

(cherry picked from commit 4732f832f7)

Co-authored-by: David Parrott <stomp.box.yo@gmail.com>
2021-06-17 19:26:32 +02:00
Grot (@grafanabot)
43ab6bee9c Postgres/MySQL: Fixes issue with toggle query editor mode (#35890) (#35894)
* Postgres/MySQL: Fixes issue with toggle query editor mode

* PostGres/MySQL: Use $evalAsync instead of manual $digest

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
(cherry picked from commit eea3ea9755)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-06-17 18:53:52 +02:00
Grot (@grafanabot)
b6689bdf47 PanelEdit: VisulizationPicker doesn't show if panel has an unknown panel plugin (#35831) (#35892)
* feat(dashboard): introduce selector with fallback for unknown plugin

* refactor(dashboard): replace redux connect with redux hooks

* fix(dashboard): add a fallback for vizpicker when a panel plugin cannot be found

* feat(dashboard): add an icon for fallback plugins for vizpicker

* refactor(dashboard): prefer HOF selector

(cherry picked from commit 0fea1cf970)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-06-17 18:02:26 +02:00
Grot (@grafanabot)
e01b1285b9 Docs/SSE: Misc updates and corrections (#35882) (#35889)
* Docs/SSE: Misc updates and coorections

* Update docs/sources/panels/expressions.md

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

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

Co-authored-by: Kyle Brandt <kyle@grafana.com>
2021-06-17 17:05:45 +02:00
Grot (@grafanabot)
14a76fecf1 Docs: Link to the new alerting API spec (#35812) (#35888)
* Docs: Link to the new alerting API spec

* Update docs/sources/http_api/alerting.md

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

* Update docs/sources/http_api/alerting.md

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

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

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-06-17 16:34:33 +02:00
Grot (@grafanabot)
dd4f6f383d Fix spelling mistake in docs for expressions (#35873) (#35877)
(cherry picked from commit 066189588f)

Co-authored-by: George Robinson <85952834+gerobinson@users.noreply.github.com>
2021-06-17 09:45:36 -04:00
Grot (@grafanabot)
a4d72f0e5d Alerting: Fix alert permissions migration (#35869) (#35881)
* Alerting: Fix alert permissions migration

for MySQL >= 5.7 and PostgreSQL

* Do not use import struct

(cherry picked from commit 5e534d212c)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-06-17 16:34:20 +03:00
Grot (@grafanabot)
f300bdfa15 TimeSeries: ensure series overrides containing color are migrated, and migrate previous fieldConfig when changing panel type (#35676) (#35872)
* migrate previous fieldConfig when changing panel type

* TimeSeries: ensure a color series override is migrated correctly

* TimeSeries: update test description to be more accurate

* TimeSeries: update snapshot

(cherry picked from commit 4618fd34a9)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-06-17 12:43:45 +02:00
Grot (@grafanabot)
21d7936007 AzureMonitor: Fix workspace template variable queries without default workspace (#35836) (#35868)
(cherry picked from commit 4cdcb3103a)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2021-06-17 10:55:58 +01:00
Grot (@grafanabot)
d246127b2b Table: Set width 100% if the calced width is 0 (#35802) (#35825)
(cherry picked from commit a693b2eaef)

Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
2021-06-17 11:46:58 +02:00
Grot (@grafanabot)
f9c70dc834 AzureMonitor: Avoid instantiating appInsights for AppInsights for gov cloud (#35772) (#35867)
(cherry picked from commit 4ac2ed5de6)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2021-06-17 11:38:11 +02:00
Grot (@grafanabot)
21a0d45b63 Memoize SearchResults (#35851) (#35862)
(cherry picked from commit 91e9ef232d)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-06-17 10:43:11 +02:00
Grot (@grafanabot)
7ab2f13c87 MSSQL: Fixes issue with hidden queries still being executed (#35837) (#35861)
(cherry picked from commit 5f07381796)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-06-17 10:41:35 +02:00
Grot (@grafanabot)
9e39855e33 LogsPanel: Fix performance drop when moving logs panel in dashboard. (#35379) (#35859)
(cherry picked from commit 16a0e7b6a4)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2021-06-17 10:30:33 +02:00
Grot (@grafanabot)
4451724573 test: fix e2e dashboard and configure panel flows for Grafana 8 (#35498) (#35856)
* fix e2e flows

* trigger build

* remove aria-label

(cherry picked from commit 768c190bc0)

Co-authored-by: Vicky Lee <36230812+vickyyyyyyy@users.noreply.github.com>
2021-06-17 09:01:53 +01:00
Grot (@grafanabot)
cfea2a61f1 test: remove health check request for e2e flow (#35494) (#35855)
* remove health check request

* add deprecation notice

(cherry picked from commit e9a4484daf)

Co-authored-by: Vicky Lee <36230812+vickyyyyyyy@users.noreply.github.com>
2021-06-17 09:01:34 +01:00
Grot (@grafanabot)
23931ef3af ReleaseNotes: Updated changelog and release notes for 7.5.8 (#35703) (#35826)
* ReleaseNotes: Updated changelog and release notes for 7.5.8

* Add missing 7.5.8 link

* Update 7.5.8 release date

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
(cherry picked from commit ef59020f3d)
2021-06-16 16:51:01 +02:00
Grot (@grafanabot)
1569452425 Chore: Improve save dashboard error messages (#35780) (#35819)
Includes panel and dashboard id in alert
extractor errors.
Logs all non-400 dashboard errors.

Fixes #35751

(cherry picked from commit 477d4197fb)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-06-16 15:19:27 +02:00
Grot (@grafanabot)
3f0e41cd93 Alerting: Don't reset value when changing evaluator method on classic condition (#35750) (#35814)
(cherry picked from commit 407bd2d619)

Co-authored-by: Peter Holmberg <peterholmberg@users.noreply.github.com>
2021-06-16 14:34:59 +02:00
Grot (@grafanabot)
c5cff65563 CloudWatch/Logs: Fix missing response data for log queries (#35724) (#35746)
(cherry picked from commit 9a3e3014dd)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2021-06-16 13:58:48 +02:00
Grot (@grafanabot)
9252d6b05f Alerting: Fill the empty GeneratorURL (#35740) (#35803)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
(cherry picked from commit dcd4bf1615)

Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
2021-06-16 12:27:49 +02:00
Grot (@grafanabot)
a376e41ff1 SideMenu: Make sure the menu overlaps the border to prevent leaving hover state #35728 (#35795)
(cherry picked from commit b118e06b6a)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-06-16 10:46:44 +02:00
Grot (@grafanabot)
638ea61172 [v8.0.x] Dashboard Settings: Fix TimeZone dropdown doesn't change the timezone (#35788)
* Use redux action to update dashboard.timezone
* Added unit test

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

Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
2021-06-16 08:54:45 +02:00
Grot (@grafanabot)
13f367ed27 grafana/ui: Do not wrap words inside RadioButton (#35654) (#35753)
(cherry picked from commit e5e93134cf)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-06-16 08:48:38 +02:00
Grot (@grafanabot)
9a2970b5e8 Log level determined from striped message (#35607) (#35754)
(cherry picked from commit 41fca2e2df)

Co-authored-by: Olof Bourghardt <olof.bourghardt@gmail.com>
2021-06-16 08:47:41 +02:00
Grot (@grafanabot)
ff07379029 State Timeline: Fix crash when hovering over panel (#35692) (#35786)
* State Timeline: Fix crash when hovering over panel

* Refactor: fixes after PR comments

* Chore: fixes infinite loop

(cherry picked from commit 7a9d8e4230)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-06-16 06:59:19 +02:00
Grot (@grafanabot)
7e838c511c Time series: fix soft scale limits when all values are 0 (#35596) (#35782)
(cherry picked from commit d3c1a2bf8e)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-06-16 01:05:13 +02:00
Grot (@grafanabot)
6cd8305467 TimeSeries: Reduce tick size from 10 to 4 (#35632) (#35781)
(cherry picked from commit b3fcad947b)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-06-16 00:32:15 +02:00
Grot (@grafanabot)
da9c028c7e GraphNG: Handle infinite numbers as nulls when converting to plot array (#35638) (#35778)
(cherry picked from commit 60f5865ee2)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-06-15 17:15:21 -05:00
Grot (@grafanabot)
36b94c5a67 doc: fix link to label and detected fields doc (#35609) (#35777)
* Fix link to label and detected fields doc

* Update docs/sources/datasources/loki.md

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

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

Co-authored-by: Andrea Scarpino <andrea@scarpino.dev>
2021-06-15 21:14:20 +02:00
Grot (@grafanabot)
242577ad33 Alerting: Fix updating alert rule properties with missing/zero values (#35512) (#35776)
* Fix deleting labels and annotations

* Add test

* Keep no data and error start if not provided

* Allow setting interval and for to zero during rule updates

(cherry picked from commit e5a5b8e3fe)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-06-15 21:42:25 +03:00
Grot (@grafanabot)
55829f1646 Plugins: Improve wording around allow_loading_unsigned_plugins configuration (#35731) (#35775)
* improve wording

* 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>

* Update conf/sample.ini

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

* Update conf/defaults.ini

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

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

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-06-15 13:45:01 -04:00
Grot (@grafanabot)
6a9f5b260d Alerting: Add error recovery during rule evaluations (#35450) (#35773)
* Alerting: Eval recovery after query failure

* Apply suggestions from code review

(cherry picked from commit abe35c8c01)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-06-15 19:54:33 +03:00
Grot (@grafanabot)
c78da2c50c Docs: Add upgrade/breaking note about SQL data sources and data frames (#35766) (#35771)
Add upgrade/breaking note about SQL data sources and data frames.

Ref #35534

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

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-06-15 18:37:34 +02:00
Grot (@grafanabot)
15c9d4e3e2 Avoid log entry if not set for debug (#35741) (#35748)
(cherry picked from commit 6b786e7f68)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2021-06-15 18:01:38 +02:00
Grot (@grafanabot)
4fd5765354 Docs: Clarify data streaming with plugins documentation (#35576) (#35696)
(cherry picked from commit 898c314946)

Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2021-06-15 11:21:40 -04:00
Grot (@grafanabot)
17a091dfb6 Docs: Document migration of dashboard alert permissions (#35559) (#35764)
* Docs: Document migration of dashbard alert permissions

* Add reference to the configuration

* Apply suggestions from code review

* Apply suggestions from code review

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 33bfd6fa53)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-06-15 17:03:00 +02:00
Grot (@grafanabot)
86be18a668 Plugins: fix test with bad symlink target (#35737) (#35755)
(cherry picked from commit adbb15a3a7)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-06-15 16:16:49 +02:00
Grot (@grafanabot)
dd24946f0f Fix: fix loading symbolically linked plugins (#35635) (#35693)
(cherry picked from commit 5b5cb94809)

Co-authored-by: Domas <domas.lapinskas@grafana.com>
2021-06-15 13:24:53 +03:00
Giordano Ricci
9fce4436ea Update What's New & Release notes URLs (#35673)
* Update What's New & Release notes URLs

* Update package.json

* Update package.json
2021-06-15 11:24:19 +01:00
Grot (@grafanabot)
c9b8c851fa Plugins: Ignore symlinked folders when verifying plugin signature (#34434) (#35719)
* add check + test

* fix test

* add manifest

* fix linter

* add nolint

* separate err cond checks

* only collect relevant plugin files

* skip symlinks

* refactor

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

* remove test since case already covered

* remove unnecessary changes from before

* refactor

* remove comment

(cherry picked from commit 303352a89b)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-06-15 12:19:24 +02:00
Grot (@grafanabot)
eb018c417d Alerting: Fix alert migration RefID generation (#35667) (#35679)
* Alerting: Fix alert migration RefID generation

if the alert has more than 26 conditions

* Remove TODO comment

* Make similar change under pkg/expr

(cherry picked from commit c997f646cc)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-06-15 11:49:40 +03:00
Grot (@grafanabot)
fd50fc8ec7 Chore: Move immutable, is-hotkey, and react-inlinesvg deps to grafana-ui (#34290) (#35627)
(cherry picked from commit aa14621d29)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2021-06-15 09:49:09 +01:00
Grot (@grafanabot)
4c274d1615 Login: Require user to not be signed in to get request password email (#35421) (#35672)
(cherry picked from commit 7f882eea05)

Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
2021-06-14 18:25:24 +02:00
Grot (@grafanabot)
d86e6c072e doc: fix link to Loki's doc (#35611) (#35671)
(cherry picked from commit 74a6e6d973)

Co-authored-by: Andrea Scarpino <andrea@scarpino.dev>
2021-06-14 17:58:17 +02:00
Grot (@grafanabot)
7a3163da1f Alerting: Increase alertmanager_conf column size if mysql (#35657) (#35668)
fixes #35583

(cherry picked from commit 8a3d7b6446)
2021-06-14 17:30:17 +02:00
Grot (@grafanabot)
732f794e16 Alerting: fix postgres migration on conflict (#35556) (#35653)
(cherry picked from commit 423474325a)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-06-14 18:09:27 +03:00
Grot (@grafanabot)
8ac34f9c76 Docs: Fix Prometheus data source provisioning example about httpMethod (#35660) (#35664)
(cherry picked from commit 61a718cf8d)

Co-authored-by: hanjm <hanjinming@outlook.com>
2021-06-14 17:01:01 +02:00
Grot (@grafanabot)
72b5f5fdff PanelEdit: Always have bottom border to make sections easier to see when expanded (#35565) (#35626)
(cherry picked from commit 7599ab8217)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-06-14 16:58:36 +02:00
Grot (@grafanabot)
4e2ee85751 Add Panel: fixes No gap between rows in safari (#35570) (#35661)
* Add Panel: fixes No gap between rows in safari

* removes extra margin from bottom and far right

* fixes frontend test

* make add panel actions accessible and rewrite test using RTL

(cherry picked from commit 6ee2f1fe3e)

Co-authored-by: Uchechukwu Obasi <obasiuche62@gmail.com>
2021-06-14 16:46:29 +02:00
Grot (@grafanabot)
059c5905bb ReleaseNotes: Updated changelog and release notes for 8.0.2 (#35615) (#35644)
* ReleaseNotes: Updated changelog and release notes for 8.0.2

* Update release notes for 8.0.2

* Update CHANGELOG.md

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

* Update docs/sources/release-notes/release-notes-8-0-2.md

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

Co-authored-by: Ivana <ivana.huckova@gmail.com>
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
(cherry picked from commit 4cb62e4292)
2021-06-14 15:15:36 +02:00
Grot (@grafanabot)
e7c0b6a248 Docs: Fix template example for unified alerting (#35620) (#35639)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
(cherry picked from commit 673b03671d)

Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
2021-06-14 14:31:59 +02:00
Grot (@grafanabot)
8db130f746 ValueMappings: Improve singlestat value mappings migration (#35578) (#35636)
* Migrate singlestat value mappings to new value mappings

* Update public/app/features/dashboard/state/DashboardMigrator.ts

* Update migration to produce single value map

(cherry picked from commit 08bc2b402b)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-06-14 14:11:50 +02:00
Grot (@grafanabot)
7a96df875b Annotations: Fix annotation line and marker colors (#35608) (#35619)
(cherry picked from commit 75ff02a9fb)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-06-14 12:39:40 +02:00
Grot (@grafanabot)
5c5d45e19f "Release: Updated versions in package to 8.0.2" (#35614) 2021-06-14 10:55:02 +02:00
Grot (@grafanabot)
ffd39d5f36 Fix typo (#35452) (#35454)
(cherry picked from commit e4a4446004)

Co-authored-by: Nolan Crooks <58015900+crockk@users.noreply.github.com>
2021-06-14 10:06:35 +02:00
Grot (@grafanabot)
a97ad5e6e4 AlertList: make sure we sort the alert list when displayed in "recent state changes" mode. (#35544) (#35545)
(cherry picked from commit 5ac2a7cca6)

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2021-06-14 09:53:02 +02:00
Grot (@grafanabot)
4a7c0eafd4 Variables: Hides default data source if missing from regex (#35561) (#35605)
(cherry picked from commit d94817146e)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-06-14 06:29:39 +02:00
Grot (@grafanabot)
982dfe21f5 Snapshots: Remove dashboard links from snapshots (#35567) (#35586)
(cherry picked from commit 4907d09ffe)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-06-12 08:11:02 +02:00
Grot (@grafanabot)
a156582fc4 Theme: Change white base in dark theme (#35564) (#35582)
* Theme: Change white base in dark theme

* Updated

* Updated snapshots

(cherry picked from commit f884381a68)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-06-12 08:10:50 +02:00
Grot (@grafanabot)
e3ea4f839b PieChart: Fixes legend dimension limits (#35563) (#35584)
* PieChart: Fixes legend size limits

* Fixing table legend

* remove legend

(cherry picked from commit a328afd631)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-06-12 08:10:38 +02:00
Grot (@grafanabot)
be3032c4e8 Stat: improve color mode migration from singlestat panels (#35538) (#35587)
(cherry picked from commit 056e17216e)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-06-11 18:29:41 +02:00
Grot (@grafanabot)
b4e30f1bd3 Dashboard: handle the case where refresh_intervals could be null (#35511) (#35579)
* handle the case where refresh_intervals === null + add unit test

* have a clean _dashboard for each test

* modify check to see if refresh_intervals is an array

(cherry picked from commit 60f79a3548)

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>
2021-06-11 17:45:32 +02:00
Marcus Efraimsson
906af3bf4b [v8.0.x] Datasource: Add support for max_conns_per_host in dataproxy settings (#35520) (#35573)
Allow configuring dataproxy.max_conns_per_host for HTTP data sources.

Ref #35519
Ref #35257

(cherry picked from commit 6531424c72)

Co-authored-by: Javier Palomo <javier.palomo@grafana.com>
2021-06-11 17:18:44 +02:00
Grot (@grafanabot)
603c7ce2aa Graph and GraphNG: make the stories internal (#35491) (#35499)
(cherry picked from commit bea8747405)

Co-authored-by: Uchechukwu Obasi <obasiuche62@gmail.com>
2021-06-11 15:46:09 +02:00
Grot (@grafanabot)
601b9e3e8a Postgres/MySQL/MSSQL: Fix concurrent map writes panic (#35510) (#35562)
Fixes panic/fatal error concurrent map writes in SQL data sources when multiple
queries are executed concurrently and you interpolate SQL query before executing it.

Fixes #35469

(cherry picked from commit 0611207f3b)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-06-11 15:24:06 +02:00
Grot (@grafanabot)
e442c3e790 TimeSeries: Fix fill below for dataframes with name (#35453) (#35560)
Use original dataframes for matching config.

(cherry picked from commit 38734366d1)

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2021-06-11 14:24:24 +02:00
Grot (@grafanabot)
748e99a923 Configuration: Fix changing org preferences on FireFox (#35549) (#35551)
(cherry picked from commit 1838e6b774)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-06-11 12:23:28 +02:00
Grot (@grafanabot)
ab7efc2bb6 Search: runAllTimers => runOnlyPendingTimers (#35509) (#35550)
(cherry picked from commit 8e827337ea)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-06-11 12:08:23 +02:00
Grot (@grafanabot)
7b10cf8b87 Doc add note to alerting docs (#35528) (#35530)
* Added note about retrieving rules from data sources.

* Polishing content.

* Fixed typos

* Update docs/sources/alerting/unified-alerting/opt-in.md

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* Update docs/sources/alerting/unified-alerting/opt-in.md

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* Update docs/sources/alerting/unified-alerting/opt-in.md

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

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

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-06-10 14:32:28 -04:00
Grot (@grafanabot)
0e3c8b6aa3 Docs: Update intro-histograms.md (#35462) (#35527)
(cherry picked from commit 34e4985a44)

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
2021-06-10 18:05:54 +02:00
Grot (@grafanabot)
8a2e2aa063 Fix: only recurse a symbolic link if it is a directory (#35455) (#35521)
* only recurse a symbolic link if it is a directory

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

* fix linting errors

* added extra checks as per code-review

(cherry picked from commit 83f26e9ce2)

Co-authored-by: Stephanie Closson <srclosson@gmail.com>
2021-06-10 17:54:50 +02:00
Grot (@grafanabot)
a23ff23deb ReleaseNotes: Updated changelog and release notes for 8.0.1 (#35502) (#35522)
* ReleaseNotes: Updated changelog and release notes for 8.0.1

* add link to index

* Apply suggestions from code review

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

* Wording changes

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit c45c6655d0)
2021-06-10 17:06:06 +02:00
Grot (@grafanabot)
8849243d27 "Release: Updated versions in package to 8.0.1" (#35501) 2021-06-10 13:31:37 +02:00
Grot (@grafanabot)
ded96ea901 Upgrade ARG API version (#35464) (#35492)
(cherry picked from commit 05f3985108)

Co-authored-by: shuotli <63325084+shuotli@users.noreply.github.com>
2021-06-10 12:56:38 +02:00
Grot (@grafanabot)
658388573e StatPanel: Fixes issue with graph look when switching color mode (#35460) (#35482) 2021-06-10 11:53:18 +02:00
Grot (@grafanabot)
fcdf4ee25c GoogleCloudMonitoring: Fix query object for panels prior to v7 (#35449) (#35483)
* Fix query object for cloudmonitor panel from v6

* Use proper function

(cherry picked from commit 83b6df738e)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2021-06-10 11:38:53 +02:00
Grot (@grafanabot)
f0a975fc09 Routing: Remove subPath only at start of href (#35416) (#35485)
* fix(routing): remove baseUrl only if at start of url

* test(routing): add subdirectory suburl tests for stripBaseFromUrl

* test(routing): add absolute url check to fix tests, add extra tests

(cherry picked from commit 8b2ee06f3c)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-06-10 11:33:42 +02:00
Grot (@grafanabot)
422e388fa2 Datasource: Fix storing timeout option as numeric (#35441) (#35481)
#31871 introduced support for configuring timeout in seconds
for HTTP data sources. That had a bug where backend expected
a numeric timeout value where it was actually stored as a
string. This should resolve this by requiring input to be
numbers, storing input as numeric and falling back to string
value if there's no numeric value.

Ref #31871

(cherry picked from commit d15d87db8a)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-06-10 10:51:47 +02:00
Grot (@grafanabot)
ad6f9a0c32 Cloudwatch: Fix duplicated time series (#35433) (#35480)
* make sure queries are only ran once

* test aliases

* use correct dates

(cherry picked from commit eff2410bae)

Co-authored-by: Erik Sundell <erik.sundell@grafana.com>
2021-06-10 10:48:16 +02:00
Grot (@grafanabot)
56d51e45ae Grafana-UI: Removes knobs still showing in storybook stories (#35381) (#35409)
* Grafana-UI: Removes knobs from storybook addons pane

* removed other knobs settings since we are disabling it

* remove the knobs disable config in individual stories

(cherry picked from commit 8d9e1d75a5)

Co-authored-by: Uchechukwu Obasi <obasiuche62@gmail.com>
2021-06-10 10:42:08 +02:00
Grot (@grafanabot)
1bdd2c54d9 HTTP Client: Introduce go-conntrack into http client provider (#35314) (#35477)
* Introduce go-conntrack into http client provider

* Fixes according to reviewer's comments

* Fixes according to reviewer's comments

(cherry picked from commit 7cdf8b3705)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-06-10 10:21:30 +02:00
Grot (@grafanabot)
c4075fe2e3 Alerting/SSE: Fix "count_non_null" reducer validation (#35451) (#35457)
fixes error "reducer 'count_non_null' in condition 2 is not a valid reducer"

(cherry picked from commit f4e9dcd40b)
2021-06-09 21:06:07 +02:00
Grot (@grafanabot)
8c1b326585 Live: only connect when user has a role (#35339) (#35395)
(cherry picked from commit 78d53c5e3d)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-06-09 09:40:51 -07:00
Grot (@grafanabot)
8b6c978d6d Logs panel: Add paddings so first and last lines can be copied (#35410) (#35444)
* Logs panel: Add paddings so all lines can be copied

* Update public/app/plugins/panel/logs/LogsPanel.tsx

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

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
(cherry picked from commit 34f680a20d)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-06-09 18:33:34 +02:00
Grot (@grafanabot)
f4750c7a6b Fix missing defaultRegion (#35436) (#35440)
(cherry picked from commit 086309700e)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2021-06-09 17:44:32 +02:00
Grot (@grafanabot)
bd331f76ed Docs: Update panel-library.md (#35435) (#35439)
(cherry picked from commit ccd3ec5f2f)

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
2021-06-09 17:41:38 +02:00
Grot (@grafanabot)
4fca76a631 [v8.0.x] Postgres/MySQL/MSSQL: Fix annotation parsing for empty responses (#35367) (#35430)
* fix sql annotation parsing for empty responses

* fix backend when no data returned

* add back frontend changes

Co-authored-by: Ying WANG <ying.wang@grafana.com>
(cherry picked from commit 9a5e10e6fb)

Co-authored-by: Marc Bachmann <marc.brookman@gmail.com>
2021-06-09 17:39:33 +02:00
Grot (@grafanabot)
3cae0e4d18 remove box-shadow from sidenav items using images for consistency (#35428) (#35434)
(cherry picked from commit 445356d6aa)

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>
2021-06-09 15:17:06 +01:00
Grot (@grafanabot)
f1810430a9 Dashboard: Fixes Dashboard init failed error on dashboards with old singlestat panels in collapsed rows (#35432)
(cherry picked from commit b3a2740d57)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-06-09 16:09:12 +02:00
Grot (@grafanabot)
aee6c15316 Postgres/MySQL/MSSQL: Fix so that numeric/non-string values are returned from query variables (#35411) (#35423)
Fixes a problem with query variables where SQL query returning for example only
numeric values didn't populate the query variables with values.

Fixes #35391

(cherry picked from commit bf7301e485)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-06-09 14:42:17 +02:00
Grot (@grafanabot)
688d68af7e Docs: Fix code sample for access control provisioning (#35406) (#35419)
(cherry picked from commit dc7a641978)

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2021-06-09 14:22:27 +02:00
Grot (@grafanabot)
ed605c97f9 Plugins: Ignore trailing slash in root URL check (#35338) (#35402)
* ignore trailing slash in root URL check

* apply pr feedback

(cherry picked from commit 873e20b7ae)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-06-09 10:22:24 +02:00
Grot (@grafanabot)
dd5b51527d Chore: Fix observable function in DashboardQueryRunnerImpl (#35398) (#35399)
(cherry picked from commit 35168764c3)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-06-09 08:10:42 +02:00
Grot (@grafanabot)
6fc58b6ea0 Toolkit: Resolve external fonts when Grafana is served from a sub path(#35352) (#35383)
(cherry picked from commit 044acf727b)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-06-08 19:22:14 +02:00
achatterjee-grafana
8784364f59 Removed duplicate content and folder. (#35389) 2021-06-08 18:42:17 +02:00
Grot (@grafanabot)
6ee6dbc8df Added a note to differentiate legacy and new alerts. (#35385) (#35387)
(cherry picked from commit ec9b9d6ab1)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-06-08 17:51:24 +02:00
Grot (@grafanabot)
11f2a91377 Visualizations: Fixes Stat/BarGauge/Gauge/PieChart all values mode showing same name if same value (#35368) (#35384)
(cherry picked from commit c425c30d7e)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-06-08 17:13:45 +02:00
Alex Khomenko
7360428b3e Search: minor UI fixes (#35335) (#35377)
* Increase margin between search item so it's visible

* Fix manage dashboards height overflow

* Align folder icon

* Increase margin

* Update container height

* Fix className not being passed to CardContainer
2021-06-08 15:14:00 +02:00
Grot (@grafanabot)
fa5309a3a8 Docs: Fix image paths (#35334) (#35375)
(cherry picked from commit 6a39fc9ae1)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-06-08 16:09:37 +03:00
Grot (@grafanabot)
4e4dad60ce Dashboard: Removed console log prompt (#35366) (#35370)
(cherry picked from commit 26027fea2a)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-06-08 14:32:08 +02:00
Giordano Ricci
d5e06ffcf4 Chore: fix docs publish branch for v8 (#35361)
* Chore: fix docs publish branch for v8

* Docs: remove notice in what's new
2021-06-08 13:23:46 +02:00
Giordano Ricci
331756990d Docs: Fix publishing path (#35359) 2021-06-08 10:46:03 +01:00
Grot (@grafanabot)
0c75b8c92a ReleaseNotes: Updated changelog and release notes for 8.0.0 (#35350) (#35355)
* ReleaseNotes: Updated changelog and release notes for 8.0.0

* Update release notes index

Co-authored-by: Elfo404 <me@giordanoricci.com>
(cherry picked from commit d4c129a9b4)
2021-06-08 09:50:27 +01:00
Grot (@grafanabot)
41f0542c1e Release: Bump version to 8.0.0 (#35341)
* "Release: Updated versions in package to 8.0.0"

* Update whats new & release notes URL

Co-authored-by: Elfo404 <me@giordanoricci.com>
2021-06-08 07:05:23 +01:00
Grot (@grafanabot)
c82ac69dff Docs: expand unified alerting silences docs page (#35332) (#35349)
(cherry picked from commit eb9e7d9fb9)

Co-authored-by: Domas <domas.lapinskas@grafana.com>
2021-06-08 07:26:46 +02:00
Grot (@grafanabot)
904dcdd2d7 AzureMonitor: Update documentation and v8 Whats New (#35275) (#35348)
* AzureMonitor: Update documentation and v8 Whats New

* update docs, provisioning:

* minor updates, mainly images

* fix typos

* fixes

* few other minor fixes

* Update docs/sources/datasources/azuremonitor.md

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

* Apply suggestions from code review

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

* Update azuremonitor.md

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

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2021-06-07 23:23:44 +02:00
Grot (@grafanabot)
03023af9c9 Fix alerting docs (#35340) (#35345)
* First commit.

* More changes, to make sure all alert information flows.

* Updated a title

(cherry picked from commit 1f012871b4)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-06-07 19:32:21 +02:00
Torkel Ödegaard
6362bb2f36 Docs: Sync all doc changes in main to v8.0.x (#35333) 2021-06-07 18:38:48 +02:00
Grot (@grafanabot)
df42e49d06 Login: Fixes Unauthorized message showing when on login page or snapshot page (#35311) (#35315)
(cherry picked from commit ce513e4637)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-06-07 12:06:37 +02:00
Grot (@grafanabot)
94e9c0ea48 Prometheus: Metrics browser layout (#35035) (#35267)
* Metrics browser layout

* Simplified layout

(cherry picked from commit aae6e86547)

Co-authored-by: David <david.kaltschmidt@gmail.com>
2021-06-07 08:29:21 +02:00
Grot (@grafanabot)
1d721107c3 Expressions: updating copy from experimental to beta. (#35149) (#35247)
(cherry picked from commit 456b356f21)

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2021-06-07 06:13:24 +02:00
Grot (@grafanabot)
4c2822e5b7 Alerting: Allow rules with same title across folders (#35270) (#35281)
* Alerting: Allow rules with same title across folders

* Add test

(cherry picked from commit 8cda1f5153)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-06-05 19:49:34 +03:00
Grot (@grafanabot)
d25695b1e3 Histogram: reduce default bucket size, fix rendering (#35294) (#35297)
(cherry picked from commit 36925ef521)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-06-05 00:26:20 -05:00
Grot (@grafanabot)
2108faff7c Grafana-ui: explicitly set storybook control types (#35265) (#35274)
(cherry picked from commit c39d0fa8c3)

Co-authored-by: Uchechukwu Obasi <obasiuche62@gmail.com>
2021-06-04 22:07:37 +01:00
Grot (@grafanabot)
d76bcd082f Panels: avoid crash while switching between panels types (#35286) (#35289)
(cherry picked from commit 351400b82e)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-06-04 21:36:57 +02:00
Grot (@grafanabot)
557c310c8c Alerting: Recact html responses (#35277) (#35282)
(cherry picked from commit fba90b8f9b)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-06-04 21:29:23 +03:00
Grot (@grafanabot)
a95c3419b7 Histogram: support units on the x axis (#35218) (#35280)
(cherry picked from commit 99a6337e1f)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-06-04 20:11:49 +02:00
Grot (@grafanabot)
6b9f067bf2 [v8.0.x] Catalog: Show message prompting user to refresh browser (#35271) (#35279)
(cherry picked from commit 3bbe6473b6)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-06-04 19:45:39 +02:00
Grot (@grafanabot)
c882b7a525 Caching: document memory limit settings (#35189) (#35269)
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit 0a28304d2a)

Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
2021-06-04 10:07:02 -07:00
Grot (@grafanabot)
7f410cceee Elasticsearch: Fix min_doc_count value when alerting (#35254) (#35264)
* Elasticsearch: Fix min_doc_count value when alerting

* Add tests

(cherry picked from commit 7a304223e6)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-06-04 17:10:02 +02:00
Grot (@grafanabot)
74eb38e2fc Graph: fixes storybook crashing when using the story (#35251) (#35259)
* Graph: fixes storybook crashing when using the story

* fixes the GraphWithLegend story too

(cherry picked from commit 70155c7fd0)

Co-authored-by: Uchechukwu Obasi <obasiuche62@gmail.com>
2021-06-04 16:52:58 +02:00
Jack Westbrook
1aaed7c2fe Card: Defend against conditional action buttons (#35204) (#35256)
* fix(card): defend against invalid elements types passed to BaseActions

* test(card): add test to support conditional buttons being passed in

* fix(playlistpage): remove disabled prop from LinkButton for editors

* chore(playlistpage): remove title from edit button

(cherry picked from commit c13f247a94)
2021-06-04 17:38:36 +03:00
Grot (@grafanabot)
7f6f9fbce9 Grafana-UI: Allow Card consumers to override disabled prop for action (#34664) (#35249)
(cherry picked from commit 8afb15296a)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-06-04 16:06:24 +02:00
Grot (@grafanabot)
7eda7945d3 Alerting: Fix notification channel migration and handle case when Alertmanager default configuration is absent (#35086) (#35246)
* Fix dashboard alert and nootifier migration for MySQL

* Fix POSTing Alertmanager configuration if no current configuration exists

in case the default configuration has not be stored yet
or has failed to get stored

* Change CreatedAt field type

(cherry picked from commit 15c55b0115)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-06-04 16:41:28 +03:00
Grot (@grafanabot)
da8d9e6854 Renderer: add version information (#34964) (#35245)
* Renderer: add version information

* fix alerting test

(cherry picked from commit 5f6c172b5a)

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2021-06-04 14:27:58 +02:00
Grot (@grafanabot)
e3ffea3f1b AzureMonitor: fix Azure Resource Graph queries in Azure China (#35235) (#35244)
* Optimize Azure Monitor routes

* Update API version compatible with Azure China

(cherry picked from commit 412bcf1fb0)

Co-authored-by: Sergey Kostrukov <sekost@microsoft.com>
2021-06-04 13:57:14 +02:00
Grot (@grafanabot)
7b64b6f140 Remove extra margin for checkboxes (#35169) (#35242)
(cherry picked from commit bfcc6a2248)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-06-04 13:34:29 +02:00
Grot (@grafanabot)
3fa0811d6b Add missing select options for controls (#35178) (#35237)
(cherry picked from commit f683a497eb)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-06-04 11:53:40 +02:00
Grot (@grafanabot)
bc49ceddb7 remove incorrect use of grafana-cli logger (#35228) (#35236)
(cherry picked from commit 2e9ad871b3)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-06-04 11:32:06 +02:00
Grot (@grafanabot)
f5c55ffbe3 NodeGraph: Make grid view responsive (#35047) (#35234)
(cherry picked from commit aa7dbd7a69)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2021-06-04 11:25:41 +02:00
Grot (@grafanabot)
ebc38afce5 Annotations: Fix so annotations work in panel edit (#35195) (#35233)
(cherry picked from commit a7606d130e)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-06-04 11:18:30 +02:00
Grot (@grafanabot)
64b58cc3a1 Library Panels: Fix refresh when changing to angular library panel (#35048) (#35160)
Closes #34874

(cherry picked from commit 7c0158cdff)
2021-06-04 11:09:39 +02:00
Grot (@grafanabot)
a817a8ac52 Chore: Update drone pipeline failure message to include target branch (#35170) (#35171)
(cherry picked from commit 56e0efbb56)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-06-04 11:53:09 +03:00
Grot (@grafanabot)
b052edf8ba Use laher/mergefs - remove custom code (#34571) (#35161)
(cherry picked from commit 6970c9ebfd)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-06-04 11:52:11 +03:00
Grot (@grafanabot)
956f728f61 SSE: Change math expression to accept any value convertible to float (#34996) (#35202)
* SSE: Change math expression to accept any scalar value

* Apply suggestions from code review

* Update test

* Remove TODO

(cherry picked from commit eeb84d09c2)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-06-04 11:49:33 +03:00
Grot (@grafanabot)
1647073a00 DevEnv: Fix docker-driver plugin installation direction url (#35227)
(cherry picked from commit e6c53e4bcd)

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2021-06-04 10:30:30 +02:00
Grot (@grafanabot)
7b67612f7d Scuemata: Checking json validity by enabling skipped tests (#34385) (#35226)
* Make sure we don't skip any tests - refactoring

* Remove commented lines

* Move test folder

(cherry picked from commit 4c8ce8a450)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-06-04 10:03:58 +02:00
Grot (@grafanabot)
9439b6acba NodeGraph: Fix sorting markers in grid view (#35200) (#35216)
* Fix test data field label

* Fix sorting

* Changed icon for sorting

(cherry picked from commit 1dc387536e)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2021-06-04 09:55:03 +02:00
Grot (@grafanabot)
6f9ecceb9f Chore: Upgrade golangci-lint (#35188) (#35192)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit 4d1cbe551f)

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-06-04 07:45:15 +02:00
Grot (@grafanabot)
6c512e1414 Alerting: Expand {{$labels.xyz}} template in labels and annotations (#35159) (#35208)
* Alerting: Expand `{{$labels.xyz}}` template in labels and annotations

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

* Fix annotation not updating for same alert

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
(cherry picked from commit 8417088969)

Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
2021-06-04 11:05:19 +05:30
Grot (@grafanabot)
e6c2291a44 Annotations: Fix so adds, updates and deletes are shown correctly (#35184) (#35198)
* Annotations: Fix for update/save/delete annotation not appearing/disappearing

* Annotations: Fix so adds, updates and deletes are shown correctly

* Chore: updates after PR comments

(cherry picked from commit abd4e70792)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-06-04 05:55:08 +02:00
Grot (@grafanabot)
ccc0a52d4a Histogram: enable client-side zoom (with bucket snapping) (#35220) (#35221)
(cherry picked from commit 43d3d97562)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-06-04 03:28:49 +02:00
Grot (@grafanabot)
c8d6168bbf Timeseries: move join field to index zero (#35217) (#35219)
(cherry picked from commit e1af571efd)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-06-04 01:36:05 +02:00
Gabriel MABILLE
e49bf5926a Provisioning: Update accesscontrol sample file (#35203)
(cherry picked from commit 134dba5101)
2021-06-03 17:46:23 +02:00
Grot (@grafanabot)
4aa622f7f1 influxdb: docs: add new screenshot (#35156) (#35201)
(cherry picked from commit b558d32502)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-06-03 17:31:00 +02:00
Grot (@grafanabot)
a8b2415b1f Timeline: tooltip fixups (#35145) (#35191)
(cherry picked from commit a3ba605aff)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-06-03 09:50:16 -05:00
Grot (@grafanabot)
4fe55be39e Alerting: Do not hard fail on templating errors in channels (#35165) (#35193)
* Alerting: Do not hard fail on templating errors in channels

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

* Fix review

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
(cherry picked from commit a30e60a0b8)

Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
2021-06-03 16:48:37 +02:00
Grot (@grafanabot)
d78e78c2f4 AzureMonitor: Fix permissions issue with Logs template variable queries (#35181) (#35194)
(cherry picked from commit 5fb37ad5dc)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2021-06-03 16:47:24 +02:00
Grot (@grafanabot)
69dc4b281d Grafana-UI: Fix checkbox vertical alignment (#35124) (#35174)
* Grafana-UI: Fix Checkbox vertical layout issues

* reorganise css

* revert my 'fix' and just go back to setting a min height :(

(cherry picked from commit 32d9b04666)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2021-06-03 16:44:15 +02:00
Grot (@grafanabot)
681c2b3338 Chore: Remove endpoints that contain the slug field (#35104) (#35182)
* Chore: Remove endpoints that contain the slug field

* More cleanups

* Lint fixes

* Remove unnecessary funcs

* Cleanup frontend code

* Remove deprecated endpoints from docs

* Revert change according to reviewer's comments

(cherry picked from commit 1c49986b2f)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-06-03 15:57:25 +02:00
Grot (@grafanabot)
c0b872aae1 Timeline/Status grid panel: Add tooltip support (#35005) (#35183)
* Timeline/Status grid tooltip support first pass

* Tooltips workin

* Use getValueFormat to get the duration

* Separate boxes highlight from tooltip interpolation

* Separate state timeline tooltip component, rely on field display color to retrieve color of series

* create an onHover/onLeave API and optimize implementation

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
(cherry picked from commit 7359ba44d0)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-06-03 15:50:49 +02:00
Grot (@grafanabot)
5d772ffbe0 Alerting: Don't save Alertmanager config on migration when 0 channels (#35119) (#35180)
* Alerting: Don't save Alertmanager config on migration when 0 channels

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

* Fix review

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
(cherry picked from commit aa4c5bbfe4)

Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
2021-06-03 19:14:30 +05:30
Grot (@grafanabot)
b04a21b002 Add verbose version flag to list dependencies as well as the version (#34741) (#35176)
* add verbose version flag to list dependencies as well as the version

* Fix typo in the println message

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit 9d33a06b4e)

Co-authored-by: Serge Zaitsev <serge.zaitsev@grafana.com>
2021-06-03 15:21:13 +02:00
Grot (@grafanabot)
5fe040d26b Chore: Refactor backend plugin manager/tsdb query data (#34944) (#35172)
Move QueryData method into backend plugin manager which HandleRequest uses to
query data from plugin SDK supported data sources. This allowed us to remove a lot
of code no longer needed.

Ref #21510

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

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-06-03 14:41:42 +02:00
Torkel Ödegaard
57060a2276 PanelEdit: Add data source label to data source picker dropdown (#34605) (#35148)
* PanelEdit: Add data source label to data source picker dropdown

* Updated based on ux feedback

(cherry picked from commit ec33bae8d4)
2021-06-03 14:32:50 +02:00
Grot (@grafanabot)
7feb7dab38 GraphNG: uPlot 1.6.11 (#35146) (#35158)
(cherry picked from commit 433f11a78c)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-06-03 07:28:17 -05:00
Grot (@grafanabot)
6a08652891 DashboardRow: fixes time variable not updating when used in row title (#34523) (#35168)
* DashboardRow: fixes time variable not updating when used in row title

* adds test cases for subscribe event

(cherry picked from commit 395d7eb74c)

Co-authored-by: Uchechukwu Obasi <obasiuche62@gmail.com>
2021-06-03 14:02:41 +02:00
Grot (@grafanabot)
cf02cb2987 VizLegendTable: fixes column spacing to span to the right side (#35045) (#35167)
* VizLegendTable: fixes column spacing to span to the right side

* reverted text alignment to right

* implemented a more readable solution for tabble legend spacing

(cherry picked from commit 4d574bb8aa)

Co-authored-by: Uchechukwu Obasi <obasiuche62@gmail.com>
2021-06-03 13:52:49 +02:00
Grot (@grafanabot)
aa6355b6ea NodeGraph: Don't check for preferredVisualisationType (#35116) (#35163)
* Don't check for preferredVisualisationType inside the NodeGraph

* Fix layout worker mocking

(cherry picked from commit 0b94f33813)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2021-06-03 13:22:15 +02:00
Grot (@grafanabot)
1e533f37ed Security: Update default CSP template and fix firefox CSP issues (#34836) (#35162)
* Security: Update default content_security_policy_template
- Add 'strict-dynamic' back to script-src
- Add ws(s)://$ROOT_PATH to connect-src
- Change onEvent to on-event in angular templates to fix CSP issues in firefox.
- Add blob: to style-src

(cherry picked from commit 8143991b94)
2021-06-03 12:11:14 +01:00
Grot (@grafanabot)
7083577a4a Chore: Bump sanitize-url to 5.0.2 (#35088) (#35151)
(cherry picked from commit 9df23b8fff)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-06-03 11:34:29 +02:00
Grot (@grafanabot)
ada0a52a0f fix bad log format (#35150) (#35153)
(cherry picked from commit 057ba4a6e7)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-06-03 10:55:43 +02:00
Grot (@grafanabot)
0546486f31 plugin: add signature status plugin build info (#35128) (#35132)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
(cherry picked from commit ba7aca69f6)

Co-authored-by: Carl Bergquist <carl.bergquist@gmail.com>
2021-06-03 08:24:20 +02:00
Grot (@grafanabot)
dd8bf2afa8 State-timeline: support migrating from discrete panel (#35071) (#35134)
(cherry picked from commit a9b5aa1088)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-06-02 21:45:36 +02:00
Grot (@grafanabot)
553a8d0e55 Live: fix field filtering and survive reconnect (#35122) (#35133)
(cherry picked from commit f7893ca5cf)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-06-02 21:36:14 +02:00
Grot (@grafanabot)
56dff33244 Histogram: Adds histogram test dashboard & test data (#34821) (#35130)
* Added test data that contains normal distribution

* Added histogram test dashboard

* Fixed so panels share same data

(cherry picked from commit 119dbc4d76)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-06-02 20:52:44 +02:00
Grot (@grafanabot)
865ae950ae FieldDisplay: add cache to reuse field value calculations (#35072) (#35127)
* add timeline value cache

* add timeline value cache

* with console logs

* cleanup

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
(cherry picked from commit 744ca8d439)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-06-02 11:42:09 -07:00
Grot (@grafanabot)
d97bc8c0a9 SSE: Refactor to simplify Series type (#35063) (#35123)
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit 4093fae99a)

Co-authored-by: Kyle Brandt <kyle@grafana.com>
2021-06-02 19:24:54 +02:00
Grot (@grafanabot)
0924f4e268 live: log error on dashboard subscribe (#35095) (#35117)
(cherry picked from commit 7aee0deb38)

Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2021-06-02 18:54:26 +03:00
Grot (@grafanabot)
d9cc16af41 Tempo: search fixes (#35004) (#35114)
* Tempo: search fixes

Add custom width to time and trace id
Run and show query in search after page refresh

* Iterate through all response data

* Don't store linkedQuery as a property

(cherry picked from commit bf96f5e285)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-06-02 17:02:16 +02:00
Grot (@grafanabot)
29eb1c1149 InfluxDB: deprecate direct browser access in data source (#35105) (#35113)
* influxdb: deperacate direct browser-access

* better docs-formatting

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 89fc92947c)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-06-02 17:00:54 +02:00
Grot (@grafanabot)
151cfc9693 Chore: Upgrade prometheus/alertmanager dependency to v0.22.2 (#35102) (#35109)
* Chore: Upgrade prometheus/alertmanager dependency to v0.22.2

* go mod tidy

(cherry picked from commit 5d41e83896)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-06-02 16:29:43 +02:00
Grot (@grafanabot)
949662ee5e VizLegend: add readonly prop (#35096) (#35107)
* VizLegend: add readonly prop

* Update packages/grafana-ui/src/components/VizLegend/VizLegendTableItem.tsx

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
(cherry picked from commit a08ee057eb)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-06-02 16:04:03 +02:00
Grot (@grafanabot)
ebe4596c75 ChangeTracker: Unified unsaved changes handling with library panels (#34989) (#35091)
* UnsavedChanges: Move Change tracker to use Prompt

* Fix a lot of race conditions and stacking of changes in onConfirm and onDismiss

* Listen to save event

* add missing delay argument

* migrated the change tracker unit tests

* Updated snapshot

* Removed unessary action

* removed updateSourcePanel

* Fix hiding save library panel modal prompt when clicking discard

* change saved libray panel title and buttons so they are a bit different as Prompt and when used from save button

* Fixed issue with saving new dashboard

* Now all scenarios work

* increase wait time

* Fixed one more race condition

(cherry picked from commit e6f2b10a36)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-06-02 13:20:13 +02:00
Grot (@grafanabot)
38f58cc42b AzureMonitor: Use resource type display names in the UI (#35060) (#35094)
* AzureMonitor: Use display names for resource types and locations

* de-pluralize resource types

* Rename Namespace field to Resource Type, and use display names

* add comments

(cherry picked from commit 3be0a2d328)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2021-06-02 13:15:36 +02:00
Grot (@grafanabot)
159953e258 Cleanup the options initialization (#35080) (#35089)
(cherry picked from commit f052f10289)

Co-authored-by: Sergey Kostrukov <sekost@microsoft.com>
2021-06-02 12:25:01 +02:00
Grot (@grafanabot)
78cabc2e39 Docs: Add datalinks example to ElasticSearch docs (#34956) (#35081)
(cherry picked from commit 9ebe585ec8)

Co-authored-by: Fabian Gonzalez <fabiangonz98@gmail.com>
2021-06-02 09:44:14 +02:00
Grot (@grafanabot)
17e92cc436 Chore: Make drone failed nightly checks send slack messages to #grafana-backend (#35076) (#35079)
(cherry picked from commit 27ad970c2b)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-06-02 09:14:07 +02:00
Grot (@grafanabot)
4344975654 Variables: Support raw values of boolean type (#34727) (#35075)
(cherry picked from commit 4137534650)

Co-authored-by: Simon Podlipsky <simon@podlipsky.net>
2021-06-02 07:03:38 +02:00
Grot (@grafanabot)
5bb876f414 Chore: Refactor short url api test (#35051) (#35066) 2021-06-01 20:58:45 +02:00
Grot (@grafanabot)
adfb3d4e21 InfluxDB: Flux: timestamp-column has to be first in dataframes (#35036) (#35053)
(cherry picked from commit 38b030e2a4)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-06-01 18:09:30 +02:00
Grot (@grafanabot)
d1b02d524c Debounce location update (#35033) (#35056)
(cherry picked from commit 486ab7c639)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-06-01 16:45:53 +02:00
Grot (@grafanabot)
2f5d699a3e Checkbox: Fixes vertical layout isssue with Checkboxes due to fixed height (#35022) (#35055)
(cherry picked from commit dc5e7695e4)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-06-01 16:37:57 +02:00
Grot (@grafanabot)
7727ba3f69 ReleaseNotes: Updated changelog and release notes for 8.0.0-beta3 (#35049) (#35054)
* ReleaseNotes: Updated changelog and release notes for 8.0.0-beta3

* Docs: adds Beta3 to index

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
(cherry picked from commit 046de10cd7)
2021-06-01 16:32:04 +02:00
Grot (@grafanabot)
abc13765b9 Short URL: Fix so that orgId is included in generated short URL (#34696) (#35042)
Fixes #33813

Signed-off-by: Jan Jansen <jan.jansen@gdata.de>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
(cherry picked from commit 0d1b35f99e)

Co-authored-by: Jan Jansen <farodin91@users.noreply.github.com>
2021-06-01 15:00:11 +02:00
Grot (@grafanabot)
a489759271 Dashboard: Fix Table view when editing causes the panel data to not update (#34998) (#35041)
* Dashboard: Fix Table view when editing causes the panel data to not update

- Add event subscription on PanelEditorTableView
- Extract runAllPanelQueries into Panel Model in order to use it on PanelChrome and PanelEditorTableView
- Add simple unit test for runAllQueryPaneQueries

(cherry picked from commit ff03b456f1)

Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
2021-06-01 14:45:32 +02:00
Grot (@grafanabot)
f99e87f2ed Fix enterprise autodeploy (#34889) (#35037)
Config file needs to be copied over

No-op for OSS grafana

(cherry picked from commit 22544bd135)

Co-authored-by: Julien Duchesne <julienduchesne@live.com>
2021-06-01 14:00:27 +02:00
Grot (@grafanabot)
a606cb9b1e Chore: Add Circle CI empty config (#35020) (#35032)
* Fix Circle CI check with adding an empty config

* Add version

* Add empty jobs and workflows

* Add job with docker image

* Add step

(cherry picked from commit ec29c3b84f)

Co-authored-by: idafurjes <36131195+idafurjes@users.noreply.github.com>
2021-06-01 13:42:08 +02:00
Grot (@grafanabot)
bd6f91fa83 Add docs for Tempo search (#34526) (#35034)
* Add docs for Tempo search

* Apply suggestions from code review

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* Update docs/sources/datasources/tempo.md

Co-authored-by: Robby Milo <robby.milo@grafana.com>

* Apply suggestions from code review

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
Co-authored-by: Robby Milo <robby.milo@grafana.com>
Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
(cherry picked from commit b211b3a63c)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-06-01 12:34:24 +02:00
Grot (@grafanabot)
10cdbad0ad "Release: Updated versions in package to 8.0.0-beta.3" (#35030) 2021-06-01 11:49:11 +02:00
Grot (@grafanabot)
a7d22e4b45 Table: datalink to have text underline and support for image datalink (#34635) (#35029)
* Table: datalink to have text underline and support for image datalink

* fixes image oversize issue when using both image and link in a column

* fixes small nit

* extracted the getLink logic to be a standalone utility function

* Updates table tests to suit current structure

* fixes small syntax nit

* fixes bad typing issue

* annotes the getCellLinks logic as an internal utility function

* removes blank whitespace

* Tests: updates test cases to use getByRole

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

Co-authored-by: Uchechukwu Obasi <obasiuche62@gmail.com>
2021-06-01 11:29:06 +02:00
Grot (@grafanabot)
3f839c734c Docs: Add query caching to enterprise docs page (#34751) (#35026)
* add query caching to enterprise docs page

* Update docs/sources/enterprise/_index.md

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
(cherry picked from commit 9bd823bac3)

Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>
2021-06-01 11:06:34 +02:00
Grot (@grafanabot)
cb0ffc3ba3 NodeGraph: Make web worker inline fixing error when assets are loaded with different origin (#35013) (#35019)
(cherry picked from commit cb4f5b249f)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2021-06-01 10:33:44 +02:00
Domas
a108647836 Alerting: check upstream response content type in lotex proxy (#34760) (#34842)
(cherry picked from commit 347273cdea)
2021-06-01 11:25:16 +03:00
Grot (@grafanabot)
a96a58a305 Chore: Remove CircleCI (#35014) (#35017)
(cherry picked from commit a9f652ab7a)

Co-authored-by: idafurjes <36131195+idafurjes@users.noreply.github.com>
2021-06-01 10:17:07 +02:00
Grot (@grafanabot)
e777729f6f TimeSeries: Migration from old graph legend values (#34997) (#35018)
* fix(timeseries): filter enabled graph legend values when migrating

* test(timeseries): update snapshots

* test(timeseries): add additional tests for legend

(cherry picked from commit cb3c317e81)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-06-01 10:15:40 +02:00
Grot (@grafanabot)
e555bcdd01 Logs: Use GraphNG to plot log histograms (#34531) (#35016)
* Switch to GraphNG for Logs Histogram

* Remove redundant timeZone

It was used just to format timestamp in the tooltip but it's not needed anymore.

* Add tests for creating logs histogram data

* Update decoractors tests

* Adjust bar width to be more like in the old graph

* Fix tooltip pointer color

* Test tooltip pointer color

* Decouple graph config from uPlot internals

* Ensure nested properties are not mutated when overrides are applied

* Add legend toggling for Explore graphs

* Remove unused component

ExploreGraphNGPanel is now used in Explore

* Code formatting

* allow multiple bars pathBuilders to be globally cached with different settings

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
(cherry picked from commit f4a40a4d85)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-06-01 09:56:49 +02:00
Arve Knudsen
1c87edb7cf Drone: Sync with main (#35015)
* Drone: Sync with main

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-06-01 09:45:39 +02:00
Grot (@grafanabot)
0727a3a66b Reporting: update docs (#34740) (#35011)
* Reporting: update dcos

* Add info about pausing reports

* Add version note

* Update docs/sources/enterprise/reporting.md

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* Docs: update report form information

* Docs: update report scheduling

* Docs: re-order reporting sections

* Update docs/sources/enterprise/reporting.md

Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>

* Update docs/sources/enterprise/reporting.md

Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>

* Update docs/sources/enterprise/reporting.md

Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>

* Update docs/sources/enterprise/reporting.md

Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>

* Update docs/sources/enterprise/reporting.md

Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>

* Update docs/sources/enterprise/reporting.md

Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>

* Update docs/sources/enterprise/reporting.md

Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>

* Update docs/sources/enterprise/reporting.md

Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>

* Update docs/sources/enterprise/reporting.md

Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
Co-authored-by: Agnès Toulet <agnes.toulet@gmail.com>
Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>
(cherry picked from commit c6a78a6bd7)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-06-01 09:03:22 +02:00
Grot (@grafanabot)
ec170be577 Collapse: Fixes icon (angle down/right) positioning (#34930) (#35009)
(cherry picked from commit ce63da63db)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-06-01 08:53:15 +02:00
Grot (@grafanabot)
3eca7864ed NodeGraph: Fix error when clicking link in a context menu (#34817) (#34830)
* Add prevent default if onClick exists

* Apply field overrides

(cherry picked from commit fcdab32750)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2021-06-01 08:43:49 +02:00
Grot (@grafanabot)
d2c9c33d41 Color: Remove the default color scale logic (#34913) (#34918)
(cherry picked from commit 179bfecb3e)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-06-01 06:29:08 +02:00
Grot (@grafanabot)
b5f2e6ae0f Plugins: Update plugin signing copy + docs (#34716) (#35008) 2021-05-31 22:20:52 +02:00
Grot (@grafanabot)
b06b3d5a61 add missing statis assets prefix (#34999) (#35007)
(cherry picked from commit 28ccf2c880)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-05-31 21:42:36 +02:00
Grot (@grafanabot)
8ba26e2f09 Secure from custom config being undefined in PlotLegend (#34975) (#35006)
(cherry picked from commit 823581add8)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-05-31 20:44:24 +02:00
Grot (@grafanabot)
0b02a7e918 Test datasource: Returns always float values (#34986) (#35001)
(cherry picked from commit 51afde34bd)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-05-31 20:19:09 +03:00
Grot (@grafanabot)
f70ffc30e7 Plugins: Check for Grafana admin instead of Org admin (#35000) (#35003)
* check for grafana admin where necessary

* fix

(cherry picked from commit aba1801193)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-05-31 19:10:41 +02:00
Grot (@grafanabot)
eae88f8ce8 Alerting: Migrate tags as labels and not annotations (#34990) (#34992)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
(cherry picked from commit a23674ef99)

Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
2021-05-31 16:43:10 +02:00
Grot (@grafanabot)
735630f364 Admin: hide per role counts for licensed users (#34984) (#34991)
* Hide per-role counts for licensed users

* Hide totals

(cherry picked from commit 05f3161f8e)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-05-31 16:30:38 +02:00
Grot (@grafanabot)
ddb6922773 Oauth: Assign role from GF_USERS_AUTO_ASSIGN_ORG_ROLE for Azure AD Oauth (#34838) (#34938)
* 30555:Assign correct role with environment variable GF_USERS_AUTO_ASSIGN_ORG_ROLE

* 30555:Remove unused condition

(cherry picked from commit 48f6d6f7e6)

Co-authored-by: idafurjes <36131195+idafurjes@users.noreply.github.com>
2021-05-31 15:18:24 +02:00
Grot (@grafanabot)
d8c4981b77 Alerting: New alert list panel component (#34614) (#34988)
(cherry picked from commit 7dd5a065ba)

Co-authored-by: Nathan Rodman <nathanrodman@gmail.com>
2021-05-31 14:35:37 +02:00
Grot (@grafanabot)
765655fefd Alerting: Migrate paused alerts to silences (#34898) (#34987)
* Alerting: Migrate paused alerts to silences

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

* Fix lint

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
(cherry picked from commit 7c25465b3a)

Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
2021-05-31 14:32:41 +02:00
Grot (@grafanabot)
727119f9ce PluginsList Panel: Redirect to catalog app for updating plugins (#34893) (#34985)
* feat(pluginlistpanel): if catalog app is enabled redirect user if plugin is upgradable

* refactor(catalog): update copy if plugin is disabled

(cherry picked from commit 8c93899b15)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-05-31 14:26:20 +02:00
Grot (@grafanabot)
ba313788d5 fix permissions + add link for admins (#34906) (#34981)
(cherry picked from commit 98c849d4cc)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-05-31 12:54:59 +02:00
Grot (@grafanabot)
8168629948 Explore: Fix show all series (#34968) (#34979)
(cherry picked from commit 6e5d349ae8)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-05-31 11:41:47 +02:00
Grot (@grafanabot)
0df47643fd [Alerting]: fix/cleanup API examples (#34588) (#34970)
(cherry picked from commit 355be158b7)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-05-31 11:56:00 +03:00
Grot (@grafanabot)
c24d507800 InfluxDB: InfluxQL: apply on enter not on blur (#34963) (#34969)
(cherry picked from commit 618dc6a2f6)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-05-31 10:35:47 +02:00
Grot (@grafanabot)
3884cfe270 GraphNG: Remove fieldName and hideInLegend properties from UPlotSeriesBuilder (#34901) (#34965)
* Remove fieldName and hideInLegend properties from UPlotSeriesBuilder

* Fix test

(cherry picked from commit 573d7b8893)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-05-31 10:29:57 +02:00
Grot (@grafanabot)
a7a9d002cb Make sure ConfirmButton cannot be clicked when closed (#34818) (#34967)
(cherry picked from commit e38c6d73a0)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-05-31 10:07:31 +02:00
Grot (@grafanabot)
dfff63da1b Add custom icons for layout options (#34890) (#34966)
(cherry picked from commit 10f6638d9e)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-05-31 10:02:08 +02:00
Grot (@grafanabot)
7206d16352 DataLinks: Fixes an issue __series.name is not working in data link (#34932) (#34960)
(cherry picked from commit c7076c9e19)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-05-31 09:32:13 +02:00
Grot (@grafanabot)
fdd80b1b4c StatPanel: Fixes data link tooltip not showing for single value (#34934) (#34962)
(cherry picked from commit d9e9e4744d)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-05-31 09:31:18 +02:00
Grot (@grafanabot)
bf3ce22358 DashboardLinks: Fix dropdown positioning (#34909) (#34961)
(cherry picked from commit fd028fd798)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-05-31 09:26:43 +02:00
Grot (@grafanabot)
f6b0cd714d ConfirmModal: Auto focus delete button (#34917) (#34959)
(cherry picked from commit ef13f7ece1)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-05-31 09:06:32 +02:00
Grot (@grafanabot)
2335c3d0d5 Alerting: Add support for configuring avatar URL for the Discord notifier (#33355) (#34940)
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit badec6c6ad)

Co-authored-by: Chip Wolf ‮ <hello@chipwolf.uk>
2021-05-31 09:02:32 +02:00
Grot (@grafanabot)
bfb3e90750 BarChart: make sure tooltip closes when user presses E (#34884) (#34941)
(cherry picked from commit dfc466052d)

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2021-05-31 09:01:37 +02:00
Grot (@grafanabot)
bee8b0a9dd Table: Fixes sorting for number fields (#34722) (#34957)
* Table: Fixes sorting for number fields

* Refactor: changes after PR comments

* Refactor: found a bug

(cherry picked from commit 37ab5ec7f4)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-05-31 06:35:57 +02:00
Grot (@grafanabot)
fb9f1a3b04 State timeline: defer quadtree construction until first mousemove (#34949) (#34954)
(cherry picked from commit 13768da417)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-05-29 15:18:27 -05:00
Grot (@grafanabot)
216f018377 Rename: Status grid to history (#34864) (#34953)
(cherry picked from commit 4972e0f6a1)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-05-29 21:03:37 +02:00
Grot (@grafanabot)
5e46bbe823 [Dashboard] Revert feature toggle trimdefaults (#34888) (#34937)
* Revert "solve comments and retrigger the test"

This reverts commit f08d2d9eca.

* Revert "update api doc"

This reverts commit cc09ceb853.

* Revert "remove post trim"

This reverts commit 46fe8ed596.

* Revert "fix typo"

This reverts commit 3b3ceee16e.

* Revert "Apply suggestions from code review"

This reverts commit 3b7f3b8e15.

* Revert "update comments"

This reverts commit b9c6260876.

* Revert "update doc"

This reverts commit 8e4c4d7c93.

* Revert "remove feature toggle + add libraryPaneldefinition"

This reverts commit d01cfcc2ed.

* fix some typos

* Update public/app/features/dashboard/components/ShareModal/ShareExport.tsx

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

* Update docs/sources/dashboards/export-import.md

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

* fix comments

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit b391e43472)

Co-authored-by: ying-jeanne <74549700+ying-jeanne@users.noreply.github.com>
2021-05-29 16:59:06 +02:00
Grot (@grafanabot)
55cbd415a2 Themes: Add border to sidemenu, and reduce border in dark theme a tiny bit (#34737) (#34950)
* Themes: Add border to sidemenu, and reduce border in dark theme a tiny bit

* Updated

(cherry picked from commit d6a9a9b975)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-05-29 07:34:25 +02:00
Grot (@grafanabot)
e9b6b66a46 Add key for DataLinkButtons (#34935) (#34936)
(cherry picked from commit f16b2c40c1)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-05-28 22:20:54 +02:00
Grot (@grafanabot)
5a68094a45 Loki: Add formatting for annotations (#34774) (#34876)
* add formatting for loki annotations

based/copied from the same features from the prometheus datasource

(cherry picked from commit 261319a4be)

Co-authored-by: Fredrik Enestad <fredrik@enestad.com>
2021-05-28 19:00:45 +02:00
Grot (@grafanabot)
8fef4d7a8a alerting: fixes per-receiver metric cardinality (#34915) (#34924)
(cherry picked from commit cc38613ba4)

Co-authored-by: Owen Diehl <ow.diehl@gmail.com>
2021-05-28 18:54:30 +02:00
Grot (@grafanabot)
4a67bfc102 Alerting/consistent api errors (#34858) (#34920)
* consolidates alertmanager api errors

* util & testing consistent errors

* consistent errors for rest of ngalert apis

* updates expected errors in testware

* bump ci

* linting

* unrelated: dashboard.go lint

(cherry picked from commit 9aca032d10)

Co-authored-by: Owen Diehl <ow.diehl@gmail.com>
2021-05-28 12:20:46 -04:00
Joan López de la Franca Beltran
6dc4e4d563 Usage Stats: Make the UsageStatsService extension point more flexible (#34778) (#34895)
* Usage Stats: Rename service to use a more idiomatic name

* Usage Stats: Update MetricsFunc definition and implementations

* Revert "Usage Stats: Rename service to use a more idiomatic name"

This reverts commit 910ecce3e8.

* Usage Stats: Update MetricsFunc definition and implementations

(cherry picked from commit f601921670)
2021-05-28 17:47:47 +02:00
Joan López de la Franca Beltran
2ca76fa8ae Docs: Settings updates at runtime (#34169) (#34892)
* Docs: Settings updates on runtime docs skeleton

* Docs: Settings HTTP API

* Docs: Minor changes on settings updates at runtime docs

* Docs: Settings updates at runtime description

* Docs: Minor fix

* Docs: Move PUT /api/admin/settings docs into Admin API page

* Docs: Added longer explanation into 'Settings updates at runtime' page

* Apply suggestions from code review

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

* Docs: Include order of precedence description at settings updates page

* Update docs/sources/http_api/admin.md

* Docs: Add link to main configuration page from Settings updates at runtime

* Apply suggestions from code review

Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: Leonard Gram <leo@xlson.com>
Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>
(cherry picked from commit 886f6fc55b)
2021-05-28 17:44:35 +02:00
Grot (@grafanabot)
aa48f0f6a0 Prometheus: Add info that using Loki as Prometheus data source is no longer supported and might stop working (#34650) (#34911)
* Add information that Loki as Prometheus data source is not supported

* Fix ugly error when loki as prometheus used

* Refactor, add test

* Fix type error

* Fix test by passing missing method

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

* Remove optionality in prop

(cherry picked from commit add1b827ae)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-05-28 17:36:21 +02:00
Grot (@grafanabot)
4c967fe718 Alerting: Extract values from MD expr alerts (#34757) (#34908)
When using mulit-dimensional Grafana managed alerts (e.g. SSE math) extract refIds values and labels so they can be shown in the notification and dashboards.

(cherry picked from commit b47e7d12e6)

Co-authored-by: Kyle Brandt <kyle@grafana.com>
2021-05-28 11:34:59 -04:00
Grot (@grafanabot)
0101d3a51d Add info about logs histogram (#34886) (#34910)
(cherry picked from commit 6adcfa9e50)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-05-28 17:31:53 +02:00
Grot (@grafanabot)
3652af9e0b Plugins: Add missing docs for plugin catalog (#34679) (#34907)
* add missing docs for plugin catalog

* apply PR feedback

* use mp4 instead of gif

* update wording

* Add note about org admins

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* apply pr feedback

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

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-05-28 17:08:25 +02:00
Robby Milo
5f4379a24d cleanup shortcodes, asset paths (#34826) (#34900)
(cherry picked from commit 327fa124a4)
2021-05-28 16:43:49 +02:00
Grot (@grafanabot)
e1eebdcf75 Alerting: Do no hard fail on finding discontinued channels on migration (#34894) (#34902)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
(cherry picked from commit ad6648b649)

Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
2021-05-28 16:39:45 +02:00
Grot (@grafanabot)
c767dedffd live: fix log message (#34879) (#34883)
(cherry picked from commit b73d168753)

Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2021-05-28 17:25:23 +03:00
Grot (@grafanabot)
f704fa423d Prometheus: exemplars show different symbols (#34763) (#34899)
* Show different symbols for different queries

* Only run different exemplars

* Address review comment

* Do the same for dashboard + tests

(cherry picked from commit 4435895833)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-05-28 16:05:33 +02:00
Grot (@grafanabot)
6d6e875a84 Prometheus: Add metadata to metrics in Metrics browser (#34708) (#34896)
* Prometheus: Add metadata to metrics in Metrics browser

- use the available metadata to enhance the tooltip on metric items in the metrics browser
- added meta info for histogram metrics (was missing before)
- also added one for ALERTS

* fix test

(cherry picked from commit 2205464a8d)

Co-authored-by: David <david.kaltschmidt@gmail.com>
2021-05-28 15:32:07 +02:00
Grot (@grafanabot)
a0e0414720 Alerting: Fix flaky TestNotificationChannels take 2 (#34880) (#34885)
* Alerting: Fix flaky TestNotificationChannels take 2

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

* Fix nits

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

* Fix lint

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
(cherry picked from commit 8278c7bf77)

Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
2021-05-28 12:19:39 +02:00
Grot (@grafanabot)
ad1498e30c AzureMonitor: remove requirement for default subscription (#34787) (#34881)
* Do not require default subscription for Azure Monitor

* Fix explore URLs when default subscription not set

* Test datasource fixes

* Added comment

* Fix first or default subscription/workspace

* SubscriptionField doesn't depend on Log Analytics

* Tests fixed

* Select default subscription only when user clicked

(cherry picked from commit 179eb0898e)

Co-authored-by: Sergey Kostrukov <sekost@microsoft.com>
2021-05-28 11:46:16 +02:00
Grot (@grafanabot)
1ccca4b187 AzureMonitor: Deprecate using separate credentials for Logs (#34758) (#34877)
* Hide switch for using different credentials in AzureMonitor

* Apply feedback. Use @testing-library

(cherry picked from commit 48dc78fd48)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2021-05-28 10:40:13 +02:00
Grot (@grafanabot)
8415398b2e AzureMonitor: Support querying Subscriptions and Resource Groups in Logs (#34766) (#34875)
* AzureMonitor: Support querying Subscriptions and Resource Groups in Logs

* cleanup

(cherry picked from commit 888cddb834)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2021-05-28 10:23:42 +02:00
Grot (@grafanabot)
638735a37c Clarify that Threema Gateway Alerts support only Basic IDs (#34828) (#34871)
Threema Gateway supports two types of IDs: Basic IDs (where the
encryption is managed by the API server) and End-to-End IDs (where the
keys are managed by the user).

This plugin currently does not support End-to-End IDs (since it's much
more complex to implement, because the encryption needs to happen
locally). Add a few clarifications to the UI.

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit 83a83de10a)

Co-authored-by: Danilo Bargen <mail@dbrgn.ch>
2021-05-28 09:29:12 +02:00
Grot (@grafanabot)
fbee5f402e Dashboard: Fix multi-value variables in share links (#33216) (#33576) (#34868)
(cherry picked from commit 48fe3feae7)

Co-authored-by: MrSummat <gonzamborge@gmail.com>
2021-05-28 08:46:24 +02:00
Grot (@grafanabot)
6f5f36d305 PieChart: Support row data in pie chart (#34755) (#34865)
* PieChart: Support row data in pie chart

* Make color override work

* removed thing

* Minor refactoring

(cherry picked from commit 658cc5dd2d)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-05-28 08:04:02 +02:00
Grot (@grafanabot)
d76104fedf Fix flaky TestNotificationChannels (#34831) (#34866)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
(cherry picked from commit 89262ac64d)

Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
2021-05-28 07:56:57 +02:00
Grot (@grafanabot)
fe968a329e AzureMonitor: Hide App Insights for data sources not using it (#34725) (#34854)
* AzureMonitor: Hide Application Insights and Insights Analytics for panels not using them

* AzureMonitor: Hide Application Insights config

* simplify

* fix test

(cherry picked from commit 7646246d8c)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2021-05-27 23:09:03 +01:00
Grot (@grafanabot)
e6cad0f415 fixes toggleDownloadForExcel function (#34685) (#34852)
(cherry picked from commit f05bddae43)

Co-authored-by: Matt Abrams <37156449+zuchka@users.noreply.github.com>
2021-05-27 22:26:44 +02:00
Grot (@grafanabot)
04741642c5 Live: max_connections option with strict default (#34634) (#34853)
this should help Live to be enabled by default but still
do not affect setups with lots of simultenious users. To
properly handle many WS connections Grafana administrators
should tune infrastructure a bit - for example increase a
number of open files for a process. Will be in more details
in documentation.

(cherry picked from commit 6d750c000e)

Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2021-05-27 21:47:40 +02:00
Grot (@grafanabot)
f44c41fde8 AzureMonitor: reset default subscription when credentials change (#34707) (#34850)
* Update default subscription on credentials change

* Fix secret reset when subscription selected

* Remove unused exports

(cherry picked from commit de86114b66)

Co-authored-by: Sergey Kostrukov <sekost@microsoft.com>
2021-05-27 20:20:29 +01:00
Grot (@grafanabot)
5bf678bcf0 AddPanelWidget: Add padding to prevent top being cut off (#34806) (#34829)
* fix(dashboardpage): add padding so add panel chrome isnt cut off

* fix(addpanelwidget): introduce wrapping element to cater for pulsate animation offset

* refactor(addpanelwidget): use spacing.xs rather than spacing.sm

* test(addpanelwidget): update snapshot

(cherry picked from commit 8ced249c91)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-05-27 18:38:55 +02:00
Grot (@grafanabot)
ed29c58d8b Timeline: Default line width to 0 (#34802) (#34840)
(cherry picked from commit 52f3025901)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-05-27 18:01:18 +02:00
Grot (@grafanabot)
e2c03cf843 Overrides: Hide from visualization should be available as a manual override option (#34783) (#34841)
* Visualization: Hide from option should be available as a manual override option

* Fix misaligned type

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

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-05-27 17:54:34 +02:00
Grot (@grafanabot)
9364ec4404 Alerting: Set max width on alerting query rows (#34749) (#34833)
(cherry picked from commit e085b2316c)

Co-authored-by: Peter Holmberg <peterholmberg@users.noreply.github.com>
2021-05-27 16:40:51 +02:00
Grot (@grafanabot)
0f27ab2d8f Alerting: improved error message and change styling of relative button. (#34730) (#34832)
* improved error message and change styling of relative button.

* minor adjustments.

* adding clock icon.

(cherry picked from commit da6236d89a)

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2021-05-27 16:38:36 +02:00
Marcus Andersson
4a876b6986 Alerting: rename type to make it obvious what part of the code base it belongs to. (#34714) (#34824)
* renamed grafana query to grafana alert query.

* renamed according to feedback in PR.

(cherry picked from commit 1ded9a37c1)
2021-05-27 16:23:01 +02:00
Grot (@grafanabot)
b8aeab41de fix the url of API (#34808) (#34823)
(cherry picked from commit 006135c028)

Co-authored-by: ying-jeanne <74549700+ying-jeanne@users.noreply.github.com>
2021-05-27 21:18:41 +08:00
Grot (@grafanabot)
fea7355e75 Tempo: Fix the test data source implementation (#34762) (#34825)
Fixes #32677

(cherry picked from commit ec3f8ce04c)

Co-authored-by: Koenraad Verheyden <koenraad.verheyden@posteo.net>
2021-05-27 15:12:31 +02:00
Grot (@grafanabot)
922b34817c Chore: additional check when decrypting values (#34637) (#34671)
* Chore: additional check when decrypting values

* Apply suggestions from code review

(cherry picked from commit a5082ab112)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-05-27 15:42:54 +03:00
Grot (@grafanabot)
337bce75a5 Alerting/testing promql extraction (#34665) (#34819)
* promql compat for marshaling

* extracts upstream instant queries into data frame for alerting

* eval string parity

(cherry picked from commit 0e0ed43153)

Co-authored-by: Owen Diehl <ow.diehl@gmail.com>
2021-05-27 08:36:37 -04:00
Grot (@grafanabot)
b3a1a063fe Time series panel: Position tooltip correctly when window scrolled or resized (#34782) (#34794)
* Position GraphNG tooltip correctly when window scrolled or resized

* Use syncRect uPlot hook instead of polling

* update snap?!

(cherry picked from commit 1fa755bada)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-05-27 13:53:58 +02:00
Grot (@grafanabot)
6d44eb8954 Alerting: Move Visualization to QueryRow (#34658) (#34792)
* move visualization to queryeditorrow

* add prop to hide disable query

* move panel plugin state outside the vizwrapper

(cherry picked from commit 23cf31a567)

Co-authored-by: Peter Holmberg <peterholmberg@users.noreply.github.com>
2021-05-27 13:47:28 +02:00
Grot (@grafanabot)
986e54c127 SSE/Chore: cleanup some error messages (#34738) (#34743)
removes "rpc error: code = InvalidArgument desc =" like strings from error messages.

This came from old grpc stuff left from when SSE was a plugin (that probably should
not have been used even when it was a plugin)

(cherry picked from commit 9016d20c4c)

Co-authored-by: Kyle Brandt <kyle@grafana.com>
2021-05-27 07:47:05 -04:00
Grot (@grafanabot)
8b0109c095 sort alert instance, "datasource" -> "data source" (#34724) (#34812)
(cherry picked from commit 871e476e41)

Co-authored-by: Domas <domasx2@gmail.com>
2021-05-27 13:26:31 +02:00
Grot (@grafanabot)
8633344706 Plugins: Enable catalog management link to gcom (#34673) (#34811)
* click out to gcom when config enabled

* set to false

* fix styling for uninstall

* remove advertising config + simplify callout URL

* add entry to configuration.md

* update config name

* update lingo

(cherry picked from commit c7b58fe186)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-05-27 13:12:38 +02:00
Grot (@grafanabot)
f37d9bf13a check if alertmanager being configured is cortex or vanilla (#34726) (#34813)
(cherry picked from commit 5660bb585f)

Co-authored-by: Domas <domasx2@gmail.com>
2021-05-27 13:11:40 +02:00
Grot (@grafanabot)
c0d87c9779 PanelChrome: Fix issue with empty panel after adding a non data panel and coming back from panel edit (#34765) (#34804)
* PanelChrome: Fix issue with empty panel after adding a non data panel and coming back from panel edit

* Removed the console.log

(cherry picked from commit ca79d08dd8)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-05-27 12:43:52 +02:00
Grot (@grafanabot)
dc27360a89 Live: check schema equality between push messages (#34548) (#34801)
(cherry picked from commit 67028af99e)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-05-27 12:20:39 +02:00
Grot (@grafanabot)
d41bfec2f8 GraphNG: uPlot 1.6.10 (#34759) (#34800)
(cherry picked from commit 1dd5d6ffb0)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-05-27 12:13:17 +02:00
Grot (@grafanabot)
1c7e55085c AzureMonitor: Display variables in Logs resource picker (#34648) (#34719)
* AzureMonitor: Display variables in Resource Picker

* tests

* hide template variable group when there's no template variables

(cherry picked from commit b4ce068f0e)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2021-05-27 12:09:00 +02:00
Grot (@grafanabot)
48b74313b5 remove feature toggle + add libraryPaneldefinition (#34488) (#34798)
* remove feature toggle + add libraryPaneldefinition

* update doc

* update comments

* Apply suggestions from code review

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* fix typo

* remove post trim

* update api doc

* solve comments and retrigger the test

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

Co-authored-by: ying-jeanne <74549700+ying-jeanne@users.noreply.github.com>
2021-05-27 18:03:54 +08:00
Grot (@grafanabot)
0d0a795d02 check is grafana admin (#34773) (#34797)
(cherry picked from commit dbef103fb9)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-05-27 11:32:39 +02:00
Grot (@grafanabot)
47cf96dfee Plugins: Adds back getMappedValue to @grafana/data (#34746) (#34793)
* Plugins: Adds back getMappedValue to @grafana/data

* Chore: fixes doc errors

* Tests: fixes snapshot

* Tests: dummy change to restart Drone

* Tests: tries to fix snapshot

(cherry picked from commit 3a68409e5d)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-05-27 11:13:39 +02:00
Grot (@grafanabot)
13473eae6d PanelEdit: Allow standard field config properties extensions without altering order of standard options (#34669) (#34791)
* Render tooltip options in correct category

* Allow custom field config properties that extend standard categories

(cherry picked from commit 811704fd2e)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-05-27 11:08:30 +02:00
Grot (@grafanabot)
15c09dcd68 Histogram: Fix crash when state was undefined (when combine was enabled) (#34514) (#34520)
(cherry picked from commit d0769397b2)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-05-27 10:59:57 +02:00
Grot (@grafanabot)
c3bc0a861f [v8.0.x] Explore: Fix Browser title not updated on Navigation to Explore (#34764)
* Explore: Fix Browser title not updated on Navigation to Explore (#34651)

- Update document.title on Explore page
- Add unit test and snapshot for Wrapper component

(cherry picked from commit cebe67ab01)

* fix: remove snapshot for wrapper test

Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
2021-05-27 10:48:01 +02:00
Grot (@grafanabot)
eba521f12b Chore: bump Acorn and Underscore (#34302) (#34562)
(cherry picked from commit 68513b9a3f)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-05-27 10:45:07 +02:00
Grot (@grafanabot)
3acfa1b8d0 Dashboard: Fixes issue with title or folder change has no effect after exiting settings view (#34677) (#34786)
* Dashboard: Fixes issue with title or folder change has no effect after existing settings view

* Updates snapshot

(cherry picked from commit 6394a60a08)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-05-27 10:35:10 +02:00
Grot (@grafanabot)
631b2f08a8 Catalog: set library as active tab when viewing (#34753) (#34761)
(cherry picked from commit 6f652e39cb)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-05-27 10:11:11 +02:00
Grot (@grafanabot)
f45f160ab8 Live: grafana_live namespace for centrifuge prom metrics (#34712) (#34767)
(cherry picked from commit 4221f2d147)

Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2021-05-26 15:31:48 -07:00
Grot (@grafanabot)
d99847423b set state correctly and test (#34680) (#34770)
(cherry picked from commit 20d356947c)

Co-authored-by: David Parrott <stomp.box.yo@gmail.com>
2021-05-26 15:04:40 -07:00
Grot (@grafanabot)
653a3bdfbf Expose folder UID in dashboards API response (#33991) (#34772)
* expose folder UID in dashboards API response, import dashboards into folders by folder UID

* handle bad folder UID as 400 error

* 12591:Add tests for request with folderUid

* Use more descriptive error status for missing folders

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

* return 400 when folder id is missing

* put error checking in the right place this time

* mention folderUid in the docs

* Clarify usage of folderUid and folderId when both present

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

* Capitalise UID

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

* mention folder UID in the metadata for a GET response

Co-authored-by: Ida Furjesova <ida.furjesova@grafana.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit ef0fab9aa5)

Co-authored-by: Serge Zaitsev <serge.zaitsev@grafana.com>
2021-05-26 22:10:59 +02:00
Grot (@grafanabot)
fca62d20d6 hide caching settings when its disabled (#34756) (#34769)
(cherry picked from commit 3aba08f708)

Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
2021-05-26 15:06:29 -05:00
Grot (@grafanabot)
52e2a2403f NodeGraph: Show node graph collapsed by default with trace view (#34491) (#34742)
* Show node graph collapsed by default with trace view

* Fix rename variable

* Change the message

* Add test

* Fix e2e test

* Remove expect in exemplars test

* Align icon

* review fixes

(cherry picked from commit 9dafd4f863)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2021-05-26 18:53:47 +02:00
Grot (@grafanabot)
cb9a36b91f Transformations: Prevent FilterByValue transform crashing panel edit (#34747) (#34754)
(cherry picked from commit 515c73d8e6)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-05-26 17:54:22 +02:00
Grot (@grafanabot)
72b3478935 NGAlert: Update the default template to include more URLs (#34715) (#34750)
* NGAlert: Update the default template to include more URLs

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

* Fix tests

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
(cherry picked from commit d69c21acb6)

Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
2021-05-26 17:14:15 +02:00
Grot (@grafanabot)
81f2f68535 NGAlert: Add integration tests for remaining notification channels (#34662) (#34728)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
(cherry picked from commit b168223029)

Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
2021-05-26 19:59:34 +05:30
Grot (@grafanabot)
ebe20d1998 TestData: Some simple small test data and first draft of what's new in v8 demo dashboard (#34731) (#34736)
* TestData: More test data

* Added v8 demo dashboard

(cherry picked from commit 6fb0560a84)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-05-26 14:36:01 +02:00
Grot (@grafanabot)
771013904a CustomScrollbar: Invoke setScrollTop callback only after scrolling finishes (#34263) (#34564)
* Invoke setScrollTop callback only after scrolling finishes

When the state is updated while scroll events are being dispatched (like in QueryGroup) it may cause resetting the scroll position to the first emitted event because setting the scroll happens only after render (useEffect).

* Memoize onScrollStop callback

(cherry picked from commit 8d05df83ed)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-05-26 13:38:52 +02:00
Grot (@grafanabot)
ba85b954e1 Access control: Rename predefined roles to fixed roles (code) (#34469) (#34663)
* s/grafana:roles:/fixed:/

* Update free text references to predefined roles

(cherry picked from commit 0f4806db8a)

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2021-05-26 13:22:44 +02:00
Grot (@grafanabot)
b23bd2c105 PageToolbar: add bottom padding (#34602) (#34711)
* fix(pagetoolbar): pad elements top and bottom to keep vertical align and wrapper padding

* fix(sidemenu): prevent mobile sidemenu squashing dashboard, vertically align mobile sidemenu icon

* fix(dashboardsettings): prevent subheader overlap

* fix(pagetoolbar): center align all toolbar elements vertically

* refactor(pagetoolbar): combine vertical paddings to bring back original padding values

* refactor: update padding values for components that use PageToolbar

* fix(playlists): update Empty cta link route to prevent 404

* test(dashboard): update snapshot

(cherry picked from commit ad3b0b2272)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-05-26 12:13:10 +02:00
Grot (@grafanabot)
02dd5a6f0e VisualisationPicker: allow scrolling in Safari (#34717) (#34721)
(cherry picked from commit bcc7bd9dd3)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-05-26 12:12:20 +02:00
Grot (@grafanabot)
ea84eb499a Datasource: Use intervalMs field of query model in GetIntervalFrom if interval field is not set (#34270) (#34720)
The /api/ds/query and /api/tsdb/query endpoints extract the intervalMs field from
each query in the request, but it currently seems to be ignored, at
least for queries to a Prometheus datasource. This changes
GetIntervalFrom function to check for the presence of intervalMs in the
query model if interval is missing.

(cherry picked from commit b7ea66b00d)

Co-authored-by: Ben Sully <ben.sully@grafana.com>
2021-05-26 12:09:04 +02:00
Grot (@grafanabot)
e3d25450ed AzureMonitor: ResourceMonitor children refactor (#34591) (#34713)
* AzureMonitor: Refactor children to be an arrayu

* Add some resourcePickerData tests

* update tests

* some quick NestedResourceTable tests

(cherry picked from commit 1d3bcb0e90)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2021-05-26 11:22:43 +02:00
Grot (@grafanabot)
d149b2aae3 TestData: Support for csv files & csv content (#34674) (#34709)
* initial implementation of csv support for test data source

* CSV file & content scenarios working

* Removing categorical data

* fixing handler names

* Update pkg/tsdb/testdatasource/csv_data.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update pkg/tsdb/testdatasource/csv_data.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update pkg/tsdb/testdatasource/csv_data.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update pkg/tsdb/testdatasource/csv_data.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update pkg/tsdb/testdatasource/csv_data.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update pkg/tsdb/testdatasource/csv_data.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update pkg/tsdb/testdatasource/csv_data.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fixed lint issues

* updated so it uses the same parsing

* more CSV tests

* lint fixes

* more lint

* lint

* support time field

* migrate manual entry to csv

* more test output

* more test output

* missing file

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
(cherry picked from commit 987bffe482)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-05-26 11:15:41 +02:00
Grot (@grafanabot)
1de3c88c0e Chore: Upgrade opentelemetry.io/collector dependency (#34700) (#34706)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit 796590a1aa)

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-05-26 10:43:14 +02:00
Grot (@grafanabot)
17f3a5a4a3 Alerting: added possibility to preview grafana managed alert rules. (#34600) (#34704)
* starting to add eval logic.

* wip

* first version of test rule.

* reverted file.

* add info colum to result to show error or (with CC evalmatches)

* fix labels in evalmatch

* fix be test

* refactored using observables.

* moved widht/height div to outside panel rendere.

* adding docs api level.

* adding container styles to error div.

* increasing size of preview.

Co-authored-by: kyle <kyle@grafana.com>
(cherry picked from commit e19b3df1a9)

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2021-05-26 10:31:56 +02:00
Grot (@grafanabot)
1a18413505 Alerting: making sure we use the updated queries when querying for data. (#34631) (#34705)
(cherry picked from commit 70efaa5582)

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2021-05-26 10:30:36 +02:00
Grot (@grafanabot)
21ea2e2e6f Security: Upgrade Thrift dependency (#34698) (#34701)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit 42f33630c7)

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-05-26 09:59:14 +02:00
Grot (@grafanabot)
f7c144f957 Add missing AWS/AppSync metrics (#34691) (#34695)
(cherry picked from commit 80c05becc5)

Co-authored-by: Evan Sosenko <razorx@evansosenko.com>
2021-05-26 09:02:15 +02:00
Grot (@grafanabot)
0d6135dccb CloudWatch: Add Lambda@Edge Amazon CloudFront metrics (#34561) (#34694)
* Add LambdaExecutionError to AWS/CloudFront

* Add LambdaValidationError to AWS/CloudFront

* Add LambdaLimitExceededErrors to AWS/CloudFront

(cherry picked from commit f9b8f3777a)

Co-authored-by: Evan Sosenko <razorx@evansosenko.com>
2021-05-26 09:01:47 +02:00
Ivana Huckova
df3b68e659 Prometheus: Update default HTTP method to POST for existing data sources (#34599) (#34676)
* Change default method to POST

* Update comment

* Add tests

* Update Whats new

* Update docs/sources/whatsnew/whats-new-in-v8-0.md

Co-authored-by: Julien Pivotto <roidelapluie@inuits.eu>

* Update docs/sources/whatsnew/whats-new-in-v8-0.md

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

* Update docs/sources/whatsnew/whats-new-in-v8-0.md

Co-authored-by: Julien Pivotto <roidelapluie@inuits.eu>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit 93c5c8345c)
2021-05-25 20:29:59 +02:00
Grot (@grafanabot)
e2b6820d42 Live: use latest changes in Go SDK to deal with streaming frames (#34668) (#34678)
(cherry picked from commit 063e1b5ff5)

Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2021-05-25 20:16:54 +02:00
Grot (@grafanabot)
ef05f687ca InfluxDB: Flux: handle boolean data-columns (#34479) (#34670)
* InfluxDB: Flux: handle boolean data-columns

* normalize data-type strings based on documentation

* reference missing data type

(cherry picked from commit ab26c4dfa4)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-05-25 17:54:26 +02:00
Grot (@grafanabot)
7319caaa63 API: Use SettingsProvider on GET settings handler (#34632) (#34661)
(cherry picked from commit b74a502dc4)

Co-authored-by: Joan López de la Franca Beltran <joanjan14@gmail.com>
2021-05-25 16:50:11 +02:00
Grot (@grafanabot)
8dd3cd15e4 Admin: Fixes infinite loading edit profile page (#34627) (#34654)
* UserProfile: Fixes infinite loading spinner

* Refactor: some clean up

* Refactor: some more cleanup

* Tests: Adds tests for UserProfileEditPage

* Chore: updates after PR comments

* Refactor: removes unnecessary unmount/mount

(cherry picked from commit 881abb3af8)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-05-25 15:44:46 +02:00
Grot (@grafanabot)
b1177e2f8f expose azure settings as env variables (#34484) (#34647)
(cherry picked from commit 92ac2c40d3)

Co-authored-by: Erik Sundell <erik.sundell@grafana.com>
2021-05-25 14:11:16 +02:00
Grot (@grafanabot)
c8ae5539bc Grafana-UI: Make card figure honor align prop (#34639) (#34644)
(cherry picked from commit a8fa5f1796)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-05-25 14:07:22 +02:00
Grot (@grafanabot)
0822375888 fix modified yarn.lock (#34640) (#34643)
(cherry picked from commit a9b88bc72c)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-05-25 13:23:24 +02:00
Grot (@grafanabot)
587c9677bb Alerting: Move query components to unified folder (#34587) (#34636)
(cherry picked from commit dcef87fd79)

Co-authored-by: Peter Holmberg <peterholmberg@users.noreply.github.com>
2021-05-25 12:32:12 +02:00
Grot (@grafanabot)
7294dbc2a7 Alerting: misc ui fixes volume 4 (#34503) (#34625)
(cherry picked from commit d666defaea)

Co-authored-by: Domas <domasx2@gmail.com>
2021-05-25 12:58:47 +03:00
Grot (@grafanabot)
45048ebc4b Alerting: Remove unused NGAlerting components (#34568) (#34583)
(cherry picked from commit a0b78313f3)

Co-authored-by: Peter Holmberg <peterholmberg@users.noreply.github.com>
2021-05-25 11:19:11 +02:00
Grot (@grafanabot)
3956e2b422 [v8.0.x] HTTP Client: Make ResponseHeaderTimeout default timeout in http client (#34629)
* HTTP Client: Make `ResponseHeaderTimeout` default timeout in http client (#34597)

* HTTP Client: Add `ResponseHeaderTimeout` - split from `DialContext` timeout

* Fixes according to reviewer's comments

* Use grafana-plugin-sdk-go v0.100.0

(cherry picked from commit 91657dad18)

* Small change

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
Co-authored-by: dsotirakis <sotirakis.dim@gmail.com>
2021-05-25 10:59:24 +02:00
Grot (@grafanabot)
d678865934 AzureMonitor: Fix Azure token provider national clouds (#34615) (#34617)
* Fix AAD authority for sovereign clouds

* Update Azure SDK with scopes fix

* Credential initialization in cache

(cherry picked from commit a337f70469)

Co-authored-by: Sergey Kostrukov <sekost@microsoft.com>
2021-05-25 08:46:03 +02:00
Grot (@grafanabot)
44204a745c RowOptions: Fix enter key updating row options (#34586) (#34598)
(cherry picked from commit 888683a8ad)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-05-24 17:48:01 +02:00
Grot (@grafanabot)
ec09a5995d [Alerting]: alertmanager notifier fixes (#34575) (#34589)
(cherry picked from commit b48832c0f7)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-05-24 17:32:52 +03:00
Grot (@grafanabot)
01c5587eda InfluxDB: InfluxQL query editor: better handling of slow queries (#34507) (#34596)
* InfluxDB: InfluxQL query editor: better handling of slow queries

* adjusted message to be similar to other messages

* simplify code

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

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
(cherry picked from commit 0afc4c0361)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-05-24 16:31:52 +02:00
Grot (@grafanabot)
ea1dae55e8 Elasticsearch: fix NewClient not passing httpClientProvider to client impl (#34539) (#34594)
* Update client.go

fix missing "httpClientProvider" in NewClient

* Update client.go

(cherry picked from commit 530072fce7)

Co-authored-by: wangjian <wj0360@foxmail.com>
2021-05-24 15:22:27 +01:00
Grot (@grafanabot)
bac7b5ad6d Form: Expose all return values from useForm (#34380) (#34581)
(cherry picked from commit e9e438ee2f)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-05-24 14:34:58 +02:00
Grot (@grafanabot)
6f8763f03d Explore: Add caching for queries run from logs navigation (#34297) (#34580)
* WIP: Implement simple caching

* If results are cached, don't run new query and use those results

* Add duplicate key check

* Clean up

* Clean up

* Add tests for caching

* Remove unused variables

* Update public/app/features/explore/state/query.test.ts

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

* Update public/app/features/explore/state/query.test.ts

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

* Use decorateData to apply all decorators

* Remove unused variables

* Change loading stte to Done

* Clear cache when running query from navigation

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
(cherry picked from commit 247bdc2f9b)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-05-24 14:23:24 +02:00
Grot (@grafanabot)
ee46b14371 Add @public release tag to Spinner component (#34576) (#34578)
(cherry picked from commit b5de6e7a1d)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-05-24 13:56:41 +02:00
Grot (@grafanabot)
8a677b0ae4 Loki: Bring back processed bytes as meta info (#34092) (#34574)
* Loki: Bring back processed bytes as meta info

* style: Lint

(cherry picked from commit 6796a89e9d)

Co-authored-by: mmenbawy <elmenabawym@gmail.com>
2021-05-24 12:51:33 +02:00
Grot (@grafanabot)
7e05261dfe influxdb: influxql: make measurement-autocomplete case insensitive (#34563) (#34573)
(cherry picked from commit e21b90681f)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-05-24 12:48:22 +02:00
Grot (@grafanabot)
603cff9491 LibraryPanels: Fixes error when importing plugin dashboard (#34557) (#34559)
(cherry picked from commit 7b17801047)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-05-24 09:56:15 +02:00
Grot (@grafanabot)
52d6afbae7 [Alerting]: namespace fixes (#34470) (#34489)
* [Alerting]: forbid viewers for updating rules if viewers can edit

check for CanSave instead of CanEdit

* Clear ngalert tables when deleting the folder

* Apply suggestions from code review

* Log failure to check save permission

Co-authored-by: gotjosh <josue@grafana.com>
(cherry picked from commit 23939eab10)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-05-24 10:42:56 +03:00
Grot (@grafanabot)
7f919c0e55 LibraryElements: Creates usage stats for panels and variables (#34476) (#34555)
* LibraryPanels: Adds usage collection

* Refactor: renames Panel and Variable consts

* Chore: initialize stats

* Refactor: moves library element migrations to migration namespace

(cherry picked from commit 7204a64717)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-05-24 06:35:35 +02:00
Grot (@grafanabot)
34a1621a5c Timeline: use full row height with one series (#34532) (#34536)
(cherry picked from commit 11b2f0ee4d)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-05-21 01:28:01 +02:00
Grot (@grafanabot)
0577e4b119 Chore: Increase number of backend test retries in grabpl to 5 in release pipelines (#34493) (#34521)
* Increase number of backend test retries to 5

* Exclude release-branch pipelines

* Fixes according to reviewer's comments

* Refactor

* Remove unused arguments

* Remove magic number

(cherry picked from commit 292789ba2d)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-05-20 18:20:35 +02:00
Grot (@grafanabot)
50041c8138 Elasticsearch: fix flaky test (#34517) (#34518)
(cherry picked from commit e2e78f14d2)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-05-20 16:50:19 +01:00
Grot (@grafanabot)
5c2ae8fbf4 InfluxDB: InfluxQL query editor: generate better HTML (#34467) (#34516)
(cherry picked from commit d95cc4a08f)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-05-20 17:24:04 +02:00
Grot (@grafanabot)
255b91b2ba Timeline: Fix y-axis being cropped (#34508) (#34515)
(cherry picked from commit dbe281530c)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-05-20 17:08:41 +02:00
Grot (@grafanabot)
57f5b34038 Chore: Upgrade loki dependency (#34487) (#34512)
Upgrades loki dependency to include grafana/loki#3743.

(cherry picked from commit b76dfc8ed0)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-05-20 17:00:12 +02:00
Grot (@grafanabot)
126b7f8049 Timeline: Fixes crash when there was only 1 threshold step (#34471) (#34486)
(cherry picked from commit fd6e338651)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-05-20 16:43:34 +02:00
Grot (@grafanabot)
3a75fb635d Update _index.md (#34500) (#34501)
(cherry picked from commit a7c5636948)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-05-20 15:46:19 +02:00
Grot (@grafanabot)
d86e725369 Plugins: Improve plugin installer error messages (#34437) (#34495)
* fix and improve error messages

* enrich error message

* ignore previous changes

* revert manual version bump

* remove condition

* fix version param

(cherry picked from commit c4dcfdef56)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-05-20 15:34:31 +02:00
Grot (@grafanabot)
d15419ef5b ReleaseNotes: Updated changelog and release notes for 8.0.0-beta2 (#34481) (#34499)
(cherry picked from commit fc9c5ec873)
2021-05-20 15:26:42 +02:00
Grot (@grafanabot)
9d4c719205 "Release: Updated versions in package to 8.0.0-beta.2" (#34478) 2021-05-20 11:51:41 +02:00
1177 changed files with 45869 additions and 14061 deletions

View File

@@ -1,60 +1,11 @@
version: 2.1
aliases:
# Workflow filters
- &filter-only-main
branches:
only: main
jobs:
scan-docker-image:
description: "Scans a docker image for vulnerabilities using trivy"
parameters:
image:
type: string
tag:
type: string
build:
docker:
- image: circleci/buildpack-deps:stretch
- image: alpine:3.7
steps:
- setup_remote_docker
- restore_cache:
key: vulnerability-db
- run:
name: Install trivy
name: The First Step
command: |
VERSION=$(
curl --silent "https://api.github.com/repos/aquasecurity/trivy/releases/latest" | \
grep '"tag_name":' | \
sed -E 's/.*"v([^"]+)".*/\1/'
)
echo 'Fake step!'
wget https://github.com/aquasecurity/trivy/releases/download/v${VERSION}/trivy_${VERSION}_Linux-64bit.tar.gz
tar zxvf trivy_${VERSION}_Linux-64bit.tar.gz
sudo mv trivy /usr/local/bin
- run:
name: Clear trivy cache
command: trivy --clear-cache
- run:
name: Scan Docker image for unkown/low/medium vulnerabilities
command: trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM << parameters.image >>:<< parameters.tag >>
- run:
name: Scan Docker image for high/critical vulnerabilities
command: trivy --exit-code 1 --severity HIGH,CRITICAL << parameters.image >>:<< parameters.tag >>
- save_cache:
key: vulnerability-db
paths:
- $HOME/.cache/trivy
workflows:
nightly:
triggers:
- schedule:
cron: "0 0 * * *"
filters: *filter-only-main
jobs:
- scan-docker-image:
matrix:
parameters:
image: [grafana/grafana, grafana/grafana-enterprise]
tag: [latest, main, latest-ubuntu, main-ubuntu]

View File

@@ -2,9 +2,10 @@ load('scripts/pr.star', 'pr_pipelines')
load('scripts/main.star', 'main_pipelines')
load('scripts/release.star', 'release_pipelines', 'test_release_pipelines')
load('scripts/version.star', 'version_branch_pipelines')
load('scripts/job.star', 'cronjobs')
load('scripts/vault.star', 'secrets')
def main(ctx):
edition = 'oss'
return pr_pipelines(edition=edition) + main_pipelines(edition=edition) + release_pipelines() + \
test_release_pipelines() + version_branch_pipelines() + secrets()
test_release_pipelines() + version_branch_pipelines() + cronjobs(edition=edition) + secrets()

View File

@@ -17,7 +17,7 @@ steps:
image: grafana/build-container:1.4.1
commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.2.8/grabpl
- chmod +x bin/grabpl
- ./bin/grabpl verify-drone
- curl -fLO https://github.com/jwilder/dockerize/releases/download/v$${DOCKERIZE_VERSION}/dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz
@@ -165,7 +165,6 @@ steps:
- mkdir -p /hugo/content/docs/grafana
- cp -r docs/sources/* /hugo/content/docs/grafana/latest/
- cd /hugo && make prod
failure: ignore
depends_on:
- initialize
- build-frontend-docs
@@ -259,7 +258,7 @@ steps:
image: grafana/build-container:1.4.1
commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.2.8/grabpl
- chmod +x bin/grabpl
- ./bin/grabpl verify-drone
- curl -fLO https://github.com/jwilder/dockerize/releases/download/v$${DOCKERIZE_VERSION}/dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz
@@ -324,17 +323,6 @@ steps:
depends_on:
- initialize
- name: publish-frontend-metrics
image: grafana/build-container:1.4.1
commands:
- ./scripts/ci-frontend-metrics.sh | ./bin/grabpl publish-metrics $${GRAFANA_MISC_STATS_API_KEY}
environment:
GRAFANA_MISC_STATS_API_KEY:
from_secret: grafana_misc_stats_api_key
failure: ignore
depends_on:
- initialize
- name: build-backend
image: grafana/build-container:1.4.1
commands:
@@ -352,6 +340,17 @@ steps:
- initialize
- test-frontend
- name: publish-frontend-metrics
image: grafana/build-container:1.4.1
commands:
- ./scripts/ci-frontend-metrics.sh | ./bin/grabpl publish-metrics $${GRAFANA_MISC_STATS_API_KEY}
environment:
GRAFANA_MISC_STATS_API_KEY:
from_secret: grafana_misc_stats_api_key
failure: ignore
depends_on:
- build-frontend
- name: build-plugins
image: grafana/build-container:1.4.1
commands:
@@ -590,8 +589,7 @@ steps:
image: grafana/ci-wix:0.1.1
commands:
- $$ProgressPreference = "SilentlyContinue"
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/windows/grabpl.exe -OutFile grabpl.exe
- .\grabpl.exe verify-drone
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.2.8/windows/grabpl.exe -OutFile grabpl.exe
- name: build-windows-installer
image: grafana/ci-wix:0.1.1
@@ -640,7 +638,7 @@ steps:
image: grafana/build-container:1.4.1
commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.2.8/grabpl
- chmod +x bin/grabpl
- ./bin/grabpl verify-drone
environment:
@@ -689,7 +687,7 @@ steps:
image: plugins/slack
settings:
channel: grafana-ci-notifications
template: "Build {{build.number}} failed for commit: <https://github.com/{{repo.owner}}/{{repo.name}}/commit/{{build.commit}}|{{ truncate build.commit 8 }}>: {{build.link}}\nAuthor: {{build.author}}"
template: "Build {{build.number}} failed for commit: <https://github.com/{{repo.owner}}/{{repo.name}}/commit/{{build.commit}}|{{ truncate build.commit 8 }}>: {{build.link}}\nBranch: <https://github.com/{{ repo.owner }}/{{ repo.name }}/commits/{{ build.branch }}|{{ build.branch }}>\nAuthor: {{build.author}}"
webhook:
from_secret: slack_webhook
@@ -725,7 +723,7 @@ steps:
image: grafana/build-container:1.4.1
commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.2.8/grabpl
- chmod +x bin/grabpl
- ./bin/grabpl verify-drone
- ./bin/grabpl verify-version ${DRONE_TAG}
@@ -755,8 +753,8 @@ steps:
image: grafana/build-container:1.4.1
commands:
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
- ./bin/grabpl test-backend --edition oss
- ./bin/grabpl integration-tests --edition oss
- ./bin/grabpl test-backend --edition oss --tries 5
- ./bin/grabpl integration-tests --edition oss --tries 5
depends_on:
- initialize
@@ -1031,8 +1029,7 @@ steps:
image: grafana/ci-wix:0.1.1
commands:
- $$ProgressPreference = "SilentlyContinue"
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/windows/grabpl.exe -OutFile grabpl.exe
- .\grabpl.exe verify-drone
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.2.8/windows/grabpl.exe -OutFile grabpl.exe
- name: build-windows-installer
image: grafana/ci-wix:0.1.1
@@ -1082,7 +1079,7 @@ steps:
image: grafana/build-container:1.4.1
commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.2.8/grabpl
- chmod +x bin/grabpl
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
- cd grafana-enterprise
@@ -1098,6 +1095,7 @@ steps:
- rmdir bin
- mv grafana-enterprise /tmp/
- /tmp/grabpl init-enterprise /tmp/grafana-enterprise ${DRONE_TAG}
- mv /tmp/grafana-enterprise/deployment_tools_config.json deployment_tools_config.json
- mkdir bin
- mv /tmp/grabpl bin/
- ./bin/grabpl verify-drone
@@ -1130,8 +1128,8 @@ steps:
image: grafana/build-container:1.4.1
commands:
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
- ./bin/grabpl test-backend --edition enterprise
- ./bin/grabpl integration-tests --edition enterprise
- ./bin/grabpl test-backend --edition enterprise --tries 5
- ./bin/grabpl integration-tests --edition enterprise --tries 5
depends_on:
- initialize
@@ -1196,8 +1194,8 @@ steps:
image: grafana/build-container:1.4.1
commands:
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
- ./bin/grabpl test-backend --edition enterprise2
- ./bin/grabpl integration-tests --edition enterprise2
- ./bin/grabpl test-backend --edition enterprise2 --tries 5
- ./bin/grabpl integration-tests --edition enterprise2 --tries 5
depends_on:
- initialize
@@ -1506,7 +1504,7 @@ steps:
image: grafana/ci-wix:0.1.1
commands:
- $$ProgressPreference = "SilentlyContinue"
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/windows/grabpl.exe -OutFile grabpl.exe
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.2.8/windows/grabpl.exe -OutFile grabpl.exe
- git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git"
- cd grafana-enterprise
- git checkout ${DRONE_TAG}
@@ -1523,7 +1521,6 @@ steps:
- rm -force grabpl.exe
- C:\App\grabpl.exe init-enterprise C:\App\grafana-enterprise
- cp C:\App\grabpl.exe grabpl.exe
- .\grabpl.exe verify-drone
depends_on:
- clone
@@ -1575,7 +1572,7 @@ steps:
image: grafana/build-container:1.4.1
commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.2.8/grabpl
- chmod +x bin/grabpl
- ./bin/grabpl verify-drone
- ./bin/grabpl verify-version ${DRONE_TAG}
@@ -1644,7 +1641,7 @@ steps:
image: plugins/slack
settings:
channel: grafana-ci-notifications
template: "Build {{build.number}} failed for commit: <https://github.com/{{repo.owner}}/{{repo.name}}/commit/{{build.commit}}|{{ truncate build.commit 8 }}>: {{build.link}}\nAuthor: {{build.author}}"
template: "Build {{build.number}} failed for commit: <https://github.com/{{repo.owner}}/{{repo.name}}/commit/{{build.commit}}|{{ truncate build.commit 8 }}>: {{build.link}}\nBranch: <https://github.com/{{ repo.owner }}/{{ repo.name }}/commits/{{ build.branch }}|{{ build.branch }}>\nAuthor: {{build.author}}"
webhook:
from_secret: slack_webhook
@@ -1680,7 +1677,7 @@ steps:
image: grafana/build-container:1.4.1
commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.2.8/grabpl
- chmod +x bin/grabpl
- ./bin/grabpl verify-drone
- ./bin/grabpl verify-version v7.3.0-test
@@ -1710,8 +1707,8 @@ steps:
image: grafana/build-container:1.4.1
commands:
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
- ./bin/grabpl test-backend --edition oss
- ./bin/grabpl integration-tests --edition oss
- ./bin/grabpl test-backend --edition oss --tries 5
- ./bin/grabpl integration-tests --edition oss --tries 5
depends_on:
- initialize
@@ -1975,8 +1972,7 @@ steps:
image: grafana/ci-wix:0.1.1
commands:
- $$ProgressPreference = "SilentlyContinue"
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/windows/grabpl.exe -OutFile grabpl.exe
- .\grabpl.exe verify-drone
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.2.8/windows/grabpl.exe -OutFile grabpl.exe
- name: build-windows-installer
image: grafana/ci-wix:0.1.1
@@ -2026,7 +2022,7 @@ steps:
image: grafana/build-container:1.4.1
commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.2.8/grabpl
- chmod +x bin/grabpl
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
- cd grafana-enterprise
@@ -2042,6 +2038,7 @@ steps:
- rmdir bin
- mv grafana-enterprise /tmp/
- /tmp/grabpl init-enterprise /tmp/grafana-enterprise
- mv /tmp/grafana-enterprise/deployment_tools_config.json deployment_tools_config.json
- mkdir bin
- mv /tmp/grabpl bin/
- ./bin/grabpl verify-drone
@@ -2074,8 +2071,8 @@ steps:
image: grafana/build-container:1.4.1
commands:
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
- ./bin/grabpl test-backend --edition enterprise
- ./bin/grabpl integration-tests --edition enterprise
- ./bin/grabpl test-backend --edition enterprise --tries 5
- ./bin/grabpl integration-tests --edition enterprise --tries 5
depends_on:
- initialize
@@ -2140,8 +2137,8 @@ steps:
image: grafana/build-container:1.4.1
commands:
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
- ./bin/grabpl test-backend --edition enterprise2
- ./bin/grabpl integration-tests --edition enterprise2
- ./bin/grabpl test-backend --edition enterprise2 --tries 5
- ./bin/grabpl integration-tests --edition enterprise2 --tries 5
depends_on:
- initialize
@@ -2444,7 +2441,7 @@ steps:
image: grafana/ci-wix:0.1.1
commands:
- $$ProgressPreference = "SilentlyContinue"
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/windows/grabpl.exe -OutFile grabpl.exe
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.2.8/windows/grabpl.exe -OutFile grabpl.exe
- git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git"
- cd grafana-enterprise
- git checkout main
@@ -2461,7 +2458,6 @@ steps:
- rm -force grabpl.exe
- C:\App\grabpl.exe init-enterprise C:\App\grafana-enterprise
- cp C:\App\grabpl.exe grabpl.exe
- .\grabpl.exe verify-drone
depends_on:
- clone
@@ -2513,7 +2509,7 @@ steps:
image: grafana/build-container:1.4.1
commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.2.8/grabpl
- chmod +x bin/grabpl
- ./bin/grabpl verify-drone
- ./bin/grabpl verify-version v7.3.0-test
@@ -2582,7 +2578,7 @@ steps:
image: plugins/slack
settings:
channel: grafana-ci-notifications
template: "Build {{build.number}} failed for commit: <https://github.com/{{repo.owner}}/{{repo.name}}/commit/{{build.commit}}|{{ truncate build.commit 8 }}>: {{build.link}}\nAuthor: {{build.author}}"
template: "Build {{build.number}} failed for commit: <https://github.com/{{repo.owner}}/{{repo.name}}/commit/{{build.commit}}|{{ truncate build.commit 8 }}>: {{build.link}}\nBranch: <https://github.com/{{ repo.owner }}/{{ repo.name }}/commits/{{ build.branch }}|{{ build.branch }}>\nAuthor: {{build.author}}"
webhook:
from_secret: slack_webhook
@@ -2618,7 +2614,7 @@ steps:
image: grafana/build-container:1.4.1
commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.2.8/grabpl
- chmod +x bin/grabpl
- ./bin/grabpl verify-drone
- curl -fLO https://github.com/jwilder/dockerize/releases/download/v$${DOCKERIZE_VERSION}/dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz
@@ -2888,8 +2884,7 @@ steps:
image: grafana/ci-wix:0.1.1
commands:
- $$ProgressPreference = "SilentlyContinue"
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/windows/grabpl.exe -OutFile grabpl.exe
- .\grabpl.exe verify-drone
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.2.8/windows/grabpl.exe -OutFile grabpl.exe
- name: build-windows-installer
image: grafana/ci-wix:0.1.1
@@ -2935,7 +2930,7 @@ steps:
image: grafana/build-container:1.4.1
commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.2.8/grabpl
- chmod +x bin/grabpl
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
- cd grafana-enterprise
@@ -2951,6 +2946,7 @@ steps:
- rmdir bin
- mv grafana-enterprise /tmp/
- /tmp/grabpl init-enterprise /tmp/grafana-enterprise
- mv /tmp/grafana-enterprise/deployment_tools_config.json deployment_tools_config.json
- mkdir bin
- mv /tmp/grabpl bin/
- ./bin/grabpl verify-drone
@@ -3356,7 +3352,7 @@ steps:
image: grafana/ci-wix:0.1.1
commands:
- $$ProgressPreference = "SilentlyContinue"
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.0.0/windows/grabpl.exe -OutFile grabpl.exe
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.2.8/windows/grabpl.exe -OutFile grabpl.exe
- git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git"
- cd grafana-enterprise
- git checkout $$env:DRONE_BRANCH
@@ -3373,7 +3369,6 @@ steps:
- rm -force grabpl.exe
- C:\App\grabpl.exe init-enterprise C:\App\grafana-enterprise
- cp C:\App\grabpl.exe grabpl.exe
- .\grabpl.exe verify-drone
depends_on:
- clone
@@ -3416,7 +3411,7 @@ steps:
image: plugins/slack
settings:
channel: grafana-ci-notifications
template: "Build {{build.number}} failed for commit: <https://github.com/{{repo.owner}}/{{repo.name}}/commit/{{build.commit}}|{{ truncate build.commit 8 }}>: {{build.link}}\nAuthor: {{build.author}}"
template: "Build {{build.number}} failed for commit: <https://github.com/{{repo.owner}}/{{repo.name}}/commit/{{build.commit}}|{{ truncate build.commit 8 }}>: {{build.link}}\nBranch: <https://github.com/{{ repo.owner }}/{{ repo.name }}/commits/{{ build.branch }}|{{ build.branch }}>\nAuthor: {{build.author}}"
webhook:
from_secret: slack_webhook
@@ -3432,6 +3427,49 @@ depends_on:
- enterprise-build-release-branch
- enterprise-windows-release-branch
---
kind: pipeline
type: docker
name: scan-docker-images
platform:
os: linux
arch: amd64
steps:
- name: scan-docker-images-unkown-low-medium-vulnerabilities
image: aquasec/trivy:0.18.3
commands:
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM grafana/grafana:latest
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM grafana/grafana:main
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM grafana/grafana:latest-ubuntu
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM grafana/grafana:main-ubuntu
- name: scan-docker-images-high-critical-vulnerabilities
image: aquasec/trivy:0.18.3
commands:
- trivy --exit-code 1 --severity HIGH,CRITICAL grafana/grafana:latest
- trivy --exit-code 1 --severity HIGH,CRITICAL grafana/grafana:main
- trivy --exit-code 1 --severity HIGH,CRITICAL grafana/grafana:latest-ubuntu
- trivy --exit-code 1 --severity HIGH,CRITICAL grafana/grafana:main-ubuntu
- name: slack-notify-failure
image: plugins/slack
settings:
channel: grafana-backend
template: "Nightly docker image scan job for {{repo.name}} failed: {{build.link}}"
webhook:
from_secret: slack_webhook_backend
when:
status:
- failure
trigger:
cron:
- nightly
event:
- cron
---
kind: secret
name: dockerconfigjson

View File

@@ -3,7 +3,7 @@ name: publish_docs
on:
push:
branches:
- main
- v8.0.x
paths:
- 'docs/sources/**'
- 'packages/grafana-*/**'
@@ -36,7 +36,7 @@ jobs:
host: github.com
github_pat: '${{ secrets.GH_BOT_ACCESS_TOKEN }}'
source_folder: docs/sources
target_folder: content/docs/grafana/next
target_folder: content/docs/grafana/latest
allow_no_changes: 'true'
- shell: bash
run: |

View File

@@ -1,4 +1,273 @@
<!-- 8.0.5 START -->
# 8.0.5 (2021-07-08)
### Features and enhancements
* **Cloudwatch Logs:** Send error down to client. [#36277](https://github.com/grafana/grafana/pull/36277), [@zoltanbedi](https://github.com/zoltanbedi)
* **Folders:** Return 409 Conflict status when folder already exists. [#36429](https://github.com/grafana/grafana/pull/36429), [@dsotirakis](https://github.com/dsotirakis)
* **TimeSeries:** Do not show series in tooltip if it's hidden in the viz. [#36353](https://github.com/grafana/grafana/pull/36353), [@dprokop](https://github.com/dprokop)
### Bug fixes
* **AzureMonitor:** Fix issue where resource group name is missing on the resource picker button. [#36400](https://github.com/grafana/grafana/pull/36400), [@joshhunt](https://github.com/joshhunt)
* **Chore:** Fix AWS auth assuming role with workspace IAM. [#36430](https://github.com/grafana/grafana/pull/36430), [@wbrowne](https://github.com/wbrowne)
* **DashboardQueryRunner:** Fixes unrestrained subscriptions being created. [#36371](https://github.com/grafana/grafana/pull/36371), [@hugohaggmark](https://github.com/hugohaggmark)
* **DateFormats:** Fix reading correct setting key for use_browser_locale. [#36428](https://github.com/grafana/grafana/pull/36428), [@torkelo](https://github.com/torkelo)
* **Links:** Fix links to other apps outside Grafana when under sub path. [#36498](https://github.com/grafana/grafana/pull/36498), [@torkelo](https://github.com/torkelo)
* **Snapshots:** Fix snapshot absolute time range issue. [#36350](https://github.com/grafana/grafana/pull/36350), [@torkelo](https://github.com/torkelo)
* **Table:** Fix data link color. [#36446](https://github.com/grafana/grafana/pull/36446), [@tharun208](https://github.com/tharun208)
* **Time Series:** Fix X-axis time format when tick increment is larger than a year. [#36335](https://github.com/grafana/grafana/pull/36335), [@torkelo](https://github.com/torkelo)
* **Tooltip Plugin:** Prevent tooltip render if field is undefined. [#36260](https://github.com/grafana/grafana/pull/36260), [@ashharrison90](https://github.com/ashharrison90)
<!-- 8.0.5 END -->
<!-- 8.0.4 START -->
# 8.0.4 (2021-07-01)
### Features and enhancements
* **Live:** Rely on app url for origin check. [#35983](https://github.com/grafana/grafana/pull/35983), [@FZambia](https://github.com/FZambia)
* **PieChart:** Sort legend descending, update placeholder to show default …. [#36062](https://github.com/grafana/grafana/pull/36062), [@ashharrison90](https://github.com/ashharrison90)
* **TimeSeries panel:** Do not reinitialize plot when thresholds mode change. [#35952](https://github.com/grafana/grafana/pull/35952), [@dprokop](https://github.com/dprokop)
### Bug fixes
* **Elasticsearch:** Allow case sensitive custom options in date_histogram interval. [#36168](https://github.com/grafana/grafana/pull/36168), [@Elfo404](https://github.com/Elfo404)
* **Elasticsearch:** Restore previous field naming strategy when using variables. [#35624](https://github.com/grafana/grafana/pull/35624), [@Elfo404](https://github.com/Elfo404)
* **Explore:** Fix import of queries between SQL data sources. [#36210](https://github.com/grafana/grafana/pull/36210), [@ivanahuckova](https://github.com/ivanahuckova)
* **InfluxDB:** InfluxQL query editor: fix retention policy handling. [#36022](https://github.com/grafana/grafana/pull/36022), [@gabor](https://github.com/gabor)
* **Loki:** Send correct time range in template variable queries. [#36268](https://github.com/grafana/grafana/pull/36268), [@ivanahuckova](https://github.com/ivanahuckova)
* **TimeSeries:** Preserve RegExp series overrides when migrating from old graph panel. [#36134](https://github.com/grafana/grafana/pull/36134), [@ashharrison90](https://github.com/ashharrison90)
<!-- 8.0.4 END -->
<!-- 8.0.3 START -->
# 8.0.3 (2021-06-18)
### Features and enhancements
* **Alerting:** Increase alertmanager_conf column if MySQL. [#35657](https://github.com/grafana/grafana/pull/35657), [@kylebrandt](https://github.com/kylebrandt)
* **Time series/Bar chart panel:** Handle infinite numbers as nulls when converting to plot array. [#35638](https://github.com/grafana/grafana/pull/35638), [@dprokop](https://github.com/dprokop)
* **TimeSeries:** Ensure series overrides that contain color are migrated, and migrate the previous `fieldConfig` when changing the panel type. [#35676](https://github.com/grafana/grafana/pull/35676), [@ashharrison90](https://github.com/ashharrison90)
* **ValueMappings:** Improve singlestat value mappings migration. [#35578](https://github.com/grafana/grafana/pull/35578), [@dprokop](https://github.com/dprokop)
### Bug fixes
* **Annotations:** Fix annotation line and marker colors. [#35608](https://github.com/grafana/grafana/pull/35608), [@torkelo](https://github.com/torkelo)
* **AzureMonitor:** Fix KQL template variable queries without default workspace. [#35836](https://github.com/grafana/grafana/pull/35836), [@joshhunt](https://github.com/joshhunt)
* **CloudWatch/Logs:** Fix missing response data for log queries. [#35724](https://github.com/grafana/grafana/pull/35724), [@aocenas](https://github.com/aocenas)
* **Elasticsearch:** Restore previous field naming strategy when using variables. [#35624](https://github.com/grafana/grafana/pull/35624), [@Elfo404](https://github.com/Elfo404)
* **LibraryPanels:** Fix crash in library panels list when panel plugin is not found. [#35907](https://github.com/grafana/grafana/pull/35907), [@torkelo](https://github.com/torkelo)
* **LogsPanel:** Fix performance drop when moving logs panel in dashboard. [#35379](https://github.com/grafana/grafana/pull/35379), [@aocenas](https://github.com/aocenas)
* **Loki:** Parse log levels when ANSI coloring is enabled. [#35607](https://github.com/grafana/grafana/pull/35607), [@olbo98](https://github.com/olbo98)
* **MSSQL:** Fix issue with hidden queries still being executed. [#35787](https://github.com/grafana/grafana/pull/35787), [@torkelo](https://github.com/torkelo)
* **PanelEdit:** Display the VisualizationPicker that was not displayed if a panel has an unknown panel plugin. [#35831](https://github.com/grafana/grafana/pull/35831), [@jackw](https://github.com/jackw)
* **Plugins:** Fix loading symbolically linked plugins. [#35635](https://github.com/grafana/grafana/pull/35635), [@domasx2](https://github.com/domasx2)
* **Prometheus:** Fix issue where legend name was replaced with name Value in stat and gauge panels. [#35863](https://github.com/grafana/grafana/pull/35863), [@torkelo](https://github.com/torkelo)
* **State Timeline:** Fix crash when hovering over panel. [#35692](https://github.com/grafana/grafana/pull/35692), [@hugohaggmark](https://github.com/hugohaggmark)
<!-- 8.0.3 END -->
<!-- 8.0.2 START -->
# 8.0.2 (2021-06-14)
### Features and enhancements
* **Datasource:** Add support for max_conns_per_host in dataproxy settings. [#35520](https://github.com/grafana/grafana/pull/35520), [@jvrplmlmn](https://github.com/jvrplmlmn)
### Bug fixes
* **Configuration:** Fix changing org preferences in FireFox. [#35549](https://github.com/grafana/grafana/pull/35549), [@hugohaggmark](https://github.com/hugohaggmark)
* **PieChart:** Fix legend dimension limits. [#35563](https://github.com/grafana/grafana/pull/35563), [@torkelo](https://github.com/torkelo)
* **Postgres/MySQL/MSSQL:** Fix panic in concurrent map writes. [#35510](https://github.com/grafana/grafana/pull/35510), [@marefr](https://github.com/marefr)
* **Variables:** Hide default data source if missing from regex. [#35561](https://github.com/grafana/grafana/pull/35561), [@hugohaggmark](https://github.com/hugohaggmark)
<!-- 8.0.2 END -->
<!-- 8.0.1 START -->
# 8.0.1 (2021-06-10)
### Bug fixes
* **Alerting/SSE:** Fix "count_non_null" reducer validation. [#35451](https://github.com/grafana/grafana/pull/35451), [@kylebrandt](https://github.com/kylebrandt)
* **Cloudwatch:** Fix duplicated time series. [#35433](https://github.com/grafana/grafana/pull/35433), [@sunker](https://github.com/sunker)
* **Cloudwatch:** Fix missing defaultRegion. [#35436](https://github.com/grafana/grafana/pull/35436), [@andresmgot](https://github.com/andresmgot)
* **Dashboard:** Fix Dashboard init failed error on dashboards with old singlestat panels in collapsed rows. [#35425](https://github.com/grafana/grafana/pull/35425), [@torkelo](https://github.com/torkelo)
* **Datasource:** Fix storing timeout option as numeric. [#35441](https://github.com/grafana/grafana/pull/35441), [@marefr](https://github.com/marefr)
* **Postgres/MySQL/MSSQL:** Fix annotation parsing for empty responses. [#35367](https://github.com/grafana/grafana/pull/35367), [@marcbachmann](https://github.com/marcbachmann)
* **Postgres/MySQL/MSSQL:** Numeric/non-string values are now returned from query variables. [#35411](https://github.com/grafana/grafana/pull/35411), [@marefr](https://github.com/marefr)
* **Postgres:** Fix an error that was thrown when the annotation query did not return any results. [#35382](https://github.com/grafana/grafana/pull/35382), [@dprokop](https://github.com/dprokop)
* **StatPanel:** Fix an issue with the appearance of the graph when switching color mode. [#35460](https://github.com/grafana/grafana/pull/35460), [@torkelo](https://github.com/torkelo)
* **Visualizations:** Fix an issue in the Stat/BarGauge/Gauge/PieChart panels where all values mode were showing the same name if they had the same value. [#35368](https://github.com/grafana/grafana/pull/35368), [@torkelo](https://github.com/torkelo)
### Plugin development fixes & changes
* **Toolkit:** Resolve external fonts when Grafana is served from a sub path. [#35352](https://github.com/grafana/grafana/pull/35352), [@jackw](https://github.com/jackw)
<!-- 8.0.1 END -->
<!-- 8.0.0 START -->
# 8.0.0 (2021-06-08)
### Features and enhancements
* **AzureMonitor:** Require default subscription for workspaces() template variable query. [#35181](https://github.com/grafana/grafana/pull/35181), [@joshhunt](https://github.com/joshhunt)
* **AzureMonitor:** Use resource type display names in the UI. [#35060](https://github.com/grafana/grafana/pull/35060), [@joshhunt](https://github.com/joshhunt)
* **Dashboard:** Remove support for loading and deleting dashboard by slug. [#35104](https://github.com/grafana/grafana/pull/35104), [@dsotirakis](https://github.com/dsotirakis)
* **InfluxDB:** Deprecate direct browser access in data source. [#35105](https://github.com/grafana/grafana/pull/35105), [@gabor](https://github.com/gabor)
* **VizLegend:** Add a read-only property. [#35096](https://github.com/grafana/grafana/pull/35096), [@dprokop](https://github.com/dprokop)
### Bug fixes
* **AzureMonitor:** Fix Azure Resource Graph queries in Azure China. [#35235](https://github.com/grafana/grafana/pull/35235), [@kostrse](https://github.com/kostrse)
* **Checkbox:** Fix vertical layout issue with checkboxes due to fixed height. [#35022](https://github.com/grafana/grafana/pull/35022), [@torkelo](https://github.com/torkelo)
* **Dashboard:** Fix Table view when editing causes the panel data to not update. [#34998](https://github.com/grafana/grafana/pull/34998), [@axelavargas](https://github.com/axelavargas)
* **Dashboard:** Fix issues where unsaved-changes warning is not displayed. [#34989](https://github.com/grafana/grafana/pull/34989), [@torkelo](https://github.com/torkelo)
* **Login:** Fixes Unauthorized message showing when on login page or snapshot page. [#35311](https://github.com/grafana/grafana/pull/35311), [@torkelo](https://github.com/torkelo)
* **NodeGraph:** Fix sorting markers in grid view. [#35200](https://github.com/grafana/grafana/pull/35200), [@aocenas](https://github.com/aocenas)
* **Short URL:** Include orgId in generated short URLs. [#34696](https://github.com/grafana/grafana/pull/34696), [@farodin91](https://github.com/farodin91)
* **Variables:** Support raw values of boolean type. [#34727](https://github.com/grafana/grafana/pull/34727), [@simPod](https://github.com/simPod)
### Breaking changes
The following endpoints were deprecated for Grafana v5.0 and support for them has now been removed:
* GET `/dashboards/db/:slug`
* GET `/dashboard-solo/db/:slug`
* GET `/api/dashboard/db/:slug`
* DELETE `/api/dashboards/db/:slug` Issue [#35104](https://github.com/grafana/grafana/issues/35104)
<!-- 8.0.0 END -->
<!-- 8.0.0-beta3 START -->
# 8.0.0-beta3 (2021-06-01)
### Features and enhancements
* **API:** Support folder UID in dashboards API. [#33991](https://github.com/grafana/grafana/pull/33991), [@zserge](https://github.com/zserge)
* **Alerting:** Add support for configuring avatar URL for the Discord notifier. [#33355](https://github.com/grafana/grafana/pull/33355), [@ChipWolf](https://github.com/ChipWolf)
* **Alerting:** Clarify that Threema Gateway Alerts support only Basic IDs. [#34828](https://github.com/grafana/grafana/pull/34828), [@dbrgn](https://github.com/dbrgn)
* **Azure:** Expose Azure settings to external plugins. [#34484](https://github.com/grafana/grafana/pull/34484), [@sunker](https://github.com/sunker)
* **AzureMonitor:** Deprecate using separate credentials for Azure Monitor Logs. [#34758](https://github.com/grafana/grafana/pull/34758), [@andresmgot](https://github.com/andresmgot)
* **AzureMonitor:** Display variables in resource picker for Azure Monitor Logs. [#34648](https://github.com/grafana/grafana/pull/34648), [@joshhunt](https://github.com/joshhunt)
* **AzureMonitor:** Hide application insights for data sources not using it. [#34725](https://github.com/grafana/grafana/pull/34725), [@joshhunt](https://github.com/joshhunt)
* **AzureMonitor:** Support querying subscriptions and resource groups in Azure Monitor Logs. [#34766](https://github.com/grafana/grafana/pull/34766), [@joshhunt](https://github.com/joshhunt)
* **AzureMonitor:** remove requirement for default subscription. [#34787](https://github.com/grafana/grafana/pull/34787), [@kostrse](https://github.com/kostrse)
* **CloudWatch:** Add Lambda@Edge Amazon CloudFront metrics. [#34561](https://github.com/grafana/grafana/pull/34561), [@razor-x](https://github.com/razor-x)
* **CloudWatch:** Add missing AWS and AppSync metrics. [#34691](https://github.com/grafana/grafana/pull/34691), [@razor-x](https://github.com/razor-x)
* **ConfirmModal:** Auto focus delete button. [#34917](https://github.com/grafana/grafana/pull/34917), [@torkelo](https://github.com/torkelo)
* **Explore:** Add caching for queries that are run from logs navigation. [#34297](https://github.com/grafana/grafana/pull/34297), [@ivanahuckova](https://github.com/ivanahuckova)
* **Loki:** Add formatting for annotations. [#34774](https://github.com/grafana/grafana/pull/34774), [@fredr](https://github.com/fredr)
* **Loki:** Bring back processed bytes as meta information. [#34092](https://github.com/grafana/grafana/pull/34092), [@mmenbawy](https://github.com/mmenbawy)
* **NodeGraph:** Display node graph collapsed by default with trace view. [#34491](https://github.com/grafana/grafana/pull/34491), [@aocenas](https://github.com/aocenas)
* **Overrides:** Include a manual override option to hide something from visualization. [#34783](https://github.com/grafana/grafana/pull/34783), [@torkelo](https://github.com/torkelo)
* **PieChart:** Support row data in pie charts. [#34755](https://github.com/grafana/grafana/pull/34755), [@torkelo](https://github.com/torkelo)
* **Prometheus:** Update default HTTP method to POST for existing data sources. [#34599](https://github.com/grafana/grafana/pull/34599), [@ivanahuckova](https://github.com/ivanahuckova)
* **Time series panel:** Position tooltip correctly when window is scrolled or resized. [#34782](https://github.com/grafana/grafana/pull/34782), [@dprokop](https://github.com/dprokop)
### Bug fixes
* **Admin:** Fix infinite loading edit on the profile page. [#34627](https://github.com/grafana/grafana/pull/34627), [@hugohaggmark](https://github.com/hugohaggmark)
* **Color:** Fix issues with random colors in string and date fields. [#34913](https://github.com/grafana/grafana/pull/34913), [@torkelo](https://github.com/torkelo)
* **Dashboard:** Fix issue with title or folder change has no effect after exiting settings view. [#34677](https://github.com/grafana/grafana/pull/34677), [@torkelo](https://github.com/torkelo)
* **DataLinks:** Fix an issue __series.name is not working in data link. [#34932](https://github.com/grafana/grafana/pull/34932), [@torkelo](https://github.com/torkelo)
* **Datasource:** Fix dataproxy timeout should always be applied for outgoing data source HTTP requests. [#34597](https://github.com/grafana/grafana/pull/34597), [@dsotirakis](https://github.com/dsotirakis)
* **Elasticsearch:** Fix NewClient not passing httpClientProvider to client impl. [#34539](https://github.com/grafana/grafana/pull/34539), [@KiVirgil](https://github.com/KiVirgil)
* **Explore:** Fix Browser title not updated on Navigation to Explore. [#34651](https://github.com/grafana/grafana/pull/34651), [@axelavargas](https://github.com/axelavargas)
* **GraphNG:** Remove fieldName and hideInLegend properties from UPlotSeriesBuilder. [#34901](https://github.com/grafana/grafana/pull/34901), [@dprokop](https://github.com/dprokop)
* **OAuth:** Fix fallback to auto_assign_org_role setting for Azure AD OAuth when no role claims exists. [#34838](https://github.com/grafana/grafana/pull/34838), [@idafurjes](https://github.com/idafurjes)
* **PanelChrome:** Fix issue with empty panel after adding a non data panel and coming back from panel edit. [#34765](https://github.com/grafana/grafana/pull/34765), [@torkelo](https://github.com/torkelo)
* **StatPanel:** Fix data link tooltip not showing for single value. [#34934](https://github.com/grafana/grafana/pull/34934), [@torkelo](https://github.com/torkelo)
* **Table:** Fix sorting for number fields. [#34722](https://github.com/grafana/grafana/pull/34722), [@hugohaggmark](https://github.com/hugohaggmark)
* **Table:** Have text underline for datalink, and add support for image datalink. [#34635](https://github.com/grafana/grafana/pull/34635), [@thisisobate](https://github.com/thisisobate)
* **Time series panel:** Position tooltip correctly when window is scrolled or resized. [#34584](https://github.com/grafana/grafana/pull/34584), [@dprokop](https://github.com/dprokop)
* **Transformations:** Prevent FilterByValue transform from crashing panel edit. [#34747](https://github.com/grafana/grafana/pull/34747), [@jackw](https://github.com/jackw)
### Breaking changes
The default HTTP method for Prometheus data source is now POST. Previously, it was GET. The POST APIs have been available since January 2018 (Prometheus 2.1.0) and they have fewer limitations than the GET APIs. For example, when dealing with high cardinality labels, GET hits the URL size limit.
If you have a Prometheus instance with version < 2.1.0, which uses the default HTTP method, update your HTTP method to GET. Issue [#34599](https://github.com/grafana/grafana/issues/34599)
<!-- 8.0.0-beta3 END -->
<!-- 8.0.0-beta2 START -->
# 8.0.0-beta2 (2021-05-20)
### Features and enhancements
* **AppPlugins:** Expose react-router to apps. [#33775](https://github.com/grafana/grafana/pull/33775), [@dprokop](https://github.com/dprokop)
* **AzureMonitor:** Add Azure Resource Graph. [#33293](https://github.com/grafana/grafana/pull/33293), [@shuotli](https://github.com/shuotli)
* **AzureMonitor:** Managed Identity configuration UI. [#34170](https://github.com/grafana/grafana/pull/34170), [@kostrse](https://github.com/kostrse)
* **AzureMonitor:** Token provider with support for Managed Identities. [#33807](https://github.com/grafana/grafana/pull/33807), [@kostrse](https://github.com/kostrse)
* **AzureMonitor:** Update Logs workspace() template variable query to return resource URIs. [#34445](https://github.com/grafana/grafana/pull/34445), [@joshhunt](https://github.com/joshhunt)
* **BarChart:** Value label sizing. [#34229](https://github.com/grafana/grafana/pull/34229), [@dprokop](https://github.com/dprokop)
* **CloudMonitoring:** Add support for preprocessing. [#33011](https://github.com/grafana/grafana/pull/33011), [@sunker](https://github.com/sunker)
* **CloudWatch:** Add AWS/EFS StorageBytes metric. [#33426](https://github.com/grafana/grafana/pull/33426), [@freshleafmedia](https://github.com/freshleafmedia)
* **CloudWatch:** Allow use of missing AWS namespaces using custom metrics. [#30961](https://github.com/grafana/grafana/pull/30961), [@mmcoltman](https://github.com/mmcoltman)
* **Datasource:** Shared HTTP client provider for core backend data sources and any data source using the data source proxy. [#33439](https://github.com/grafana/grafana/pull/33439), [@marefr](https://github.com/marefr)
* **InfluxDB:** InfluxQL: allow empty tag values in the query editor. [#34311](https://github.com/grafana/grafana/pull/34311), [@gabor](https://github.com/gabor)
* **Instrumentation:** Instrument incoming HTTP request with histograms by default. [#33921](https://github.com/grafana/grafana/pull/33921), [@bergquist](https://github.com/bergquist)
* **Library Panels:** Add name endpoint & unique name validation to AddLibraryPanelModal. [#33987](https://github.com/grafana/grafana/pull/33987), [@kaydelaney](https://github.com/kaydelaney)
* **Logs panel:** Support details view. [#34125](https://github.com/grafana/grafana/pull/34125), [@ivanahuckova](https://github.com/ivanahuckova)
* **PieChart:** Always show the calculation options dropdown in the editor. [#34267](https://github.com/grafana/grafana/pull/34267), [@oscarkilhed](https://github.com/oscarkilhed)
* **PieChart:** Remove beta flag. [#34098](https://github.com/grafana/grafana/pull/34098), [@oscarkilhed](https://github.com/oscarkilhed)
* **Plugins:** Enforce signing for all plugins. [#34364](https://github.com/grafana/grafana/pull/34364), [@wbrowne](https://github.com/wbrowne)
* **Plugins:** Remove support for deprecated backend plugin protocol version. [#34127](https://github.com/grafana/grafana/pull/34127), [@idafurjes](https://github.com/idafurjes)
* **Tempo/Jaeger:** Add better display name to legend. [#34063](https://github.com/grafana/grafana/pull/34063), [@aocenas](https://github.com/aocenas)
* **Timeline:** Add time range zoom. [#34079](https://github.com/grafana/grafana/pull/34079), [@torkelo](https://github.com/torkelo)
* **Timeline:** Adds opacity & line width option. [#34118](https://github.com/grafana/grafana/pull/34118), [@torkelo](https://github.com/torkelo)
* **Timeline:** Value text alignment option. [#34087](https://github.com/grafana/grafana/pull/34087), [@torkelo](https://github.com/torkelo)
* **ValueMappings:** Add duplicate action, and disable dismiss on backdrop click. [#34100](https://github.com/grafana/grafana/pull/34100), [@torkelo](https://github.com/torkelo)
* **Zipkin:** Add node graph view to trace response. [#34414](https://github.com/grafana/grafana/pull/34414), [@aocenas](https://github.com/aocenas)
### Bug fixes
* **Annotations panel:** Remove subpath from dashboard links. [#34134](https://github.com/grafana/grafana/pull/34134), [@jackw](https://github.com/jackw)
* **Content Security Policy:** Allow all image sources by default. [#34265](https://github.com/grafana/grafana/pull/34265), [@aknuds1](https://github.com/aknuds1)
* **Content Security Policy:** Relax default template wrt. loading of scripts, due to nonces not working. [#34363](https://github.com/grafana/grafana/pull/34363), [@aknuds1](https://github.com/aknuds1)
* **Datasource:** Fix tracing propagation for alert execution by introducing HTTP client outgoing tracing middleware. [#34466](https://github.com/grafana/grafana/pull/34466), [@marefr](https://github.com/marefr)
* **InfluxDB:** InfluxQL always apply time interval end. [#34308](https://github.com/grafana/grafana/pull/34308), [@gabor](https://github.com/gabor)
* **Library Panels:** Fixes "error while loading library panels". [#34278](https://github.com/grafana/grafana/pull/34278), [@hugohaggmark](https://github.com/hugohaggmark)
* **NewsPanel:** Fixes rendering issue in Safari. [#34067](https://github.com/grafana/grafana/pull/34067), [@kaydelaney](https://github.com/kaydelaney)
* **PanelChrome:** Fix queries being issued again when scrolling in and out of view. [#34061](https://github.com/grafana/grafana/pull/34061), [@torkelo](https://github.com/torkelo)
* **Plugins:** Fix Azure token provider cache panic and auth param nil value. [#34252](https://github.com/grafana/grafana/pull/34252), [@kostrse](https://github.com/kostrse)
* **Snapshots:** Fix key and deleteKey being ignored when creating an external snapshot. [#33686](https://github.com/grafana/grafana/pull/33686), [@wengelbrecht-grafana](https://github.com/wengelbrecht-grafana)
* **Table:** Fix issue with cell border not showing with colored background cells. [#34231](https://github.com/grafana/grafana/pull/34231), [@torkelo](https://github.com/torkelo)
* **Table:** Makes tooltip scrollable for long JSON values. [#34120](https://github.com/grafana/grafana/pull/34120), [@hugohaggmark](https://github.com/hugohaggmark)
* **TimeSeries:** Fix for Connected null values threshold toggle during panel editing. [#34452](https://github.com/grafana/grafana/pull/34452), [@leeoniya](https://github.com/leeoniya)
* **Variables:** Fixes inconsistent `selected` states on dashboard load. [#34197](https://github.com/grafana/grafana/pull/34197), [@hugohaggmark](https://github.com/hugohaggmark)
* **Variables:** Refreshes all panels even if panel is full screen. [#34097](https://github.com/grafana/grafana/pull/34097), [@hugohaggmark](https://github.com/hugohaggmark)
### Breaking changes
The `workspaces()` template variable, mainly for use with Azure Monitor Logs, has been changed to return resource URIs instead of Log Analytics Workspaces GUIDs. This should not impact Azure Monitor Logs queries, but if the variables are being used in other data sources which expect a Workspace GUID may no longer be compatible.
Custom template variables used in the workspace or resource field in Azure Monitor Logs queries should resolve to an Azure Resource URI in the format `/subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}`
Issue [#34445](https://github.com/grafana/grafana/issues/34445)
Removes support for deprecated backend plugin protocol (v1) including usage of github.com/grafana/grafana-plugin-model.
Issue [#34127](https://github.com/grafana/grafana/issues/34127)
### Plugin development fixes & changes
* **QueryField:** Remove carriage return character from pasted text. [#34076](https://github.com/grafana/grafana/pull/34076), [@ivanahuckova](https://github.com/ivanahuckova)
<!-- 8.0.0-beta2 END -->
<!-- 8.0.0-beta1 START -->
# 8.0.0-beta1 (2021-05-13)
@@ -131,6 +400,29 @@ The InfoBox & FeatureInfoBox are now deprecated please use the Alert component i
<!-- 8.0.0-beta1 END -->
<!-- 7.5.9 START -->
# 7.5.9 (2021-06-23)
### Bug fixes
* **Login:** Fix Unauthorized message that is displayed on sign-in or snapshot page. [#35880](https://github.com/grafana/grafana/pull/35880), [@torkelo](https://github.com/torkelo)
<!-- 7.5.9 END -->
<!-- 7.5.8 START -->
# 7.5.8 (2021-06-16)
### Features and enhancements
* **Datasource:** Add support for max_conns_per_host in dataproxy settings. [#35519](https://github.com/grafana/grafana/pull/35519), [@jvrplmlmn](https://github.com/jvrplmlmn)
* **Datasource:** Add support for max_idle_connections_per_host in dataproxy settings. [#35365](https://github.com/grafana/grafana/pull/35365), [@dsotirakis](https://github.com/dsotirakis)
* **Instrumentation:** Add metrics for outbound HTTP connections. [#35321](https://github.com/grafana/grafana/pull/35321), [@dsotirakis](https://github.com/dsotirakis)
* **Snapshots:** Remove dashboard links from dashboard snapshots. [#35567](https://github.com/grafana/grafana/pull/35567), [@torkelo](https://github.com/torkelo)
<!-- 7.5.8 END -->
<!-- 7.5.7 START -->
# 7.5.7 (2021-05-19)

View File

@@ -139,10 +139,13 @@ connstr =
# This enables data proxy logging, default is false
logging = false
# How long the data proxy waits before timing out, default is 30 seconds.
# How long the data proxy waits to read the headers of the response before timing out, default is 30 seconds.
# This setting also applies to core backend HTTP data sources where query requests use an HTTP client with timeout set.
timeout = 30
# How long the data proxy waits to establish a TCP connection before timing out, default is 10 seconds.
dialTimeout = 10
# How many seconds the data proxy waits before sending a keepalive request.
keep_alive_seconds = 30
@@ -155,6 +158,11 @@ tls_handshake_timeout_seconds = 10
# waiting for the server to approve.
expect_continue_timeout_seconds = 1
# Optionally limits the total number of connections per host, including connections in the dialing,
# active, and idle states. On limit violation, dials will block.
# A value of zero (0) means no limit.
max_conns_per_host = 0
# The maximum number of idle connections that Grafana will keep alive.
max_idle_connections = 100
@@ -252,7 +260,8 @@ content_security_policy = false
# Set Content Security Policy template used when adding the Content-Security-Policy header to your requests.
# $NONCE in the template includes a random nonce.
content_security_policy_template = """script-src 'self' 'unsafe-eval' 'unsafe-inline';object-src 'none';font-src 'self';style-src 'self' 'unsafe-inline';img-src * data:;base-uri 'self';connect-src 'self' grafana.com;manifest-src 'self';media-src 'none';form-action 'self';"""
# $ROOT_PATH is server.root_url without the protocol.
content_security_policy_template = """script-src 'self' 'unsafe-eval' 'unsafe-inline' 'strict-dynamic' $NONCE;object-src 'none';font-src 'self';style-src 'self' 'unsafe-inline' blob:;img-src * data:;base-uri 'self';connect-src 'self' grafana.com ws://$ROOT_PATH wss://$ROOT_PATH;manifest-src 'self';media-src 'none';form-action 'self';"""
#################################### Snapshots ###########################
[snapshots]
@@ -878,12 +887,24 @@ disable_sanitize_html = false
[plugins]
enable_alpha = false
app_tls_skip_verify_insecure = false
# Enter a comma-separated list of plugin identifiers to identify plugins that are allowed to be loaded even if they lack a valid signature.
# Enter a comma-separated list of plugin identifiers to identify plugins to load even if they are unsigned. Plugins with modified signatures are never loaded.
allow_loading_unsigned_plugins =
# Enable or disable installing plugins directly from within Grafana.
plugin_admin_enabled = false
plugin_admin_external_manage_enabled = false
plugin_catalog_url = https://grafana.com/grafana/plugins/
#################################### Grafana Live ##########################################
[live]
# max_connections to Grafana Live WebSocket endpoint per Grafana server instance. See Grafana Live docs
# if you are planning to make it higher than default 100 since this can require some OS and infrastructure
# tuning. 0 disables Live, -1 means unlimited connections.
max_connections = 100
# allowed_origins is a comma-separated list of origins that can establish connection with Grafana Live.
# If not set then origin will be matched over root_url. Supports wildcard symbol "*".
allowed_origins =
#################################### Grafana Image Renderer Plugin ##########################
[plugin.grafana-image-renderer]
# Instruct headless browser instance to use a default timezone when not provided by Grafana, e.g. when rendering panel image of alert.

View File

@@ -3,37 +3,42 @@
# # list of default built-in role assignments that should be removed
# removeDefaultAssignments:
# # <string, required>, must be one of the Organization roles (`Viewer`, `Editor`, `Admin`) or `Grafana Admin`
# # <string>, must be one of the Organization roles (`Viewer`, `Editor`, `Admin`) or `Grafana Admin`
# - builtInRole: "Grafana Admin"
# # <string, required>, must be one of the existing predefined roles
# predefinedRole: "grafana:roles:permissions:admin"
# # <string>, must be one of the existing fixed roles
# fixedRole: "fixed:permissions:admin"
# # list of default built-in role assignments that should be added back
# addDefaultAssignments:
# # <string, required>, must be one of the Organization roles (`Viewer`, `Editor`, `Admin`) or `Grafana Admin`
# # <string>, must be one of the Organization roles (`Viewer`, `Editor`, `Admin`) or `Grafana Admin`
# - builtInRole: "Admin"
# # <string, required>, must be one of the existing predefined roles
# predefinedRole: "grafana:roles:reporting:admin:read"
# # <string>, must be one of the existing fixed roles
# fixedRole: "fixed:reporting:admin:read"
# # list of roles that should be deleted
# deleteRoles:
# # <string> name of the role you want to create. Required if no uid is set
# - name: "custom:roles:reporting:admin:edit"
# - name: "custom:reports:editor"
# # <string> uid of the role. Required if no name
# uid: customrolesreportingadminedit
# uid: "customreportseditor1"
# # <int> org id. will default to Grafana's default if not specified
# orgId: 1
# # <bool> force deletion revoking all grants of the role
# force: true
# - name: "custom:global:reports:reader"
# uid: "customglobalreportsreader1"
# # <bool> overwrite org id and removes a global role
# global: true
# force: true
# # list of roles to insert/update depending on what is available in the database
# roles:
# # <string, required> name of the role you want to create. Required
# - name: custom:roles:users:editor
# - name: "custom:users:editor"
# # <string> uid of the role. Has to be unique for all orgs.
# uid: customrolesuserseditor
# uid: customuserseditor1
# # <string> description of the role, informative purpose only.
# description: "Role to allow users to create/read/write users"
# description: "Role for our custom user editors"
# # <int> version of the role, Grafana will update the role when increased
# version: 2
# # <int> org id. will default to Grafana's default if not specified
@@ -51,6 +56,21 @@
# # <list> list of builtIn roles the role should be assigned to
# builtInRoles:
# # <string, required> name of the builtin role you want to assign the role to
# - name: "Admin"
# - name: "Editor"
# # <int> org id. will default to the role org id
# orgId: 1
# orgId: 1
# - name: "custom:global:users:reader"
# uid: "customglobalusersreader1"
# description: "Global Role for custom user readers"
# version: 1
# # <bool> overwrite org id and creates a global role
# global: true
# permissions:
# - action: "users:read"
# scope: "users:*"
# builtInRoles:
# - name: "Viewer"
# orgId: 1
# - name: "Editor"
# # <bool> overwrite org id and assign role globally
# global: true

View File

@@ -145,10 +145,13 @@
# This enables data proxy logging, default is false
;logging = false
# How long the data proxy waits before timing out, default is 30 seconds.
# How long the data proxy waits to read the headers of the response before timing out, default is 30 seconds.
# This setting also applies to core backend HTTP data sources where query requests use an HTTP client with timeout set.
;timeout = 30
# How long the data proxy waits to establish a TCP connection before timing out, default is 10 seconds.
;dialTimeout = 10
# How many seconds the data proxy waits before sending a keepalive probe request.
;keep_alive_seconds = 30
@@ -161,6 +164,11 @@
# waiting for the server to approve.
;expect_continue_timeout_seconds = 1
# Optionally limits the total number of connections per host, including connections in the dialing,
# active, and idle states. On limit violation, dials will block.
# A value of zero (0) means no limit.
;max_conns_per_host = 0
# The maximum number of idle connections that Grafana will keep alive.
;max_idle_connections = 100
@@ -258,7 +266,8 @@
# Set Content Security Policy template used when adding the Content-Security-Policy header to your requests.
# $NONCE in the template includes a random nonce.
;content_security_policy_template = """script-src 'self' 'unsafe-eval' 'unsafe-inline';object-src 'none';font-src 'self';style-src 'self' 'unsafe-inline';img-src * data:;base-uri 'self';connect-src 'self' grafana.com;manifest-src 'self';media-src 'none';form-action 'self';"""
# $ROOT_PATH is server.root_url without the protocol.
;content_security_policy_template = """script-src 'self' 'unsafe-eval' 'unsafe-inline' 'strict-dynamic' $NONCE;object-src 'none';font-src 'self';style-src 'self' 'unsafe-inline' blob:;img-src * data:;base-uri 'self';connect-src 'self' grafana.com ws://$ROOT_PATH wss://$ROOT_PATH;manifest-src 'self';media-src 'none';form-action 'self';"""
#################################### Snapshots ###########################
[snapshots]
@@ -864,12 +873,24 @@
[plugins]
;enable_alpha = false
;app_tls_skip_verify_insecure = false
# Enter a comma-separated list of plugin identifiers to identify plugins that are allowed to be loaded even if they lack a valid signature.
# Enter a comma-separated list of plugin identifiers to identify plugins to load even if they are unsigned. Plugins with modified signatures are never loaded.
;allow_loading_unsigned_plugins =
# Enable or disable installing plugins directly from within Grafana.
;plugin_admin_enabled = false
;plugin_admin_external_manage_enabled = false
;plugin_catalog_url = https://grafana.com/grafana/plugins/
#################################### Grafana Live ##########################################
[live]
# max_connections to Grafana Live WebSocket endpoint per Grafana server instance. See Grafana Live docs
# if you are planning to make it higher than default 100 since this can require some OS and infrastructure
# tuning. 0 disables Live, -1 means unlimited connections.
;max_connections = 100
# allowed_origins is a comma-separated list of origins that can establish connection with Grafana Live.
# If not set then origin will be matched over root_url. Supports wildcard symbol "*".
;allowed_origins =
#################################### Grafana Image Renderer Plugin ##########################
[plugin.grafana-image-renderer]
# Instruct headless browser instance to use a default timezone when not provided by Grafana, e.g. when rendering panel image of alert.

View File

@@ -133,10 +133,6 @@ Family: scuemata.#Family & {
// The values depend on panel type
options: {...}
libraryPanel?: {
name: string,
uid: string
}
fieldConfig: {
defaults: {
...

View File

@@ -45,7 +45,7 @@ make devenv sources=postgres,openldap,grafana postgres_version=9.2 grafana_versi
The grafana block is pre-configured with the dev-datasources and dashboards.
#### Jaeger
Jaeger block runs both Jaeger and Loki container. Loki container sends traces to Jaeger and also logs its own logs into itself so it is possible to setup derived field for traceID from Loki to Jaeger. You need to install a docker plugin for the self logging to work, without it the container won't start. See https://github.com/grafana/loki/tree/master/cmd/docker-driver#plugin-installation for installation instructions.
Jaeger block runs both Jaeger and Loki container. Loki container sends traces to Jaeger and also logs its own logs into itself so it is possible to setup derived field for traceID from Loki to Jaeger. You need to install a docker plugin for the self logging to work, without it the container won't start. See https://grafana.com/docs/loki/latest/clients/docker-driver/#installing for installation instructions.
#### Graphite

File diff suppressed because it is too large Load Diff

View File

@@ -15,7 +15,6 @@
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": 441,
"links": [],
"panels": [
{
@@ -56,19 +55,21 @@
"overrides": []
},
"gridPos": {
"h": 13,
"w": 24,
"h": 10,
"w": 12,
"x": 0,
"y": 0
},
"id": 9,
"options": {
"barWidth": 1,
"groupWidth": 1,
"groupWidth": 0.82,
"legend": {
"calcs": [],
"calcs": [
"max"
],
"displayMode": "list",
"placement": "bottom"
"placement": "right"
},
"orientation": "auto",
"showValue": "auto",
@@ -79,11 +80,85 @@
},
"targets": [
{
"csvContent": "Name,Stat1,Stat2\nStockholm, 10, 15\nNew York, 19, 5\nLondon, 10, 1\nNegative, 15, -5\nLong value, 15,10",
"refId": "A",
"scenarioId": "categorical_data"
"scenarioId": "csv_content"
}
],
"title": "Plenty od data, automatic value sizing",
"title": "Auto sizing & auto show values",
"type": "barchart"
},
{
"datasource": null,
"description": "Should be smaller given the longer value",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"axisSoftMin": 0,
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false
},
"lineWidth": 0
},
"decimals": 2,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 10,
"w": 12,
"x": 12,
"y": 0
},
"id": 15,
"options": {
"barWidth": 1,
"groupWidth": 0.82,
"legend": {
"calcs": [
"max"
],
"displayMode": "list",
"placement": "right"
},
"orientation": "auto",
"showValue": "auto",
"text": {},
"tooltip": {
"mode": "single"
}
},
"targets": [
{
"csvContent": "Name,Stat1,Stat2\nStockholm, 10, 15\nNew York, 19, 5\nLondon, 10, 1\nNegative, 15, -5\nLong value, 15,10",
"refId": "A",
"scenarioId": "csv_content"
}
],
"title": "Auto sizing & auto show values",
"type": "barchart"
},
{
@@ -124,10 +199,152 @@
"overrides": []
},
"gridPos": {
"h": 12,
"w": 24,
"h": 11,
"w": 8,
"x": 0,
"y": 13
"y": 10
},
"id": 16,
"options": {
"barWidth": 1,
"groupWidth": 0.89,
"legend": {
"calcs": [
"max"
],
"displayMode": "list",
"placement": "right"
},
"orientation": "auto",
"showValue": "auto",
"text": {},
"tooltip": {
"mode": "single"
}
},
"targets": [
{
"csvContent": "Name,Stat1,Stat2,Stat3,Stat4,Stat5,Stat6,Stat7,Stat8,Stat9,Stat10\nA, 10, 15,8,3,4,12,14,1,5,10\nB, 19, 5,8,3,4,12,14,6,7,2\nC, 15, 5,8,3,4,10,4,6,7,2\n",
"refId": "A",
"scenarioId": "csv_content"
}
],
"title": "auto show values & No room for value",
"type": "barchart"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"axisSoftMin": 0,
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false
},
"lineWidth": 0
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 11,
"w": 8,
"x": 8,
"y": 10
},
"id": 17,
"options": {
"barWidth": 1,
"groupWidth": 0.89,
"legend": {
"calcs": [
"max"
],
"displayMode": "list",
"placement": "right"
},
"orientation": "auto",
"showValue": "always",
"text": {},
"tooltip": {
"mode": "single"
}
},
"targets": [
{
"csvContent": "Name,Stat1,Stat2,Stat3,Stat4,Stat5,Stat6,Stat7,Stat8,Stat9,Stat10\nA, 10, 15,8,3,4,12,14,1,5,10\nB, 19, 5,8,3,4,12,14,6,7,2\nC, 15, 5,8,3,4,10,4,6,7,2\n",
"refId": "A",
"scenarioId": "csv_content"
}
],
"title": "auto show values & Always show value",
"type": "barchart"
},
{
"datasource": "-- Dashboard --",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"axisSoftMin": 0,
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false
},
"lineWidth": 0
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 11,
"w": 8,
"x": 16,
"y": 10
},
"id": 10,
"options": {
@@ -142,7 +359,7 @@
"showValue": "auto",
"text": {
"size": 10,
"valueSize": 10
"valueSize": 25
},
"tooltip": {
"mode": "single"
@@ -150,11 +367,11 @@
},
"targets": [
{
"refId": "A",
"scenarioId": "categorical_data"
"panelId": 9,
"refId": "A"
}
],
"title": "Plenty od data, fixed value sizing",
"title": "Fixed value sizing",
"type": "barchart"
},
{
@@ -195,267 +412,42 @@
"overrides": []
},
"gridPos": {
"h": 12,
"h": 11,
"w": 12,
"x": 0,
"y": 25
"y": 21
},
"id": 11,
"id": 18,
"options": {
"barWidth": 1,
"groupWidth": 1,
"groupWidth": 0.82,
"legend": {
"calcs": [],
"calcs": [
"max"
],
"displayMode": "list",
"placement": "bottom"
},
"orientation": "auto",
"showValue": "auto",
"text": {
"size": 10
},
"tooltip": {
"mode": "single"
}
},
"targets": [
{
"refId": "A",
"scenarioId": "categorical_data"
}
],
"title": "Auto font size, value auto visible",
"transformations": [
{
"id": "filterByValue",
"options": {
"filters": [
{
"config": {
"id": "equal",
"options": {
"value": "Bedroom"
}
},
"fieldName": "location"
},
{
"config": {
"id": "equal",
"options": {
"value": "Cellar"
}
},
"fieldName": "location"
}
],
"match": "any",
"type": "include"
}
}
],
"type": "barchart"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"axisSoftMin": 0,
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false
},
"lineWidth": 0
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 12,
"w": 12,
"x": 12,
"y": 25
},
"id": 12,
"options": {
"barWidth": 1,
"groupWidth": 1,
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"orientation": "auto",
"showValue": "always",
"text": {
"size": 10
},
"tooltip": {
"mode": "single"
}
},
"targets": [
{
"refId": "A",
"scenarioId": "categorical_data"
}
],
"title": "Auto font size, value always visible",
"transformations": [
{
"id": "filterByValue",
"options": {
"filters": [
{
"config": {
"id": "equal",
"options": {
"value": "Bedroom"
}
},
"fieldName": "location"
},
{
"config": {
"id": "equal",
"options": {
"value": "Cellar"
}
},
"fieldName": "location"
}
],
"match": "any",
"type": "include"
}
}
],
"type": "barchart"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"axisSoftMin": 0,
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false
},
"lineWidth": 0
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 12,
"w": 12,
"x": 0,
"y": 37
},
"id": 13,
"options": {
"barWidth": 1,
"groupWidth": 1,
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
"placement": "right"
},
"orientation": "horizontal",
"showValue": "auto",
"text": {
"size": 10
},
"text": {},
"tooltip": {
"mode": "single"
}
},
"targets": [
{
"csvContent": "Name,Stat1,Stat2\nStockholm, 10, 15\nNew York, 19, 5\nLondon, 10, 1\nLong value, 15,10",
"refId": "A",
"scenarioId": "categorical_data"
}
],
"title": "Auto font size, value auto visible",
"transformations": [
{
"id": "filterByValue",
"options": {
"filters": [
{
"config": {
"id": "equal",
"options": {
"value": "Bedroom"
}
},
"fieldName": "location"
},
{
"config": {
"id": "equal",
"options": {
"value": "Cellar"
}
},
"fieldName": "location"
}
],
"match": "any",
"type": "include"
}
"scenarioId": "csv_content"
}
],
"title": "Auto sizing & auto show values",
"type": "barchart"
},
{
"datasource": null,
"description": "",
"fieldConfig": {
"defaults": {
"color": {
@@ -492,65 +484,37 @@
"overrides": []
},
"gridPos": {
"h": 12,
"h": 11,
"w": 12,
"x": 12,
"y": 37
"y": 21
},
"id": 14,
"id": 19,
"options": {
"barWidth": 1,
"groupWidth": 1,
"groupWidth": 0.89,
"legend": {
"calcs": [],
"calcs": [
"max"
],
"displayMode": "list",
"placement": "bottom"
"placement": "right"
},
"orientation": "horizontal",
"showValue": "always",
"text": {
"size": 10
},
"showValue": "auto",
"text": {},
"tooltip": {
"mode": "single"
}
},
"targets": [
{
"csvContent": "Name,Stat1,Stat2,Stat3,Stat4,Stat5,Stat6,Stat7,Stat8,Stat9,Stat10\nA, 10, 15,8,3,4,12,14,1,5,10\nB, 19, 5,8,3,4,12,14,6,7,2\nC, 15, 5,8,3,4,10,4,6,7,2\n",
"refId": "A",
"scenarioId": "categorical_data"
}
],
"title": "Auto font size, value always visible",
"transformations": [
{
"id": "filterByValue",
"options": {
"filters": [
{
"config": {
"id": "equal",
"options": {
"value": "Bedroom"
}
},
"fieldName": "location"
},
{
"config": {
"id": "equal",
"options": {
"value": "Cellar"
}
},
"fieldName": "location"
}
],
"match": "any",
"type": "include"
}
"scenarioId": "csv_content"
}
],
"title": "auto show values & little room",
"type": "barchart"
}
],
@@ -571,7 +535,7 @@
},
"timepicker": {},
"timezone": "",
"title": "BarChart - value text sizing",
"title": "BarChart - Panel Tests - Value sizing",
"uid": "WFlOM-jM1",
"version": 9
}
"version": 3
}

View File

@@ -17,11 +17,14 @@
"graphTooltip": 0,
"links": [
{
"icon": "external link",
"tags": ["gdev", "graph-ng"],
"type": "dashboards",
"asDropdown": true,
"title": "Graph Tests"
"icon": "external link",
"tags": [
"gdev",
"graph-ng"
],
"title": "Graph Tests",
"type": "dashboards"
}
],
"panels": [
@@ -35,13 +38,15 @@
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillGradient": "none",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 2,
@@ -50,10 +55,16 @@
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"nullValueMode": "null",
"thresholds": {
"mode": "absolute",
"steps": [
@@ -82,6 +93,7 @@
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
@@ -136,13 +148,15 @@
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillGradient": "none",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 2,
@@ -151,11 +165,17 @@
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"max": 120,
"nullValueMode": "null",
"thresholds": {
"mode": "absolute",
"steps": [
@@ -184,6 +204,7 @@
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
@@ -246,13 +267,15 @@
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillGradient": "none",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 2,
@@ -261,11 +284,17 @@
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"max": 120,
"nullValueMode": "null",
"thresholds": {
"mode": "absolute",
"steps": [
@@ -294,6 +323,7 @@
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
@@ -375,13 +405,15 @@
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillGradient": "none",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 2,
@@ -390,10 +422,16 @@
"type": "linear"
},
"showPoints": "auto",
"spanNulls": true
"spanNulls": true,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"nullValueMode": "null",
"thresholds": {
"mode": "absolute",
"steps": [
@@ -422,6 +460,7 @@
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
@@ -476,13 +515,15 @@
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillGradient": "none",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 2,
@@ -491,11 +532,17 @@
"type": "linear"
},
"showPoints": "auto",
"spanNulls": true
"spanNulls": true,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"max": 120,
"nullValueMode": "null",
"thresholds": {
"mode": "absolute",
"steps": [
@@ -524,6 +571,7 @@
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
@@ -586,13 +634,15 @@
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillGradient": "none",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 2,
@@ -601,11 +651,17 @@
"type": "linear"
},
"showPoints": "auto",
"spanNulls": true
"spanNulls": true,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"max": 120,
"nullValueMode": "null",
"thresholds": {
"mode": "absolute",
"steps": [
@@ -634,6 +690,7 @@
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
@@ -713,48 +770,33 @@
"mode": "palette-classic"
},
"custom": {
"axis": {
"grid": true,
"label": "Temperature",
"side": 3,
"width": 60
},
"axisLabel": "",
"axisPlacement": "auto",
"bars": {
"show": false
},
"barAlignment": 0,
"drawStyle": "line",
"fill": {
"alpha": 0
},
"fillGradient": "none",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false
},
"line": {
"color": {
"mode": "palette-classic"
},
"show": true,
"width": 1
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 2,
"nullValues": "null",
"pointSize": 5,
"points": {
"radius": 8,
"show": true
},
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
@@ -818,6 +860,7 @@
},
"legend": {
"asTable": false,
"calcs": [],
"displayMode": "list",
"isVisible": true,
"placement": "bottom"
@@ -874,48 +917,33 @@
"mode": "palette-classic"
},
"custom": {
"axis": {
"grid": true,
"label": "Temperature",
"side": 3,
"width": 60
},
"axisLabel": "",
"axisPlacement": "auto",
"bars": {
"show": false
},
"barAlignment": 0,
"drawStyle": "line",
"fill": {
"alpha": 0
},
"fillGradient": "none",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false
},
"line": {
"color": {
"mode": "palette-classic"
},
"show": true,
"width": 1
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 2,
"nullValues": "null",
"pointSize": 5,
"points": {
"radius": 8,
"show": true
},
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
@@ -979,6 +1007,7 @@
},
"legend": {
"asTable": false,
"calcs": [],
"displayMode": "list",
"isVisible": true,
"placement": "bottom"
@@ -1044,7 +1073,8 @@
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
@@ -1053,7 +1083,14 @@
"type": "linear"
},
"showPoints": "never",
"spanNulls": 3600000
"spanNulls": 3600000,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
@@ -1124,11 +1161,97 @@
"timeShift": null,
"title": "Span nulls below 1hr",
"type": "timeseries"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineStyle": {
"fill": "solid"
},
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 7,
"x": 0,
"y": 22
},
"id": 15,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"tooltip": {
"mode": "single"
}
},
"targets": [
{
"refId": "A",
"scenarioId": "csv_metric_values",
"stringInput": "30,null,1,20,90,null,30,null,5,0,null,30"
}
],
"title": "Always show points between gaps",
"type": "timeseries"
}
],
"schemaVersion": 27,
"schemaVersion": 30,
"style": "dark",
"tags": ["gdev", "panel-tests", "graph-ng"],
"tags": [
"gdev",
"panel-tests",
"graph-ng"
],
"templating": {
"list": []
},
@@ -1140,5 +1263,5 @@
"timezone": "",
"title": "Panel Tests - Graph NG - Gaps and Connected",
"uid": "8mmCAF1Mz",
"version": 1
}
"version": 12
}

View File

@@ -0,0 +1,442 @@
{
"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": 632,
"links": [],
"panels": [
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false
},
"lineWidth": 1
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 4,
"options": {
"bucketOffset": 0,
"combine": false,
"legend": {
"calcs": [],
"displayMode": "hidden",
"placement": "bottom"
}
},
"targets": [
{
"refId": "A",
"scenarioId": "random_walk",
"spread": 10
}
],
"title": "Time series + Auto buckets",
"type": "histogram"
},
{
"datasource": "-- Dashboard --",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false
},
"lineWidth": 1
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 3,
"options": {
"bucketOffset": 0,
"bucketSize": 3,
"combine": false,
"legend": {
"calcs": [],
"displayMode": "hidden",
"placement": "bottom"
}
},
"targets": [
{
"panelId": 4,
"refId": "A"
}
],
"title": "Time series + bucket size 3",
"type": "histogram"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false
},
"lineWidth": 1
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 5,
"options": {
"bucketOffset": 0,
"bucketSize": 1,
"combine": false,
"legend": {
"calcs": [],
"displayMode": "hidden",
"placement": "bottom"
}
},
"targets": [
{
"csvFileName": "weight_height.csv",
"refId": "A",
"scenarioId": "csv_file"
}
],
"title": "People height distribution",
"transformations": [
{
"id": "filterFieldsByName",
"options": {
"include": {
"names": [
"Height"
]
}
}
}
],
"type": "histogram"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false
},
"lineWidth": 1
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 6,
"options": {
"bucketOffset": 0,
"bucketSize": 5,
"combine": false,
"legend": {
"calcs": [],
"displayMode": "hidden",
"placement": "bottom"
}
},
"targets": [
{
"csvFileName": "weight_height.csv",
"refId": "A",
"scenarioId": "csv_file"
}
],
"title": "People weight distribution",
"transformations": [
{
"id": "filterFieldsByName",
"options": {
"include": {
"names": [
"Weight"
]
}
}
}
],
"type": "histogram"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 12,
"x": 0,
"y": 16
},
"id": 8,
"options": {
"showHeader": true
},
"pluginVersion": "8.1.0-pre",
"targets": [
{
"csvFileName": "weight_height.csv",
"refId": "A",
"scenarioId": "csv_file"
}
],
"title": "Standalone transform - Height",
"transformations": [
{
"id": "filterFieldsByName",
"options": {
"include": {
"names": [
"Height"
]
}
}
},
{
"id": "histogram",
"options": {
"combine": true,
"fields": {}
}
}
],
"type": "table"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 12,
"x": 12,
"y": 16
},
"id": 9,
"options": {
"showHeader": true
},
"pluginVersion": "8.1.0-pre",
"targets": [
{
"csvFileName": "weight_height.csv",
"refId": "A",
"scenarioId": "csv_file"
}
],
"title": "Standalone transform - Weight",
"transformations": [
{
"id": "filterFieldsByName",
"options": {
"include": {
"names": [
"Weight"
]
}
}
},
{
"id": "histogram",
"options": {
"combine": true,
"fields": {}
}
}
],
"type": "table"
}
],
"schemaVersion": 30,
"style": "dark",
"tags": [
"gdev",
"panel-tests"
],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Panel Tests - Histogram",
"uid": "UTv--wqMk",
"version": 4
}

View File

@@ -389,7 +389,7 @@
}
],
"title": "Status map",
"type": "status-grid"
"type": "status-history"
}
],
"refresh": false,

View File

@@ -350,7 +350,7 @@
}
],
"title": "Status grid",
"type": "status-grid"
"type": "status-history"
}
],
"refresh": false,

View File

@@ -15,7 +15,7 @@ docs-quick: pull
docker run -v $(shell pwd)/sources:$(CONTENT_PATH):Z -p $(PORT) --rm -it $(IMAGE) /bin/bash -c "ln -s /frontend-docs/packages_api /hugo/content/docs/grafana/next/packages_api && make server-quick"
docs-no-pull:
docker run -v $(shell pwd)/sources:$(CONTENT_PATH):Z -p $(PORT) --rm -it $(IMAGE) /bin/bash -c "make server-quick"
docker run -v $(shell pwd)/sources:$(CONTENT_PATH):Z -p $(PORT) --rm -it $(IMAGE) /bin/bash -c "make server"
docs-test: pull
docker run -v $(shell pwd)/sources:$(CONTENT_PATH):Z --rm -it $(IMAGE) /bin/bash -c 'make prod'

View File

@@ -1,8 +1,8 @@
+++
title = "Grafana documentation"
description = "Guides, Installation and Feature Documentation"
description = "Guides, installation, and feature documentation"
keywords = ["grafana", "installation", "documentation"]
aliases = ["/docs/grafana/v1.1", "/docs/grafana/latest/guides/reference/admin", "/docs/grafana/v3.1"]
aliases = ["/docs/grafana/latest/guides/reference/admin"]
+++
# Grafana documentation
@@ -51,7 +51,7 @@ aliases = ["/docs/grafana/v1.1", "/docs/grafana/latest/guides/reference/admin",
<a href="{{< relref "basics/_index.md" >}}" class="nav-cards__item nav-cards__item--guide">
<h4>Grafana basics</h4>
<p>Learn basic observability.</p>
</a>
</a>
<a href="{{< relref "administration/configuration.md" >}}" class="nav-cards__item nav-cards__item--guide">
<h4>Configure Grafana</h4>
<p>Review the configuration and setup options.</p>
@@ -64,8 +64,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-v8-0.md" >}}" class="nav-cards__item nav-cards__item--guide">
<h4>What's new in v8.0</h4>
<p>Explore the features and enhancements in the latest release.</p>
</a>
@@ -75,51 +75,51 @@ aliases = ["/docs/grafana/v1.1", "/docs/grafana/latest/guides/reference/admin",
<div class="nav-cards">
<a href="{{< relref "datasources/graphite.md" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/img/docs/logos/icon_graphite.svg" >
<img src="/static/img/docs/logos/icon_graphite.svg" >
<h5>Graphite</h5>
</a>
<a href="{{< relref "datasources/elasticsearch.md" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/img/docs/logos/icon_elasticsearch.svg" >
<img src="/static/img/docs/logos/icon_elasticsearch.svg" >
<h5>Elasticsearch</h5>
</a>
<a href="{{< relref "datasources/influxdb/_index.md" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/img/docs/logos/icon_influxdb.svg" >
<img src="/static/img/docs/logos/icon_influxdb.svg" >
<h5>InfluxDB</h5>
</a>
<a href="{{< relref "datasources/prometheus.md" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/img/docs/logos/icon_prometheus.svg" >
<img src="/static/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">
<img src="/img/docs/logos/icon_cloudmonitoring.svg">
<img src="/static/img/docs/logos/icon_cloudmonitoring.svg">
<h5>Google Cloud Monitoring</h5>
</a>
<a href="{{< relref "datasources/cloudwatch.md" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/img/docs/logos/icon_cloudwatch.svg">
<img src="/static/img/docs/logos/icon_cloudwatch.svg">
<h5>AWS CloudWatch</h5>
</a>
<a href="{{< relref "datasources/azuremonitor.md" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/img/docs/logos/icon_azure_monitor.jpg">
<a href="{{< relref "datasources/azuremonitor/_index.md" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/static/img/docs/logos/icon_azure_monitor.jpg">
<h5>Azure Monitor</h5>
</a>
<a href="{{< relref "datasources/loki.md" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/img/docs/logos/icon_loki.svg">
<img src="/static/img/docs/logos/icon_loki.svg">
<h5>Loki</h5>
</a>
<a href="{{< relref "datasources/mysql.md" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/img/docs/logos/icon_mysql.png" >
<img src="/static/img/docs/logos/icon_mysql.png" >
<h5>MySQL</h5>
</a>
<a href="{{< relref "datasources/postgres.md" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/img/docs/logos/icon_postgres.svg" >
<img src="/static/img/docs/logos/icon_postgres.svg" >
<h5>Postgres</h5>
</a>
<a href="{{< relref "datasources/mssql.md" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/img/docs/logos/sql_server_logo.svg">
<img src="/static/img/docs/logos/sql_server_logo.svg">
<h5>Microsoft SQL Server</h5>
</a>
<a href="{{< relref "datasources/opentsdb.md" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/img/docs/logos/icon_opentsdb.png" >
<img src="/static/img/docs/logos/icon_opentsdb.png" >
<h5>OpenTSDB</h5>
</a>
</div>

View File

@@ -414,6 +414,11 @@ The length of time that Grafana will wait for a successful TLS handshake with th
The length of time that Grafana will wait for a datasources first response headers after fully writing the request headers, if the request has an “Expect: 100-continue” header. A value of `0` will result in the body being sent immediately. Default is `1` second. For more details check the [Transport.ExpectContinueTimeout](https://golang.org/pkg/net/http/#Transport.ExpectContinueTimeout) documentation.
### max_conns_per_host
Optionally limits the total number of connections per host, including connections in the dialing, active, and idle states. On limit violation, dials are blocked. A value of `0` means that there are no limits. Default is `0`.
For more details check the [Transport.MaxConnsPerHost](https://golang.org/pkg/net/http/#Transport.MaxConnsPerHost) documentation.
### max_idle_connections
The maximum number of idle connections that Grafana will maintain. Default is `100`. For more details check the [Transport.MaxIdleConns](https://golang.org/pkg/net/http/#Transport.MaxIdleConns) documentation.
@@ -581,7 +586,9 @@ As of Grafana v7.3, this also limits the refresh interval options in Explore.
### default_home_dashboard_path
Path to the default home dashboard. If this value is empty, then Grafana uses StaticRootPath + "dashboards/home.json"
Path to the default home dashboard. If this value is empty, then Grafana uses StaticRootPath + "dashboards/home.json".
>**Note:** On Linux, Grafana uses `/usr/share/grafana/public/dashboards/home.json` as the default home dashboard location.
<hr />
@@ -1382,7 +1389,7 @@ Basic auth password.
### public_url
Optional URL to send to users in notifications. If the string contains the sequence \${file}, it is replaced with the uploaded filename. Otherwise, the file name is appended to the path part of the URL, leaving any query string unchanged.
Optional URL to send to users in notifications. If the string contains the sequence `${file}`, it is replaced with the uploaded filename. Otherwise, the file name is appended to the path part of the URL, leaving any query string unchanged.
<hr>
@@ -1469,15 +1476,19 @@ Set to `true` if you want to test alpha plugins that are not yet ready for gener
### allow_loading_unsigned_plugins
Enter a comma-separated list of plugin identifiers to identify plugins that are allowed to be loaded even if they lack a valid signature.
Enter a comma-separated list of plugin identifiers to identify plugins to load even if they are unsigned. Plugins with modified signatures are never loaded.
We do _not_ recommend using this option. For more information, refer to [Plugin signatures]({{< relref "../plugins/plugin-signatures.md" >}}).
### plugin_admin_enabled
Available to Grafana administrators only, the plugin admin app is set to `false` by default. Set it to `true` to enable the app.
For more information, refer to [Plugin catalog]({{< relref "../plugins/catalog.md" >}}).
### plugin_admin_external_manage_enabled
Set to `true` if you want to enable external management of plugins. Default is `false`. This is only applicable to Grafana Cloud users.
### plugin_catalog_url
@@ -1485,6 +1496,37 @@ Custom install/learn more URL for enterprise plugins. Defaults to https://grafan
<hr>
## [live]
### max_connections
> **Note**: Available in Grafana v8.0 and later versions.
The `max_connections` option specifies the maximum number of connections to the Grafana Live WebSocket endpoint per Grafana server instance. Default is `100`.
Refer to [Grafana Live configuration documentation]({{< relref "../live/configure-grafana-live.md" >}}) if you specify a number higher than default since this can require some operating system and infrastructure tuning.
0 disables Grafana Live, -1 means unlimited connections.
### allowed_origins
> **Note**: Available in Grafana v8.0.4 and later versions.
The `allowed_origins` option is a comma-separated list of additional origins (`Origin` header of HTTP Upgrade request during WebSocket connection establishment) that will be accepted by Grafana Live.
If not set (default), then the origin is matched over [root_url]({{< relref "#root_url" >}}) which should be sufficient for most scenarios.
Origin patterns support wildcard symbol "*".
For example:
```ini
[live]
allowed_origins = "https://*.example.com"
```
<hr>
## [plugin.grafana-image-renderer]
For more information, refer to [Image rendering]({{< relref "image_rendering.md" >}}).

View File

@@ -7,7 +7,7 @@ weight = 300
# Image rendering
Grafana supports automatic rendering of panels as PNG images. This allows Grafana to automatically generate images of your panels to include in [alert notifications]({{< relref "../alerting/notifications.md" >}}).
Grafana supports automatic rendering of panels as PNG images. This allows Grafana to automatically generate images of your panels to include in [alert notifications]({{< relref "../alerting/old-alerting/notifications.md" >}}).
>**Note:** Image rendering of dashboards is not supported at this time.
@@ -150,7 +150,7 @@ ldd chrome-linux/chrome
On Ubuntu 18.10 the following dependencies have been confirmed as needed for the image rendering to function.
```bash
libx11-6 libx11-xcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrender1 libxtst6 libglib2.0-0 libnss3 libcups2 libdbus-1-3 libxss1 libxrandr2 libgtk-3-0 libgtk-3-0 libasound2
libx11-6 libx11-xcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrender1 libxtst6 libglib2.0-0 libnss3 libcups2 libdbus-1-3 libxss1 libxrandr2 libgtk-3-0 libgtk-3-0 libasound2 libxcb-dri3-0 libgbm1
```
**Debian:**
@@ -172,7 +172,7 @@ libxdamage1 libxext6 libxi6 libxtst6 libnss3 libnss3 libcups2 libxss1 libxrandr2
On a minimal Centos installation, the following dependencies have been confirmed as needed for the image rendering to function:
```bash
libXcomposite libXdamage libXtst cups libXScrnSaver pango atk adwaita-cursor-theme adwaita-icon-theme at at-spi2-atk at-spi2-core cairo-gobject colord-libs dconf desktop-file-utils ed emacs-filesystem gdk-pixbuf2 glib-networking gnutls gsettings-desktop-schemas gtk-update-icon-cache gtk3 hicolor-icon-theme jasper-libs json-glib libappindicator-gtk3 libdbusmenu libdbusmenu-gtk3 libepoxy liberation-fonts liberation-narrow-fonts liberation-sans-fonts liberation-serif-fonts libgusb libindicator-gtk3 libmodman libproxy libsoup libwayland-cursor libwayland-egl libxkbcommon m4 mailx nettle patch psmisc redhat-lsb-core redhat-lsb-submod-security rest spax time trousers xdg-utils xkeyboard-config
libXcomposite libXdamage libXtst cups libXScrnSaver pango atk adwaita-cursor-theme adwaita-icon-theme at at-spi2-atk at-spi2-core cairo-gobject colord-libs dconf desktop-file-utils ed emacs-filesystem gdk-pixbuf2 glib-networking gnutls gsettings-desktop-schemas gtk-update-icon-cache gtk3 hicolor-icon-theme jasper-libs json-glib libappindicator-gtk3 libdbusmenu libdbusmenu-gtk3 libepoxy liberation-fonts liberation-narrow-fonts liberation-sans-fonts liberation-serif-fonts libgusb libindicator-gtk3 libmodman libproxy libsoup libwayland-cursor libwayland-egl libxkbcommon m4 mailx nettle patch psmisc redhat-lsb-core redhat-lsb-submod-security rest spax time trousers xdg-utils xkeyboard-config alsa-lib
```
### Certificate signed by internal certificate authorities

View File

@@ -23,13 +23,13 @@ The theme affects how Grafana displays graphs, menus, other UI elements.
Here is an example of the dark theme.
![Dark theme example](/img/docs/preferences/dark-theme-7-4.png)
![Dark theme example](/static/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)
![Light theme example](/static/img/docs/preferences/light-theme-7-4.png)
## Change server UI theme

View File

@@ -32,7 +32,7 @@ Users with the Grafana Server Admin flag on their account or access to the confi
### 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.
1. Update your configuration file to set the path to the JSON file. Refer to [default_home_dashboard_path]({{< relref "../configuration.md#default_home_dashboard_path">}}) for more information about modifying the Grafana configuration files.
```ini
[dashboards]
@@ -40,6 +40,8 @@ Users with the Grafana Server Admin flag on their account or access to the confi
default_home_dashboard_path = data/main-dashboard.json
```
>**Note:** On Linux, Grafana uses `/usr/share/grafana/public/dashboards/home.json` as the default home dashboard location.
## Set the home dashboard for your organization
Organization administrators can choose a home dashboard for their organization.

View File

@@ -152,7 +152,7 @@ Since not all datasources have the same configuration settings we only have the
| 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 |
| httpMethod | string | Prometheus | HTTP Method. 'GET', 'POST', defaults to POST |
| customQueryParameters | string | Prometheus | Query parameters to add, as a URL-encoded string. |
| esVersion | string | Elasticsearch | Elasticsearch version (E.g. `7.0.0`, `7.6.1`) |
| timeField | string | Elasticsearch | Which field that should be used as timestamp |
@@ -305,7 +305,7 @@ Grafana offers options to export the JSON definition of a dashboard. Either `Cop
Note: The JSON definition in the input field when using `Copy JSON to Clipboard` or `Save JSON to file` will have the `id` field automatically removed to aid the provisioning workflow.
{{< docs-imagebox img="/img/docs/v51/provisioning_cannot_save_dashboard.png" max-width="500px" class="docs-image--no-shadow" >}}
{{< figure src="/static/img/docs/v51/provisioning_cannot_save_dashboard.png" max-width="500px" class="docs-image--no-shadow" >}}
### Reusable Dashboard URLs
@@ -437,6 +437,14 @@ The following sections detail the supported settings and secure settings for eac
| sound | |
| okSound | |
#### Alert notification `discord`
| Name | Secure setting |
| -------------- | -------------- |
| url | yes |
| avatar_url | |
| message | |
#### Alert notification `slack`
| Name | Secure setting |
@@ -575,3 +583,9 @@ The following sections detail the supported settings and secure settings for eac
| Name |
| ---- |
| url |
## Grafana Enterprise
Grafana Enterprise supports provisioning for the following resources:
- [Access Control Provisioning]({{< relref "../enterprise/access-control/provisioning.md" >}})

View File

@@ -11,7 +11,7 @@ Setting up Grafana for high availability is fairly simple. You just need a share
and other persistent data. So the default embedded SQLite database will not work, you will have to switch to MySQL or Postgres.
<div class="text-center">
<img src="/img/docs/tutorials/grafana-high-availability.png" max-width= "800px" class="center" />
<img src="/static/img/docs/tutorials/grafana-high-availability.png" max-width= "800px" class="center" />
</div>
## Configure multiple servers to use the same database
@@ -22,7 +22,7 @@ Grafana will now persist all long term data in the database. How to configure th
## Alerting
Currently alerting supports a limited form of high availability. [Alert notifications]({{< relref "../alerting/notifications.md" >}}) are deduplicated when running multiple servers. This means all alerts are executed on every server but alert notifications are only sent once per alert. Grafana does not support load distribution between servers.
Currently alerting supports a limited form of high availability. [Alert notifications]({{< relref "../alerting/old-alerting/notifications.md" >}}) are deduplicated when running multiple servers. This means all alerts are executed on every server but alert notifications are only sent once per alert. Grafana does not support load distribution between servers.
## User sessions

View File

@@ -1,8 +0,0 @@
+++
title = "Alerts"
aliases = ["/docs/grafana/latest/alerting/rules/", "/docs/grafana/latest/alerting/metrics/"]
weight = 110
+++
# Alerts v2.0 overview

View File

@@ -4,51 +4,27 @@ aliases = ["/docs/grafana/latest/alerting/rules/", "/docs/grafana/latest/alertin
weight = 110
+++
# Alerts overview
# Grafana alerts
Alerts allow you to identify problems in your system moments after they occur. By quickly identifying unintended changes in your system, you can minimize disruptions to your services.
Alerts allow you to know about problems in your systems moments after they occur. Robust and actionable alerts help you identify and resolve issues quickly, minimizing disruption to your services.
Alerts consists of two parts:
Grafana 8.0 has new and improved alerts. The new alerting system are an [opt-in]({{< relref "./unified-alerting/opt-in.md" >}}) feature that centralizes alerting information for Grafana managed alerts and alerts from Prometheus-compatible data sources in one UI and API.
- Alert rules - When the alert is triggered. Alert rules are defined by one or more conditions that are regularly evaluated by Grafana.
- Notification channel - How the alert is delivered. When the conditions of an alert rule are met, the Grafana notifies the channels configured for that alert.
Alerts have four main components:
Currently only the graph panel visualization supports alerts.
- Alerting rule - One or more query and/or expression, a condition, the frequency of evaluation, and the (optional) duration that a condition must be met before creating an alert.
- Contact point - A channel for sending notifications when the conditions of an alerting rule are met.
- Notification policy - A set of matching and grouping criteria used to determine where, and how frequently, to send notifications.
- Silences - Date and matching criteria used to silence notifications.
## Alert tasks
You can create and edit alerting rules for Grafana managed alerts, Cortex alerts, and Loki alerts as well as see alerting information from prometheus-compatible data sources in a single, searchable view. For more information, on how to create and edit alerts and notifications, refer to [Overview of Grafana 8.0 alerts]({{< relref "../alerting/unified-alerting/_index.md" >}}).
You can perform the following tasks for alerts:
For handling notifications for Grafana managed alerts, we use an embedded Alertmanager. You can configure its contact points, notification policies, silences and templates from the new Grafana alerting UI by selecting `Grafana` from the Alertmanager dropdown on the top of the respective tab.
- [Add or edit an alert notification channel]({{< relref "notifications.md" >}})
- [Create an alert rule]({{< relref "create-alerts.md" >}})
- [View existing alert rules and their current state]({{< relref "view-alerts.md" >}})
- [Test alert rules and troubleshoot]({{< relref "troubleshoot-alerts.md" >}})
> **Note:** Currently the configuration of this embedded Alertmanager is shared across organisations. Therefore users are advised to use the new Grafana 8 Alerts only if they have one organisation otherwise all contact points, notification policies, silences and templates for Grafana managed alerts will be visible by all organizations.
## Clustering
As part of the new alert changes, we have introduced a new data source, Alertmanager, which includes built-in support for Prometheus Alertmanager. It is presently in alpha and it not accessible unless alpha plugins are enabled in Grafana settings. For more information, refer to [Alertmanager data source]({{< relref "../datasources/alertmanager.md" >}}). If such a data source is present, then you can view and modify its silences, contact points and notification policies from the Grafana alerting UI by selecting it from the Alertmanager dropdown on the top of respective tab.
Currently alerting supports a limited form of high availability. Since v4.2.0 of Grafana, alert notifications are deduped when running multiple servers. This means all alerts are executed on every server but no duplicate alert notifications are sent due to the deduping logic. Proper load balancing of alerts will be introduced in the future.
> **Note:** Out of the box, Grafana still supports old Grafana alerts. They are legacy alerts at this time, and will be deprecated in a future release. For more information, refer to [Legacy Grafana alerts]({{< relref "./old-alerting/_index.md" >}}).
## Notifications
You can also set alert rule notifications along with a detailed message about the alert rule. The message can contain anything: information about how you might solve the issue, link to runbook, and so on.
The actual notifications are configured and shared between multiple alerts.
## Alert execution
Alert rules are evaluated in the Grafana backend in a scheduler and query execution engine that is part
of core Grafana. Alert rules can query only backend data sources with alerting enabled. Such data sources are:
- builtin or developed and maintained by grafana, such as: `Graphite`, `Prometheus`, `Loki`, `InfluxDB`, `Elasticsearch`,
`Google Cloud Monitoring`, `Cloudwatch`, `Azure Monitor`, `MySQL`, `PostgreSQL`, `MSSQL`, `OpenTSDB`, `Oracle`, and `Azure Data Explorer`
- any community backend data sources with alerting enabled (`backend` and `alerting` properties are set in the [plugin.json]({{< relref "../developers/plugins/metadata.md" >}}))
## 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" >}}).
Description | Type | Metric name
---------- | ----------- | ----------
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`
To learn more about the differences between new alerts and the legacy alerts, refer to [What's New with Grafana 8 Alerts]({{< relref "../alerting/difference-old-new.md" >}}).

View File

@@ -1,18 +1,21 @@
+++
title = "Difference between new and old alerts"
description = "Pause an existing alert rule"
keywords = ["grafana", "alerting", "guide", "rules", "view"]
weight = 400
title = "What's New with Grafana 8 Alerts"
description = "What's New with Grafana 8 Alerts"
keywords = ["grafana", "alerting", "guide"]
weight = 112
+++
# Difference between new and old alerts
# What's New with Grafana 8 Alerts
The Alerts released with Grafana 8.0 are an opt-in feature that centralizes alerting information for Grafana managed alerts and alerts from Prometheus-compatible datasources in one UI and API. You are able to create and edit alerting rules for Grafana managed alerts, Cortex alerts, and Loki alerts as well as see alerting information from prometheus-compatible datasources in a single, searchable view.
The `ngalert` feature toggle enables the beta version of our new alerting system.
## Multi-dimensional alerting
Create alerts that will give you system-wide visibility with a single alerting rule. With Grafana 8 alerts, you are able to generate multiple alert instances from a single rule eg. creating a rule to monitor disk usage for multiple mount points on a single host. The evaluation engine is able to return multiple time series from a single query. Each time series is identified by its label set.
>**Note:** It is recommended to backup Grafana's database before enabling this feature.
## Create alerts outside of Dashboards
Grafana legacy alerts were tied to a dashboard. Grafana 8 Alerts allow you to create queries and expressions that can combine data from multiple sources, in unique ways. You are still able to link dashboards and panels to alerting rules, allowing you to quickly troubleshoot the system under observation, by linking a dashboard and/or panel ID to the alerting rule.
When the feature flag is enabled, dashboard alerting is disabled and dashboard alerts are migrated into the system. Going to "Alert List" will take you to the new system.
## Create Loki and Cortex alerting rules
With Grafana 8 Alerts you are able to manage your Loki and Cortex alerting rules using the same UI and API as your Grafana managed alerts.
Once you disable the new alters, all migrated and newly created alerts in the new system are deleted, and dashboard alerting will be enabled again.
During beta, the migration of existing dashboard rules may change.
## View and search for alerts from Prometheus
You can now display all of your alerting information in one, searchable UI. Alerts for Prometheus compatible datasources are listed below Grafana managed alerts. Search for labels across multiple datasources to quickly find all of the relevant alerts.

View File

@@ -0,0 +1,57 @@
+++
title = "Legacy Grafana Alerts"
aliases = ["/docs/grafana/latest/alerting/rules/", "/docs/grafana/latest/alerting/metrics/"]
weight = 114
+++
# Legacy Grafana alerts
Grafana 8.0 has [new and improved alerts]({{< relref "../unified-alerting/_index.md" >}}). The new alerting system are an opt-in feature that centralizes alerting information for Grafana managed alerts and alerts from Prometheus-compatible data sources in one UI and API.
Out of the box, Grafana still supports legacy dashboard alerts. Legacy Grafana alerts consists of two parts:
Alert rules - When the alert is triggered. Alert rules are defined by one or more conditions that are regularly evaluated by Grafana.
Notification channel - How the alert is delivered. When the conditions of an alert rule are met, the Grafana notifies the channels configured for that alert.
Currently only the graph panel visualization supports alerts.
Legacy alerts have two main components:
- Alert rule - When the alert is triggered. Alert rules are defined by one or more conditions that are regularly evaluated by Grafana.
- Notification channel - How the alert is delivered. When the conditions of an alert rule are met, the Grafana notifies the channels configured for that alert.
## Alert tasks
You can perform the following tasks for alerts:
- [Create an alert rule]({{< relref "create-alerts.md" >}})
- [View existing alert rules and their current state]({{< relref "view-alerts.md" >}})
- [Test alert rules and troubleshoot]({{< relref "troubleshoot-alerts.md" >}})
- [Add or edit an alert contact point]({{< relref "notifications.md" >}})
## Clustering
Currently alerting supports a limited form of high availability. Since v4.2.0 of Grafana, alert notifications are deduped when running multiple servers. This means all alerts are executed on every server but no duplicate alert notifications are sent due to the deduping logic. Proper load balancing of alerts will be introduced in the future.
## Alert evaluation
Grafana managed alerts are evaluated by the Grafana backend. Rule evaluations are scheduled, according to the alert rule configuration, and queries are evaluated by an engine that is part of core Grafana.
Alert rules can only query backend data sources with alerting enabled:
- builtin or developed and maintained by grafana: `Graphite`, `Prometheus`, `Loki`, `InfluxDB`, `Elasticsearch`,
`Google Cloud Monitoring`, `Cloudwatch`, `Azure Monitor`, `MySQL`, `PostgreSQL`, `MSSQL`, `OpenTSDB`, `Oracle`, and `Azure Data Explorer`
- any community backend data sources with alerting enabled (`backend` and `alerting` properties are set in the [plugin.json]({{< relref "../../developers/plugins/metadata.md" >}}))
## 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" >}}).
Metric Name | Type | Description
---------- | ----------- | ----------
`alerting.alerts` | gauge | How many alerts by state
`alerting.request_duration_seconds` | histogram | Histogram of requests to the Alerting API
`alerting.active_configurations` | gauge | The number of active, non default alertmanager configurations for grafana managed alerts
`alerting.rule_evaluations_total` | counter | The total number of rule evaluations
`alerting.rule_evaluation_failures_total` | counter | The total number of rule evaluation failures
`alerting.rule_evaluation_duration_seconds` | summary | The duration for a rule to execute
`alerting.rule_group_rules` | gauge | The number of rules

View File

@@ -17,7 +17,7 @@ This topic explains how you can use alert query labels in alert notifications.
1. Navigate to the panel you want to add or edit an alert rule for.
1. Click on the panel title, and then click **Edit**.
1. On the Alert tab, click **Create Alert**. If an alert already exists for this panel, then you can edit the alert directly.
1. Refer to the alert query labels in the alert rule name and/or alert notification message field by using the `${Label}` syntax.
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](/static/img/docs/alerting/alert-notification-template-7-4.png)

View File

@@ -9,7 +9,7 @@ weight = 200
Grafana alerting allows you to attach rules to your dashboard panels. When you save the dashboard, Grafana extracts the alert rules into a separate alert rule storage and schedules them for evaluation.
![Alerting overview](/img/docs/alerting/drag_handles_gif.gif)
![Alerting overview](/static/img/docs/alerting/drag_handles_gif.gif)
In the Alert tab of the graph panel you can configure how often the alert rule should be evaluated and the conditions that need to be met for the alert to change state and trigger its [notifications]({{< relref "notifications.md" >}}).
@@ -37,7 +37,7 @@ This section describes the fields you fill out to create an alert.
- **Evaluate every -** Specify how often the scheduler should evaluate the alert rule. This is referred to as the _evaluation interval_.
- **For -** Specify how long the query needs to violate the configured thresholds before the alert notification triggers.
You can set a minimum evaluation interval in the `alerting.min_interval_seconds` configuration field, to set a minimum time between evaluations. Refer to [Configuration]({{< relref "../administration/configuration.md" >}}#min-interval-seconds) for more information.
You can set a minimum evaluation interval in the `alerting.min_interval_seconds` configuration field, to set a minimum time between evaluations. Refer to [Configuration]({{< relref "../../administration/configuration.md" >}}#min-interval-seconds) for more information.
> **Caution:** Do not use `For` with the `If no data or all values are null` setting set to `No Data`. The triggering of `No Data` will trigger instantly and not take `For` into consideration. This may also result in that an OK notification not being sent if alert transitions from `No Data -> Pending -> OK`.
@@ -46,9 +46,9 @@ If an alert rule has a configured `For` and the query violates the configured th
Typically, it's always a good idea to use this setting since it's often worse to get false positive than wait a few minutes before the alert notification triggers. Looking at the `Alert list` or `Alert list panels` you will be able to see alerts in pending state.
Below you can see an example timeline of an alert using the `For` setting. At ~16:04 the alert state changes to `Pending` and after 4 minutes it changes to `Alerting` which is when alert notifications are sent. Once the series falls back to normal the alert rule goes back to `OK`.
{{< imgbox img="/img/docs/v54/alerting-for-dark-theme.png" caption="Alerting For" >}}
{{< figure class="float-right" src="/static/img/docs/v54/alerting-for-dark-theme.png" caption="Alerting For" >}}
{{< imgbox max-width="40%" img="/img/docs/v4/alerting_conditions.png" caption="Alerting Conditions" >}}
{{< figure class="float-right" max-width="40%" src="/static/img/docs/v4/alerting_conditions.png" caption="Alerting Conditions" >}}
### Conditions

View File

@@ -52,7 +52,7 @@ Alert rule evaluation interval | Send reminders every | Reminder sent every (aft
Name | Type | Supports images | Support alert rule tags
-----|------|---------------- | -----------------------
[DingDing](#dingdingdingtalk) | `dingding` | yes, external only | no
Discord | `discord` | yes | no
[Discord](#discord) | `discord` | yes | no
[Email](#email) | `email` | yes | no
[Google Hangouts Chat](#google-hangouts-chat) | `googlechat` | yes, external only | no
Hipchat | `hipchat` | yes, external only | no
@@ -74,7 +74,7 @@ VictorOps | `victorops` | yes, external only | yes
### Email
To enable email notifications you have to set up [SMTP settings]({{< relref "../administration/configuration/#smtp" >}})
To enable email notifications you have to set up [SMTP settings]({{< relref "../../administration/configuration/#smtp" >}})
in the Grafana config. Email notifications will upload an image of the alert graph to an
external image destination if available or fallback to attaching the image to the email.
Be aware that if you use the `local` image storage email servers and clients might not be
@@ -89,7 +89,7 @@ Addresses | Email addresses to recipients. You can enter multiple email addresse
### Slack
{{< imgbox max-width="40%" img="/img/docs/v4/slack_notification.png" caption="Alerting Slack Notification" >}}
{{< figure class="float-right" max-width="40%" src="/static/img/docs/v4/slack_notification.png" caption="Alerting Slack Notification" >}}
To set up Slack, you need to configure an incoming Slack webhook URL. You can follow
[Sending messages using Incoming Webhooks](https://api.slack.com/incoming-webhooks) on how to do that. If you want to include screenshots of the
@@ -162,7 +162,7 @@ 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
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
@@ -220,6 +220,19 @@ In DingTalk PC Client:
6. There will be a Webhook URL in the panel, looks like this: https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxxx. Copy this URL to the Grafana DingTalk setting page and then click "finish".
### Discord
To set up Discord, you must create a Discord channel webhook. For instructions on how to create the channel, refer to
[Intro to Webhooks](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks) f.
Setting | Description
---------- | -----------
Webhook URL | Discord webhook URL.
Message Content | Mention a group using @ or a user using <@ID> when notifying in a channel.
Avatar URL | Optionally, provide a URL to an image to use as the avatar for the bot's message.
Alternately, use the [Slack](#slack) notifier by appending `/slack` to a Discord webhook URL.
### Kafka
Notifications can be sent to a Kafka topic from Grafana using the [Kafka REST Proxy](https://docs.confluent.io/1.0/kafka-rest/docs/index.html).
@@ -252,19 +265,19 @@ Alertmanager handles alerts sent by client applications such as Prometheus serve
## Enable images in notifications {#external-image-store}
Grafana can render the panel associated with the alert rule as a PNG image and include that in the notification. Read more about the requirements and how to configure
[image rendering]({{< relref "../administration/image_rendering/" >}}).
[image rendering]({{< relref "../../administration/image_rendering/" >}}).
You must configure an [external image storage provider]({{< relref "../administration/configuration/#external-image-storage" >}}) in order to receive images in alert notifications. If your notification channel requires that the image be publicly accessible (e.g. Slack, PagerDuty), configure a provider which uploads the image to a remote image store like Amazon S3, Webdav, Google Cloud Storage, or Azure Blob Storage. Otherwise, the local provider can be used to serve the image directly from Grafana.
You must configure an [external image storage provider]({{< relref "../../administration/configuration/#external-image-storage" >}}) in order to receive images in alert notifications. If your notification channel requires that the image be publicly accessible (e.g. Slack, PagerDuty), configure a provider which uploads the image to a remote image store like Amazon S3, Webdav, Google Cloud Storage, or Azure Blob Storage. Otherwise, the local provider can be used to serve the image directly from Grafana.
Notification services which need public image access are marked as 'external only'.
## Configure the link back to Grafana from alert notifications
All alert notifications contain a link back to the triggered alert in the Grafana instance.
This URL is based on the [domain]({{< relref "../administration/configuration/#domain" >}}) setting in Grafana.
This URL is based on the [domain]({{< relref "../../administration/configuration/#domain" >}}) setting in Grafana.
## Notification templating
> **Note:** Alert notification templating is only available in Grafana v7.4 and above.
The alert notification template feature allows you to take the [label]({{< relref "../basics/timeseries-dimensions.md#labels" >}}) value from an alert query and [inject that into alert notifications]({{< relref "./add-notification-template.md" >}}).
The alert notification template feature allows you to take the [label]({{< relref "../../basics/timeseries-dimensions.md#labels" >}}) value from an alert query and [inject that into alert notifications]({{< relref "./add-notification-template.md" >}}).

View File

@@ -9,7 +9,7 @@ weight = 500
If alerts are not behaving as you expect, here are some steps you can take to troubleshoot and figure out what is going wrong.
![Test Rule](/img/docs/v4/alert_test_rule.png)
![Test Rule](/static/img/docs/v4/alert_test_rule.png)
The first level of troubleshooting you can do is click **Test Rule**. You will get result back that you can expand to the point where you can see the raw data that was returned from your query.

View File

@@ -0,0 +1,60 @@
+++
title = "Grafana 8 Alerts"
aliases = ["/docs/grafana/latest/alerting/metrics/"]
weight = 113
+++
# Overview of Grafana 8 alerts
Alerts allow you to know about problems in your systems moments after they occur. Robust and actionable alerts help you identify and resolve issues quickly, minimizing disruption to your services.
>**Note:** This information is for the new, Grafana 8 Alerts. This is an [opt-in]({{< relref"./opt-in.md" >}}) feature released in Grafana 8.0. Grafana still supports [legacy dashboard alerts]({{< relref "../old-alerting/_index.md" >}}) out of the box
Alerts have four main components:
- Alerting rule - One or more query and/or expression, a condition, the frequency of evaluation, and the (optional) duration that a condition must be met before creating an alert.
- Contact point - A channel for sending notifications when the conditions of an alerting rule are met.
- Notification policy - A set of matching and grouping criteria used to determine where, and how frequently, to send notifications.
- Silences - Date and matching criteria used to silence notifications.
## Alerting tasks
You can perform the following tasks for alerts:
- [Create a Grafana managed alert rule]({{< relref "alerting-rules/create-grafana-managed-rule.md" >}})
- [Create a Cortex or Loki managed alert rule]({{< relref "alerting-rules/create-cortex-loki-managed-rule.md" >}})
- [View existing alert rules and their current state]({{< relref "alerting-rules/rule-list.md" >}})
- [Test alert rules and troubleshoot]({{< relref "./troubleshoot-alerts.md" >}})
- [Add or edit an alert contact point]({{< relref "./contact-points.md" >}})
- [Add or edit notification policies]({{< relref "./notification-policies.md" >}})
- [Create and edit silences]({{< relref "./silences.md" >}})
## Clustering
The current alerting system doesn't support high availability. Alert notifications are not deduplicated and load balancing is not supported between instances e.g. silences from one instance will not appear in the other. The Grafana team aims to have this feature by Grafana version 8.1+.
## Alert evaluation
Grafana managed alerts are evaluated by the Grafana backend. Rule evaluations are scheduled, according to the alert rule configuration, and queries are evaluated by an engine that is part of core Grafana.
Alerting rules can only query backend data sources with alerting enabled:
- builtin or developed and maintained by grafana: `Graphite`, `Prometheus`, `Loki`, `InfluxDB`, `Elasticsearch`,
`Google Cloud Monitoring`, `Cloudwatch`, `Azure Monitor`, `MySQL`, `PostgreSQL`, `MSSQL`, `OpenTSDB`, `Oracle`, and `Azure Data Explorer`
- any community backend data sources with alerting enabled (`backend` and `alerting` properties are set in the [plugin.json]({{< relref "../../developers/plugins/metadata.md" >}}))
## Metrics from the alerting engine
The alerting engine publishes some internal metrics about itself. You can read more about how Grafana publishes [internal metrics]({{< relref "../../administration/view-server/internal-metrics.md" >}}).
Metric Name | Type | Description
---------- | ----------- | ----------
`alerting.alerts` | gauge | How many alerts by state
`alerting.request_duration_seconds` | histogram | Histogram of requests to the Alerting API
`alerting.active_configurations` | gauge | The number of active, non default Alertmanager configurations for grafana managed alerts
`alerting.rule_evaluations_total` | counter | The total number of rule evaluations
`alerting.rule_evaluation_failures_total` | counter | The total number of rule evaluation failures
`alerting.rule_evaluation_duration_seconds` | summary | The duration for a rule to execute
`alerting.rule_group_rules` | gauge | The number of rules
- [View alert rules and their current state]({{< relref "alerting-rules/rule-list.md" >}})

View File

@@ -0,0 +1,13 @@
+++
title = "Create and manage rules"
aliases = ["/docs/grafana/latest/alerting/rules/"]
weight = 130
+++
# Create and manage alerting Rules
One or more queries and/or expressions, a condition, the frequency of evaluation, and the (optional) duration that a condition must be met before creating an alert. Alerting rules are how you express the criteria for creating an alert. Queries and expressions select and can operate on the data you wish to alert on. A condition sets the threshold that an alert must meet or exceed to create an alert. The interval specifies how frequently the rule should be evaluated. The duration, when configured, sets a period that a condition must be met or exceeded before an alert is created. Alerting rules also can contain settings for what to do when your query does not return any data, or there is an error attempting to execute the query.
- [Create Cortex or Loki managed alert rule]({{< relref "./create-cortex-loki-managed-rule.md" >}})
- [Create Grafana managed alert rule]({{< relref "./create-grafana-managed-rule.md" >}})
- [State and Health of alerting rules]({{< relref "./state-and-health.md" >}})
- [View existing alert rules and their current state]({{< relref "./rule-list.md" >}})

View File

@@ -0,0 +1,65 @@
+++
title = "Create Cortex or Loki managed alert rule"
description = "Create Cortex or Loki managed alerting rule"
keywords = ["grafana", "alerting", "guide", "rules", "create"]
weight = 400
+++
# Create a Cortex or Loki managed alerting rule
Grafana allows you manage alerting rules for an external Cortex or Loki instance.
In order for both Cortex and Loki data sources to work with Grafana 8.0 alerting, enable the ruler API by configuring their respective services. The`local` rule storage type, default for Loki, only supports viewing of rules. If you want to edit rules, then configure one of the other rule storage types. When configuring a Grafana Prometheus data source to point to Cortex, use the legacy `/api/prom` prefix, not `/prometheus`. Only single-binary mode is currently supported, and it is not possible to provide a separate URL for the ruler API.
## Add or edit a Cortex or Loki managed alerting rule
1. In the Grafana menu hover your cursor over the Alerting (bell) icon.
1. To create a new alert rule, click **New alert rule**. To edit an existing rule, expand one of the rules in the **Cortex / Loki** section and click **Edit**.
1. Click on the **Alert type** drop down and select **Cortex / Loki managed alert**.
1. Fill out the rest of the fields. Descriptions are listed below in [Alert rule fields](#alert-rule-fields).
1. When you have finished writing your rule, click **Save** in the upper right corner to save the rule,, or **Save and exit** to save and exit rule editing.
## Alert rule fields
This section describes the fields you fill out to create an alert.
### Alert type
- **Alert name -** Enter a descriptive name. The name will be displayed in the alert rule list, as well as added as `alertname` label to every alert instance that is created from this rule.
- **Alert type -** Select **Cortex / Loki managed alert**.
- **Data source -** Select a Prometheus or Loki data source. Only Prometheus data sources that support Cortex ruler API will be available.
- **Namespace -** Select an existing rule namespace or click **Add new** to create a new one.
- **Group -** Select an existing group within the selected namespace or click **Add new** to create a new one. Newly created rules will be added to the end of the rule group.
![Alert type section screenshot](/static/img/docs/alerting/unified/rule-edit-cortex-alert-type-8-0.png 'Alert type section screenshot')
### Query
Enter a PromQL or LogQL expression. Rule will fire if evaluation result has at least one series with value > 0. An alert will be created per each such series.
![Query section](/static/img/docs/alerting/unified/rule-edit-cortex-query-8-0.png 'Query section screenshot')
### Conditions
- **For -** For how long the selected condition should violated before an alert enters `Firing` state. When condition threshold is violated for the first time, an alert becomes `Pending`. If the **for** time elapses and the condition is still violated, it becomes `Firing`. Else it reverts back to `Normal`.
![Conditions section](/static/img/docs/alerting/unified/rule-edit-cortex-conditions-8-0.png 'Conditions section screenshot')
### Details
Annotations and labels can be optionally added in the details section.
#### Annotations
Annotations are key and value pairs that provide additional meta information about the alert, for example description, summary, runbook URL. They are displayed in rule and alert details in the UI and can be used in contact type message templates. Annotations can also be templated, for example `Instance {{ $labels.instance }} down` will have the evaluated `instance` label value added for every alert this rule produces.
#### Labels
Labels are key value pairs that categorize or identify an alert. Labels are used to match alerts in silences or match and groups alerts in notification policies. Labels are also shown in rule or alert details in the UI and can be used in contact type message templates. For example, it is common to add a `severity` label and then configure a separate notification policy for each severity. Or one could add a `team` label and configure team specific notification policies, or silence all alerts for a particular team.
![Details section](/static/img/docs/alerting/unified/rule-edit-details-8-0.png 'Details section screenshot')
## Preview alerts
To evaluate the rule and see what alerts it would produce, click **Preview alerts**. It will display a list of alerts with state and value of for each one.

View File

@@ -0,0 +1,108 @@
+++
title = "Create Grafana managed alert rule"
description = "Create Grafana managed alert rule"
keywords = ["grafana", "alerting", "guide", "rules", "create"]
weight = 400
+++
# Create a Grafana managed alerting rule
Grafana allows you to create alerting rules that query one or more data sources, reduce or transform the results and compare them to each other or to fix thresholds. These rules will be executed and notifications sent by Grafana itself.
## Add or edit a Grafana managed alerting rule
1. In the Grafana menu hover your cursor over the Alerting (bell) icon.
1. To create a new alert rule, click **New alert rule**. To edit an existing rule, expand one of the rules in the **Grafana** section and click **Edit**.
1. Click on the **Alert type** drop down and select **Grafana managed alert**.
1. Fill out the rest of the fields. Descriptions are listed below in [Alert rule fields](#alert-rule-fields).
1. When you have finished writing your rule, click **Save** in the upper right corner to save the rule,, or **Save and exit** to save and exit rule editing.
## Alert rule fields
This section describes the fields you fill out to create an alert.
### Alert type
- **Alert name -** Enter a descriptive name. The name will be displayed in the alert rule list, as well as added as `alertname` label to every alert instance that is created from this rule.
- **Alert type -** Select **Grafana managed alert**.
- **Folder -** Select a folder this alert rule will belong to. To create a new folder, click on the drop down and type in a new folder name.
![Alert type section screenshot](/static/img/docs/alerting/unified/rule-edit-grafana-alert-type-8-0.png 'Alert type section screenshot')
### Query
Add one or more [queries]({{< relref "../../../panels/queries.md" >}}) or [expressions]({{< relref "../../../panels/expressions.md" >}}). You can use classic condition expression to create a rule that will trigger a single alert if it's threshold is met, or use reduce and math expressions to create a multi dimensional alert rule that can trigger multiple alerts, one per matching series in the query result.
#### Rule with classic condition
You can use classic condition expression to create a rule that will trigger a single alert if it's conditions is met. It works about the same way as dashboard alerts in previous versions of Grafana.
1. Add one or more queries
1. Add an expression. Click on **Operation** dropdown and select **Classic condition**.
1. Add one or more conditions. For each condition you can specify operator (`AND` / `OR`), aggregation function, query letter and threshold value.
If a query returns multiple series, then the aggregation function and threshold check will be evaluated for each series.It will not track alert state **per series**. This has implications that are detailed in the scenario below.
- Alert condition with query that returns 2 series: **server1** and **server2**
- **server1** series causes the alert rule to fire and switch to state `Firing`
- Notifications are sent out with message: _load peaking (server1)_
- In a subsequent evaluation of the same alert rule, the **server2** series also causes the alert rule to fire
- No new notifications are sent as the alert rule is already in state `Firing`.
So, as you can see from the above scenario Grafana will not send out notifications when other series cause the alert to fire if the rule already is in state `Firing`. If you want to have alert per series, create a multi dimensional alert rule as described in the section below.
![Query section classic condition](/static/img/docs/alerting/unified/rule-edit-classic-8-0.png 'Query section classic condition screenshot')
#### Multi dimensional rule
You can use reduce and math expressions to create a rule that will create an alert per series returned by the query.
1. Add one or more queries
2. Add a `reduce` expression for each query to aggregate values in the selected time range into a single value. With some data sources this is not needed for [rules using numeric data]({{< relref "../grafana-managed-numeric-rule.md" >}}).
3. Add a `math` expressions with the condition for the rule. Not needed in case a query or a reduce expression already returns 0 if rule should not be firing, or > 0 if it should be firing. Some examples: `$B > 70` if it should fire in case value of B query/expression is more than 70. `$B < $C * 100` in case it should fire if value of B is less than value of C multiplied by 100. If queries being compared have multiple series in their results, series from different queries are matched if they have the same labels or one is a subset of the other.
See or [expressions documentation]({{< relref "../../../panels/expressions.md" >}}) for in depth explanation of `math` and `reduce` expressions.
![Query section multi dimensional](/static/img/docs/alerting/unified/rule-edit-multi-8-0.png 'Query section multi dimensional screenshot')
### Conditions
- **Condition -** Select the letter of the query or expression whose result will trigger the alert rule. You will likely want to select either a `classic condition` or a `math` expression.
- **Evaluate every -** How often the rule should be evaluated, executing the defined queries and expressions. Must be no less than 10 seconds and a multiple of 10 seconds. Examples: `1m`, `30s`
- **Evaluate for -** For how long the selected condition should violated before an alert enters `Alerting` state. When condition threshold is violated for the first time, an alert becomes `Pending`. If the **for** time elapses and the condition is still violated, it becomes `Alerting`. Else it reverts back to `Normal`.
#### No Data & Error handling
Toggle **Configure no data and error handling** switch to configure how the rule should handle cases where evaluation results in error or returns no data.
| No Data Option | Description |
| --------------- | ------------------------------------------------------------------------------------------ |
| No Data | Set alert state to `NoData` and rule state to `Normal` |
| Alerting | Set alert rule state to `Alerting` |
| Ok | Set alert rule state to `Normal` |
| Error or timeout option | Description |
| ----------------------- | --------------------------------------------------- |
| Alerting | Set alert rule state to `Alerting` |
| OK | Set alert rule state to `Normal` |
![Conditions section](/static/img/docs/alerting/unified/rule-edit-grafana-conditions-8-0.png 'Conditions section screenshot')
### Details
Annotations and labels can be optionally added in the details section.
#### Annotations
Annotations are key and value pairs that provide additional meta information about the alert, for example description, summary, runbook URL. They are displayed in rule and alert details in the UI and can be used in contact type message templates. Annotations can also be templated, for example `Instance {{ $labels.instance }} down` will have the evaluated `instance` label value added for every alert this rule produces.
#### Labels
Labels are key value pairs that categorize or identify an alert. Labels are used to match alerts in silences or match and groups alerts in notification policies. Labels are also shown in rule or alert details in the UI and can be used in contact type message templates. For example, it is common to add a `severity` label and then configure a separate notification policy for each severity. Or one could add a `team` label and configure team specific notification policies, or silence all alerts for a particular team. Labels can also be templated like annotations, for example `{{ $labels.namespace }}/{{ $labels.job }}` will produce a new rule label that will have the evaluated `namespace` and `job` label value added for every alert this rule produces. The rule labels take precedence over the labels produced by the query/condition.
![Details section](/static/img/docs/alerting/unified/rule-edit-details-8-0.png 'Details section screenshot')
## Preview alerts
To evaluate the rule and see what alerts it would produce, click **Preview alerts**. It will display a list of alerts with state and value for each one.

View File

@@ -0,0 +1,48 @@
+++
title = "View alert rules"
description = "View alert rules"
keywords = ["grafana", "alerting", "guide", "rules", "view"]
weight = 400
+++
# View alert rules
To view alerts:
1. In the Grafana menu hover your cursor over the Alerting (bell) icon.
1. Click **Alert Rules**. You can see all configured Grafana alert rules as well as any rules from Loki or Prometheus data sources.
By default, the group view is shown. You can toggle between group or state views by clicking the relevant **View as** buttons in the options area at the top of the page.
### Group view
Group view shows Grafana alert rules grouped by folder and Loki or Prometheus alert rules grouped by `namespace` + `group`. This is the default rule list view, intended for managing rules. You can expand each group to view a list of rules in this group. Each rule can be further expanded to view its details. Action buttons and any alerts spawned by this rule, and each alert can be further expanded to view its details.
![Grouped alert rule view](/static/img/docs/alerting/unified/rule-list-group-view-8-0.png 'Screenshot of grouped alert rule view')
### State view
State view shows alert rules grouped by state. Use this view to get an overview of which rules are in what state. Each rule can be expanded to view its details. Action buttons and any alerts spawned by this rule, and each alert can be further expanded to view its details.
![Alert rule state view](/static/img/docs/alerting/unified/rule-list-state-view-8-0.png 'Screenshot of alert rule state view')
## Filter alert rules
You can use the following filters to view only alert rules that match specific criteria:
- **Filter alerts by name or label -** Type an alert name, label name or value in the **Search** input.
- **Filter alerts by state -** In **States** Select which alert states you want to see. All others are hidden.
- **Filter alerts by data source -** Click the **Select data source** and select an alerting data source. Only alert rules that query selected data source will be visible.
## Rule details
A rule row shows the rule state, health, and summary annotation if the rule has one. You can expand the rule row to display rule labels, all annotations, data sources this rule queries, and a list of alert instances spawned from this rule.
![Alert rule details](/static/img/docs/alerting/unified/rule-details-8-0.png 'Screenshot of alert rule details')
### Edit or delete rule
Grafana rules can only be edited or deleted by users with Edit permissions for the folder which contains the rule. Prometheus or Loki rules can be edited or deleted by users with Editor or Admin roles.
To edit or delete a rule:
1. Expand this rule to reveal rule controls.
1. Click **Edit** to go to the rule editing form. Make changes following [instructions listed here]({{< relref "./create-grafana-managed-rule.md" >}}).
1. Click **Delete"** to delete a rule.

View File

@@ -0,0 +1,27 @@
+++
title = "State and Health of alerting rules"
description = "State and Health of alerting rules"
keywords = ["grafana", "alerting", "guide", "state"]
+++
The concepts of state and health for alerting rules help you understand, at a glance, several key status indicators about your alerts. Alert state, alerting rule state, and alerting rule health are related, but they each convey subtly different information.
## Alerting rule state
Indicates whether any of the timeseries resulting from evaluation of the alerting rule are in an alerting state. Alerting rule state only requires a single alerting instance to be in a pending or firing state for the alerting rule state to not be normal.
- Normal: none of the timeseries returned are in an alerting state.
- Pending: at least one of the timeseries returned are in a pending state.
- Firing: at least one of the timeseries returned are in an alerting state.
## Alert state
Alert state is an indication of the output of the alerting evaluation engine.
- Normal: the condition for the alerting rule has evaluated to **false** for every timeseries returned by the evaluation engine.
- Alerting: the condition for the alerting rule has evaluated to **true** for at least one timeseries returned by the evaluation engine and the duration, if set, **has** been met or exceeded.
- Pending: the condition for the alerting rule has evaluated to **true** for at least one timeseries returned by the evaluation engine and the duration, if set, **has not** been met or exceeded.
- NoData: the alerting rule has not returned a timeseries, all values for the timeseries are null, or all values for the timeseries are zero.
- Error: There was an error encountered when attempting to evaluate the alerting rule.
## Alerting rule health
Indicates the status of alerting rule evaluation.
- Ok: the rule is being evaluated, data is being returned, and no errors have been encountered.
- Error: an error was encountered when evaluating the alerting rule.
- NoData: at least one of the timeseries returned during evaluation is in a NoData state.

View File

@@ -0,0 +1,77 @@
+++
title = "Contact points"
description = "Create or edit contact point"
keywords = ["grafana", "alerting", "guide", "contact point", "notification channel", "create"]
weight = 400
+++
# Contact points
Contact points define where to send notifications about alerts that match a particular [notification policy]({{< relref "./notification-policies.md" >}}). A contact point can contain one or more contact point types, eg email, slack, webhook and so on. A notification will dispatched to all contact point types defined on a contact point. [Templating]({{< relref "./message-templating/_index.md" >}}) can be used to customize contact point type message with alert data. Grafana alerting UI can be used to configure both Grafana managed contact points and contact points for an [external Alertmanager if one is configured]({{< relref "../../datasources/alertmanager.md" >}}).
Grafana alerting UI allows you to configure contact points for the Grafana managed alerts (handled by the embedded Alertmanager) as well as contact points for an [external Alertmanager if one is configured]({{< relref "../../datasources/alertmanager.md" >}}), using the Alertmanager dropdown.
> **Note:** Currently the configuration of the embedded Alertmanager is shared across organisations. Therefore users are advised to use the new Grafana 8 Alerts only if they have one organisation otherwise contact points for the Grafana managed alerts will be visible by all organizations.
## Add a contact point
1. In the Grafana side bar, hover your cursor over the **Alerting** (bell) icon and then click **Contact points**.
1. Click **Add contact point**.
1. Enter a **Name** for the contact point
1. Select contact point type and fill out mandatory fields. **Optional settings** can be expanded for more options.
1. If you'd like this contact point to notify via multiple channels, for example both email and slack, click **New contact point type** and fill out additional contact point type details.
1. Click **Save contact point** button at the bottom of the page.
## Editing a contact point
1. In the Grafana side bar, hover your cursor over the **Alerting** (bell) icon and then click **Contact points**.
1. Find the contact point you want to edit in the contact points table and click the **pen icon** on the right side.
1. Make any changes and click **Save contact point** button at the bottom of the page.
## Deleting a contact point
1. In the Grafana side bar, hover your cursor over the **Alerting** (bell) icon and then click **Contact points**.
1. Find the contact point you want to edit in the contact points table and click the **trash can icon** on the right side.
1. A confirmation dialog will open. Click **Yes, delete**.
**Note** You will not be able to delete contact points that are currently used by any notification policy. If you want to delete such contact point, you will have to first go to [notification policies]({{< relref "./notification-policies.md" >}}) and delete the policy or update it to use another contact point.
## List of notifiers supported by Grafana
Name | Type
-----|-----
[DingDing](#dingdingdingtalk) | `dingding`
[Discord](#discord) | `discord`
[Email](#email) | `email`
[Google Hangouts Chat](#google-hangouts-chat) | `googlechat`
[Kafka](#kafka) | `kafka`
Line | `line`
Microsoft Teams | `teams`
[Opsgenie](#opsgenie) | `opsgenie`
[Pagerduty](#pagerduty) | `pagerduty`
Prometheus Alertmanager | `prometheus-alertmanager`
[Pushover](#pushover) | `pushover`
Sensu | `sensu`
[Sensu Go](#sensu-go) | `sensugo`
[Slack](#slack) | `slack`
Telegram | `telegram`
Threema | `threema`
VictorOps | `victorops`
[Webhook](#webhook) | `webhook`
[Zenduty](#zenduty) | `webhook`
## Manage contact points for an external Alertmanager
Grafana alerting UI supports managing external Alertmanager configuration. Once you add an [Alertmanager data source]({{< relref "../../datasources/alertmanager.md" >}}), a dropdown displays at the top of the page where you can select either `Grafana` or an external Alertmanager as your data source.
{{< figure max-width="40%" src="/static/img/docs/alerting/unified/contact-points-select-am-8-0.gif" caption="Select Alertmanager" >}}
### Edit Alertmanager global config
To edit global configuration options for an alertmanager, like SMTP server that is used by default for all email contact types:
1. In the Grafana side bar, hover your cursor over the **Alerting** (bell) icon and then click **Contact points**.
1. In the dropdown at the top of the page, select an Alertmanager data source.
1. Click **Edit global config** button at the bottom of the page.
1. Fill out the form and click **Save global config**.
**Note** this is only for external Alertmanagers. Some global options for Grafana contact types, like email settings, can be configured via [Grafana configuration]({{< relref "../../administration/configuration.md" >}}).

View File

@@ -0,0 +1,67 @@
+++
title = "Grafana managed alert rules for numeric data"
description = "Grafana managed alert rules for numeric data"
keywords = ["grafana", "alerting", "guide", "rules", "create"]
weight = 400
+++
# Alerting on numeric data
Among certain data sources numeric data that is not time series can be directly alerted on, or passed into Server Side Expressions (SSE). This allows for more processing and resulting efficiency within the data source, and it can also simplify alert rules.
When alerting on numeric data instead of time series data, there is no need to reduce each labeled time series into a single number. Instead labeled numbers are returned to Grafana instead.
## Tabular Data
This feature is supported with backend data sources that query tabular data:
- SQL data sources such as MySQL, Postgres, MSSQL, and Oracle.
- The Azure Kusto based services: Azure Monitor (Logs), Azure Monitor (Azure Resource Graph), and Azure Data Explorer.
A query with Grafana managed alerts or SSE is considered numeric with these data sources, if:
- The "Format AS" option is set to "Table" in the data source query.
- The table response returned to Grafana from the query includes only one numeric (e.g. int, double, float) column, and optionally additional string columns.
If there are string columns then those columns become labels. The name of column becomes the label name, and the value for each row becomes the value of the corresponding label. If multiple rows are returned, then each row should be uniquely identified their labels.
## Example
For a MySQL table called "DiskSpace":
| Time | Host | Disk | PercentFree
| ----------- | --- | -----| --------
| 2021-June-7 | web1 | /etc | 3
| 2021-June-7 | web2 | /var | 4
| 2021-June-7 | web3 | /var | 8
| ... | ... | ... | ...
You can query the data filtering on time, but without returning the time series to Grafana. For example, an alert that would trigger per Host, Disk when there is less than 5% free space:
```sql
SELECT Host, Disk, CASE WHEN PercentFree < 5.0 THEN PercentFree ELSE 0 END FROM (
SELECT
Host,
Disk,
Avg(PercentFree)
FROM DiskSpace
Group By
Host,
Disk
Where __timeFilter(Time)
```
This query returns the following Table response to Grafana:
| Host | Disk | PercentFree
| --- | -----| --------
| web1 | /etc | 3
| web2 | /var | 4
| web3 | /var | 0
When this query is used as the **condition** in an alert rule, then the non-zero will be alerting. As a result, three alert instances are produced:
| Labels | Status
| ----------------------| ------
| {Host=web1,disk=/etc} | Alerting
| {Host=web2,disk=/var} | Alerting
| {Host=web3,disk=/var} | Normal

View File

@@ -0,0 +1,105 @@
+++
title = "Message templating"
description = "Message templating"
aliases = ["/docs/grafana/latest/alerting/message-templating/"]
keywords = ["grafana", "alerting", "guide", "contact point", "templating"]
weight = 400
+++
# Message templating
Notifications sent via [contact points]({{< relref "../contact-points.md" >}}) are built using templates. Grafana comes with default templates which you can customize. Grafana's notification templates are based on the [Go templating system](https://golang.org/pkg/text/template) where some fields are evaluated as text, while others are evaluated as HTML which can affect escaping. Since most of the contact point fields can be templated, you can create reusable templates and them in multiple contact points. See [template data reference]({{< relref "./template-data.md" >}}) to check what variables are available in the templates.
## Using templating in contact point fields
This section shows an example of using templating to render a number of firing or resolved alerts in Slack message title, and listing alerts with status and name in the message body:
<img src="/static/img/docs/alerting/unified/contact-points-template-fields-8-0.png" width="600px">
## Reusable templates
You can create named templates and then reuse them in contact point fields or other templates.
Grafana alerting UI allows you to configure templates for the Grafana managed alerts (handled by the embedded Alertmanager) as well as templates for an [external Alertmanager if one is configured]({{< relref "../../../datasources/alertmanager.md" >}}), using the Alertmanager dropdown.
> **Note:** Currently the configuration of the embedded Alertmanager is shared across organisations. Therefore users are advised to use the new Grafana 8 Alerts only if they have one organisation otherwise templates for the Grafana managed alerts will be visible by all organizations
### Create a template
1. In the Grafana side bar, hover your cursor over the **Alerting** (bell) icon and then click **Contact points**.
1. Click **Add template**.
1. Fill in **Name** and **Content** fields.
1. Click **Save template** button at the bottom of the page.
**Note** The template name used to reference this template in templating is not the value of the **Name** field, but the parameter to `define` tag in the content. When creating a template you can omit `define` entirely and it will be added automatically with same value as **Name** field. It's recommended to use the same name for `define` and **Name** field to avoid confusion.
<img src="/static/img/docs/alerting/unified/templates-create-8-0.png" width="600px">
### Edit a template
1. In the Grafana side bar, hover your cursor over the **Alerting** (bell) icon and then click **Contact points**.
1. Find the template you want to edit in the templates table and click the **pen icon** on the right side.
1. Make any changes and click **Save template** button at the bottom of the page.
### Delete a template
1. In the Grafana side bar, hover your cursor over the **Alerting** (bell) icon and then click **Contact points**.
1. Find the template you want to edit in the templates table and click the **trash can icon** on the right side.
1. A confirmation dialog will open. Click **Yes, delete**.
**Note** You are not prevented from deleting templates that are in use somewhere in contact points or other templates. Be careful!
### Use a template in a contact point field
To use a template:
Enter `{{ template "templatename" . }}` into a contact point field, where `templatename` is the `define` parameter of a template.
<img src="/static/img/docs/alerting/unified/contact-points-use-template-8-0.png" width="600px">
### Template examples
Here is an example of a template to render a single alert:
```
{{ define "alert" }}
[{{.Status}}] {{ .Labels.alertname }}
Labels:
{{ range .Labels.SortedPairs }}
{{ .Name }}: {{ .Value }}
{{ end }}
{{ if gt (len .Annotations) 0 }}
Annotations:
{{ range .Annotations.SortedPairs }}
{{ .Name }}: {{ .Value }}
{{ end }}
{{ end }}
{{ if gt (len .SilenceURL ) 0 }}
Silence alert: {{ .SilenceURL }}
{{ end }}
{{ if gt (len .DashboardURL ) 0 }}
Go to dashboard: {{ .DashboardURL }}
{{ end }}
{{ end }}
```
Template to render entire notification message:
```
{{ define "message" }}
{{ if gt (len .Alerts.Firing) 0 }}
{{ len .Alerts.Firing }} firing:
{{ range .Alerts.Firing }} {{ template "alert" .}} {{ end }}
{{ end }}
{{ if gt (len .Alerts.Resolved) 0 }}
{{ len .Alerts.Resolved }} resolved:
{{ range .Alerts.Resolved }} {{ template "alert" .}} {{ end }}
{{ end }}
{{ end }}
```
## Manage templates for an external Alertmanager
Grafana alerting UI supports managing external Alertmanager configuration. Once you add an [Alertmanager data source]({{< relref "../../../datasources/alertmanager.md" >}}), a dropdown displays at the top of the page, allowing you to select either `Grafana` or an external Alertmanager data source.
{{< figure max-width="40%" src="/static/img/docs/alerting/unified/contact-points-select-am-8-0.gif" caption="Select Alertmanager" >}}

View File

@@ -0,0 +1,76 @@
+++
title = "Template data"
keywords = ["grafana", "alerting", "guide", "contact point", "templating"]
+++
# Template data
Template data is passed on to [message templates]({{< relref "./_index.md" >}}) as well as sent as payload to webhook pushes.
Name | Type | Notes
------------------|----------|-----------------------------------------------------------------
Receiver | string | Name of the contact point that the notification is being sent to.
Status | string | `firing` if at least one alert is firing, otherwise `resolved`.
Alerts | Alert | List of alert objects that are included in this notification (see below).
GroupLabels | KeyValue | Labels these alerts were grouped by.
CommonLabels | KeyValue | Labels common to all the alerts included in this notification.
CommonAnnotations | KeyValue | Annotations common to all the alerts included in this notification.
ExternalURL | string | Back link to the Grafana that sent the notification. If using external Alertmanager, back link to this Alertmanager.
The `Alerts` type exposes functions for filtering alerts:
* `Alerts.Firing` returns a list of firing alerts.
* `Alerts.Resolved` returns a list of resolved alerts.
## Alert
Name | Type | Notes
-------------|-----------|---------------------------------------------------------------------
Status | string | `firing` or `resolved`.
Labels | KeyValue | A set of labels attached to the alert.
Annotations | KeyValue | A set of annotations attached to the alert.
StartsAt | time.Time | Time the alert started firing.
EndsAt | time.Time | Only set if the end time of an alert is known. Otherwise set to a configurable timeout period from the time since the last alert was received.
GeneratorURL | string | A back link to Grafana or external Alertmanager.
SilenceURL | string | Link to grafana silence for with labels for this alert pre-filled. Only for Grafana managed alerts.
DashboardURL | string | Link to grafana dashboard, if alert rule belongs to one. Only for Grafana managed alerts.
PanelURL | string | Link to grafana dashboard panel, if alert rule belongs to one. Only for Grafana managed alerts.
Fingerprint | string | Fingerprint that can be used to identify the alert.
ValueString | string | A string that contains the labels and value of each reduced expression in the alert.
## KeyValue
`KeyValue` is a set of key/value string pairs that represent labels and annotations.
Here is an example containing two annotations:
```json
{
"summary": "alert summary",
"description": "alert description"
}
```
In addition to direct access of data (labels and annotations) stored as KeyValue, there are also methods for sorting, removing and transforming.
Name | Arguments | Returns | Notes
------------|-----------|-----------------------------------------|----------------
SortedPairs | | Sorted list of key & value string pairs |
Remove | []string | KeyValue | Returns a copy of the Key/Value map without the given keys.
Names | | []string | List of label names
Values | | []string | List of label values
## Functions
Some functions to transform values are also available, along with [default functions provided by Go templating](https://golang.org/pkg/text/template/#hdr-Functions).
Name | Arguments | Returns
-------------|------------------------------|----------------------------------------------
title | string | Capitalizes first character of each word.
toUpper | string | Converts all characters to upper case.
match | pattern, string | Match a string using RegExp.
reReplaceAll | pattern, replacement, string | RegExp substitution, unanchored.
join | string, []string | Concatenates the elements of the second argument to create a single string. First argument is the separator.
safeHtml | string | Marks string as HTML, not requiring auto-escaping.
stringSlice | ...string | Returns passed strings as slice of strings.

View File

@@ -0,0 +1,77 @@
+++
title = "Notification policies"
description = "Notification policies"
keywords = ["grafana", "alerting", "guide", "notification policies", "routes"]
weight = 400
+++
# Notification policies
Notification policies determine how alerts are routed to contact points. Policies have a tree structure, where each policy can have one or more child policies. Each policy except for the root policy can also match specific alert labels. Each alert enters policy tree at the root and then traverses each child policy. If `Continue matching subsequent sibling nodes` is not checked, it stops at the first matching node, otherwise, it continues matching it's siblings as well. If an alert does not match any children of a policy, the alert is handled based on the configuration settings of this policy and notified to the contact point configured on this policy. Alert that does not match any specific policy is handled by the root policy.
Grafana alerting UI allows you to configure notification policies for the Grafana managed alerts (handled by the embedded Alertmanager) as well as notification policies for an [external Alertmanager if one is configured]({{< relref "../../datasources/alertmanager.md" >}}), using the Alertmanager dropdown.
> **Note:** Currently the configuration of the embedded Alertmanager is shared across organisations. Therefore users are advised to use the new Grafana 8 Alerts only if they have one organisation otherwise notification policies for the Grafana managed alerts will be visible by all organizations.
## Edit notification policies
To access notification policy editing page, In the Grafana side bar, hover your cursor over the **Alerting (bell)** icon and then click **Notification policies**.
### Edit root notification policy
1. Click **edit** button on the top right of the root policy box.
1. Make changes and click **save** button.
### Add new specific policy
To add a top level specific policy, click **New policy** button in the **Specific routing** section, fill in the form and click **Save policy**.
To add a nested policy to an existing specific policy, expand the parent policy in specific routing table and click **Add nested policy**. fill in the form and click **Save policy**.
### Edit specific policy
To edit a specific policy, find it in the specific routing table and click **Edit** button. Make your changes and click **Save policy**.
### Root policy fields
- **Default contact point -** The [contact point]({{< relref "./contact-points.md" >}}) to send notifications to that did not match any specific policy.
- **Group by -** Labels to group alerts by. If multiple alerts are matched for this policy, they will be grouped based on these labels and a notification will be sent per group. Mandatory for root policy, optional for nested specific policies. If a specific policy does not specify own grouping, root policy grouping will be used.
Group timing options
- **Group wait -** - How long to wait to buffer alerts of the same group before sending a notification initially. Default is 30 seconds.
- **Group interval -** - How long to wait before sending an notification when an alert has been added to a group for which there has already been a notification. Default is 5 minutes.
- **Repeat interval -** - How long to wait before re-sending a notification after one has already been sent and no new alerts were added to the group. Default is 4 hours.
### Specific policy fields
- **Contact point -** The [contact point]({{< relref "./contact-points.md" >}}) to send notification to if alert matched this specific policy but did not match any of it's nested policies, or there were no nested specific policies.
- **Matching labels -** Rules for matching alert labels. See ["How label matching works"](#how-label-matching-works) below for details.
- **Continue matching subsequent sibling nodes -** If not enabled and an alert matches this policy but not any of it's nested policies, matching will stop and a notification will be sent to the contact point defined on this policy. If enabled, notification will be sent but alert will continue matching subsequent siblings of this policy, thus sending more than one notification. Use this if for example you want to send notification to a catch-all contact point as well as to one of more specific contact points handled by subsequent policies.
- **Override grouping** - Toggle if you want to override grouping for this policy. If toggled, you will be able to specify grouping same as for root policy described above. If not toggled, root policy grouping will be used.
- **Override group timings** Toggle if you want to override group timings for this policy. If toggled, you will be able to specify group timings same as for root policy described above. If not toggled, root policy group timings will be used.
### How label matching works
A policy will match an alert if alert's labels match all of the "Matching Labels" specified on the policy.
- The **Label** field is the name of the label to match. It must exactly match the label name.
- The **Value** field matches against the corresponding value for the specified **Label** name. How it matches depends on the **Regex** and **Equal** checkboxes.
- The **Regex** checkbox specifies if the inputted **Value** should be matched against labels as a regular expression. The regular expression is always anchored. If not selected it is an exact string match.
- The **Equal** checkbox specifies if the match should include alert instances that match or do not match. If not checked, the silence includes alert instances _do not_ match.
## Example setup
One usage example would be:
* Create a "default" contact point for most alerts with a non invasive contact point type, like a slack message, and set it on root policy
* Edit root policy grouping to group alerts by `cluster`, `namespace` and `alertname` so you get a notification per alert rule and specific k8s cluster & namespace.
* Create specific route for alerts coming from development cluster with an appropriate contact point
* Create a specific route for alerts with "critical" severity with a more invasive contact point type, like pager duty notification
* Create specific routes for particular teams that handle their own onduty rotations
![Notification policies screenshot](/static/img/docs/alerting/unified/notification-policies-8-0.png 'Notification policies screenshot')

View File

@@ -0,0 +1,31 @@
+++
title = "Opt-in to Grafana 8 Alerts"
description = "Enable Grafana 8 Alerts"
weight = 128
+++
# Enable Grafana 8 Alerts
Setting the `ngalert` feature toggle enables the new Grafana 8 alerting system.
>**Note:** It is recommended to backup Grafana's database before enabling this feature. If you are using PostgreSQL as the backend data source, then the minimum required version is 9.5.
At startup, when [the feature toggle is enabled]({{< relref "../../administration/configuration.md">}}#feature_toggles), the legacy Grafana dashboard alerting is disabled and existing dashboard alerts are migrated into a format that is compatible with the Grafana 8 alerting system. You can view these migrated rules, alongside any new alerts you create after the migration, from the Alerting page of your Grafana instance.
Read and write access to dashboard alerts in Grafana versions 7 and earlier were governed by the dashboard and folder permissions under which the alerts were stored. In Grafana 8, alerts are stored in folders and inherit the permissions of those folders. During the migration, dashboard alert permissions are matched to the new rules permissions as follows:
- If alert's dashboard has permissions, it will create a folder named like `Migrated {"dashboardUid": "UID", "panelId": 1, "alertId": 1}` to match permissions of the dashboard (including the inherited permissions from the folder).
- If there are no dashboard permissions and the dashboard is under a folder, then the rule is linked to this folder and inherits its permissions.
- If there are no dashboard permissions and the dashboard is under the General folder, then the rule is linked to the `General Alerting` folder and the rule inherits the default permissions.
During beta, Grafana 8 alerting system can retrieve rules from all available Prometheus, Loki, and Alertmanager data sources. It might not be able to fetch rules from all other supported data sources at this time.
Also notification channels are migrated to an Alertmanager configuration with the appropriate routes and receivers. Default notification channels are added as contact points to the default route. Notification channels not associated with any Dashboard alert go to the `autogen-unlinked-channel-recv` route.
Since `Hipchat` and `Sensu` are discontinued, they are not migrated to the new alerting. If you have dashboard alerts associated with those types of channels and you want to migrate to the new alerting, make sure you assign another supported notification channel, so that you continue to receive notifications for those alerts.
Finally, silences (expiring after one year) are created for all paused dashboard alerts.
## Disabling Grafana 8 Alerting after migration
To disable Grafana 8 Alerting, remove or disable the `ngalert` feature toggle. Dashboard alerts will be re-enabled and any alerts created during or after the migration are deleted.
>**Note:** Any alerting rules created in the Grafana 8 Alerting system will be lost when migrating back to dashboard alerts

View File

@@ -0,0 +1,57 @@
+++
title = "Silence alert notifications"
description = "Silence alert notifications"
keywords = ["grafana", "alerting", "silence", "mute"]
weight = 400
+++
# Silence alert notifications
Grafana allows to you to prevent notifications from one or more alert rules by creating a silence. This silence lasts for a specified window of time.
Silences do not prevent alert rules from being evaluated. They also do not stop alert instances being shown in the user interface. Silences only prevent notifications from being created.
Grafana alerting UI allows you to configure silences for the Grafana managed alerts (handled by the embedded Alertmanager) as well as silences for an [external Alertmanager if one is configured]({{< relref "../../datasources/alertmanager.md" >}}), using the Alertmanager dropdown.
> **Note:** Currently the configuration of the embedded Alertmanager is shared across organisations. Therefore users are advised to use the new Grafana 8 Alerts only if they have one organisation otherwise silences for the Grafana managed alerts will be visible by all organizations.
## Add a silence
To add a silence:
1. In the Grafana menu, hover your cursor over the **Alerting** (bell) icon and then select **Silences** (crossed out bell icon).
1. Click the **New Silence** button.
1. Select the start and end date in **Silence start and end** to indicate when the silence should go into effect and expire.
1. Optionally, update the **Duration** to alter the time for the end of silence in the previous step to correspond to the start plus the duration.
1. Enter one or more *Matching Labels* by filling out the **Name** and **Value** fields. Matchers determine which rules the silence will apply to.
1. Enter a **Comment**.
1. Enter the name of the owner in **Creator**.
1. Click **Create**.
## How label matching works
Alert instances that have labels that match all of the "Matching Labels" specified in the silence will have their notifications suppressed.
- The **Label** field is the name of the label to match. It must exactly match the label name.
- The **Value** field matches against the corresponding value for the specified **Label** name. How it matches depends on the **Regex** and **Equal** checkboxes.
- The **Regex** checkbox specifies if the inputted **Value** should be matched against labels as a regular expression. The regular expression is always anchored. If not selected it is an exact string match.
- The **Equal** checkbox specifies if the match should include alert instances that match or do not match. If not checked, the silence includes alert instances _do not_ match.
## Viewing and editing silences
1. In the Grafana menu hover your cursor over the **Alerting** (bell) icon, then select **Silences** (crossed out bell icon).
1. To end the silence, click the **Unsilence** option next to the listed silence. Silences that have ended are still listed and are automatically removed after 5 days. There is no method for manual removal.
1. To edit a silence, click the pencil icon next to the listed silence. Edit the silence using instructions on how to create a silence.
1. Click **Submit** to save your changes.
## Manage silences for an external Alertmanager
Grafana alerting UI supports managing external Alertmanager silences. Once you add an [Alertmanager data source]({{< relref "../../datasources/alertmanager.md" >}}), a dropdown displays at the top of the page where you can select either `Grafana` or an external Alertmanager as your data source.
## Create a URL to silence form with defaults filled in
When linking to silence form, you can provide default matching labels and comment via `matchers` and `comment` query parameters. `matchers` expects one more matching labels of type `[label][operator][value]` joined by a comma. `operator` can be one of `=` (equals, not regex), `!=` (not equals, not regex), `=~` (equals, regex), `!~` (not equals, not regex).
For example, to link to silence form with matching labels `severity=critical` & `cluster!~europe-.*` and comment `Silence critical EU alerts`, create a URL `https://mygrafana/aleting/silence/new?matchers=severity%3Dcritical%2Ccluster!~europe-*&comment=Silence%20critical%20EU%20alert`.
To link to a new silence page for an [external Alertmanager]({{< relref "../../datasources/alertmanager.md" >}}), add a `alertmanager` query parameter with the Alertmanager data source name.

View File

@@ -100,7 +100,7 @@ Grafana has an LDAP debug view built-in which allows you to test your LDAP confi
Within this view, you'll be able to see which LDAP servers are currently reachable and test your current configuration.
{{< docs-imagebox img="/img/docs/ldap_debug.png" class="docs-image--no-shadow" max-width="600px" >}}
{{< figure src="/static/img/docs/ldap_debug.png" class="docs-image--no-shadow" max-width="600px" >}}
To use the debug view:
@@ -109,7 +109,7 @@ To use the debug view:
1. Then, press "Run"
1. If the user is found within any of your LDAP instances, the mapping information is displayed
{{< docs-imagebox img="/img/docs/ldap_debug_mapping_testing.png" class="docs-image--no-shadow" max-width="600px" >}}
{{< figure src="/static/img/docs/ldap_debug_mapping_testing.png" class="docs-image--no-shadow" max-width="600px" >}}
### Bind

View File

@@ -12,7 +12,7 @@ With Team Sync, you can set up synchronization between your auth provider's team
of certain teams/groups to automatically be added/removed as members to certain teams in Grafana. Currently the synchronization will only happen every
time a user logs in, unless LDAP is used together with active background synchronization that was added in Grafana 6.3.
{{< docs-imagebox img="/img/docs/enterprise/team_members_ldap.png" class="docs-image--no-shadow docs-image--right" max-width= "600px" >}}
{{< figure src="/static/img/docs/enterprise/team_members_ldap.png" class="docs-image--no-shadow docs-image--right" max-width= "600px" >}}
Grafana keeps track of all synchronized users in teams and you can see which users have been synchronized in the team members list, see `LDAP` label in screenshot.
This mechanism allows Grafana to remove an existing synchronized user from a team when its LDAP group membership (for example) changes. This mechanism also enables you to manually add a user as member of a team and it will not be removed when the user signs in. This gives you flexibility to combine LDAP group memberships and Grafana team memberships.

View File

@@ -11,14 +11,14 @@ An exemplar is a specific trace representative of a repeated pattern of data in
Suppose your company website is experiencing a surge in traffic volumes. While more than eighty percent of the users are able to access the website in under two seconds, some users are experiencing a higher than normal response time resulting in bad user experience
To identify the factors that are contributing to the latency, you must compare a trace for a fast response against a trace for a slow response. Given the vast amount of data in a typical production environment, it will be extremely laborious and time-consuming effort.
To identify the factors that are contributing to the latency, you must compare a trace for a fast response against a trace for a slow response. Given the vast amount of data in a typical production environment, it will be extremely laborious and time-consuming effort.
Use exemplars to help isolate problems within your data distribution by pinpointing query traces exhibiting high latency within a time interval. Once you localize the latency problem to a few exemplar traces, you can combine it with additional system based information or location properties to perform a root cause analysis faster, leading to quick resolutions to performance issues.
Support for exemplars is available for the Prometheus data source only. Once you enable the functionality, exemplars data is available by default. For more information on exemplar configuration and how to enable exemplars, refer to [configuring exemplars in Prometheus data source]({{< relref "../../datasources/prometheus.md#configuring-exemplars" >}}).
Grafana shows exemplars alongside a metric in the Explore view and in dashboards. Each exemplar displays as a highlighted star. You can hover your cursor over an exemplar to view the unique traceID, which is a combination of a key value pair. To investigate further, click the blue button next to the `traceID` property.
Grafana shows exemplars alongside a metric in the Explore view and in dashboards. Each exemplar displays as a highlighted star. You can hover your cursor over an exemplar to view the unique traceID, which is a combination of a key value pair. To investigate further, click the blue button next to the `traceID` property.
{{< docs-imagebox img="/img/docs/v74/exemplars.png" class="docs-image--no-shadow" max-width= "750px" caption="Screenshot showing the detail window of an Exemplar" >}}
{{< figure src="/static/img/docs/v74/exemplars.png" class="docs-image--no-shadow" max-width= "750px" caption="Screenshot showing the detail window of an Exemplar" >}}
Refer to [View exemplar data]({{< relref "./view-exemplars.md" >}}) for instructions on how to drill down and view exemplar trace details from metrics and logs. To know more about exemplars, refer to the blogpost [Intro to exemplars, which enable Grafana Tempos distributed tracing at massive scale](https://grafana.com/blog/2021/03/31/intro-to-exemplars-which-enable-grafana-tempos-distributed-tracing-at-massive-scale/).

View File

@@ -7,7 +7,7 @@ weight = 400
# View exemplar data
When support for exemplar support is enabled for a Prometheus data source, you can view exemplar data either in the Explore view or from the Loki log details.
When support for exemplar support is enabled for a Prometheus data source, you can view exemplar data either in the Explore view or from the Loki log details.
## In Explore
@@ -15,13 +15,13 @@ Explore visualizes exemplar traces as highlighted stars alongside metrics data.
To examine the details of an exemplar trace:
1. Place your cursor over an exemplar (highlighted star). Depending on your backend trace data source, you will see a blue button with the label `Query with <data source name>`. In the following example, the tracing data source is Tempo.
1. Place your cursor over an exemplar (highlighted star). Depending on your backend trace data source, you will see a blue button with the label `Query with <data source name>`. In the following example, the tracing data source is Tempo.
{{< docs-imagebox img="/img/docs/basics/exemplar-details.png" class="docs-image--no-shadow" max-width= "275px" caption="Screenshot showing Exemplar details" >}}
{{< figure src="/static/img/docs/basics/exemplar-details.png" class="docs-image--no-shadow" max-width= "275px" caption="Screenshot showing Exemplar details" >}}
1. Click the **Query with Tempo** option next to the `traceID` property. The trace details, including the spans within the trace are listed in a separate panel on the right.
{{< docs-imagebox img="/img/docs/basics/exemplar-explore-view.png" class="docs-image--no-shadow" max-width= "750px" caption="Explorer view with panel showing trace details" >}}
{{< figure src="/static/img/docs/basics/exemplar-explore-view.png" class="docs-image--no-shadow" max-width= "750px" caption="Explorer view with panel showing trace details" >}}
For more information on how to drill down and analyze the trace and span details, refer to the [Analyze trace and span details](#analyze-trace-and-spans) section.
@@ -32,32 +32,32 @@ You can also view exemplar trace details from the Loki logs in Explore. Use rege
To view the details of an exemplar trace:
1. Expand a log line and scroll down to the `Detected fields` section. Depending on your backend trace data source, you will see a blue button with the label `<data source name>`.
1. Expand a log line and scroll down to the `Detected fields` section. Depending on your backend trace data source, you will see a blue button with the label `<data source name>`.
1. Click the blue button next to the `traceID` property. Typically, it will have the name of the backend data source. In the following example, the tracing data source is Tempo. The trace details, including the spans within the trace are listed in a separate panel on the right.
{{< docs-imagebox img="/img/docs/basics/exemplar-loki-logs.png" class="docs-image--no-shadow" max-width= "750px" caption="Explorer view with panel showing trace details" >}}
{{< figure src="/static/img/docs/basics/exemplar-loki-logs.png" class="docs-image--no-shadow" max-width= "750px" caption="Explorer view with panel showing trace details" >}}
For more information on how to drill down and analyze the trace and span details, refer to the [Analyze trace and span details](#analyze-trace-and-spans) section.
## Analyze trace and spans
This panel shows the details of the trace in different segments.
- The top segment shows the Trace ID to indicate that the query results correspond to the specific trace.
This panel shows the details of the trace in different segments.
- The top segment shows the Trace ID to indicate that the query results correspond to the specific trace.
You can add more traces to the results using the `Add query` button.
- The next segment shows the entire span for the specific trace as a narrow strip. All levels of the trace from the client all the way down to database query is displayed, which provides a bird's eye view of the time distribution across all layers over which the HTTP request was processed.
1. You can click within this strip view to display a magnified view of a smaller time segment within the span. This magnified view shows up in the bottom segment of the panel.
1. In the magnified view, you can expand or collapse the various levels of the trace to drill down to the specific span of interest.
1. In the magnified view, you can expand or collapse the various levels of the trace to drill down to the specific span of interest.
For example, if the strip view shows that most of the latency was within the app layer, you can expand the trace down the app layer to investigate the problem further. To expand a particular layer of span, click the icon on the left. The same button can collapse an expanded span.
- To see the details of the span at any level, click the span itself.
- To see the details of the span at any level, click the span itself.
This displays additional metadata associated with the span. The metadata itself is initially shown in a narrow strip but you can see more details by clicking the metadata strip.
{{< docs-imagebox img="/img/docs/basics/exemplar-span-details.png" class="docs-image--no-shadow" max-width= "750px" caption="Span details" >}}
{{< figure src="/static/img/docs/basics/exemplar-span-details.png" class="docs-image--no-shadow" max-width= "750px" caption="Span details" >}}

View File

@@ -16,13 +16,18 @@ and the bar height represents the frequency (such as count) of values that fell
## Histogram example
This histogram shows the value distribution of a couple of time series. You can easily see that
This _histogram_ shows the value distribution of a couple of time series. You can easily see that
most values land between 240-300 with a peak between 260-280.
![](/img/docs/v43/heatmap_histogram.png)
![](/static/img/docs/v43/heatmap_histogram.png)
Histograms only look at _value distributions_ over a specific time range. The problem with histograms is you cannot see any trends or changes in the distribution over time.
This is where heatmaps become useful.
Here is an example showing height distribution of people.
{{< figure src="/static/img/docs/histogram-panel/histogram-example-v8-0.png" max-width="625px" caption="Bar chart example" >}}
For more information about histogram visualization options, refer to [Histogram]({{< relref "../panels/visualizations/histogram.md" >}}).
Histograms only look at _value distributions_ over a specific time range. The problem with histograms is you cannot see any trends or changes in the distribution over time. This is where heatmaps become useful.
## Heatmaps
@@ -30,7 +35,9 @@ A _heatmap_ is like a histogram, but over time where each time slice represents
In this example, you can clearly see what values are more common and how they trend over time.
![](/img/docs/v43/heatmap_histogram_over_time.png)
![](/static/img/docs/v43/heatmap_histogram_over_time.png)
For more information about heatmap visualization options, refer to [Heatmap]({{< relref "../panels/visualizations/heatmap.md" >}}).
## Pre-bucketed data

View File

@@ -14,7 +14,7 @@ In [Introduction to time series]({{< relref "timeseries.md#time-series-databases
With time series data, the data often contain more than a single series, and is a set of multiple time series. Many Grafana data sources support this type of data.
{{< docs-imagebox img="/img/docs/example_graph_multi_dim.png" class="docs-image--no-shadow" max-width="850px" >}}
{{< figure src="/static/img/docs/example_graph_multi_dim.png" class="docs-image--no-shadow" max-width="850px" >}}
The common case is issuing a single query for a measurement with one or more additional properties as dimensions. For example, querying a temperature measurement along with a location property. In this case, multiple series are returned back from that single query and each series has unique location as a dimension.
@@ -76,7 +76,7 @@ In this case the labels that represent the dimensions will have two keys based o
> **Note:** More than one dimension is currently only supported in the Logs queries within the Azure Monitor service as of version 7.1.
> **Note:** Multiple dimensions are not supported in a way that maps to multiple alerts in Grafana, but rather they are treated as multiple conditions to a single alert. See the documentation on [creating alerts with multiple series]({{< relref "../alerting/create-alerts.md#multiple-series" >}}).
> **Note:** Multiple dimensions are not supported in a way that maps to multiple alerts in Grafana, but rather they are treated as multiple conditions to a single alert. See the documentation on [creating alerts with multiple series]({{< relref "../alerting/old-alerting/create-alerts.md#multiple-series" >}}).
### Multiple values

View File

@@ -1,5 +1,5 @@
+++
title = "Time series"
title = "Intro to time series"
description = "Introduction to time series"
keywords = ["grafana", "intro", "guide", "concepts", "timeseries"]
weight = 400
@@ -19,7 +19,7 @@ Temperature data like this is one example of what we call a *time series*—a se
Tables are useful when you want to identify individual measurements but make it difficult to see the big picture. A more common visualization for time series is the _graph_, which instead places each measurement along a time axis. Visual representations like the graph make it easier to discover patterns and features of the data that otherwise would be difficult to see.
{{< docs-imagebox img="/img/docs/example_graph.png" class="docs-image--no-shadow" max-width="850px" >}}
{{< figure src="/static/img/docs/example_graph.png" class="docs-image--no-shadow" max-width="850px" >}}
Temperature data like the one in the example, is far from the only example of a time series. Other examples of time series are:

View File

@@ -38,11 +38,11 @@ How can you tell you are here?
- Methodical dashboards according to an [observability strategy]({{< relref "common-observability-strategies.md" >}}).
- Hierarchical dashboards with drill-downs to the next level.
{{< imgbox max-width="100%" img="/img/docs/best-practices/drill-down-example.png" caption="Example of using drill-down" >}}
{{< figure class="float-right" max-width="100%" src="/static/img/docs/best-practices/drill-down-example.png" caption="Example of using drill-down" >}}
- Dashboard design reflects service hierarchies. The example shown below uses the RED method (request and error rate on the left, latency duration on the right) with one row per service. The row order reflects the data flow.
{{< imgbox max-width="100%" img="/img/docs/best-practices/service-hierarchy-example.png" caption="Example of a service hierarchy" >}}
{{< figure class="float-right" max-width="100%" src="/static/img/docs/best-practices/service-hierarchy-example.png" caption="Example of a service hierarchy" >}}
- Compare like to like: split service dashboards when the magnitude differs. Make sure aggregated metrics don't drown out important information.
- Expressive charts with meaningful use of color and normalizing axes where you can.

View File

@@ -10,7 +10,7 @@ A _dashboard_ is a set of one or more panels organized and arranged into one or
## Dashboard UI
<img src="/img/docs/v50/dashboard_annotated.png" class="no-shadow" width="700px">
<img src="/static/img/docs/v50/dashboard_annotated.png" class="no-shadow" width="700px">
1. Zoom out time range
1. Time picker dropdown. Here you can access relative time range options, auto refresh options and set custom absolute time ranges.
@@ -22,7 +22,7 @@ A _dashboard_ is a set of one or more panels organized and arranged into one or
Click the new Dashboard link on the right side of the Dashboard picker. You now have a blank Dashboard.
<img class="no-shadow" src="/img/docs/v50/top_nav_annotated.png" width="580px">
<img class="no-shadow" src="/static/img/docs/v50/top_nav_annotated.png" width="580px">
The image above shows you the top header for a Dashboard.

View File

@@ -7,7 +7,7 @@ weight = 2
# Annotations
{{< docs-imagebox img="/img/docs/v46/annotations.png" max-width="800px" >}}
{{< figure src="/static/img/docs/v46/annotations.png" max-width="800px" >}}
Annotations provide a way to mark points on the graph with rich events. When you hover over an annotation
you can get event description and event tags. The text field can include links to other systems with more detail.
@@ -20,17 +20,17 @@ Grafana comes with a native annotation store and the ability to add annotation e
By holding down Ctrl/Cmd+Click. Adding tags to the annotation will make it searchable from other dashboards.
{{< docs-imagebox img="/img/docs/annotations/annotation-still.png"
max-width="600px" animated-gif="/img/docs/annotations/annotation.gif" >}}
{{< figure src="/static/img/docs/annotations/annotation-still.png"
max-width="600px" animated-gif="/static/img/docs/annotations/annotation.gif" >}}
### Adding regions events
You can also hold down Ctrl/Cmd and select region to create a region annotation.
{{< docs-imagebox img="/img/docs/annotations/region-annotation-still.png"
max-width="600px" animated-gif="/img/docs/annotations/region-annotation.gif" >}}
{{< figure src="/static/img/docs/annotations/region-annotation-still.png"
max-width="600px" animated-gif="/static/img/docs/annotations/region-annotation.gif" >}}
### Built in query
### Built-in query
After you added an annotation they will still be visible. This is due to the built in annotation query that exists on all dashboards. This annotation query will
fetch all annotation events that originate from the current dashboard and show them on the panel where they were created. This includes alert state history annotations. You can
@@ -46,7 +46,7 @@ one tag. For example create an annotation query name `outages` and specify a tag
In Grafana v5.3+ it's possible to use template variables in the tag query. So if you have a dashboard showing stats for different services and a template variable that dictates which services to show, you can now use the same template variable in your annotation query to only show annotations for those services.
{{< docs-imagebox img="/img/docs/v53/annotation_tag_filter_variable.png" max-width="600px" >}}
{{< figure src="/static/img/docs/v53/annotation_tag_filter_variable.png" max-width="600px" >}}
## Querying other data sources
@@ -54,8 +54,8 @@ Annotation events are fetched via annotation queries. To add a new annotation qu
open the dashboard settings menu, then select `Annotations`. This will open the dashboard annotations
settings view. To create a new annotation query hit the `New` button.
<!--![](/img/docs/v50/annotation_new_query.png)-->
{{< docs-imagebox img="/img/docs/v50/annotation_new_query.png" max-width="600px" >}}
<!--![](/static/img/docs/v50/annotation_new_query.png)-->
{{< figure src="/static/img/docs/v50/annotation_new_query.png" max-width="600px" >}}
Specify a name for the annotation query. This name is given to the toggle (checkbox) that will allow
you to enable/disable showing annotation events from this query. For example you might have two

View File

@@ -21,7 +21,7 @@ On the Create Folder page, fill in a unique name for the folder and then click C
## Manage Dashboards
{{< docs-imagebox img="/img/docs/v50/manage_dashboard_menu.png" max-width="300px" class="docs-image--right" >}}
{{< figure src="/static/img/docs/v50/manage_dashboard_menu.png" max-width="300px" class="docs-image--right" >}}
There is a new Manage Dashboards page where you can carry out a variety of tasks:

View File

@@ -10,7 +10,7 @@ weight = 100
Whenever you save a version of your dashboard, a copy of that version is saved so that previous versions of your dashboard are never lost. A list of these versions is available by entering the dashboard settings and then selecting "Versions" in the left side menu.
<img class="no-shadow" src="/img/docs/v50/dashboard_versions_list.png">
<img class="no-shadow" src="/static/img/docs/v50/dashboard_versions_list.png">
The dashboard version history feature lets you compare and restore to previously saved dashboard versions.
@@ -18,11 +18,11 @@ The dashboard version history feature lets you compare and restore to previously
To compare two dashboard versions, select the two versions from the list that you wish to compare. Once selected, the "Compare versions" button will become clickable. Click the button to view the diff between the two versions.
<img class="no-shadow" src="/img/docs/v50/dashboard_versions_select.png">
<img class="no-shadow" src="/static/img/docs/v50/dashboard_versions_select.png">
Upon clicking the button, you'll be brought to the diff view. By default, you'll see a textual summary of the changes, like in the image below.
<img class="no-shadow" src="/img/docs/v50/dashboard_versions_diff_basic.png">
<img class="no-shadow" src="/static/img/docs/v50/dashboard_versions_diff_basic.png">
If you want to view the diff of the raw JSON that represents your dashboard, you can do that as well by clicking the "View JSON Diff" button at the bottom.
@@ -32,6 +32,6 @@ If you want to restore to the version you are diffing against, you can do so by
If you need to restore to a previously saved dashboard version, you can do so by either clicking the "Restore" button on the right of a row in the dashboard version list, or by clicking the "Restore to version \<x\>" button appearing in the diff view. Clicking the button will bring up the following popup prompting you to confirm the restoration.
<img class="no-shadow" src="/img/docs/v50/dashboard_versions_restore.png">
<img class="no-shadow" src="/static/img/docs/v50/dashboard_versions_restore.png">
After restoring to a previous version, a new version will be created containing the same exact data as the previous version, only with a different version number. This is indicated in the "Notes column" for the row in the new dashboard version. This is done simply to ensure your previous dashboard versions are not affected by the change.

View File

@@ -15,7 +15,7 @@ Dashboards are exported in Grafana JSON format, and contain everything you need
The export feature is accessed in the share window which you open by clicking the share button in the dashboard menu.
{{< docs-imagebox img="/img/docs/export/export-modal.png" max-width="800px" >}}
{{< figure src="/static/img/docs/export/export-modal.png" max-width="800px" >}}
### Making a dashboard portable
@@ -25,16 +25,16 @@ add template variables for things like a metric prefix (use constant variable) a
A template variable of the type `Constant` will automatically be hidden in
the dashboard, and will also be added as a required input when the dashboard is imported.
## Importing a dashboard
## Import dashboard
To import a dashboard click the + icon in the side menu, and then click **Import**.
{{< docs-imagebox img="/img/docs/v70/import_step1.png" max-width="700px" >}}
{{< figure src="/static/img/docs/v70/import_step1.png" max-width="700px" >}}
From here you can upload a dashboard JSON file, paste a [Grafana.com](https://grafana.com) dashboard
URL or paste dashboard JSON text directly into the text area.
{{< docs-imagebox img="/img/docs/v70/import_step2_grafana.com.png" max-width="700px" >}}
{{< figure src="/static/img/docs/v70/import_step2_grafana.com.png" max-width="700px" >}}
In step 2 of the import process Grafana will let you change the name of the dashboard, pick what
data source you want the dashboard to use and specify any metric prefixes (if the dashboard use any).
@@ -43,7 +43,7 @@ data source you want the dashboard to use and specify any metric prefixes (if th
Find dashboards for common server applications at [Grafana.com/dashboards](https://grafana.com/dashboards).
{{< docs-imagebox img="/img/docs/v50/gcom_dashboard_list.png" max-width="700px" >}}
{{< figure src="/static/img/docs/v50/gcom_dashboard_list.png" max-width="700px" >}}
## Import and sharing with Grafana 2.x or 3.0

View File

@@ -14,7 +14,7 @@ Grafana automatically scales dashboards to any resolution, which makes them perf
You can access the Playlist feature from Grafana's side menu, in the Dashboards submenu.
{{< docs-imagebox img="/img/docs/v50/playlist.png" max-width="25rem">}}
{{< figure src="/static/img/docs/v50/playlist.png" max-width="25rem">}}
## Create a playlist

View File

@@ -10,6 +10,6 @@ weight = 8
Reporting allows you to generate PDFs from any of your dashboards and have them sent out to interested parties on a schedule.
{{< docs-imagebox img="/img/docs/enterprise/reports_list.png" max-width="500px" class="docs-image--no-shadow" >}}
{{< figure src="/static/img/docs/enterprise/reports_list.png" max-width="500px" class="docs-image--no-shadow" >}}
> Reporting is only available in Grafana Enterprise, v6.4 or later. For more information, refer to [Reporting]({{< relref "../enterprise/reporting.md" >}}) in [Grafana Enterprise]({{< relref "../enterprise" >}}).

View File

@@ -10,7 +10,7 @@ weight = 5
Dashboards can be searched by the dashboard name, filtered by one (or many) tags or filtered by starred status. The dashboard search is accessed through the dashboard picker, available in the dashboard top nav area. The dashboard search can also be opened by using the shortcut `F`.
<img class="no-shadow" src="/img/docs/v50/dashboard_search_annotated.png" width="700px">
<img class="no-shadow" src="/static/img/docs/v50/dashboard_search_annotated.png" width="700px">
1. `Search Bar`: The search bar allows you to enter any string and search both database and file based dashboards in real-time.
1. `Starred`: Here you find all your starred dashboards.

View File

@@ -5,7 +5,7 @@ weight = 7
# Keyboard shortcuts
Grafana has a number of keyboard shortcuts available. Press Shift + `?` on your keyboard to display all keyboard shortcuts available in your version of Grafana.
Grafana has a number of keyboard shortcuts available. Press `?` or `h` on your keyboard to display all keyboard shortcuts available in your version of Grafana.
**Popular shortcuts:**

View File

@@ -37,7 +37,7 @@ Here are some examples:
The dashboard and panel time controls have a common user interface (UI).
<img class="no-shadow" src="/img/docs/time-range-controls/common-time-controls-7-0.png" max-width="700px">
<img class="no-shadow" src="/static/img/docs/time-range-controls/common-time-controls-7-0.png" max-width="700px">
The options are defined below.
@@ -47,11 +47,11 @@ The current time range, also called the _time picker_, shows the time range curr
Hover your cursor over the field to see the exact time stamps in the range and their source (such as the local browser).
<img class="no-shadow" src="/img/docs/time-range-controls/time-picker-7-0.png" max-width="300px">
<img class="no-shadow" src="/static/img/docs/time-range-controls/time-picker-7-0.png" max-width="300px">
Click on the current time range to change the time range. You can change the current time using a _relative time range_, such as the last 15 minutes, or an _absolute time range_, such as `2020-05-14 00:00:00 to 2020-05-15 23:59:59`.
<img class="no-shadow" src="/img/docs/time-range-controls/change-current-time-range-7-0.png" max-width="900px">
<img class="no-shadow" src="/static/img/docs/time-range-controls/change-current-time-range-7-0.png" max-width="900px">
### Relative time range

View File

@@ -16,8 +16,9 @@ Each data source has a specific Query Editor that is customized for the features
The following data sources are officially supported:
- [Alertmanager]({{< relref "alertmanager.md" >}})
- [AWS CloudWatch]({{< relref "cloudwatch.md" >}})
- [Azure Monitor]({{< relref "azuremonitor.md" >}})
- [Azure Monitor]({{< relref "azuremonitor/_index.md" >}})
- [Elasticsearch]({{< relref "elasticsearch.md" >}})
- [Google Cloud Monitoring]({{< relref "google-cloud-monitoring/_index.md" >}})
- [Graphite]({{< relref "graphite.md" >}})
@@ -45,4 +46,3 @@ In addition to the data sources that you have configured in your Grafana, there
## Data source plugins
Since Grafana 3.0 you can install data sources as plugins. Check out [Grafana.com/plugins](https://grafana.com/plugins) for more data sources.

View File

@@ -13,21 +13,21 @@ Before you can create your first dashboard, you need to add your data source.
To add a data source:
1. Move your cursor to the cog icon on the side menu which will show the configuration options.
{{< docs-imagebox img="/img/docs/v75/sidemenu-datasource-7-5.png" max-width="150px" class="docs-image--no-shadow">}}
{{< figure src="/static/img/docs/v75/sidemenu-datasource-7-5.png" max-width="150px" class="docs-image--no-shadow">}}
1. Click on **Data sources**. The data sources page opens showing a list of previously configured data sources for the Grafana instance.
1. Click **Add data source** to see a list of all supported data sources.
{{< docs-imagebox img="/img/docs/v75/add-data-source-7-5.png" max-width="600px" class="docs-image--no-shadow">}}
{{< figure src="/static/img/docs/v75/add-data-source-7-5.png" max-width="600px" class="docs-image--no-shadow">}}
1. Search for a specific data source by entering the name in the search dialog. Or you can scroll through supported data sources grouped into time series, logging, tracing and other categories.
1. Move the cursor over the data source you want to add.
{{< docs-imagebox img="/img/docs/v75/select-data-source-7-5.png" max-width="700px" class="docs-image--no-shadow">}}
{{< figure src="/static/img/docs/v75/select-data-source-7-5.png" max-width="700px" class="docs-image--no-shadow">}}
1. Click **Select**. The data source configuration page opens.
1. Configure the data source following instructions specific to that data source. See [Data sources]({{< relref "_index.md" >}}) for links to configuration instructions for all supported data sources.

View File

@@ -0,0 +1,35 @@
+++
title = "Alertmanager"
description = "Guide for using Alertmanager in Grafana"
keywords = ["grafana", "prometheus", "guide"]
aliases = ["/docs/grafana/latest/features/datasources/alertmanager"]
weight = 1300
+++
# Alertmanager data source
Grafana includes built-in support for Prometheus Alertmanager. It is presently in alpha and not accessible unless [alpha plugins are enabled in Grafana settings](https://grafana.com/docs/grafana/latest/administration/configuration/#enable_alpha). Once you add it as a data source, you can use the [Grafana alerting UI](https://grafana.com/docs/grafana/latest/alerting/) to manage silences, contact points as well as notification policies. A drop down option in these pages allows you to switch between Grafana and any configured Alertmanager data sources .
>**Note:** New in Grafana 8.0.
>**Note:** Currently only the [Cortex implementation of Prometheus alertmanager](https://cortexmetrics.io/docs/proposals/scalable-alertmanager/) is supported.
## Provision the Alertmanager data source
Configure the Alertmanager data sources by updating Grafana's configuration files. For more information on how it works and the settings available, refer to the [provisioning docs page]({{< relref "../administration/provisioning/#datasources" >}}).
Here is an example for provisioning the Alertmanager data source:
```yaml
apiVersion: 1
datasources:
- name: Alertmanager
type: alertmanager
url: http://localhost:9090
access: proxy
# optionally
basicAuth: true
basicAuthUser: my_user
basicAuthPassword: test_password
```

View File

@@ -1,478 +0,0 @@
+++
title = "Azure Monitor"
description = "Guide for using Azure Monitor in Grafana"
keywords = ["grafana", "microsoft", "azure", "monitor", "application", "insights", "log", "analytics", "guide"]
aliases = ["/docs/grafana/latest/features/datasources/azuremonitor"]
weight = 300
+++
# Azure Monitor data source
The Azure Monitor data source supports multiple services in the Azure cloud:
- **[Azure Monitor Metrics]({{< relref "#querying-the-azure-monitor-service" >}})** (or Metrics) is the platform service that provides a single source for monitoring Azure resources.
- **[Azure Monitor Logs]({{< relref "#querying-the-azure-log-analytics-service" >}})** (or Logs) gives you access to log data collected by Azure Monitor.
- **[Application Insights]({{< relref "#querying-the-application-insights-service" >}})** is an extensible Application Performance Management (APM) service for web developers on multiple platforms and can be used to monitor your live web application - it will automatically detect performance anomalies.
- **[Application Insights Analytics]({{< relref "#query-the-application-insights-analytics-service" >}})** allows you to query [Application Insights data](https://docs.microsoft.com/en-us/azure/azure-monitor/app/analytics) using the same query language used for Azure Log Analytics.
## Add the data source
The data source can access metrics from four different services. You can configure access to the services that you use. It is also possible to use the same credentials for multiple services if that is how you have set it up in Azure AD.
- [Guide to setting up an Azure Active Directory Application for Azure Monitor.](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal)
- [Guide to setting up an Azure Active Directory Application for Azure Monitor Logs.](https://dev.loganalytics.io/documentation/Authorization/AAD-Setup)
- [Quickstart Guide for Application Insights.](https://dev.applicationinsights.io/quickstart/)
1. Accessed from the Grafana main menu, newly installed data sources can be added immediately within the Data Sources section. Next, click the "Add data source" button in the upper right. The Azure Monitor data source will be available for selection in the Cloud section in the list of data sources.
1. In the name field, Grafana will automatically fill in a name for the data source - `Azure Monitor` or something like `Azure Monitor - 3`. If you are going to configure multiple data sources, then change the name to something more informative.
1. If you are using Azure Monitor, you need 4 pieces of information from the Azure portal (see link above for detailed instructions):
- **Tenant Id** (Azure Active Directory -> Properties -> Directory ID)
- **Client Id** (Azure Active Directory -> App Registrations -> Choose your app -> Application ID)
- **Client Secret** (Azure Active Directory -> App Registrations -> Choose your app -> Keys)
- **Default Subscription Id** (Subscriptions -> Choose subscription -> Overview -> Subscription ID)
1. Paste these four items into the fields in the Azure Monitor API Details section:
{{< docs-imagebox img="/img/docs/v62/config_1_azure_monitor_details.png" class="docs-image--no-shadow" caption="Azure Monitor Configuration Details" >}}
- The Subscription Id can be changed per query. Save the data source and refresh the page to see the list of subscriptions available for the specified Client Id.
1. If you are also using the Azure Monitor Logs service, then you need to specify these two configuration values (or you can reuse the Client Id and Secret from the previous step).
- Client Id (Azure Active Directory -> App Registrations -> Choose your app -> Application ID)
- Client Secret (Azure Active Directory -> App Registrations -> Choose your app -> Keys -> Create a key -> Use client secret)
1. If you are using Application Insights, then you need two pieces of information from the Azure Portal (see link above for detailed instructions):
- Application ID
- API Key
1. Paste these two items into the appropriate fields in the Application Insights API Details section:
{{< docs-imagebox img="/img/docs/v62/config_2_app_insights_api_details.png" class="docs-image--no-shadow" caption="Application Insights Configuration Details" >}}
1. Test that the configuration details are correct by clicking on the "Save & Test" button:
{{< docs-imagebox img="/img/docs/v62/config_3_save_and_test.png" class="docs-image--no-shadow" caption="Save and Test" >}}
Alternatively on step 4 if creating a new Azure Active Directory App, use the [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/?view=azure-cli-latest):
```bash
az ad sp create-for-rbac -n "http://localhost:3000"
```
## Choose a Service
In the query editor for a panel, after choosing your Azure Monitor data source, the first option is to choose a service. There are four options here:
- `Metrics`
- `Application Insights`
- `Logs`
- `Insights Analytics`
- `Azure Resource Graph`
The query editor changes depending on which one you pick. Metrics is the default.
Starting in Grafana 7.1, Insights Analytics replaced the former edit mode from within Application Insights.
Starting in Grafana 7.4, the Azure Monitor query type was renamed to Metrics and Azure Logs Analytics was renamed to Logs.
## Query the Metrics service
The Metrics service provides metrics for all the Azure services that you have running. It helps you understand how your applications on Azure are performing and to proactively find issues affecting your applications.
If your Azure Monitor credentials give you access to multiple subscriptions, then choose the appropriate subscription first.
Examples of metrics that you can get from the service are:
- `Microsoft.Compute/virtualMachines - Percentage CPU`
- `Microsoft.Network/networkInterfaces - Bytes sent`
- `Microsoft.Storage/storageAccounts - Used Capacity`
{{< docs-imagebox img="/img/docs/v60/azuremonitor-service-query-editor.png" class="docs-image--no-shadow" caption="Metrics Query Editor" >}}
As of Grafana 7.1, the query editor allows you to query multiple dimensions for metrics that support them. Metrics that support multiple dimensions are those listed in the [Azure Monitor supported Metrics List](https://docs.microsoft.com/en-us/azure/azure-monitor/platform/metrics-supported) that have one or more values listed in the "Dimension" column for the metric.
### Format legend keys with aliases for Metrics
The default legend formatting for the Metrics API is:
`metricName{dimensionName=dimensionValue,dimensionTwoName=DimensionTwoValue}`
> **Note:** Before Grafana 7.1, the formatting included the resource name in the default: `resourceName{dimensionName=dimensionValue}.metricName`. As of Grafana 7.1, the resource name has been removed from the default legend.
These can be quite long, but this formatting can be changed by using aliases. In the **Legend Format** field, you can combine the aliases defined below any way you want.
Metrics examples:
- `Blob Type: {{ blobtype }}`
- `{{ resourcegroup }} - {{ resourcename }}`
### Alias patterns for Metrics
- `{{ resourcegroup }}` = replaced with the value of the Resource Group
- `{{ namespace }}` = replaced with the value of the Namespace (e.g. Microsoft.Compute/virtualMachines)
- `{{ resourcename }}` = replaced with the value of the Resource Name
- `{{ metric }}` = replaced with metric name (e.g. Percentage CPU)
- `{{ dimensionname }}` = _Legacy as of 7.1+ (for backwards compatibility)_ replaced with the first dimension's key/label (as sorted by the key/label) (e.g. blobtype)
- `{{ dimensionvalue }}` = _Legacy as of 7.1+ (for backwards compatibility)_ replaced with first dimension's value (as sorted by the key/label) (e.g. BlockBlob)
- `{{ arbitraryDim }}` = _Available in 7.1+_ replaced with the value of the corresponding dimension. (e.g. `{{ blobtype }}` becomes BlockBlob)
### Create template variables for Metrics
Instead of hard-coding things like server, application and sensor name in your metric queries you can use variables in their place. 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.
Note that the Metrics service does not support multiple values yet. If you want to visualize multiple time series (for example, metrics for server1 and server2) then you have to add multiple queries to able to view them on the same graph or in the same table.
The Metrics data source Plugin provides the following queries you can specify in the `Query` field in the Variable edit view. They allow you to fill a variable's options list.
| Name | Description |
| -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| `Subscriptions()` | Returns a list of subscriptions. |
| `ResourceGroups()` | Returns a list of resource groups. |
| `ResourceGroups(12345678-aaaa-bbbb-cccc-123456789aaa)` | Returns a list of resource groups for a specified subscription. |
| `Namespaces(aResourceGroup)` | Returns a list of namespaces for the specified resource group. |
| `Namespaces(12345678-aaaa-bbbb-cccc-123456789aaa, aResourceGroup)` | Returns a list of namespaces for the specified resource group and subscription. |
| `ResourceNames(aResourceGroup, aNamespace)` | Returns a list of resource names. |
| `ResourceNames(12345678-aaaa-bbbb-cccc-123456789aaa, aResourceGroup, aNamespace)` | Returns a list of resource names for a specified subscription. |
| `MetricNamespace(aResourceGroup, aNamespace, aResourceName)` | Returns a list of metric namespaces. |
| `MetricNamespace(12345678-aaaa-bbbb-cccc-123456789aaa, aResourceGroup, aNamespace, aResourceName)` | Returns a list of metric namespaces for a specified subscription. |
| `MetricNames(aResourceGroup, aNamespace, aResourceName)` | Returns a list of metric names. |
| `MetricNames(12345678-aaaa-bbbb-cccc-123456789aaa, aResourceGroup, aNamespace, aResourceName)` | Returns a list of metric names for a specified subscription. |
Examples:
- Resource Groups query: `ResourceGroups()`
- Passing in metric name variable: `Namespaces(cosmo)`
- Chaining template variables: `ResourceNames($rg, $ns)`
- Do not quote parameters: `MetricNames(hg, Microsoft.Network/publicIPAddresses, grafanaIP)`
{{< docs-imagebox img="/img/docs/v60/azuremonitor-service-variables.png" class="docs-image--no-shadow" caption="Nested Azure Monitor Template Variables" >}}
Check out the [Templating]({{< relref "../variables/_index.md" >}}) documentation for an introduction to the templating feature and the different
types of template variables.
### List of supported Azure Monitor metrics
Not all metrics returned by the Azure Monitor Metrics API have values. To make it easier for you when building a query, the Grafana data source has a list of supported metrics and ignores metrics which will never have values. This list is updated regularly as new services and metrics are added to the Azure cloud. For more information about the list of metrics, refer to [current supported namespaces](https://github.com/grafana/grafana/blob/main/public/app/plugins/datasource/grafana-azure-monitor-datasource/azure_monitor/supported_namespaces.ts).
### Alerting
Grafana alerting is supported for the Azure Monitor service. This is not Azure Alerts support. For more information about Grafana alerting, refer to [how alerting in Grafana works]({{< relref "../alerting/_index.md" >}}).
{{< docs-imagebox img="/img/docs/v60/azuremonitor-alerting.png" class="docs-image--no-shadow" caption="Azure Monitor Alerting" >}}
## Query 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.
If your credentials give you access to multiple subscriptions, then choose the appropriate subscription before entering queries.
### Time series queries
Time series queries are for the Graph panel and other panels like the SingleStat panel. Each query must contain at least a datetime column and a numeric value column. The result must also be sorted in ascending order by the datetime column.
Here is an example query that returns the aggregated count grouped by hour:
```kusto
Perf
| where $__timeFilter(TimeGenerated)
| summarize count() by bin(TimeGenerated, 1h)
| order by TimeGenerated asc
```
A query can also have one or more non-numeric/non-datetime columns, and those columns are considered dimensions and become labels in the response. For example, a query that returns the aggregated count grouped by hour, Computer, and the CounterName:
```kusto
Perf
| where $__timeFilter(TimeGenerated)
| summarize count() by bin(TimeGenerated, 1h), Computer, CounterName
| order by TimeGenerated asc
```
You can also select additional number value columns (with, or without multiple dimensions). For example, getting a count and average value by hour, Computer, CounterName, and InstanceName:
```kusto
Perf
| where $__timeFilter(TimeGenerated)
| summarize Samples=count(), ["Avg Value"]=avg(CounterValue)
by bin(TimeGenerated, $__interval), Computer, CounterName, InstanceName
| order by TimeGenerated asc
```
> **Tip**: In the above query, the Kusto syntax `Samples=count()` and `["Avg Value"]=...` is used to rename those columns — the second syntax allowing for the space. This changes the name of the metric that Grafana uses, and as a result, things like series legends and table columns will match what you specify. Here `Samples` is displayed instead of `_count`.
{{< docs-imagebox img="/img/docs/azuremonitor/logs_multi-value_multi-dim.png" class="docs-image--no-shadow" caption="Azure Logs query with multiple values and multiple dimensions" >}}
### Table queries
Table queries are mainly used in the Table panel and show a list of columns and rows. This example query returns rows with the six specified columns:
```kusto
AzureActivity
| where $__timeFilter()
| project TimeGenerated, ResourceGroup, Category, OperationName, ActivityStatus, Caller
| order by TimeGenerated desc
```
### Format the display name for Log Analytics
The default display name format is:
`metricName{dimensionName=dimensionValue,dimensionTwoName=DimensionTwoValue}`
This can be customized by using the [display name field option]({{< relref "../panels/field-options/_index.md#display-name" >}}).
### Logs macros
To make writing queries easier there are several Grafana macros that can be used in the where clause of a query:
- `$__timeFilter()` - Expands to
`TimeGenerated ≥ datetime(2018-06-05T18:09:58.907Z) and`
`TimeGenerated ≤ datetime(2018-06-05T20:09:58.907Z)` where the from and to datetimes are from the Grafana time picker.
- `$__timeFilter(datetimeColumn)` - Expands to
`datetimeColumn ≥ datetime(2018-06-05T18:09:58.907Z) and`
`datetimeColumn ≤ datetime(2018-06-05T20:09:58.907Z)` where the from and to datetimes are from the Grafana time picker.
- `$__timeFrom()` - Returns the From datetime from the Grafana picker. Example: `datetime(2018-06-05T18:09:58.907Z)`.
- `$__timeTo()` - Returns the From datetime from the Grafana picker. Example: `datetime(2018-06-05T20:09:58.907Z)`.
- `$__escapeMulti($myVar)` - is to be used with multi-value template variables that contain illegal characters. If `$myVar` has the following two values as a string `'\\grafana-vm\Network(eth0)\Total','\\hello!'`, then it expands to: `@'\\grafana-vm\Network(eth0)\Total', @'\\hello!'`. If using single value variables there is no need for this macro, simply escape the variable inline instead - `@'\$myVar'`.
- `$__contains(colName, $myVar)` - is to be used with multi-value template variables. If `$myVar` has the value `'value1','value2'`, it expands to: `colName in ('value1','value2')`.
If using the `All` option, then check the `Include All Option` checkbox and in the `Custom all value` field type in the following value: `all`. If `$myVar` has value `all` then the macro will instead expand to `1 == 1`. For template variables with a lot of options, this will increase the query performance by not building a large "where..in" clause.
### Logs builtin variables
There are also some Grafana variables that can be used in Logs queries:
- `$__interval` - Grafana calculates the minimum time grain that can be used to group by time in queries. For more information about `$__interval`, refer to [interval variables]({{< relref "../variables/variable-types/_index.md#interval-variables" >}}). It returns a time grain like `5m` or `1h` that can be used in the bin function. E.g. `summarize count() by bin(TimeGenerated, $__interval)`
### Templating with variables for Logs
Any Log Analytics query that returns a list of values can be used in the `Query` field in the Variable edit view. There is also one Grafana function for Log Analytics that returns a list of workspaces.
Refer to the [Variables]({{< relref "../variables/_index.md" >}}) documentation for an introduction to the templating feature and the different
types of template variables.
| Name | Description |
| -------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| `workspaces()` | Returns a list of workspaces for the default subscription. |
| `workspaces(12345678-aaaa-bbbb-cccc-123456789aaa)` | Returns a list of workspaces for the specified subscription (the parameter can be quoted or unquoted). |
Example variable queries:
<!-- prettier-ignore-start -->
| Query | Description |
| --------------------------------------------------------------------------------------- | --------------------------------------------------------- |
| `subscriptions()` | Returns a list of Azure subscriptions |
| `workspaces()` | Returns a list of workspaces for default subscription |
| `workspaces("12345678-aaaa-bbbb-cccc-123456789aaa")` | Returns a list of workspaces for a specified subscription |
| `workspaces("$subscription")` | With template variable for the subscription parameter |
| `workspace("myWorkspace").Heartbeat \| distinct Computer` | Returns a list of Virtual Machines |
| `workspace("$workspace").Heartbeat \| distinct Computer` | Returns a list of Virtual Machines with template variable |
| `workspace("$workspace").Perf \| distinct ObjectName` | Returns a list of objects from the Perf table |
| `workspace("$workspace").Perf \| where ObjectName == "$object" \| distinct CounterName` | Returns a list of metric names from the Perf table |
<!-- prettier-ignore-end -->
Example of a time series query using variables:
```kusto
Perf
| where ObjectName == "$object" and CounterName == "$metric"
| where TimeGenerated >= $__timeFrom() and TimeGenerated <= $__timeTo()
| where $__contains(Computer, $computer)
| summarize avg(CounterValue) by bin(TimeGenerated, $__interval), Computer
| order by TimeGenerated asc
```
### Deep linking from Grafana panels to the Azure Metric Logs query editor in Azure Portal
> Only available in Grafana v7.0+.
{{< docs-imagebox img="/img/docs/v70/azure-log-analytics-deep-linking.png" max-width="500px" class="docs-image--right" caption="Logs deep linking" >}}
Click on a time series in the panel to see a context menu with a link to `View in Azure Portal`. Clicking that link opens the Azure Metric Logs query editor in the Azure Portal and runs the query from the Grafana panel there.
If you're not currently logged in to the Azure Portal, then the link opens the login page. The provided link is valid for any account, but it only displays the query if your account has access to the Azure Metric Logs workspace specified in the query.
<div class="clearfix"></div>
### Logs alerting
> Only available in Grafana v7.0+.
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.
{{< docs-imagebox img="/img/docs/azuremonitor/insights_analytics_multi-dim.png" class="docs-image--no-shadow" caption="Azure Application Insights Analytics query with multiple dimensions" >}}
## 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" >}})
Here are some provisioning examples for this data source.
```yaml
# config file version
apiVersion: 1
datasources:
- name: Azure Monitor
type: grafana-azure-monitor-datasource
access: proxy
jsonData:
appInsightsAppId: <app-insights-app-id>
clientId: <client-id>
cloudName: azuremonitor
subscriptionId: <subscription-id>
tenantId: <tenant-id>
logAnalyticsClientId: <log-analytics-client-id>
logAnalyticsDefaultWorkspace: <log-analytics-default-workspace>
logAnalyticsSubscriptionId: <log-analytics-subscription-id>
logAnalyticsTenantId: <log-analytics-tenant-id>
secureJsonData:
clientSecret: <client-secret>
appInsightsApiKey: <app-insights-api-key>
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.
## Query Azure Resource Graph service
Azure Resource Graph (ARG) is a service in Azure that is designed to extend Azure Resource Management by providing efficient and performant resource exploration with the ability to query at scale across a given set of subscriptions so that you can effectively govern your environment. By querying ARG, you can query resources with complex filtering, iteratively explore resources based on governance requirements, and assess the impact of applying policies in a vast cloud environment.
{{< docs-imagebox img="/img/docs/azure-monitor/azure-resource-graph-8-0.png" class="docs-image--no-shadow" caption="Azure Resource Graph Editor" >}}
### Table queries
Queries are written in the [Kusto Query Language](https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/). An Azure Resource Graph query is formatted as table data.
If your credentials give you access to multiple subscriptions, then you can choose multiple subscriptions before entering queries.
### Sort results by resource properties
Here is an example query that returns any type of resource, but only the name, type, and location properties:
```kusto
Resources
| project name, type, location
| order by name asc
```
The query uses `order by` to sort the properties by the `name` property in ascending (asc) order. You can change what property to sort by and the order (`asc` or `desc`). The query uses `project` to show the listed properties in the results. You can add or remove properties.
### Query resources with complex filtering
Filtering for Azure resources with a tag name of `Environment` that have a value of `Internal`. You can change these to any desired tag key and value. The `=~` in the `type` match tells Resource Graph to be case insensitive. You can project by other properties or add/ remove more.
The tag key is case sensitive. `Environment` and `environment` will give different results. For example, a query that returns a list of resources with a specified tag value:
```kusto
Resources
| where tags.environment=~'internal'
| project name
```
### Group and aggregate the values by property
You can also use `summarize` and `count` to define how to group and aggregate the values by property. For example, returning count of healthy, unhealthy, and not applicable resources per recommendation.:
```kusto
securityresources
| where type == 'microsoft.security/assessments'
| extend resourceId=id,
    recommendationId=name,
    resourceType=type,
    recommendationName=properties.displayName,
    source=properties.resourceDetails.Source,
    recommendationState=properties.status.code,
    description=properties.metadata.description,
    assessmentType=properties.metadata.assessmentType,
    remediationDescription=properties.metadata.remediationDescription,
    policyDefinitionId=properties.metadata.policyDefinitionId,
    implementationEffort=properties.metadata.implementationEffort,
    recommendationSeverity=properties.metadata.severity,
    category=properties.metadata.categories,
    userImpact=properties.metadata.userImpact,
    threats=properties.metadata.threats,
    portalLink=properties.links.azurePortal
| summarize numberOfResources=count(resourceId) by tostring(recommendationName), tostring(recommendationState)
```

View File

@@ -0,0 +1,255 @@
+++
title = "Azure Monitor"
description = "Guide for using Azure Monitor in Grafana"
keywords = ["grafana", "microsoft", "azure", "monitor", "application", "insights", "log", "analytics", "guide"]
aliases = ["/docs/grafana/latest/features/datasources/azuremonitor"]
weight = 300
+++
# Azure Monitor data source
Grafana includes built-in support for Azure Monitor, the Azure service to maximize the availability and performance of your applications and services in the Azure Cloud. The Azure Monitor data source supports visualizing data from three Azure services:
- **Azure Monitor Metrics** to collect numeric data from resources in your Azure account.
- **Azure Monitor Logs** to collect log and performance data from your Azure account, and query using the powerful Kusto Language.
- **Azure Resource Graph** to quickly query your Azure resources across subscriptions.
This topic explains configuring, querying, and other options specific to the Azure Monitor data source. Refer to [Add a data source]({{< relref "../add-a-data-source.md" >}}) for instructions on how to add a data source to Grafana.
## Azure Monitor configuration
To access Azure Monitor configuration, hover your mouse over the **Configuration** (gear) icon, click **Data Sources**, and then select the Azure Monitor data source. If you haven't already, you'll need to [add the Azure Monitor data source]({{< relref "../add-a-data-source.md" >}}).
You must create an app registration and service principal in Azure AD to authenticate the data source. See the [Azure documentation](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal#get-tenant-and-app-id-values-for-signing-in) for configuration details. Alternatively, if you are hosting Grafana in Azure (e.g. App Service, or Azure Virtual Machines) you can configure the Azure Monitor data source to use Managed Identity to securely authenticate without entering credentials into Grafana. Refer to [Configuring using Managed Identity](#configuring-using-managed-identity) for more details.
| Name | Description |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Authentication | Enables Managed Identity. Selecting Managed Identity will hide many of the fields below. See [Configuring using Managed Identity](#configuring-using-managed-identity) for more details. |
| Azure Cloud | The national cloud for your Azure account. For most users, this is the default "Azure". For more information, see [the Azure documentation.](https://docs.microsoft.com/en-us/azure/active-directory/develop/authentication-national-cloud) |
| Directory (tenant) ID | The directory/tenant ID for the Azure AD app registration to use for authentication. See [Get tenant and app ID values for signing in](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal#get-tenant-and-app-id-values-for-signing-in) from the Azure documentation. |
| Application (client) ID | The application/client ID for the Azure AD app registration to use for authentication. |
| Client secret | The application client secret for the Azure AD app registration to use for authentication. See [Create a new application secret](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal#option-2-create-a-new-application-secret) from the Azure documentation. |
| Default subscription | _(optional)_ Sets a default subscription for template variables to use |
| Default workspace | _(optional)_ Sets a default workspace for Log Analytics-based template variable queries to use |
## Azure Monitor query editor
The Azure Monitor data source has three different modes depending on which Azure service you wish to query:
- **Metrics** for [Azure Monitor Metrics](#querying-azure-monitor-metrics)
- **Logs** for [Azure Monitor Logs](#querying-azure-monitor-logs)
- [**Azure Resource Graph**](#querying-azure-resource-graph)
### Querying Azure Monitor Metrics
Azure Monitor Metrics collects numeric data from [supported resources](https://docs.microsoft.com/en-us/azure/azure-monitor/monitor-reference) and allows you to query them to investigate the health and utilization of your resources to maximise availability and performance.
Metrics are a lightweight format that only stores simple numeric data in a particular structure. Metrics is capable for supporting near real-time scenarios making it useful for fast detection of issues. Azure Monitor Logs can store a variety of different data types each with their own structure.
{{< figure src="/static/img/docs/azure-monitor/query-editor-metrics.png" max-width="800px" class="docs-image--no-shadow" caption="Azure Logs Metrics sample query visualizing CPU percentage over time" >}}
#### Your first Azure Monitor Metrics query
1. Select the Metrics service
1. Select a resource to pull metrics from using the subscription, resource group, resource type, and resource fields.
1. Some resources, such as storage accounts, organise metrics under multiple metric namespaces. Grafana will pick a default namespace, but change this to see which other metrics are available.
1. Select a metric from the Metric field.
Optionally, you can apply further aggregations or filter by dimensions for further analysis.
1. Change the aggregation from the default average to show minimum, maximum or total values.
1. Set a specific custom time grain. By default Grafana will automatically select a time grain interval based on your selected time range.
1. For metrics that have multiple dimensions, you can split and filter further the returned metrics. For example, the Application Insights dependency calls metric supports returning multiple time series for successful vs unsuccessful calls.
{{< figure src="/static/img/docs/azure-monitor/query-editor-metrics-dimensions.png" max-width="800px" class="docs-image--no-shadow" caption="Azure Monitor Metrics screenshot showing Dimensions" >}}
The options available will change depending on what is most relevant to the selected metric.
#### Legend alias formatting
The legend label for Metrics can be changed using aliases. In the Legend Format field, you can combine aliases defined below any way you want e.g
- `Blob Type: {{ blobtype }}` becomes `Blob Type: PageBlob`, `Blob Type: BlockBlob`
- `{{ resourcegroup }} - {{ resourcename }}` becomes `production - web_server`
| Alias pattern | Description |
| ----------------------------- | ------------------------------------------------------------------------------------------- |
| `{{ resourcegroup }}` | Replaced with the the resource group |
| `{{ namespace }}` | Replaced with the resource type / namespace (e.g. Microsoft.Compute/virtualMachines) |
| `{{ resourcename }}` | Replaced with the resource name |
| `{{ metric }}` | Replaced with the metric name (e.g. Percentage CPU) |
| _`{{ arbitaryDimensionID }}`_ | Replaced with the value of the specified dimension. (e.g. {{ blobtype }} becomes BlockBlob) |
| `{{ dimensionname }}` | _(Legacy for backwards compatibility)_ Replaced with the name of the first dimension |
| `{{ dimensionvalue }}` | _(Legacy for backwards compatibility)_ Replaced with the value of the first dimension |
#### Supported Azure Monitor metrics
Not all metrics returned by the Azure Monitor Metrics API have values. To make it easier for you when building a query, the Grafana data source has a list of supported metrics and ignores metrics which will never have values. This list is updated regularly as new services and metrics are added to the Azure cloud. For more information about the list of metrics, refer to [current supported namespaces](https://github.com/grafana/grafana/blob/main/public/app/plugins/datasource/grafana-azure-monitor-datasource/azure_monitor/supported_namespaces.ts).
### Querying Azure Monitor Logs
Azure Monitor Logs collects and organises log and performance data from [supported resources](https://docs.microsoft.com/en-us/azure/azure-monitor/monitor-reference) and makes many sources of data available to query together with the sophisticated [Kusto Query Language (KQL)](https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/).
While Azure Monitor Metrics only stores simplified numerical data, Logs can store different data types each with their own structure and can perform complexe analysis of data using KQL.
{{< figure src="/static/img/docs/azure-monitor/query-editor-logs.png" max-width="800px" class="docs-image--no-shadow" caption="Azure Monitor Logs sample query comparing successful requests to failed requests" >}}
#### Your first Azure Monitor Logs query
1. Select the Logs service
2. Select a resource to query. Alternatively, you can dynamically query all resources under a single resource group or subscription.
3. Enter in your KQL query. See below for examples.
##### Kusto Query Language
Azure Monitor Logs queries are written using the Kusto Query Language (KQL), a rich language designed to be easy to read and write, which should be familiar to those know who SQL. The Azure documentation has plenty of resource to help with learning KQL:
- [Log queries in Azure Monitor](https://docs.microsoft.com/en-us/azure/azure-monitor/logs/log-query-overview)
- [Getting started with Kusto](https://docs.microsoft.com/en-us/azure/data-explorer/kusto/concepts/)
- [Tutorial: Use Kusto queries in Azure Monitor](https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/tutorial?pivots=azuremonitor)
- [SQL to Kusto cheat sheet](https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/sqlcheatsheet)
Here is an example query that returns a virtual machine's CPU performance, averaged over 5m time grains
```kusto
Perf
# $__timeFilter is a special Grafana macro that filters the results to the time span of the dashboard
| where $__timeFilter(TimeGenerated)
| where CounterName == "% Processor Time"
| summarize avg(CounterValue) by bin(TimeGenerated, 5m), Computer
| order by TimeGenerated asc
```
Time series queries are for values that change over time, usually for graph visualisations such as the Time series panel. Each query should return at least a datetime column and a numeric value column. The result must also be sorted in ascending order by the datetime column.
A query can also have one or more non-numeric/non-datetime columns, and those columns are considered dimensions and become labels in the response. For example, a query that returns the aggregated count grouped by hour, Computer, and the CounterName:
```kusto
Perf
| where $__timeFilter(TimeGenerated)
| summarize count() by bin(TimeGenerated, 1h), Computer, CounterName
| order by TimeGenerated asc
```
You can also select additional number value columns (with, or without multiple dimensions). For example, getting a count and average value by hour, Computer, CounterName, and InstanceName:
```kusto
Perf
| where $__timeFilter(TimeGenerated)
| summarize Samples=count(), ["Avg Value"]=avg(CounterValue)
by bin(TimeGenerated, $__interval), Computer, CounterName, InstanceName
| order by TimeGenerated asc
```
Table queries are mainly used in the Table panel and show a list of columns and rows. This example query returns rows with the six specified columns:
```kusto
AzureActivity
| where $__timeFilter()
| project TimeGenerated, ResourceGroup, Category, OperationName, ActivityStatus, Caller
| order by TimeGenerated desc
```
##### Logs macros
To make writing queries easier there are several Grafana macros that can be used in the where clause of a query:
| Macro | Description |
| ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `$__timeFilter()` | Used to filter the results to the time range of the dashboard.<br/>Example: `TimeGenerated >= datetime(2018-06-05T18:09:58.907Z) and TimeGenerated <= datetime(2018-06-05T20:09:58.907Z)`. |
| `$__timeFilter(datetimeColumn)` | Like `$__timeFilter()`, but specifies a custom field to filter on. |
| `$__timeFrom()` | Expands to the start of the dashboard time range.<br/>Example: `datetime(2018-06-05T18:09:58.907Z)`. |
| `$__timeTo()` | Expands to the end of the dashboard time range.<br/>Example: `datetime(2018-06-05T20:09:58.907Z)`. |
| `$__escapeMulti($myVar)` | Used with multi-value template variables that contain illegal characters.<br/>If `$myVar` has the following two values as a string `'\\grafana-vm\Network(eth0)\Total','\\hello!'`, then it expands to `@'\\grafana-vm\Network(eth0)\Total', @'\\hello!'`.<br/><br/>If using single value variables there is no need for this macro, simply escape the variable inline instead - `@'\$myVar'`. |
| `$__contains(colName, $myVar)` | Used with multi-value template variables.<br/>If `$myVar` has the value `'value1','value2'`, it expands to: `colName in ('value1','value2')`.<br/><br/>If using the `All` option, then check the `Include All Option` checkbox and in the `Custom all value` field type in the value `all`. If `$myVar` has value `all` then the macro will instead expand to `1 == 1`. For template variables with a lot of options, this will increase the query performance by not building a large "where..in" clause. |
Additionally, Grafana has the built-in `$__interval` macro
### Querying Azure Resource Graph
Azure Resource Graph (ARG) is a service in Azure that is designed to extend Azure Resource Management by providing efficient and performant resource exploration, with the ability to query at scale across a given set of subscriptions so that you can effectively govern your environment. By querying ARG, you can query resources with complex filtering, iteratively explore resources based on governance requirements, and assess the impact of applying policies in a vast cloud environment.
{{< figure src="/static/img/docs/azure-monitor/query-editor-arg.png" max-width="800px" class="docs-image--no-shadow" caption="Azure Resource Graph sample query listing virtual machines on an account" >}}
### Your first Azure Resource Graph query
ARG queries are written in a variant of the [Kusto Query Language](https://docs.microsoft.com/en-us/azure/governance/resource-graph/concepts/query-language), but not all Kusto language features are available in ARG. An Azure Resource Graph query is formatted as table data.
If your credentials give you access to multiple subscriptions, then you can choose multiple subscriptions before entering queries.
#### Sort results by resource properties
Here is an example query that returns all resources in the selected subscriptions, but only the name, type, and location properties:
```kusto
Resources
| project name, type, location
| order by name asc
```
The query uses `order by` to sort the properties by the `name` property in ascending (`asc`) order. You can change what property to sort by and the order (`asc` or `desc`). The query uses `project` to show only the listed properties in the results. You can add or remove properties.
#### Query resources with complex filtering
Filtering for Azure resources with a tag name of `environment` that have a value of `Internal`. You can change these to any desired tag key and value. The `=~` in the `type` match tells Resource Graph to be case insensitive. You can project by other properties or add/remove more.
For example, a query that returns a list of resources with an `environment` tag value of `Internal`:
```kusto
Resources
| where tags.environment=~'internal'
| project name
```
#### Group and aggregate the values by property
You can also use `summarize` and `count` to define how to group and aggregate the values by property. For example, returning count of healthy, unhealthy, and not applicable resources per recommendation:
```kusto
securityresources
| where type == 'microsoft.security/assessments'
| extend resourceId=id,
    recommendationId=name,
    resourceType=type,
    recommendationName=properties.displayName,
    source=properties.resourceDetails.Source,
    recommendationState=properties.status.code,
    description=properties.metadata.description,
    assessmentType=properties.metadata.assessmentType,
    remediationDescription=properties.metadata.remediationDescription,
    policyDefinitionId=properties.metadata.policyDefinitionId,
    implementationEffort=properties.metadata.implementationEffort,
    recommendationSeverity=properties.metadata.severity,
    category=properties.metadata.categories,
    userImpact=properties.metadata.userImpact,
    threats=properties.metadata.threats,
    portalLink=properties.links.azurePortal
| summarize numberOfResources=count(resourceId) by tostring(recommendationName), tostring(recommendationState)
```
In Azure Resource Graph many nested properties (`properties.displayName`) are of a `dynamic` type, and should be cast to a string with `tostring()` to operate on them.
The Azure documentation also hosts [many sample queries](https://docs.microsoft.com/en-gb/azure/governance/resource-graph/samples/starter) to help you get started
## Going further with Azure Monitor
See the following topics to learn more about the Azure Monitor data source:
- [Azure Monitor template variables]({{< relref "./template-variables.md" >}}) for more interactive, dynamic, and reusable dashboards.
- [Provisioning Azure Monitor]({{< relref "./provisioning.md" >}}) for configuring the Azure Monitor data source using YAML files
- [Deprecating Application Insights]({{< relref "./provisioning.md" >}}) and migrating to Metrics and Logs queries
### Configuring using Managed Identity
Customers who host Grafana in Azure (e.g. App Service, Azure Virtual Machines) and have managed identity enabled on their VM, will now be able to use the managed identity to configure Azure Monitor in Grafana. This will simplify the data source configuration, requiring the data source to be securely authenticated without having to manually configure credentials via Azure AD App Registrations for each data source. For more details on Azure managed identities, refer to the [Azure documentation](https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview).
To enable managed identity for Grafana, set the `managed_identity_enabled` flag in the `[azure]` section of the [Grafana server config](https://grafana.com/docs/grafana/latest/administration/configuration/#azure).
```ini
[azure]
managed_identity_enabled = true
```
Then, in the Azure Monitor data source configuration and set Authentication to Managed Identity. The directory ID, application ID and client secret fields will be hidden and the data source will use managed identity for authenticating to Azure Monitor Metrics, Logs, and Azure Resource Graph.
{{< figure src="/static/img/docs/azure-monitor/managed-identity.png" max-width="800px" class="docs-image--no-shadow" caption="Azure Monitor Metrics screenshot showing Dimensions" >}}

View File

@@ -0,0 +1,28 @@
+++
title = "Application Insights deprecation"
description = "Template to provision the Azure Monitor data source"
keywords = ["grafana", "microsoft", "azure", "monitor", "application", "insights", "log", "analytics", "guide"]
weight = 999
+++
# Deprecated Application Insights and Insights Analytics
Application Insights and Insights Analytics are two ways to query the same Azure Application Insights data, which can also be queried from Metrics and Logs. In Grafana 8.0, Application Insights and Insights Analytics are 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. New panels are not able to use Application Insights or Insights Analytics.
Azure Monitor Metrics and Azure Monitor Logs do not use Application Insights API keys, so make sure the data source is configured with an Azure AD app registration that has access to Application Insights.
## Application Insights
New Application Insights queries can be made with the Metrics service and selecting the "Application Insights" resource type. Application Insights has metrics available between two different metric
{{< figure src="/static/img/docs/azure-monitor/app-insights-metrics.png" max-width="800px" class="docs-image--no-shadow" caption="Azure Monitor Application Insights example" >}}
## Insights Analytics
New Insights Analaytics queries can be written with Kusto in the Logs query type by selecting your Application Insights resource.
{{< figure src="/static/img/docs/azure-monitor/app-insights-logs.png" max-width="800px" class="docs-image--no-shadow" caption="Azure Logs Application Insights example" >}}
The new resource picker for Logs shows all resources on your Azure subscription compatible with Logs.
{{< figure src="/static/img/docs/azure-monitor/app-insights-resource-picker.png" max-width="800px" class="docs-image--no-shadow" caption="Azure Logs Application Insights resource picker" >}}

View File

@@ -0,0 +1,56 @@
+++
title = "Provisioning Azure Monitor"
description = "Template to provision the Azure Monitor data source"
keywords = ["grafana", "microsoft", "azure", "monitor", "application", "insights", "log", "analytics", "guide"]
weight = 2
+++
# Configure the data source with provisioning
You can configure data sources using config files with Grafanas provisioning system. For more information on how it works and all the settings you can set for data sources on the [Provisioning documentation page]({{< relref "../../administration/provisioning/#datasources" >}})
Here are some provisioning examples for this data source.
## Azure AD App Registration (client secret)
```yaml
apiVersion: 1 # config file version
datasources:
- name: Azure Monitor
type: grafana-azure-monitor-datasource
access: proxy
jsonData:
azureAuthType: clientsecret
cloudName: azuremonitor # See table below
tenantId: <tenant-id>
clientId: <client-id>
subscriptionId: <subscription-id> # Optional, default subscription
secureJsonData:
clientSecret: <client-secret>
version: 1
```
## Managed Identity
```yaml
apiVersion: 1 # config file version
datasources:
- name: Azure Monitor
type: grafana-azure-monitor-datasource
access: proxy
jsonData:
azureAuthType: msi
subscriptionId: <subscription-id> # Optional, default subscription
version: 1
```
## Supported cloud names
| Azure Cloud | Value |
| ------------------------------------------------ | -------------------------- |
| Microsoft Azure public cloud | `azuremonitor` (_default_) |
| Microsoft Chinese national cloud | `chinaazuremonitor` |
| US Government cloud | `govazuremonitor` |
| Microsoft German national cloud ("Black Forest") | `germanyazuremonitor` |

View File

@@ -0,0 +1,53 @@
+++
title = "Azure Monitor template variables"
description = "Using template variables with Azure Monitor in Grafana"
keywords = ["grafana", "microsoft", "azure", "monitor", "application", "insights", "log", "analytics", "guide"]
weight = 2
+++
# Template variables
Instead of hard-coding values for fields like resource group or resource name in your queries, you can use variables in their place to create more interactive, dynamic, and reusable dashboards.
Check out the [Templating]({{< relref "../../variables/_index.md" >}}) documentation for an introduction to the templating feature and the different
types of template variables.
The Azure Monitor data source provides the following queries you can specify in the Query field in the Variable edit view
| Name | Description |
| ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| `Subscriptions()` | Returns subscriptions. |
| `ResourceGroups()` | Returns resource groups. |
| `ResourceGroups(subscriptionID)` | Returns resource groups for a specified subscription. |
| `Namespaces(aResourceGroup)` | Returns namespaces for the default subscription and specified resource group. |
| `Namespaces(subscriptionID, aResourceGroup)` | Returns namespaces for the specified subscription and resource group. |
| `ResourceNames(aResourceGroup, aNamespace)` | Returns a list of resource names. |
| `ResourceNames(subscriptionID, aResourceGroup, aNamespace)` | Returns a list of resource names for a specified subscription. |
| `MetricNamespace(aResourceGroup, aNamespace, aResourceName)` | Returns a list of metric namespaces. |
| `MetricNamespace(subscriptionID, aResourceGroup, aNamespace, aResourceName)` | Returns a list of metric namespaces for a specified subscription. |
| `MetricNames(aResourceGroup, aMetricDefinition, aResourceName, aMetricNamespace)` | Returns a list of metric names. |
| `MetricNames(aSubscriptionID, aMetricDefinition, aResourceName, aMetricNamespace)` | Returns a list of metric names for a specified subscription. |
| `workspaces()` | Returns a list of workspaces for the default subscription. |
| `workspaces(subscriptionID)` | Returns a list of workspaces for the specified subscription (the parameter can be quoted or unquoted). |
Where a subscription ID is not specified, a default subscription must be specified in the data source configuration, which will be used.
Any Log Analytics KQL query that returns a single list of values can also be used in the Query field. For example:
| Query | Description |
| ----------------------------------------------------------------------------------------- | --------------------------------------------------------- |
| `workspace("myWorkspace").Heartbeat \| distinct Computer` | Returns a list of Virtual Machines |
| `workspace("$workspace").Heartbeat \| distinct Computer` | Returns a list of Virtual Machines with template variable |
| `workspace("$workspace").Perf \| distinct ObjectName` | Returns a list of objects from the Perf table |
| `workspace("$workspace").Perf \| where ObjectName == "$object"` `\| distinct CounterName` | Returns a list of metric names from the Perf table |
Example of a time series query using variables:
```kusto
Perf
| where ObjectName == "$object" and CounterName == "$metric"
| where TimeGenerated >= $__timeFrom() and TimeGenerated <= $__timeTo()
| where $__contains(Computer, $computer)
| summarize avg(CounterValue) by bin(TimeGenerated, $__interval), Computer
| order by TimeGenerated asc
```

View File

@@ -137,8 +137,8 @@ region = us-west-2
The CloudWatch data source can query data from both CloudWatch metrics and CloudWatch Logs APIs, each with its own specialized query editor. You select which API you want to query with using the query mode switch on top of the editor.
{{< docs-imagebox img="/img/docs/v70/cloudwatch-metrics-query-field.png" max-width="800px" class="docs-image--left" caption="CloudWatch metrics query field" >}}
{{< docs-imagebox img="/img/docs/v70/cloudwatch-logs-query-field.png" max-width="800px" class="docs-image--right" caption="CloudWatch Logs query field" >}}
{{< figure src="/static/img/docs/v70/cloudwatch-metrics-query-field.png" max-width="800px" class="docs-image--left" caption="CloudWatch metrics query field" >}}
{{< figure src="/static/img/docs/v70/cloudwatch-logs-query-field.png" max-width="800px" class="docs-image--right" caption="CloudWatch Logs query field" >}}
## Using the Metric Query Editor
@@ -150,7 +150,7 @@ To create a valid query, you need to specify the namespace, metric name and at l
In Grafana 6.5 or higher, youre able to monitor a dynamic list of metrics by using the asterisk (\*) wildcard for one or more dimension values.
{{< docs-imagebox img="/img/docs/v65/cloudwatch-dimension-wildcard.png" max-width="800px" class="docs-image--right" caption="CloudWatch dimension wildcard" >}}
{{< figure src="/static/img/docs/v65/cloudwatch-dimension-wildcard.png" max-width="800px" class="docs-image--right" caption="CloudWatch dimension wildcard" >}}
In the example, all metrics in the namespace `AWS/EC2` with a metric name of `CPUUtilization` and ANY value for the `InstanceId` dimension are queried. This can help you monitor metrics for AWS resources, like EC2 instances or containers. For example, when new instances get created as part of an auto scaling event, they will automatically appear in the graph without you having to track the new instance IDs. This capability is currently limited to retrieving up to 100 metrics. You can click on `Show Query Preview` to see the search expression that is automatically built to support wildcards. To learn more about search expressions, visit the [CloudWatch documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/search-expression-syntax.html).
@@ -184,7 +184,7 @@ If the period field is left blank or set to `auto`, then it calculates automatic
### Deep linking from Grafana panels to the CloudWatch console
{{< docs-imagebox img="/img/docs/v65/cloudwatch-deep-linking.png" max-width="500px" class="docs-image--right" caption="CloudWatch deep linking" >}}
{{< figure src="/static/img/docs/v65/cloudwatch-deep-linking.png" max-width="500px" class="docs-image--right" caption="CloudWatch deep linking" >}}
Left clicking a time series in the panel shows a context menu with a link to `View in CloudWatch console`. Clicking that link will open a new tab that will take you to the CloudWatch console and display all the metrics for that query. If you're not currently logged in to the CloudWatch console, the link will forward you to the login page. The provided link is valid for any account but will only display the right metrics if you're logged in to the account that corresponds to the selected data source in Grafana.
@@ -198,11 +198,11 @@ To query CloudWatch Logs, select the region and up to 20 log groups which you wa
You can also write queries returning time series data by using the [`stats` command](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_Insights-Visualizing-Log-Data.html). When making `stats` queries in Explore, you have to make sure you are in Metrics Explore mode.
{{< docs-imagebox img="/img/docs/v70/explore-mode-switcher.png" max-width="500px" class="docs-image--right" caption="Explore mode switcher" >}}
{{< figure src="/static/img/docs/v70/explore-mode-switcher.png" max-width="500px" class="docs-image--right" caption="Explore mode switcher" >}}
To the right of the query input field is a CloudWatch Logs Insights link that opens the CloudWatch Logs Insights console with your query. You can continue exploration there if necessary.
{{< docs-imagebox img="/img/docs/v70/cloudwatch-logs-deep-linking.png" max-width="500px" class="docs-image--right" caption="CloudWatch Logs deep linking" >}}
{{< figure src="/static/img/docs/v70/cloudwatch-logs-deep-linking.png" max-width="500px" class="docs-image--right" caption="CloudWatch Logs deep linking" >}}
### Using template variables
@@ -211,7 +211,7 @@ See the [Templating]({{< relref "../variables/_index.md" >}}) documentation for
### Deep linking from Grafana panels to the CloudWatch console
{{< docs-imagebox img="/img/docs/v70/cloudwatch-logs-deep-linking.png" max-width="500px" class="docs-image--right" caption="CloudWatch Logs deep linking" >}}
{{< figure src="/static/img/docs/v70/cloudwatch-logs-deep-linking.png" max-width="500px" class="docs-image--right" caption="CloudWatch Logs deep linking" >}}
If you'd like to view your query in the CloudWatch Logs Insights console, simply click the `CloudWatch Logs Insights` button next to the query editor.
If you're not currently logged in to the CloudWatch console, the link will forward you to the login page. The provided link is valid for any account but will only display the right metrics if you're logged in to the account that corresponds to the selected data source in Grafana.
@@ -232,7 +232,7 @@ The updated CloudWatch data source ships with pre-configured dashboards for five
To import the pre-configured dashboards, go to the configuration page of your CloudWatch data source and click on the `Dashboards` tab. Click `Import` for the dashboard you would like to use. 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/v65/cloudwatch-dashboard-import.png" caption="CloudWatch dashboard import" >}}
{{< figure src="/static/img/docs/v65/cloudwatch-dashboard-import.png" caption="CloudWatch dashboard import" >}}
## Templated queries

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](/static/img/docs/elasticsearch/elasticsearch-ds-details-7-4.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.
@@ -57,7 +57,7 @@ a time pattern for the index name or a wildcard.
### Elasticsearch version
Select the version of your Elasticsearch data source from the version selection dropdown. Different query compositions and functionalities are available in the query editor for different versions.
Available Elasticsearch versions are `2.x`, `5.x`, `5.6+`, `6.0+`, and `7.0+`. Select the option that best matches your data source version.
Available Elasticsearch versions are `2.x`, `5.x`, `5.6+`, `6.0+`, `7.0+` and `7.7+`. Select the option that best matches your data source version.
Grafana assumes that you are running the lowest possible version for a specified range. This ensures that new features or breaking changes in a future Elasticsearch release will not affect your configuration.
@@ -101,7 +101,7 @@ Each data link configuration consists of:
## Metric Query editor
![Elasticsearch Query Editor](/img/docs/elasticsearch/query-editor-7-4.png)
![Elasticsearch Query Editor](/static/img/docs/elasticsearch/query-editor-7-4.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.
@@ -120,7 +120,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)
![Pipeline aggregation editor](/static/img/docs/elasticsearch/pipeline-aggregation-editor-7-4.png)
## Templating
@@ -170,13 +170,13 @@ 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)
![Query with template variables](/static/img/docs/elasticsearch/elastic-templating-query-7-4.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.
Example dashboard:
[Elasticsearch Templated Dashboard](https://play.grafana.org/dashboard/db/elasticsearch-templated)
[Elasticsearch Templated Dashboard](https://play.grafana.org/d/CknOEXDMk/elasticsearch-templated?orgId=1d)
## Annotations
@@ -246,6 +246,10 @@ datasources:
esVersion: "7.0.0"
logMessageField: message
logLevelField: fields.level
dataLinks:
- datasourceUid: my_jaeger_uid # Target UID needs to be known
field: traceID
url: "$${__value.raw}" # Careful about the double "$$" because of env var expansion
```
## Amazon Elasticsearch Service
@@ -262,4 +266,4 @@ In order to sign requests to your Amazon Elasticsearch Service domain, SigV4 can
Once AWS SigV4 is enabled, it can be configured on the Elasticsearch data source configuration page. Refer to [Cloudwatch authentication]({{<relref "./cloudwatch.md#authentication" >}}) for more information about authentication options.
{{< docs-imagebox img="/img/docs/v73/elasticsearch-sigv4-config-editor.png" max-width="500px" class="docs-image--no-shadow" caption="SigV4 configuration for AWS Elasticsearch Service" >}}
{{< figure src="/static/img/docs/v73/elasticsearch-sigv4-config-editor.png" max-width="500px" class="docs-image--no-shadow" caption="SigV4 configuration for AWS Elasticsearch Service" >}}

View File

@@ -39,31 +39,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" >}}
{{< figure src="/static/img/docs/v71/cloudmonitoring_enable_api.png" max-width="450px" 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" >}}
{{< figure src="/static/img/docs/v71/cloudmonitoring_create_service_account_button.png" max-width="500px" 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" >}}
{{< figure src="/static/img/docs/v71/cloudmonitoring_create_service_account_key.png" max-width="500px" 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" >}}
{{< figure src="/static/img/docs/v71/cloudmonitoring_service_account_choose_role.png" max-width="600px" 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" >}}
{{< figure src="/static/img/docs/v71/cloudmonitoring_grafana_upload_key.png" max-width="550px" 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" >}}
{{< figure src="/static/img/docs/v71/cloudmonitoring_grafana_key_uploaded.png" max-width="600px" class="docs-image--no-shadow" caption="Service key file is uploaded to Grafana" >}}
### Using GCE Default Service Account
@@ -81,7 +81,7 @@ The Google Cloud Monitoring query editor allows you to build two types of querie
### Metric Queries
{{< docs-imagebox img="/img/docs/google-cloud-monitoring/metric-query-builder-8-0.png" max-width= "400px" class="docs-image--right" >}}
{{< figure src="/static/img/docs/google-cloud-monitoring/metric-query-builder-8-0.png" max-width= "400px" class="docs-image--right" >}}
The metric query editor allows you to select metrics, group/aggregate by labels and by time, and use filters to specify which time series you want in the results.
@@ -111,7 +111,7 @@ When the operator is set to `=~` or `!=~` it is possible to add regular expressi
Preprocessing options are displayed in the UI when the selected metric has a metric kind of `delta` or `cumulative`. If the selected metric has a metric kind of `gauge`, no pre-processing option will be displayed.
If you select 'Rate', data points are aligned and converted to a rate per time series. If you select 'Delta', data points are aligned by their delta (difference) per time series.
If you select `Rate`, data points are aligned and converted to a rate per time series. If you select `Delta`, data points are aligned by their delta (difference) per time series.
#### Grouping
@@ -195,7 +195,7 @@ Example Result: `gce_instance - compute.googleapis.com/instance/cpu/usage_time`
> **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" >}}
{{< figure src="/static/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.
@@ -208,7 +208,7 @@ Grafana issues one query to the Cloud Monitoring API per query editor row, and e
> **Note:** Available in Grafana v7.0 and later versions.
{{< docs-imagebox img="/img/docs/google-cloud-monitoring/slo-query-builder-8-0.png" max-width= "400px" class="docs-image--right" >}}
{{< figure src="/static/img/docs/google-cloud-monitoring/slo-query-builder-8-0.png" max-width= "400px" class="docs-image--right" >}}
The SLO query builder in the Google Cloud Monitoring data source allows you to display SLO data in time series format. To get an understanding of the basic concepts in service monitoring, please refer to Google Cloud Monitoring's [official docs](https://cloud.google.com/monitoring/service-monitoring).
@@ -303,7 +303,7 @@ Why two ways? The first syntax is easier to read and write but does not allow yo
## Annotations
{{< docs-imagebox img="/img/docs/google-cloud-monitoring/annotations-8-0.png" max-width= "400px" class="docs-image--right" >}}
{{< figure src="/static/img/docs/google-cloud-monitoring/annotations-8-0.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
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.

View File

@@ -21,4 +21,4 @@ The data source of the newly created dashboard panels will be the one selected a
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" >}}
{{< figure src="/static/img/docs/google-cloud-monitoring/curated-dashboards-7-4.png" max-width= "650px" >}}

View File

@@ -55,8 +55,8 @@ To see the raw text of the query that is sent to Graphite, click the **Toggle te
Click **Select metric** to start navigating the metric space. Once you start, you can continue using the mouse or keyboard arrow keys. You can select a wildcard and still continue.
{{< docs-imagebox img="/img/docs/graphite/graphite-query-editor-still.png"
animated-gif="/img/docs/graphite/graphite-query-editor.gif" >}}
{{< figure src="/static/img/docs/graphite/graphite-query-editor-still.png"
animated-gif="/static/img/docs/graphite/graphite-query-editor.gif" >}}
### Functions
@@ -65,8 +65,8 @@ a function is selected, it will be added and your focus will be in the text box
- To edit or change a parameter, click on it and it will turn into a text box.
- To delete a function, click the function name followed by the x icon.
{{< docs-imagebox img="/img/docs/graphite/graphite-functions-still.png"
animated-gif="/img/docs/graphite/graphite-functions-demo.gif" >}}
{{< figure src="/static/img/docs/graphite/graphite-functions-still.png"
animated-gif="/static/img/docs/graphite/graphite-functions-demo.gif" >}}
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.
@@ -141,12 +141,12 @@ For more details, see the [Graphite docs on the autocomplete API for tags](http:
The query you specify in the query field should be a metric find type of query. For example, a query like `prod.servers.*` fills the
variable with all possible values that exist in the wildcard position.
The results contain all possible values occurring only at the last level of the query. To get full metric names matching the query
use expand function (`expand(*.servers.*)`).
The results contain all possible values occurring only at the last level of the query. To get full metric names matching the query
use expand function (`expand(*.servers.*)`).
#### Comparison between expanded and non-expanded metric search results
The expanded query returns the full names of matching metrics. In combination with regex, it can extract any part of the metric name. By contrast, a non-expanded query only returns the last part of the metric name. It does not allow you to extract other parts of metric names.
The expanded query returns the full names of matching metrics. In combination with regex, it can extract any part of the metric name. By contrast, a non-expanded query only returns the last part of the metric name. It does not allow you to extract other parts of metric names.
Here are some example metrics:
- `prod.servers.001.cpu`
@@ -190,7 +190,7 @@ tag_values(server, server=~${__searchFilter:regex})
### Variable usage
You can use a variable in a metric node path or as a parameter to a function.
![variable](/img/docs/v2/templated_variable_parameter.png)
![variable](/static/img/docs/v2/templated_variable_parameter.png)
There are two syntaxes:

View File

@@ -19,7 +19,7 @@ To access data source settings, hover your mouse over the **Configuration** (gea
InfluxDB data source options differ depending on which [query language](#query-languages) you select: InfluxQL or Flux.
> **Note:** Though not required, it's a good practice to append the language choice to the data source name. For example:
>
>
- InfluxDB-InfluxQL
- InfluxDB-Flux
@@ -33,6 +33,7 @@ Name | Description
`Default` | Default data source means that it will be pre-selected for new panels.
`URL` | The HTTP protocol, IP address and port of your InfluxDB API. InfluxDB API port is by default 8086.
`Access` | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser.
**Note**: Browser access is deprecated and will be removed in a future release.
`Whitelisted Cookies`| Cookies that will be forwarded to the data source. All other cookies will be deleted.
`Database` | The ID of the bucket you want to query from, copied from the [Buckets page](https://docs.influxdata.com/influxdb/v2.0/organizations/buckets/view-buckets/) of the InfluxDB UI.
`User` | The username you use to sign into InfluxDB.
@@ -74,7 +75,7 @@ To help you choose the best language for your needs, heres a comparison of [F
Enter edit mode by clicking the panel title and clicking **Edit**. The editor allows you to select metrics and tags.
![InfluxQL query editor](/img/docs/influxdb/influxql-query-editor-7-5.png)
![InfluxQL query editor](/static/img/docs/influxdb/influxql-query-editor-8-0.png)
### Filter data (WHERE)
@@ -89,7 +90,7 @@ You can type in regex patterns for metric names or tag filter values. Be sure to
In the `SELECT` row you can specify what fields and functions you want to use. If you have a
group by time you need an aggregation function. Some functions like derivative require an aggregation function. The editor tries to simplify and unify this part of the query. For example:
![](/img/docs/influxdb/select_editor.png)
![](/static/img/docs/influxdb/select_editor.png)
The above generates the following InfluxDB `SELECT` clause:

View File

@@ -33,17 +33,17 @@ This is a configuration for the [trace to logs feature]({{< relref "../explore/t
- **Data source -** Target data source.
- **Tags -** The tags that will be used in the Loki query. Default is `'cluster', 'hostname', 'namespace', 'pod'`.
![Trace to logs settings](/img/docs/explore/trace-to-logs-settings-7-4.png 'Screenshot of the trace to logs settings')
![Trace to logs settings](/static/img/docs/explore/trace-to-logs-settings-7-4.png 'Screenshot of the trace to logs settings')
## Query traces
You can query and display traces from Jaeger via [Explore]({{< relref "../explore/_index.md" >}}).
{{< docs-imagebox img="/img/docs/explore/jaeger-search-form.png" class="docs-image--no-shadow" caption="Screenshot of the Jaeger query editor" >}}
{{< figure src="/static/img/docs/explore/jaeger-search-form.png" class="docs-image--no-shadow" caption="Screenshot of the Jaeger query editor" >}}
You can query by trace ID or use the search form to find traces. To query by trace ID, select the TraceID from the Query type selector and insert the ID into the text input.
{{< docs-imagebox img="/img/docs/explore/jaeger-trace-id.png" class="docs-image--no-shadow" caption="Screenshot of the Jaeger query editor with trace ID selected" >}}
{{< figure src="/static/img/docs/explore/jaeger-trace-id.png" class="docs-image--no-shadow" caption="Screenshot of the Jaeger query editor with trace ID selected" >}}
To perform a search, set the query type selector to Search, then use the following fields to find traces:

View File

@@ -18,12 +18,12 @@ Add it as a data source and you are ready to build dashboards or query your log
To access Loki settings, click the **Configuration** (gear) icon, then click **Data Sources**, and then click the Loki data source.
| Name | Description |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `Name` | The data source name. This is how you refer to the data source in panels, queries, and Explore. |
| `Default` | Default data source means that it will be pre-selected for new panels. |
| `URL` | The URL of the Loki instance, e.g., `http://localhost:3100` |
| `Whitelisted Cookies` | Grafana Proxy deletes forwarded cookies by default. Specify cookies by name that should be forwarded to the data source. |
| Name | Description |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Name` | The data source name. This is how you refer to the data source in panels, queries, and Explore. |
| `Default` | Default data source that is pre-selected for new panels. |
| `URL` | URL of the Loki instance, e.g., `http://localhost:3100`. |
| `Whitelisted Cookies` | Grafana Proxy deletes forwarded cookies by default. Specify cookies by name that should be forwarded to the data source. |
| `Maximum lines` | Upper limit for the number of log lines returned by Loki (default is 1000). Lower this limit if your browser is sluggish when displaying logs in Explore. |
### Derived fields
@@ -33,7 +33,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]({{< relref "../explore/logs-integration/#labels-and-detected-fields" >}}).
Each derived field consists of:
@@ -43,30 +43,31 @@ Each derived field consists of:
- **Internal link -** Select if the link is internal or external. In case of internal link, a data source selector allows you to select the target data source. Only tracing data sources are supported.
You can use a debug section to see what your fields extract and how the URL is interpolated. Click **Show example log message** to show the text area where you can enter a log message.
{{< docs-imagebox img="/img/docs/v75/loki_derived_fields_settings.png" class="docs-image--no-shadow" max-width="800px" caption="Screenshot of the derived fields debugging" >}}
{{< figure src="/static/img/docs/v75/loki_derived_fields_settings.png" class="docs-image--no-shadow" max-width="800px" caption="Screenshot of the derived fields debugging" >}}
The new field with the link shown in log details:
{{< docs-imagebox img="/img/docs/explore/detected-fields-link-7-4.png" max-width="800px" caption="Detected fields link in Explore" >}}
{{< figure src="/static/img/docs/explore/detected-fields-link-7-4.png" max-width="800px" caption="Detected fields link in Explore" >}}
## Loki query editor
You can use the Loki query editor to create log and metric queries.
| Name | Description |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Query expression` | Loki query expression, refer to the [LogQL documentation](https://grafana.com/docs/loki/latest/logql/) for more information. |
| Name | Description |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Query expression` | Loki query expression, refer to the [LogQL documentation](https://grafana.com/docs/loki/latest/logql/) for more information. |
| `Query type` | Choose the type of query to run. The instant type queries against a single point in time. We are using "To" time from the time range. The range type queries over the selected range of time. |
| `Line limit` | Upper limit for number of log lines returned by query. The default is the Maximum lines limit set in Loki settings. |
| `Legend` | Available only in Dashboard. Controls the name of the time series, using name or pattern. For example `{{hostname}}` is replaced with the label value for the label `hostname`. |
| `Line limit` | Upper limit for number of log lines returned by query. The default is the Maximum lines limit set in Loki settings. |
| `Legend` | Available only in Dashboard. Controls the name of the time series, using name or pattern. For example `{{hostname}}` is replaced with the label value for the label `hostname`. |
### Log browser
With Loki log browser you can easily navigate trough your list of labels and values and construct the query of your choice. Log browser has multi-step selection:
1. Choose the labels you would like to consider for your search.
2. Pick the values for selected labels. Log browser supports facetting and therefore it shows you only possible label combinations.
2. Pick the values for selected labels. Log browser supports facetting and therefore it shows you only possible label combinations.
3. Choose the type of query - logs query or rate metrics query. Additionally, you can also validate selector.
{{< docs-imagebox img="/img/docs/v75/loki_log_browser.png" class="docs-image--no-shadow" max-width="800px" caption="Screenshot of the derived fields debugging" >}}
{{< figure src="/static/img/docs/v75/loki_log_browser.png" class="docs-image--no-shadow" max-width="800px" caption="Screenshot of the log browser for Loki" >}}
## Querying with Loki

View File

@@ -69,7 +69,7 @@ If possible, we recommend you to use the latest service pack available for optim
## Query Editor
{{< docs-imagebox img="/img/docs/v51/mssql_query_editor.png" class="docs-image--no-shadow" >}}
{{< figure src="/static/img/docs/v51/mssql_query_editor.png" class="docs-image--no-shadow" >}}
You will find the MSSQL query editor in the metrics tab in Graph, Singlestat or Table panel's edit mode. You enter edit mode by clicking the
panel title, then edit. The editor allows you to define a SQL query to select data to be visualized.
@@ -145,7 +145,7 @@ SELECT
Query editor with example query:
{{< docs-imagebox img="/img/docs/v51/mssql_table_query.png" max-width="500px" class="docs-image--no-shadow" >}}
{{< figure src="/static/img/docs/v51/mssql_table_query.png" max-width="500px" class="docs-image--no-shadow" >}}
The query:
@@ -164,7 +164,7 @@ FROM
The resulting table panel:
{{< docs-imagebox img="/img/docs/v51/mssql_table_result.png" max-width="1489px" class="docs-image--no-shadow" >}}
{{< figure src="/static/img/docs/v51/mssql_table_result.png" max-width="1489px" class="docs-image--no-shadow" >}}
## Time series queries
@@ -199,7 +199,7 @@ INSERT metric_values (time, measurement, valueOne, valueTwo) VALUES('2018-03-15
```
{{< docs-imagebox img="/img/docs/v51/mssql_time_series_one.png" class="docs-image--no-shadow docs-image--right" >}}
{{< figure src="/static/img/docs/v51/mssql_time_series_one.png" class="docs-image--no-shadow docs-image--right" >}}
**Example with one `value` and one `metric` column.**
@@ -219,7 +219,7 @@ When the above query is used in a graph panel, it will produce two series named
<div class="clearfix"></div>
{{< docs-imagebox img="/img/docs/v51/mssql_time_series_two.png" class="docs-image--no-shadow docs-image--right" >}}
{{< figure src="/static/img/docs/v51/mssql_time_series_two.png" class="docs-image--no-shadow docs-image--right" >}}
**Example with multiple `value` columns:**
@@ -239,7 +239,7 @@ When the above query is used in a graph panel, it will produce two series named
<div class="clearfix"></div>
{{< docs-imagebox img="/img/docs/v51/mssql_time_series_three.png" class="docs-image--no-shadow docs-image--right" >}}
{{< figure src="/static/img/docs/v51/mssql_time_series_three.png" class="docs-image--no-shadow docs-image--right" >}}
**Example using the \$\_\_timeGroup macro:**
@@ -263,7 +263,7 @@ Any two series lacking a value in a three-minute window will render a line betwe
<div class="clearfix"></div>
{{< docs-imagebox img="/img/docs/v51/mssql_time_series_four.png" class="docs-image--no-shadow docs-image--right" >}}
{{< figure src="/static/img/docs/v51/mssql_time_series_four.png" class="docs-image--no-shadow docs-image--right" >}}
**Example using the \$\_\_timeGroup macro with fill parameter set to zero:**
@@ -440,7 +440,7 @@ Please note that any macro function will not work inside a stored procedure.
### Examples
{{< docs-imagebox img="/img/docs/v51/mssql_metrics_graph.png" class="docs-image--no-shadow docs-image--right" >}}
{{< figure src="/static/img/docs/v51/mssql_metrics_graph.png" class="docs-image--no-shadow docs-image--right" >}}
For the following examples, the database table is defined in [Time series queries](#time-series-queries). Let's say that we want to visualize four series in a graph panel, such as all combinations of columns `valueOne`, `valueTwo` and `measurement`. Graph panel to the right visualizes what we want to achieve. To solve this, we need to use two queries:
**First query:**

View File

@@ -21,17 +21,18 @@ Grafana ships with a built-in MySQL data source plugin that allows you to query
### 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 MySQL instance.
`Database` | Name of your MySQL database.
`User` | Database user's login/username
`Password` | Database user's password
`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. This should always be lower than configured [wait_timeout](https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_wait_timeout) in MySQL (Grafana v5.4+).
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 MySQL instance.
`Database` | Name of your MySQL database.
`User` | Database user's login/username
`Password` | Database user's password
`Session Timezone` | Specify the time zone used in the database session, such as `Europe/Berlin` or `+02:00`. This is necessary, if the timezone of the database (or the host of the database) is set to something other than UTC. Set the value used in the session with `SET time_zone='...'`. If you leave this field empty, then the time zone is not updated. For more information, refer to the [MySQL documentation](https://dev.mysql.com/doc/refman/8.0/en/time-zone-support.html).
`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. This should always be lower than configured [wait_timeout](https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_wait_timeout) in MySQL (Grafana v5.4+).
### Min time interval
@@ -71,7 +72,7 @@ You can use wildcards (`*`) in place of database or table if you want to grant
> Only available in Grafana v5.4+.
{{< docs-imagebox img="/img/docs/v54/mysql_query_still.png" class="docs-image--no-shadow" animated-gif="/img/docs/v54/mysql_query.gif" >}}
{{< figure src="/static/img/docs/v54/mysql_query_still.png" class="docs-image--no-shadow" animated-gif="/static/img/docs/v54/mysql_query.gif" >}}
You find the MySQL query editor in the metrics tab in a panel's edit mode. You enter edit mode by clicking the
panel title, then edit.
@@ -154,7 +155,7 @@ If the `Format as` query option is set to `Table` then you can basically do any
Query editor with example query:
{{< docs-imagebox img="/img/docs/v45/mysql_table_query.png" >}}
{{< figure src="/static/img/docs/v45/mysql_table_query.png" >}}
The query:
@@ -172,7 +173,7 @@ You can control the name of the Table panel columns by using regular `as ` SQL c
The resulting table panel:
![](/img/docs/v43/mysql_table.png)
![](/static/img/docs/v43/mysql_table.png)
## Time series queries

View File

@@ -30,7 +30,7 @@ Open a graph in edit mode by click the title. Query editor will differ if the da
In the former version, only tags can be used to query OpenTSDB. But in the latter version, filters as well as tags
can be used to query opentsdb. Fill Policy is also introduced in OpenTSDB 2.2.
![](/img/docs/v43/opentsdb_query_editor.png)
![](/static/img/docs/v43/opentsdb_query_editor.png)
> **Note:** While using OpenTSDB 2.2 data source, make sure you use either Filters or Tags as they are mutually exclusive. If used together, might give you weird results.

View File

@@ -22,7 +22,7 @@ Name | Description
`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 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+).
@@ -68,7 +68,7 @@ Make sure the user does not get any unwanted privileges from the public role.
## Query editor
{{< docs-imagebox img="/img/docs/v53/postgres_query_still.png" class="docs-image--no-shadow" animated-gif="/img/docs/v53/postgres_query.gif" >}}
{{< figure src="/static/img/docs/v53/postgres_query_still.png" class="docs-image--no-shadow" animated-gif="/static/img/docs/v53/postgres_query.gif" >}}
You find the PostgreSQL query editor in the metrics tab in Graph or Singlestat panel's edit mode. You enter edit mode by clicking the
panel title, then edit.
@@ -98,7 +98,7 @@ The available functions in the query editor depend on the PostgreSQL version you
If you use aggregate functions you need to group your resultset. The editor will automatically add a `GROUP BY time` if you add an aggregate function.
The editor tries to simplify and unify this part of the query. For example:<br>
![](/img/docs/v53/postgres_select_editor.png)<br>
![](/static/img/docs/v53/postgres_select_editor.png)<br>
The above will generate the following PostgreSQL `SELECT` clause:
@@ -160,7 +160,7 @@ If the `Format as` query option is set to `Table` then you can basically do any
Query editor with example query:
![](/img/docs/v46/postgres_table_query.png)
![](/static/img/docs/v46/postgres_table_query.png)
The query:
@@ -179,7 +179,7 @@ You can control the name of the Table panel columns by using regular `as ` SQL c
The resulting table panel:
![postgres table](/img/docs/v46/postgres_table.png)
![postgres table](/static/img/docs/v46/postgres_table.png)
## Time series queries

View File

@@ -14,22 +14,22 @@ Grafana includes built-in support for Prometheus. This topic explains options, v
To access Prometheus settings, hover your mouse over the **Configuration** (gear) icon, then click **Data Sources**, and then click the Prometheus data source.
| 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. |
| `Url` | The URL of your Prometheus server, e.g. `http://prometheus.example.org:9090`. |
| `Access` | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser. |
| `Basic Auth` | Enable basic authentication to the Prometheus data source. |
| `User` | User name for basic authentication. |
| `Password` | Password for basic authentication. |
| `Scrape interval` | Set this to the typical scrape and evaluation interval configured in Prometheus. Defaults to 15s.
| `HTTP method` | Use either POST or GET HTTP method to query your data source. POST is the recommended and pre-selected method as it allows bigger queries. Change this to GET if you have a Prometheus version older than 2.1 or if POST requests are restricted in your network. |
| `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. |
| Name | Description |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Name` | The data source name. This is how you refer to the data source in panels and queries. |
| `Default` | Default data source that is pre-selected for new panels. |
| `Url` | The URL of your Prometheus server, for example, `http://prometheus.example.org:9090`. |
| `Access` | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser. |
| `Basic Auth` | Enable basic authentication to the Prometheus data source. |
| `User` | User name for basic authentication. |
| `Password` | Password for basic authentication. |
| `Scrape interval` | Set this to the typical scrape and evaluation interval configured in Prometheus. Defaults to 15s. |
| `HTTP method` | Use either POST or GET HTTP method to query your data source. POST is the recommended and pre-selected method as it allows bigger queries. Change this to GET if you have a Prometheus version older than 2.1 or if POST requests are restricted in your network. |
| `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
@@ -39,8 +39,8 @@ Below you can find information and options for Prometheus query editor in dashbo
Open a graph in edit mode by clicking the title > Edit (or by pressing `e` key while hovering over panel).
{{< docs-imagebox img="/img/docs/v45/prometheus_query_editor_still.png"
animated-gif="/img/docs/v45/prometheus_query_editor.gif" >}}
{{< figure src="/static/img/docs/v45/prometheus_query_editor_still.png"
animated-gif="/static/img/docs/v45/prometheus_query_editor.gif" >}}
| Name | Description |
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -76,6 +76,29 @@ To show a horizontal line across the whole graph, add a series override and sele
| `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. |
### Metrics browser
The metrics browser allows you to quickly find metrics and select relevant labels to build basic queries.
When you open the browser you will see all available metrics and labels.
If supported by your Prometheus instance, each metric will show its HELP and TYPE as a tooltip.
{{< figure src="/static/img/docs/v8/prometheus_metrics_browser.png" class="docs-image--no-shadow" max-width="800px" caption="Screenshot of the metrics browser for Prometheus" >}}
When you select a metric, the browser narrows down the available labels to show only the ones applicable to the metric.
You can then select one or more labels for which the available label values are shown in lists in the bottom section.
Select one or more values for each label to tighten your query scope.
> **Note:** If you do not remember a metric name to start with, you can also select a few labels first, to narrow down the list and then find relevant label values.
All lists in the metrics browser have a search field above them to quickly filter for metrics or labels that match a certain string. The values section only has one search field. Its filtering applies to all labels to help you find values across labels once they have been selected, for example, among your labels `app`, `job`, `job_name` only one might with the value you are looking for.
Once you are satisfied with your query, click "Use query" to run the query. The button "Use as rate query" adds a `rate(...)[$__interval]` around your query to help write queries for counter metrics.
The "Validate selector" button will check with Prometheus how many time series are available for that selector.
#### Limitations
The metrics browser has a hard limit of 10,000 labels (keys) and 50,000 label values (including metric names). If your Prometheus instance returns more results, the browser will continue functioning. However, the result sets will be cut off above those maximum limits.
## Templating
Instead of hard-coding things like server, application and sensor name in your metric queries, you can use variables in their place.
@@ -188,9 +211,9 @@ datasources:
type: prometheus
# Access mode - proxy (server in the UI) or direct (browser in the UI).
access: proxy
httpMethod: POST
url: http://localhost:9090
jsonData:
httpMethod: POST
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.
@@ -218,7 +241,7 @@ If you are running Grafana in an Amazon EKS cluster, follow the AWS guide to [Qu
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" >}}
{{< figure src="/static/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" >}}
{{< figure src="/static/img/docs/v74/exemplars-setting.png" class="docs-image--no-shadow" caption="Screenshot of the Exemplars configuration" >}}

View File

@@ -32,14 +32,18 @@ This is a configuration for the [trace to logs feature]({{< relref "../explore/t
- **Data source -** Target data source.
- **Tags -** The tags that will be used in the Loki query. Default is `'cluster', 'hostname', 'namespace', 'pod'`.
![Trace to logs settings](/img/docs/explore/trace-to-logs-settings-7-4.png 'Screenshot of the trace to logs settings')
![Trace to logs settings](/static/img/docs/explore/trace-to-logs-settings-7-4.png 'Screenshot of the trace to logs settings')
## Query traces
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.
You can search for traces if you set up the trace to logs setting in the data source configuration page. To find traces to visualize, use the [Loki query editor]({{< relref "loki.md#loki-query-editor" >}}). To get search results, you must have [derived fields]({{< relref "loki.md#derived-fields" >}}) configured, which point to this data source.
{{< docs-imagebox img="/img/docs/v73/tempo-query-editor.png" class="docs-image--no-shadow" caption="Screenshot of the Tempo query editor" >}}
{{< figure src="/static/img/docs/tempo/query-editor-search.png" class="docs-image--no-shadow" caption="Screenshot of the Tempo query editor showing the search tab" >}}
To query a particular trace, select the **TraceID** query type, and then put the ID into the Trace ID field.
{{< figure src="/static/img/docs/tempo/query-editor-traceid.png" class="docs-image--no-shadow" caption="Screenshot of the Tempo TraceID query type" >}}
## Linking Trace ID from logs

View File

@@ -24,14 +24,14 @@ The `TestData DB` data source is not enabled by default. To enable it:
Once `TestData DB` is enabled, you can use it as a data source in any metric panel.
![](/img/docs/v41/test_data_add.png)
![](/static/img/docs/v41/test_data_add.png)
## CSV
The comma separated values scenario is the most powerful one since it lets you create any kind of graph you like.
Once you provided the numbers, `TestData DB` distributes them evenly based on the time range of your query.
![](/img/docs/v41/test_data_csv_example.png)
![](/static/img/docs/v41/test_data_csv_example.png)
## Dashboards

View File

@@ -33,17 +33,17 @@ This is a configuration for the [trace to logs feature]({{< relref "../explore/t
- **Data source -** Target data source.
- **Tags -** The tags that will be used in the Loki query. Default is `'cluster', 'hostname', 'namespace', 'pod'`.
![Trace to logs settings](/img/docs/explore/trace-to-logs-settings-7-4.png "Screenshot of the trace to logs settings")
![Trace to logs settings](/static/img/docs/explore/trace-to-logs-settings-7-4.png "Screenshot of the trace to logs settings")
## Query traces
Querying and displaying traces from Zipkin is available via [Explore]({{< relref "../explore" >}}).
{{< docs-imagebox img="/img/docs/v70/zipkin-query-editor.png" class="docs-image--no-shadow" caption="Screenshot of the Zipkin query editor" >}}
{{< figure src="/static/img/docs/v70/zipkin-query-editor.png" class="docs-image--no-shadow" caption="Screenshot of the Zipkin query editor" >}}
The Zipkin query editor allows you to query by trace ID directly or selecting a trace from trace selector. To query by trace ID, insert the ID into the text input.
{{< docs-imagebox img="/img/docs/v70/zipkin-query-editor-open.png" class="docs-image--no-shadow" caption="Screenshot of the Zipkin query editor with trace selector expanded" >}}
{{< figure src="/static/img/docs/v70/zipkin-query-editor-open.png" class="docs-image--no-shadow" caption="Screenshot of the Zipkin query editor with trace selector expanded" >}}
Use the trace selector to pick particular trace from all traces logged in the time range you have selected in Explore. The trace selector has three levels of nesting:

View File

@@ -3,23 +3,114 @@ title = "Add authentication for data source plugins"
aliases = ["/docs/grafana/latest/plugins/developing/auth-for-datasources/", "/docs/grafana/next/developers/plugins/authentication/"]
+++
# Add authentication for data source plugins
# Add authentication for data source plugins
This page explains how to use the Grafana data source proxy to authenticate against a third-party API from a data source plugin.
This page explains how to configure your data source plugin to authenticate against a third-party API.
When a user saves a password or any other sensitive data as a data source option, Grafana encrypts the data and stores it in the Grafana database. Any encrypted data source options can only be decrypted on the Grafana server. This means that any data source that makes authenticated queries needs to request the decrypted data to be sent to the browser.
There are two ways you can perform authenticated requests from your plugin—using the [_data source proxy_](#authenticate-using-the-data-source-proxy), or by building a [_backend plugin_](#authenticate-using-a-backend-plugin). The one you choose depends on how your plugin authenticates against the third-party API.
To minimize the amount of sensitive information sent to and from the browser, data source plugins can use the Grafana _data source proxy_. When using the data source proxy, any requests containing sensitive information go through the Grafana server. No sensitive data is sent to the browser after the data is saved.
- Use the data source proxy if you need to authenticate using Basic Auth or API keys
- Use the data source proxy if the API supports OAuth 2.0 using client credentials
- Use a backend plugin if the API uses a custom authentication method that isn't supported by the data source proxy, or if your API communicates over a different protocol than HTTP
Some data sources, like [Prometheus]({{< relref "../../datasources/prometheus.md" >}}) and [InfluxDB]({{< relref "../../datasources/influxdb" >}}), allow users to configure whether to use the data source proxy, through a setting called _access modes_.
Regardless of which approach you use, you first need to encrypt any sensitive information that the plugin needs to store.
## Add a proxy route to your plugin
## Encrypt data source configuration
To forward requests through the Grafana proxy, you need to configure one or more _routes_. A route specifies how the proxy transforms outgoing requests. All routes for a given plugin are defined in the [plugin.json]({{< relref "metadata.md" >}}) file.
Data source plugins have two ways of storing custom configuration: `jsonData` and `secureJsonData`.
Let's add a route to proxy requests to `https://api.example.com/foo/bar`.
Users with the _Viewer_ role can access data source configuration—such as the contents of `jsonData`—in cleartext. If you've enabled anonymous access, anyone that can access Grafana in their browser can see the contents of `jsonData`. **Only use `jsonData` to store non-sensitive configuration.**
1. Add the route to `plugin.json`. Note that you need to reload the Grafana server every time you make a change to your `plugin.json` file.
> **Note:** You can see the settings that the current user has access to by entering `window.grafanaBootData` in the developer console of your browser.
> **Note:** Users of [Grafana Enterprise](https://grafana.com/products/enterprise/grafana/) can restrict access to data sources to specific users and teams. For more information, refer to [Data source permissions](https://grafana.com/docs/grafana/latest/enterprise/datasource_permissions).
If you need to store sensitive information, such as passwords, tokens and API keys, use `secureJsonData` instead. Whenever the user saves the data source configuration, the secrets in `secureJsonData` are sent to the Grafana server and encrypted before they're stored.
Once the secure configuration has been encrypted, it can no longer be accessed from the browser. The only way to access secrets after they've been saved is by using the [_data source proxy_](#authenticate-using-the-data-source-proxy).
#### Add secret configuration to your data source plugin
To demonstrate how you can add secrets to a data source plugin, let's add support for configuring an API key.
Create a new interface in `types.go` to hold the API key.
```ts
export interface MySecureJsonData {
apiKey?: string;
}
```
Add type information to your `secureJsonData` object by updating the props for your `ConfigEditor` to accept the interface as a second type parameter.
```ts
interface Props extends DataSourcePluginOptionsEditorProps<MyDataSourceOptions, MySecureJsonData> {}
```
You can access the value of the secret from the `options` prop inside your `ConfigEditor` until the user saves the configuration. When the user saves the configuration, Grafana clears the value. After that, you can use the `secureJsonFields` to determine whether the property has been configured.
```ts
const { secureJsonData, secureJsonFields } = options;
const { apiKey } = secureJsonData;
```
To securely update the secret in your plugin's configuration editor, update the `secureJsonData` object using the `onOptionsChange` prop.
```ts
const onAPIKeyChange = (event: ChangeEvent<HTMLInputElement>) => {
onOptionsChange({
...options,
secureJsonData: {
apiKey: event.target.value,
},
});
};
```
Next, define a component that can accept user input.
```ts
<Input
type="password"
placeholder={secureJsonFields?.apiKey ? 'configured' : ''}
value={secureJsonData.apiKey ?? ''}
onChange={onAPIKeyChange}
/>
```
Finally, if you want the user to be able to reset the API key, then you need to set the property to `false` in the `secureJsonFields` object.
```ts
const onResetAPIKey = () => {
onOptionsChange({
...options,
secureJsonFields: {
...options.secureJsonFields,
apiKey: false,
},
secureJsonData: {
...options.secureJsonData,
apiKey: '',
},
});
};
```
Now that users can configure secrets, the next step is to see how we can add them to our requests.
## Authenticate using the data source proxy
Once the user has saved the configuration for a data source, any secret data source configuration will no longer be available in the browser. Encrypted secrets can only be accessed on the server. So how do you add them to you request?
The Grafana server comes with a proxy that lets you define templates for your requests. We call them _proxy routes_. Grafana sends the proxy route to the server, decrypts the secrets along with other configuration, and adds them to the request before sending it off.
> **Note:** Be sure not to confuse the data source proxy with the [auth proxy]({{< relref "../../auth/auth-proxy.md" >}}). The data source proxy is used to authenticate a data source, while the auth proxy is used to log into Grafana itself.
### Add a proxy route to your plugin
To forward requests through the Grafana proxy, you need to configure one or more proxy routes. A proxy route is a template for any outgoing request that is handled by the proxy. You can configure proxy routes in the [plugin.json](https://grafana.com/docs/grafana/latest/developers/plugins/metadata/) file.
1. Add the route to plugin.json. Note that you need to restart the Grafana server every time you make a change to your plugin.json file.
```json
"routes": [
@@ -43,27 +134,30 @@ Let's add a route to proxy requests to `https://api.example.com/foo/bar`.
}
// ...
}
```
1. In the `query` method, make a request using [BackendSrv]({{< relref "../../packages_api/runtime/backendsrv.md" >}}).
1. In the `query` method, make a request using `BackendSrv`. The first section of the URL path needs to match the `path` of your proxy route. The data source proxy replaces `this.url + routePath` with the `url` of the route. The following request will be made to `https://api.example.com/v1/users`.
```ts
import { getBackendSrv } from '@grafana/runtime';
```
```ts
const routePath = '/example';
getBackendSrv()
.datasourceRequest({
url: this.url + routePath + '/foo/bar',
url: this.url + routePath + '/v1/users',
method: 'GET',
});
```
## Add a dynamic proxy route to your plugin
### Add a dynamic proxy route to your plugin
In the example above, the URL stays the same for everyone using the plugin. Let's look at how you can create dynamic routes based on data source options that are provided by the user.
Grafana sends the proxy route to the server, where the data source proxy decrypts any sensitive data and interpolates the template variables with the decrypted data before making the request.
Many of the properties in the `route` object can use templates in the form of `{{ .JsonData.YOUR_OPTION_NAME }}`, where `YOUR_OPTION_NAME` is the name of a property in the `jsonData` object.
To add user-defined configuration to your routes, add `{{ .JsonData.apiKey }}` to the route, where `apiKey` is the name of a property in the `jsonData` object.
```json
"routes": [
@@ -74,7 +168,7 @@ Many of the properties in the `route` object can use templates in the form of `{
]
```
You can also access sensitive data in your route configuration by changing `.JsonData` into `.SecureJsonData`.
You can also configure your route to use sensitive data by using `.SecureJsonData`.
```json
"routes": [
@@ -85,17 +179,9 @@ You can also access sensitive data in your route configuration by changing `.Jso
]
```
Now you know how to define routes for your data source plugin. Next, let's look at how to authenticate requests for your routes.
In addition to the URL, you can also add headers, URL parameters, and a request body, to a proxy route.
## Configure the authentication method for a route
The Grafana proxy supports a number of different authentication methods. For more information on how to configure each authentication method, refer to [plugin.json]({{< relref "metadata.md" >}}).
For any sensitive data, make sure that you encrypt data source options, and that you use `{{ .SecureJsonData.YOUR_OPTION_NAME }}` when using sensitive data source options in your routes.
### Add HTTP header
To add HTTP headers to proxied requests, use the `headers` property.
#### Add HTTP headers to a proxy route
```json
"routes": [
@@ -112,9 +198,7 @@ To add HTTP headers to proxied requests, use the `headers` property.
]
```
### Add URL parameters
To add URL parameters to proxied requests, use the `urlParams` property.
#### Add URL parameters to a proxy route
```json
"routes": [
@@ -131,9 +215,7 @@ To add URL parameters to proxied requests, use the `urlParams` property.
]
```
### Set body content
To set the body content and length of proxied requests, use the `body` property.
#### Add a request body to a proxy route
```json
"routes": [
@@ -148,25 +230,79 @@ To set the body content and length of proxied requests, use the `body` property.
]
```
### Enable token authentication
### Add a OAuth 2.0 proxy route to your plugin
To enable token-based authentication for proxied requests, use the `tokenAuth` property.
The data source proxy supports OAuth 2.0 authentication.
Grafana automatically renews the token when it expires.
Since the request to each route is made server-side, only machine-to-machine authentication is supported. In order words, if you need to use a different grant than client credentials, you need to implement it yourself.
To authenticate using OAuth 2.0, add a `tokenAuth` object to the proxy route definition. If necessary, Grafana performs a request to the URL defined in `tokenAuth` to retrieve a token before making the request to the URL in your proxy route. Grafana automatically renews the token when it expires.
Any parameters defined in `tokenAuth.params` are encoded as `application/x-www-form-urlencoded` and sent to the token URL.
```json
"routes": [
{
"path": "example",
"url": "https://api.example.com",
"tokenAuth": {
"url": "https://login.example.com/oauth2/token",
"params": {
"grant_type": "client_credentials",
"client_id": "{{ .JsonData.clientId }}",
"client_secret": "{{ .SecureJsonData.clientSecret }}"
{
"routes": [
{
"path": "api",
"url": "https://api.example.com/v1",
"tokenAuth": {
"url": "https://api.example.com/v1/oauth/token",
"params": {
"grant_type": "client_credentials",
"client_id": "{{ .SecureJsonData.clientId }}",
"client_secret": "{{ .SecureJsonData.clientSecret }}"
}
}
}
}
]
]
}
```
## Authenticate using a backend plugin
While the data source proxy supports the most common authentication methods for HTTP APIs, using proxy routes has a few limitations:
- Proxy routes only support HTTP or HTTPS
- Proxy routes don't support custom token authentication
If any of these limitations apply to your plugin, you need to add a [backend plugin]({{< relref "./backend/_index.md" >}}). Since backend plugins run on the server they can access decrypted secrets, which makes it easier to implement custom authentication methods.
The decrypted secrets are available from the `DecryptedSecureJSONData` field in the instance settings.
```go
func (ds *dataSource) QueryData(ctx context.Context, req *backend.QueryDataRequest) (*backend.QueryDataResponse, error) {
instanceSettings := req.PluginContext.DataSourceInstanceSettings
if apiKey, exists := settings.DecryptedSecureJSONData["apiKey"]; exists {
// Use the decrypted API key.
}
// ...
}
```
## Forward OAuth identity for the logged-in user
If your data source uses the same OAuth provider as Grafana itself, for example using [Generic OAuth Authentication]({{< relref "../../auth/generic-oauth.md" >}}), your data source plugin can reuse the access token for the logged-in Grafana user.
To allow Grafana to pass the access token to the plugin, the user needs to enable **Forward OAuth Identity** on the data source configuration page. This tells Grafana to pass the token to the plugin in a Authorization header. Note that your plugin needs to use the [DataSourceHttpSettings](https://developers.grafana.com/ui/latest/index.html?path=/story/data-source-datasourcehttpsettings--basic) component in the configuration editor to expose the setting for your data source plugin.
The Authorization header is available on the `DataQuery` object on the query data request in your backend data source.
```go
func (ds *dataSource) QueryData(ctx context.Context, req *backend.QueryDataRequest) (*backend.QueryDataResponse, error) {
for _, q := range req.Queries {
token := strings.Fields(q.Headers.Get("Authorization"))
var (
tokenType = token[0]
accessToken = token[1]
)
// ...
}
}
```
> **Note:** Due to a bug in Grafana, using this feature with PostgreSQL can cause a deadlock. For more information, refer to [Grafana causes deadlocks in PostgreSQL, while trying to refresh users token](https://github.com/grafana/grafana/issues/20515).

View File

@@ -12,7 +12,7 @@ However, one limitation with these plugins are that they execute on the client-s
We use the term _backend plugin_ to denote that a plugin has a backend component. Still, normally a backend plugin requires frontend components as well. This is for example true for backend data source plugins which normally need configuration and query editor components implemented for the frontend.
Data source plugins can be extended with a backend component. In the future we plan to support additional types and possibly new kinds of plugins, such as [notifiers for Grafana Alerting]({{< relref "../../../alerting/notifications.md" >}}) and custom authentication to name a few.
Data source plugins can be extended with a backend component. In the future we plan to support additional types and possibly new kinds of plugins, such as [notifiers for Grafana Alerting]({{< relref "../../../alerting/old-alerting/notifications.md" >}}) and custom authentication to name a few.
## Use cases for implementing a backend plugin

View File

@@ -57,7 +57,7 @@ export const SimpleEditor: React.FC<StandardEditorProps<number, Settings>> = ({
// Default values
const from = item.settings?.from ?? 1;
const to = item.settings?.from ?? 10;
const to = item.settings?.to ?? 10;
for (let i = from; i <= to; i++) {
options.push({

View File

@@ -31,7 +31,7 @@ throw new Error('An error occurred');
Grafana displays the error message in the top-left corner of the panel.
{{< docs-imagebox img="/img/docs/panel_error.png" class="docs-image--no-shadow" max-width="850px" >}}
{{< figure src="/static/img/docs/panel_error.png" class="docs-image--no-shadow" max-width="850px" >}}
Avoid displaying overly-technical error messages to the user. If you want to let technical users report an error, consider logging it instead.

View File

@@ -10,7 +10,7 @@ App plugins are Grafana plugins that can bundle data source and panel plugins wi
Data source and panel plugins will show up like normal plugins. The app pages will be available in the main menu.
{{< imgbox img="/img/docs/v3/app-in-main-menu.png" caption="App in Main Menu" >}}
{{< figure class="float-right" src="/static/img/docs/v3/app-in-main-menu.png" caption="App in Main Menu" >}}
## Enabling app plugins
@@ -45,7 +45,7 @@ ConfigCtrl.templateUrl = 'components/config/config.html';
If possible, a link to a dashboard or custom page should be shown after enabling the app to guide the user to the appropriate place.
{{< imgbox img="/img/docs/app_plugin_after_enable.png" caption="After enabling" >}}
{{< figure class="float-right" src="/static/img/docs/app_plugin_after_enable.png" caption="After enabling" >}}
### Develop your own App

View File

@@ -96,7 +96,7 @@ Then each pair, label and field is wrapped in a div with a gf-form class.
Note that there are some Angular attributes here. *ng-model* will update the panel data. *ng-change* will render the panel when you change the value. This change will occur on the onblur event due to the *ng-model-onblur* attribute. This means you can see the effect of your changes on the panel while editing.
{{< imgbox img="/assets/img/blog/clock-panel-editor.png" caption="Panel Editor" >}}
{{< figure class="float-right" src="/assets/img/blog/clock-panel-editor.png" caption="Panel Editor" >}}
On the editor tab we use a drop down for 12/24 hour clock, an input field for font size and a color picker for the background color.

View File

@@ -5,11 +5,11 @@ aliases = ["/docs/grafana/latest/plugins/developing/snapshot-mode/"]
# Legacy snapshot mode
{{< imgbox img="/img/docs/Grafana-snapshot-example.png" caption="A dashboard using snapshot data and not live data." >}}
{{< figure class="float-right" src="/static/img/docs/Grafana-snapshot-example.png" caption="A dashboard using snapshot data and not live data." >}}
Grafana has this great feature where you can [save a snapshot of your dashboard]({{< relref "../../../dashboards/json-model.md" >}}). Instead of sending a screenshot of a dashboard to someone, you can send them a working, interactive Grafana dashboard with the snapshot data embedded inside it. The snapshot can be saved on your Grafana server and is available to all your co-workers. Raintank also hosts a [snapshot server](http://snapshot.raintank.io/) if you want to send the snapshot to someone who does not have access to your Grafana server.
{{< imgbox img="/img/docs/animated_gifs/snapshots.gif" caption="Selecting a snapshot" >}}
{{< figure class="float-right" src="/static/img/docs/animated_gifs/snapshots.gif" caption="Selecting a snapshot" >}}
This all works because Grafana saves a snapshot of the current data in the dashboard json instead of fetching the data from a data source. However, if you are building a custom panel plugin then this will not work straight out of the box. You will need to make some small (and easy!) changes first.
@@ -41,7 +41,7 @@ This will cover most use cases for snapshot support. Sometimes you will want to
Data that is not time series data from a Grafana data source is not saved automatically by Grafana. Saving custom data for snapshot mode has to be done manually.
{{< imgbox img="/img/docs/Grafana-save-snapshot.png" caption="Save snapshot" >}}
{{< figure class="float-right" src="/static/img/docs/Grafana-save-snapshot.png" caption="Save snapshot" >}}
Grafana gives us a chance to save data to the dashboard json when it is creating a snapshot. In the 'data-received' event handler, you can check the snapshot flag on the dashboard object. If this is true, then Grafana is creating a snapshot and you can manually save custom data to the panel json. In the example, a new field called snapshotLocationData in the panel json is initialized with a snapshot of the custom data.

View File

@@ -37,7 +37,7 @@ For more information, refer to [@grafana/toolkit](https://www.npmjs.com/package/
### Field options
Grafana 7.0 introduced the concept of [_field options_]({{< relref "../../panels/field-options/_index.md#field-options" >}}), a new way of configuring your data before it gets visualized. Since this was not available in previous versions, any plugin that enables field-based configuration will not work in previous versions of Grafana.
Grafana 7.0 introduced the concept of _field options_, a new way of configuring your data before it gets visualized. Since this was not available in previous versions, any plugin that enables field-based configuration will not work in previous versions of Grafana.
For plugins prior to Grafana 7.0, all options are considered _Display options_. The tab for field configuration isn't available.

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