Compare commits

..

265 Commits

Author SHA1 Message Date
Grot (@grafanabot)
6855cdff7c "Release: Updated versions in package to 8.1.4" (#39273) 2021-09-16 09:22:09 +02:00
Grot (@grafanabot)
6352cc18ba Docs: Update azuread docs to mention about env variables (#39203) (#39265)
* Update azuread docs to mention about env variables

Add a note about the name of the environment variables to be used for configuring client_id and client_secret

* Update docs/sources/auth/azuread.md

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

* Update docs/sources/auth/azuread.md

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

* fix typo

* Revert "fix typo"

This reverts commit ff84f70773.

* Fixed typo again, trying to kick start license check.

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

Co-authored-by: rodrigosilva-ciandt <84101915+rodrigosilva-ciandt@users.noreply.github.com>
2021-09-16 04:16:04 +02:00
Grot (@grafanabot)
9d4a7b0290 Docs: plugin migration guide 7.0.0 to 8.0.0 (#38911) (#39246)
* restructuring to new storybook inspired structure.

* added instructions on how to handle breaking changes in the legend.

* start adding migration steps for 7 -> 8

* added information about the data frame format changes.

* added plugin.json changes.

* added emotion 11 imports.

* added information about theme v1 being deprecated.

* added steps for backend plugin migration.

* added reference to the migrate hooks v6 -> v7.

* docs(pluginmigration): introduce getColorForTheme changes

* Update docs/sources/developers/plugins/migration-guide.md

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

* Update docs/sources/developers/plugins/migration-guide.md

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>

* Update docs/sources/developers/plugins/migration-guide.md

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

* Update docs/sources/developers/plugins/migration-guide.md

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

* Update docs/sources/developers/plugins/migration-guide.md

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

* docs(migration-guide): introduce useStyles to v8 deprecation notes

* Apply suggestions from code review

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

* Update docs/sources/developers/plugins/migration-guide.md

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

* Update docs/sources/developers/plugins/migration-guide.md

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

* Update docs/sources/developers/plugins/migration-guide.md

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

* Update docs/sources/developers/plugins/migration-guide.md

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

* suggestion from review.

* Update docs/sources/developers/plugins/migration-guide.md

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

* docs(Migration Guide): update the example for `grafanaDependency`

* docs(Migration Guide): remove the time-series migration part for now

* Update docs/sources/developers/plugins/migration-guide.md

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

* Update docs/sources/developers/plugins/migration-guide.md

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

* docs(Migration Guide): update wording about plugin signing

* Update docs/sources/developers/plugins/migration-guide.md

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

* Update docs/sources/developers/plugins/migration-guide.md

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

* Update docs/sources/developers/plugins/migration-guide.md

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

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
(cherry picked from commit aba8af1d59)

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2021-09-15 15:54:40 -04:00
Grot (@grafanabot)
58e890dec6 Docs: Added "manageAlerts" provisioning option. (#38836) (#39253)
* add "manageAlerts" option to prov. docs

* Update docs/sources/administration/provisioning.md

Takes into account suggestion from @domasx2

Co-authored-by: Domas <domasx2@gmail.com>

* Revert "Update docs/sources/administration/provisioning.md
"

This reverts commit d7085355a6.

* Adding content back.

Co-authored-by: Domas <domasx2@gmail.com>
Co-authored-by: achatterjee-grafana <aparajita.chatterjee@grafana.com>
(cherry picked from commit 3d0fa70b3b)

Co-authored-by: Maarten De Wispelaere <50638541+BitProcessor@users.noreply.github.com>
2021-09-15 15:16:38 -04:00
Grot (@grafanabot)
71a9bf0203 BarChart: Fix legend and tooltip colors off by 1 after data refresh (#39234) (#39252)
(cherry picked from commit fb091de2c7)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-09-15 20:42:58 +02:00
Grot (@grafanabot)
da32c785c6 Update silences.md (#38834) (#39243)
* Update silences.md

minor correction in not equals regex

* Update docs/sources/alerting/unified-alerting/silences.md

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

Co-authored-by: Andrew Burian <andrew@dapperlabs.com>
2021-09-15 12:23:08 -04:00
Grot (@grafanabot)
5acc7ea503 Explore: Ensure logs volume bar colors match legend colors (#39072) (#39120)
* Ensure logs volume bar colors match legend colors

* Fix tests

(cherry picked from commit 88ad9aad42)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-09-15 16:20:23 +02:00
Grot (@grafanabot)
6e9b0b6ee1 Graph: make old graph panel thresholds work even if ngalert is enabled (#38918) (#39233)
(cherry picked from commit 264946f37f)

Co-authored-by: Domas <domas.lapinskas@grafana.com>
2021-09-15 16:49:04 +03:00
Dimitris Sotirakis
abca3c81b0 Fix regex to identify / as separator (#39220) 2021-09-15 11:51:45 +02:00
Leon Sorokin
4347b32f0e [v8.1.x] BarChart: fix stale bar values and x axis labels
(cherry picked from commit df6b6e7a98)
2021-09-14 22:01:04 -05:00
Grot (@grafanabot)
9d4a77127d Add link to default template (#39106) (#39138)
# This would have been useful to me. Perhaps it would be useful to others?
#
# (cherry picked from commit baff8fe)

Co-authored-by: dsotirakis <sotirakis.dim@gmail.com>
2021-09-14 16:57:31 -04:00
Grot (@grafanabot)
951f26304b Doc: Created a separate topic for AWS authentication (#39012) (#39160)
* Created new topic for AWS authentication and fixed broken relrefs.

* Applied suggestion from review.

* Update docs/sources/datasources/aws-cloudwatch/aws-authentication.md

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

* Applied some suggestions from doc review.

* Applied all doc review.

* Last of the edits, went through and addressed all comments.

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
(cherry picked from commit d3a7e0228c)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-09-14 09:30:36 -04:00
Grot (@grafanabot)
f427f11bda LDAP: Search all DNs for users (#38891) (#39167)
(cherry picked from commit ad971cc9be)

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2021-09-14 11:30:38 +02:00
Grot (@grafanabot)
77f610a1f3 Docs: Fix broken link to signed GCS URLs docs (#39144) (#39149)
The current version of the docs contains a broken link to the GCS docs about signed URLs. The link (since it contains an additional `]`) generates a 404 and also slightly breaks the rendering of the link.

(cherry picked from commit ae4900e76f)

Co-authored-by: Jorge Luis Betancourt <jorge-luis.betancourt@trivago.com>
2021-09-13 12:42:30 -04:00
Grot (@grafanabot)
2cc19d6a7a [v8.1.x] Variables: Fix not updating inside a Panel when the preceding Row uses "Repeat For" (#39141)
Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
2021-09-13 17:21:16 +02:00
Marcus Efraimsson
178b2ea0e5 Docs: Improve v8 upgrade notes for SQL data sources (#38792) (#39124)
Improves SQL data sources documentation in regards to Grafana 8 changes
and adds some additional upgrade notes in regards to this.

Ref #35390
Ref #38666

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit 0bb7d50ad6)
2021-09-13 11:11:04 -04:00
Grot (@grafanabot)
5e03bce5d2 Explore: Trace view now shows trace start time in selected timezone (#39054) (#39093)
(cherry picked from commit b89f8fdfcb)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2021-09-10 09:53:06 -06:00
Sofia Papagiannaki
feb4fbaae9 Alerting: Fix notification channel migration (#38983) (#39053)
(cherry picked from commit b56bf83c19)
2021-09-09 20:50:12 +03:00
Grot (@grafanabot)
c046d8cec2 Annotations: Fixes blank panels for queries with unknown data sources (#39017) (#39034)
* Annotations: Fixes blank panels for queries with unknown data sources

* Chore: fixes strict typescript error

(cherry picked from commit 419ead99aa)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-09-09 14:15:20 +02:00
Grot (@grafanabot)
72d10b8ddb Copy cue.mod and packages/grafana-schema to container workdir (#38998) (#39018)
(cherry picked from commit 78b3847014)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-09-09 08:26:51 +02:00
Grot (@grafanabot)
5a1c145aee [v8.1.x] LibraryPanels: Fixes update issues related to library panels in rows (#38969)
* LibraryPanels: Fixes update issues related to library panels in rows (#38963)

(cherry picked from commit 17f9bc138e)

* Tests: fixes broken test because of feature not yet backported

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2021-09-09 06:21:44 +02:00
Grot (@grafanabot)
4ad607ecc9 #31983 Changed regexp (#38642) (#38999)
(cherry picked from commit 258e2cd91e)

Co-authored-by: leplan73 <sbouchex@gmail.com>
2021-09-08 17:48:18 +02:00
Erik Sundell
99392d016f resolve merge conflict (#38980)
Co-authored-by: Grot (@grafanabot) <43478413+grafanabot@users.noreply.github.com>
2021-09-08 14:07:05 +02:00
Grot (@grafanabot)
a61f38238c "Release: Updated versions in package to 8.1.3" (#38965) 2021-09-08 11:32:03 +02:00
Dimitris Sotirakis
3c673048d8 Change grabpl version to 2.3.4 (#38967) 2021-09-08 11:30:28 +02:00
Grot (@grafanabot)
f39a38a9b5 PieChart: Display "No data" when there is no data (#38808) (#38960)
PieChart: Display "No data" when there is no data
(cherry picked from commit ecf40f0331)

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2021-09-08 09:34:22 +02:00
Grot (@grafanabot)
9240425952 track signature files + add warn log (#38938) (#38958)
(cherry picked from commit 40643ee023)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-09-08 09:22:37 +02:00
Grot (@grafanabot)
217f9438c6 Docs: Clarify delta value (#38824) (#38916)
(cherry picked from commit a7c367968c)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-09-08 08:52:32 +02:00
Marcus Efraimsson
4f215e06f1 Postgres/MySQL/MSSQL: Fix region annotations not displayed correctly (#38936) (#38953)
Fix region annotations not displayed correctly when returning timeend column
as epoch timestamp and by that making sure that the returned data frame field
named timeend is treated as time type.

Fixes #38533

(cherry picked from commit fbdaf56a84)
2021-09-08 09:51:27 +03:00
Grot (@grafanabot)
ccef062388 uPlot: Fix default value for plot legend visibility (#36660) (#38930)
Fixed the condition, as the last part of `!seriesConfig.show ?? false`
will never be evaluated because `!seriesConfig.show` always yields a
boolean.

(cherry picked from commit 4e22823a49)

Co-authored-by: Andreas Gerstmayr <andreas@gerstmayr.me>
2021-09-07 16:52:17 +02:00
Grot (@grafanabot)
08eab136b6 Prometheus: Fix validate selector in metrics browser (#38921) (#38926)
* Fix match[] param in loki and prometheus

* Update loki series match param

(cherry picked from commit 19d4213df6)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-09-07 16:19:18 +02:00
Grot (@grafanabot)
43696bad09 Dashboard: Forces panel re-render when exiting panel edit (#38913) (#38919)
(cherry picked from commit 8826540c09)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-09-07 13:15:22 +02:00
Grot (@grafanabot)
9e6962be65 [v8.1.x] Dashboard: Fix UIDs are not preserved when importing/creating dashboards thru importing .json file (#38892)
* Dashboard: Fix UID not preserved on import

* Import Dashboard: add e2e test to verify uid is preserved when importing dashboard

* E2e: Use dynamic uid

* Tests: fixes e2e test

* Chore: adds back waits

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

Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
2021-09-06 17:25:02 +02:00
Grot (@grafanabot)
64dc3a946d OAuth: add docs for disableAutoLogin param (#38752) (#38896)
* OAuth: add docs for disableAutoLogin param

* Apply suggestions from code review

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

* OAuth: add availability note for disableAutoLogin

* Update docs/sources/auth/overview.md

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

* Update docs/sources/auth/overview.md

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

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit 49f7278063)

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2021-09-06 17:24:26 +02:00
Grot (@grafanabot)
f45404c8ab LibraryPanels: Prevents duplicate repeated panels from being created (#38804) (#38863)
* LibraryPanels: Prevents duplicate repeated panels from being created

* Tests: adds tests

* Chore: updates after PR feedback

(cherry picked from commit 3b0910e470)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-09-06 06:24:35 +02:00
achatterjee-grafana
0176693fe9 Adding missing information, more than just the manual backport. (#38837) 2021-09-02 16:21:35 -04:00
Giordano Ricci
86f86d6fba Elasticsearch: Prevent pipeline aggregations to show up in terms order by options (#38448) (#38830)
* Elasticsearch: Prevent pipeline aggregations to show up in terms order by options

* fix optional props

* Refactor & add tests

* Fix & lower strict ts count

* Update public/app/plugins/datasource/elasticsearch/components/QueryEditor/BucketAggregationsEditor/SettingsEditor/TermsSettingsEditor.test.tsx

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

* Update public/app/plugins/datasource/elasticsearch/components/QueryEditor/BucketAggregationsEditor/SettingsEditor/TermsSettingsEditor.test.tsx

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

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
(cherry picked from commit 7f1327d1ed)
2021-09-02 19:30:06 +02:00
malcolmholmes
b992d6c228 Build: Upgrade grabpl to 2.4.2 (#38820) (#38828)
(cherry picked from commit b22c2543d0)
2021-09-02 17:11:55 +01:00
Grot (@grafanabot)
3760a3ab23 Alerting: Fix alert flapping in the internal alertmanager (#38648) (#38829)
* Alerting: Fix alert flapping in the alertmanager

fixes a bug that caused Alerts that are evaluated at low intervals (sub 1 minute), to flap in the Alertmanager.
Mostly due to a combination of `EndsAt` and resend delay.

The Alertmanager uses `EndsAt` as a heuristic to know whenever it should resolve a firing alert, in the case that it hasn't heard
back from the alert generation system.

Because grafana sent the alert with an `EndsAt` which is equal to the `For` of the alert itself,
and we had a hard-coded 1 minute re-send delay (only applicable to firing alerts) this meant that a firing alert would resolve in the Alertmanager before we re-notify that it still firing.

This commit, increases the `EndsAt` by 3x the the resend delay or alert interval (depending on which one is higher). The resendDelay has been decreased to 30 seconds.

(cherry picked from commit dd502f22eb)

Co-authored-by: gotjosh <josue@grafana.com>
2021-09-02 17:03:07 +01:00
Dimitris Sotirakis
bb646150f5 [v8.1.x] Chore: Update to alpine:3.14.2 (#38821)
* Backport #38813

* Sign drone
2021-09-02 13:39:06 +02:00
Grot (@grafanabot)
bf158b2c4a Update Dockerfile (#38785) (#38815)
Update alpine 3.14.1 to 3.14.2
CVE : https://github.com/alpinelinux/docker-alpine/issues/199

(cherry picked from commit fe65021c14)

Co-authored-by: blackmetal23 <blackmetal23@users.noreply.github.com>
2021-09-02 11:42:14 +02:00
Grot (@grafanabot)
b4b0ee91be Deprecate browser access mode for the Graphite data source. (#38783) (#38809)
* Deprecate browser access mode for Graphite

* Update docs

* Update copy

(cherry picked from commit f941390631)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-09-02 10:45:27 +02:00
Grot (@grafanabot)
bfcf311f8f Live: prepend orgId when publishing from HTTP (#38775) (#38793)
(cherry picked from commit e461c722bf)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-09-01 18:25:32 +02:00
Grot (@grafanabot)
5f7e249f40 Geomap: hide legend for markers with single threshold (#38734) (#38738)
(cherry picked from commit f567bef0bf)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-08-31 22:58:32 -07:00
Grot (@grafanabot)
742947f6c3 Doc: Add granularity to files and folder permissions. (#38732) (#38757)
* Added note as suggested by Simon. Also, adjusted content and resized image.

* Minor wording change.

(cherry picked from commit dd24995852)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-08-31 11:46:50 -04:00
Andres Martinez Gotor
af6e673891 fix conflict (#38737)
Co-authored-by: shuotli <63325084+shuotli@users.noreply.github.com>
2021-08-31 15:58:17 +02:00
Leon Sorokin
f5211483ea TimeSeries: Use graph min/max for percentage threshold (#38528) (#38684)
* TimeSeries: Use graph min/max as baseis for percentage threshold calculation.

* respect hard and soft axis limits for % threshold steps

* revert state-timeline changes

* enable by-threshold coloring in histogram and barchart

* revert yMin

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

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2021-08-30 15:02:41 -05:00
Grot (@grafanabot)
b780f77e74 Alerting/Docs: Clarify NoData option (#38451) (#38710)
* Alerting/Docs: Clarify NoData option
for #37665

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

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

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

Co-authored-by: Kyle Brandt <kyle@grafana.com>
2021-08-30 09:55:31 -04:00
Grot (@grafanabot)
72ead468b2 Toolkit: fix matchmedia missing (#38694) (#38702)
(cherry picked from commit dbc7464e78)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-08-30 15:04:46 +02:00
Zoltán Bedi
4e2cbb7028 Fix: panel crash after esc (#38646) (#38691)
(cherry picked from commit 38b398feb4)
2021-08-30 11:09:43 +02:00
Grot (@grafanabot)
a622b4ae58 Fix key prop when rendering options (#38595) (#38686)
(cherry picked from commit d90c822e69)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-08-30 08:56:52 +03:00
Grot (@grafanabot)
902ea4299c Fix typo in whats-new-in-v8-1.md (#38660) (#38662)
* Fix typo in whats-new-in-v8-1.md

* Update docs/sources/whatsnew/whats-new-in-v8-1.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 06c9f7e13b)

Co-authored-by: Christoph Deil <Deil.Christoph@gmail.com>
2021-08-28 00:55:22 +02:00
Grot (@grafanabot)
eac0c08b13 Colors: fix by-value/hex3 & Single color schemes in Gradient mode (#38656) (#38658)
(cherry picked from commit 3c72f1678f)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-08-27 22:35:14 +02:00
Grot (@grafanabot)
8cfc6571d8 Elasticsearch: Only show numbers in histogram field autocomplete (#38631) (#38652)
(cherry picked from commit b5e4a0a39a)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-08-27 18:44:39 +02:00
Grot (@grafanabot)
786174ce94 Docs: Remove an unnecessary legacy alerts notification webhook listing and reduce promotional content (#38644) (#38647)
* Removed an unecessary webhook listing and modified some text to reduce promotion for specific tooling.

* Updated doc content with Eve and Ursula's review.

* Removed "the".

Co-authored-by: achatterjee-grafana <aparajita.chatterjee@grafana.com>
(cherry picked from commit 4a73e0f9a8)

Co-authored-by: Petros Kolyvas <code@petros.io>
2021-08-27 17:48:50 +02:00
Grot (@grafanabot)
0a3ccc1701 Elasticsearch: change terms default min_doc_count to 1 (#38632) (#38641)
(cherry picked from commit eaca54a9f2)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-08-27 15:51:43 +02:00
Grot (@grafanabot)
b9a77c6208 Docs: clarify state of Unified Alerting (#38603) (#38639)
* Docs: clarify state of Unified Alerting

* Update docs/sources/alerting/unified-alerting/_index.md

Co-authored-by: Kyle Brandt <kyle@grafana.com>

* Adjusted note to move below the introduction.

* Fixed a typo and added beta notes.

* Minor typo fix.

* Docs: remove innacurate beta label for Grafana 8.0

Grafana 8.0 is not in beta, only unified alerting.

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: Kyle Brandt <kyle@grafana.com>
Co-authored-by: achatterjee-grafana <aparajita.chatterjee@grafana.com>
(cherry picked from commit 72d296843d)

Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com>
2021-08-27 15:38:39 +02:00
Grot (@grafanabot)
133c136847 Docs: Add v8.1 upgrade note regarding unencrypted data source passwords (#38449) (#38630)
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit e872032a2b)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-08-27 14:23:43 +02:00
Grot (@grafanabot)
592829cbed Live: allow connections with request host matching origin host (#38538) (#38628)
(cherry picked from commit a95a40d87d)

Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2021-08-27 12:54:16 +02:00
Grot (@grafanabot)
f3592a4e2b Docs: Add info and links about our hosted services to our grafana install docs (#38544) (#38624)
* Add info and links about our hosted services to our grafana install docs

* review updates

* Update docs/sources/installation/debian.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 bbaf6a23bb)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-08-27 12:01:42 +02:00
Grot (@grafanabot)
51d3926cde Bug: Return empty plugins.DataTimeSeriesSlice when the frame field vector is epmty (#38587) (#38602)
* Add check if the vector is empty

* Use Rows() instead of Len() on field

* Remove redundant condition

(cherry picked from commit 568549e810)

Co-authored-by: idafurjes <36131195+idafurjes@users.noreply.github.com>
2021-08-26 17:20:03 +02:00
Grot (@grafanabot)
5512b07939 Force use versions of libcrypto1.1 and libssl1.1 (#38585) (#38597)
(cherry picked from commit 00886afaf1)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-08-26 15:50:57 +02:00
Grot (@grafanabot)
c745d2fd43 Docs: Fix error in provisioning docs for discord notifier (#38579) (#38580)
Fixes an error in provisioning docs for discord notifier referencing the wrong
name of the "message content" setting.

Fixes #38494

(cherry picked from commit b231afd50f)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-08-26 12:58:08 +02:00
Grot (@grafanabot)
e928c334c2 Elasticsearch: Fix metric names for alert queries (#38546) (#38574)
* Export fieldName to var

* Add empty string as frame name

(cherry picked from commit 12320dda3c)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-08-26 09:46:30 +02:00
Grot (@grafanabot)
f195dcc37a API: Add short url validation (#38436) (#38572)
* Add short url validation
Path should not contain string ../

* Update pkg/api/short_url.go

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

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

Co-authored-by: idafurjes <36131195+idafurjes@users.noreply.github.com>
2021-08-26 09:44:07 +02:00
achatterjee-grafana
33a7e11344 Docs move "visualizations" folder up one level in TOC (#38523) (#38563)
* Moved Visualizations folder one level up. Fixed a bunch of broken relrefs.

* More broken relrefs.

* Fixed the last of the broken relrefs

* Adjusted weight and added alias.

* Added aliases to a bunch of visualization topics.

* More topics with aliases.

* More aliases, adjusted some weight and other metadata information.
2021-08-25 14:58:24 -04:00
Grot (@grafanabot)
c65399eaad Loki: Fix ad-hoc filter when used with parser (#38542) (#38557)
* Fix ad hoc filter when used with parser

* Update

(cherry picked from commit d1b6132302)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-08-25 16:37:22 +02:00
Grot (@grafanabot)
bcb405e40c Licensing: Provide correct URL for AGPL license (#36917) (#38531)
* Provide correct link for AGPL license

* Change LicenseURL to point go Grafana OSS page

* Keep utm_source query parameter

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

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

Co-authored-by: Witek Bedyk <wbedyk@suse.com>
2021-08-25 15:57:13 +02:00
Grot (@grafanabot)
6c4f476597 QueryEditor: Don't use _.defaults as it mutates the query prop directly (#37965) (#38539)
* QueryEditor: Don't use _.defaults as it mutates the query prop directly

* QueryEditor: Update the query type on mount if none exists

* QueryEditor: Mutate in the constructor instead of render

* Apply defaults immutably in render

(cherry picked from commit 7c97b9d03f)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-08-25 11:47:29 +02:00
Dimitris Sotirakis
44a659d1dc Backport #38516 (#38525) 2021-08-25 09:28:29 +02:00
Dimitris Sotirakis
ed5f8c1426 Backport #38447 (#38524) 2021-08-25 08:34:41 +02:00
Grot (@grafanabot)
8d2a6073d1 Update to golang:1.16.1-alpine3.14 (#38508) (#38510)
(cherry picked from commit da72dc55cb)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-08-24 16:40:37 +02:00
Dimitris Sotirakis
a4b4958279 [8.1.x] Backport 38088 to v8.1.x (#38491)
* Backport 38088

* Sign drone

Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
2021-08-24 14:44:37 +03:00
Grot (@grafanabot)
7964cc6789 GraphNG: optimize measureText(), drop estimation for y-axis auto-sizing (#38475) (#38476)
(cherry picked from commit 403bbd0144)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-08-24 03:49:38 -05:00
Grot (@grafanabot)
6c29821253 Chore: Add public/lib to .prettierignore (#38479) (#38486)
* Add public/lib to .prettierignore

* Fixes according to reviewer's comments

(cherry picked from commit 309d263531)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-08-24 10:39:34 +02:00
Grot (@grafanabot)
70a0dc57ac API: Add theme validation (#38432) (#38480)
* Add theme validation

* Fix lint for const

(cherry picked from commit ccab9611cb)

Co-authored-by: idafurjes <36131195+idafurjes@users.noreply.github.com>
2021-08-24 10:30:49 +02:00
Dimitris Sotirakis
79016c5d39 Cherry pick 64cb000d37 (#38477) 2021-08-24 08:43:33 +02:00
Grot (@grafanabot)
67c46e85a9 Add honeycomb plugin logo (#38461) (#38466)
(cherry picked from commit 6548cd89af)

Co-authored-by: Travis Patterson <travis.patterson@grafana.com>
2021-08-23 15:07:38 -06:00
Connor Lindsey
845e73cecd Manually set query type in Tempo explore on component mount (#38408) (#38456)
* Manually set query type in Tempo explore on component mount

(cherry picked from commit a2525005e5)
2021-08-23 09:44:42 -06:00
Grot (@grafanabot)
1a711659f5 Bug: Register OpenTSDB with correct service name (#37581) (#38450)
* Bug: Register OpenTSDB with correct service name

* USe Register instead of RegisterAndStart

(cherry picked from commit 769b7a5865)

Co-authored-by: idafurjes <36131195+idafurjes@users.noreply.github.com>
2021-08-23 15:23:28 +02:00
Grot (@grafanabot)
98c540ce8a Annotation Panel: Fix annotation with end time not being centered (#38423) (#38438)
* Annotation Panel: Fix annotation with end time not being centered

* Update public/app/plugins/panel/annolist/AnnoListPanel.tsx

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

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

Co-authored-by: Villena Guillaume <contact@guillaumevillena.fr>
2021-08-23 14:39:07 +02:00
Grot (@grafanabot)
954f55785a replace "blah" with "example". (#38114) (#38116)
(cherry picked from commit d38ce58045)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-08-20 16:38:58 +02:00
Grot (@grafanabot)
267c4d376b Dashboard: Prevents folder change when navigating to general settings (#38103) (#38108)
* Dashboard: Prevents folder change when navigating to general settings

* Tests: fixes broken tests

* Chore: changes from PR feedback

(cherry picked from commit a0773b290b)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-08-20 12:24:23 +02:00
Dimitris Sotirakis
57cdd0239f Add glob pattern matching (#38101) 2021-08-20 10:10:40 +03:00
Grot (@grafanabot)
edff57c2ef ReleaseNotes: Updated changelog and release notes for 8.1.2 (#38086) (#38091)
(cherry picked from commit 170d1bf954)
2021-08-19 13:42:33 -07:00
Grot (@grafanabot)
bbcf11723a Add metadata (#30138) (#38084)
* Sentence case

* Fix typo

* steps not paragraph

* prepare for merge conflict

* another merge conflict fix

* Update docs/sources/enterprise/license/activate-license.md

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

* add suggested changes from docs team manually

Co-authored-by: Daniel Lee <dan.limerick@gmail.com>
Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
(cherry picked from commit 5edba603a8)

Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>
2021-08-19 21:30:07 +02:00
Grot (@grafanabot)
103f8fa094 "Release: Updated versions in package to 8.1.2" (#38085) 2021-08-19 21:19:17 +03:00
Grot (@grafanabot)
8dd9ecf7cb Graphite: Convert tag values returned as numbers to strings (#37882) (#38083)
* Convert tag values returned as numbers to string

This is a bug in Graphite <= 1.1.7. Since 1.1.8 all values are converted to strings.

* Simplify type conversions

* Fix linting errors

(cherry picked from commit f7501ff77f)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-08-19 19:28:28 +02:00
Grot (@grafanabot)
4b91dc7168 AzureMonitor: Support PostgreSQL and MySQL Flexible Servers (#38075) (#38076)
(cherry picked from commit 17306217aa)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2021-08-19 17:25:42 +02:00
Grot (@grafanabot)
59067a72b8 Template variables: Keyboard navigation improvements (#38001) (#38074)
* Fix variable labels

* Add proper labeling for input

* Add ids to PickerRenderer

* Fix tests

* Update PR feedback

* OptionsPicker: Change to id

* Inherit aria attributes

* Add checkbox role

* Fix typo

* Add proper label reference

* Update role and label

* Prevent spreadng non-DOM attributes

* Move form layout to other component

* Remove haspopup

* Add testid to selector

* Add HTMLProps extension

* Use list

* Move styles outside of class

* Add cx

(cherry picked from commit 1f091c448f)

Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
2021-08-19 16:56:01 +02:00
Grot (@grafanabot)
1f802e1491 Alerting/Docs: $labels and $values not available with classic condition (#38011) (#38072)
fixes #37836

(cherry picked from commit d43d9207ee)

Co-authored-by: Kyle Brandt <kyle@grafana.com>
2021-08-19 15:28:46 +02:00
Grot (@grafanabot)
e4bb887ddd AnnotationEditor: simplify plugin (#37463) (#38066)
(cherry picked from commit ecfa32c8cb)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-08-19 14:28:50 +02:00
Grot (@grafanabot)
a7db2a20dc Admin: Obfuscate azure_blob Account Key (#38061)
Obfuscate azure_blob Account Key #37970

(cherry picked from commit 2fe62af685)

Co-authored-by: billabongrob <billabongrob@gmail.com>
2021-08-19 12:10:47 +02:00
Grot (@grafanabot)
3aa311f869 Dashboard: Fix so panels are rendered correctly on SoloPanelPage (#38050) (#38054)
* Dashboard: Fix so panels are rendered correctly on SoloPanelPage

* Refactor: narrows down the path

(cherry picked from commit 4ba2636aba)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-08-19 10:52:03 +02:00
Grot (@grafanabot)
c760ca90db TimeSeries: Support Ctrl key for marking annotations (#38034) (#38035)
(cherry picked from commit 646d95b8fb)

Co-authored-by: Villena Guillaume <guillaume@villena.me>
2021-08-18 17:10:51 -05:00
Grot (@grafanabot)
73f0217abf GraphNG: fix mem leaks & avoid plot re-inits (#38017) (#38024)
* State timeline: fix mem leak caused by excessive plot re-init

* Update PlotTooltipInterpolator type

* Do not reference config object in the setCursor hook

* fix excessive BarChart re-init caused by shallow diff of text config

* one less error

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
(cherry picked from commit 49b129b110)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-08-19 00:01:40 +02:00
Grot (@grafanabot)
4fbb9da0d2 <Explore>: Minor documentation update" (#36338) (#38028)
* Clarification added for using the Explore tool.

* Update docs/sources/explore/_index.md

Co-authored-by: Daniel Lee <dan.limerick@gmail.com>
(cherry picked from commit c5f8d98709)

Co-authored-by: w-endre <wirth.endre@gmail.com>
2021-08-18 22:51:33 +02:00
Grot (@grafanabot)
cf9c019310 revert: change to events canvas (#38023) (#38027)
(cherry picked from commit 7b813c81ac)

Co-authored-by: An <an.le@grafana.com>
2021-08-18 22:16:33 +02:00
Grot (@grafanabot)
17219bf052 Update http error code when datasource health check fails (#37895) (#37914)
Since the datasource settings are configured by the user, the health check error could be a client error. A 506 error may be sufficient as well.

(cherry picked from commit db2e0d46b7)

Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
2021-08-18 21:35:06 +02:00
Grot (@grafanabot)
cfeb21b12c Cloudwatch: Unwrap errors - throw error from upstream (#36334) (#37993)
* Unwrap errors - throw error from upstream

* Fixes according to reviewer's comments

* Fix linting

* Remove unused code

(cherry picked from commit 050dc7bc8f)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-08-18 21:34:02 +02:00
Grot (@grafanabot)
577d9d52f6 Fix typo in set-up-for-high-availability.md (#36316) (#38022)
* Update set-up-for-high-availability.md

fixed a minor typo

* Update docs/sources/administration/set-up-for-high-availability.md

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

Co-authored-by: Daniel Lee <dan.limerick@gmail.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit 63a85a4ac0)

Co-authored-by: MDS <83845780+mdsgrafana@users.noreply.github.com>
2021-08-18 20:55:30 +02:00
Grot (@grafanabot)
ed5966a452 Update Makefile (#37926) (#37953)
(cherry picked from commit 8a2f63ee06)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-08-18 20:53:22 +02:00
Grot (@grafanabot)
81916e8a3f DashboardLinks: Screen reader accessibility #37682 (#37747)
(cherry picked from commit fa731f16bf)

Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
2021-08-18 20:05:28 +02:00
Grot (@grafanabot)
c4ffd13612 profiling: Support binding pprof server to custom network interfaces (#36580) (#38009)
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit 0819d15942)

Co-authored-by: Victor Cinaglia <victor@grafana.com>
2021-08-18 19:48:46 +02:00
Grot (@grafanabot)
0194e87bf7 Accesscontrol fix permission name (#37717) (#37731)
* Fixes permission name for services:accesscontrol

(cherry picked from commit 06368abf44)

Co-authored-by: Jeremy Price <Jeremy.price@grafana.com>
2021-08-18 16:15:36 +02:00
Grot (@grafanabot)
5ff1eecfeb EventsCanvas: Clean up action to avoid memory leak (#37592) (#37988)
(cherry picked from commit b028dbc537)

Co-authored-by: An <an.le@grafana.com>
2021-08-18 11:45:22 +02:00
Grot (@grafanabot)
ab43bcf08a Fix url util converting false into true (#37402) (#37997)
A value of key-value pair is stripped for boolean values. While this is ok for `true`, it kind of inverts `false`

(cherry picked from commit 9900f2ed48)

Co-authored-by: Simon Podlipsky <simon@podlipsky.net>
2021-08-18 10:43:21 +02:00
Grot (@grafanabot)
1fe8b3a7b0 Fix scopes mutation by cloning original array (#37981) (#37996)
(cherry picked from commit c6356c5bba)

Co-authored-by: Sergey Kostrukov <sekost@microsoft.com>
2021-08-18 10:36:41 +02:00
Grot (@grafanabot)
3baec71cce Relative reference error for influxdb gettting started guide (#37979) (#37982)
(cherry picked from commit 9008ebd27a)

Co-authored-by: Petros Kolyvas <code@petros.io>
2021-08-17 23:35:48 +02:00
Grot (@grafanabot)
9271d76f1a DashboardGrid: compare window width against theme breakpoints (#37868) (#37975)
(cherry picked from commit f8d7726187)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-08-17 18:29:41 +02:00
Grot (@grafanabot)
5e380f40e5 Annotations: Fixes so alert annotations are visible in the correct Panel (#37959) (#37964)
(cherry picked from commit 0d2aaed3e8)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-08-17 15:46:52 +02:00
Grot (@grafanabot)
5619aa7a5b fix with global config state (#37293) (#37954)
(cherry picked from commit 697ac937c6)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-08-17 12:42:17 +02:00
Grot (@grafanabot)
d6a13c45d2 CloudWatch/Logs: Fix crash when time column has nil values (#37708) (#37825)
(cherry picked from commit b5f7df3e62)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2021-08-17 12:07:28 +02:00
Grot (@grafanabot)
c6e35018c6 Storybook: Fix Graph with Tooltip story (#37937) (#37950)
(cherry picked from commit 483c597740)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-08-17 10:42:52 +02:00
Grot (@grafanabot)
0ed6741259 PanelEdit: Fix 'Actual' size by passing the correct panel size to DashboardPanel (#37885) (#37936)
(cherry picked from commit 344c43f2e8)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-08-16 17:31:59 +02:00
Grot (@grafanabot)
37266efdb2 Search: Make search icon keyboard navigable (#37865) (#37931)
* Make search icon keyboard navigable

* Update text

* Update test

* Remove unused line

* Add global focus-visible styles for button

(cherry picked from commit 89572926c3)

Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
2021-08-16 16:23:16 +02:00
Grot (@grafanabot)
3d1fd54973 [v8.1.x] Navigation: Add aria-label to top section links to improve a11y for screen readers (#37928)
(cherry picked from commit 1735f9a56b)

Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
2021-08-16 15:49:01 +02:00
Grot (@grafanabot)
7b8440ad46 Elasticsearch: Fix metric names for alert queries (#37871) (#37925)
* Use props names as metrics names

* Make aliases work

(cherry picked from commit 1aeafa34d1)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-08-16 14:27:20 +02:00
Grot (@grafanabot)
95b407e39a remove guideliens form rule list state table (#37839) (#37915)
(cherry picked from commit 5ab8d6a3b9)

Co-authored-by: Domas <domas.lapinskas@grafana.com>
2021-08-16 09:45:46 +02:00
Grot (@grafanabot)
9bed8070ae Add pattern parser to syntax (#37824) (#37912)
(cherry picked from commit 15edaa5837)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-08-16 09:27:12 +02:00
Grot (@grafanabot)
07e9b15579 doc: add missing LoadingState.Streaming (#37903) (#37908)
The final query is missing this and does not work without it.

(cherry picked from commit 5c69f899b5)

Co-authored-by: Teppo Kurki <teppo.kurki@iki.fi>
2021-08-14 16:06:28 +02:00
Grot (@grafanabot)
cea45e4f90 Tooltip: bring back optimized hoverpoint code (#37901) (#37902)
(cherry picked from commit 0e3fb55caa)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-08-13 23:02:02 +02:00
Grot (@grafanabot)
75ba1d438e Tooltip: display ms within minute time range (#37569) (#37896)
* Tooltip: add hasMs flag for system dateTime format

* Tooltip: display ms in sub minute time range

* Tooltip: add field check, increase range on tests

* Add diffrentiating test

* minimize parsing to string values

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
(cherry picked from commit 87b8a74576)

Co-authored-by: nikki-kiga <42276368+nikki-kiga@users.noreply.github.com>
2021-08-13 10:50:55 -07:00
Grot (@grafanabot)
485780476b Added note on pagerduty alert notification (#37759) (#37894)
(cherry picked from commit e49aa48dbb)

Co-authored-by: Dominik Eckelmann <deckelmann@gmail.com>
2021-08-13 19:21:19 +02:00
Leon Sorokin
0d4e9b540e GraphNG: refactor by-value color schemes (#37670) (#37889)
* GraphNG: account for top canvas padding in gradient gen for color scheme/thresholds-by-value

* Updated test dashboard

* Added fix for issue when scaleMin was same as threshold

* fixed firefox issue

* revert docs changes

* update gdev dash for easier comparisons & regression spotting

* refactor

* optimize gradient re-gen/re-use and color more tinycolor.setAlpha() -> alpha(). update uPlot to dev build.

* fix percentage steps

* implement % threshold region rendering

* crisp threshold line rendering

* simplify

* WIP: hoverpoint dynamic color interpolation

* fix hover point color interp

* re-use gradient gen to draw threshold areas

* re-implement by-value color scales

* tweak comment

* mimic tinycolor behavior in colorManipulator.alpha() for empty colors

* explicitly disable hover points for BarChart and Histogram

* reduce test failures and required changes to tests

* fix barchart tests

* uPlot 1.6.15

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
(cherry picked from commit 6a77cd43ae)
2021-08-13 17:23:14 +02:00
Grot (@grafanabot)
e12111ee6e Fix alternative Azure cloud names (#37133) (#37886)
(cherry picked from commit dd0a906fb7)

Co-authored-by: Sergey Kostrukov <sekost@microsoft.com>
2021-08-13 16:26:16 +02:00
Grot (@grafanabot)
3f7725c891 Annotations: fixes variable values not displaying in annotations. (#37883) (#37884)
* Fixes wrong annotation when opening dashboard with URL encoded variable
Co-authored-by: Ashley Harrison, Hugo Haggmark, and Tobias Skarhed.

* added a more descriptive comment

(cherry picked from commit 4e98ade2af)

Co-authored-by: Uchechukwu Obasi <obasiuche62@gmail.com>
2021-08-13 16:03:08 +02:00
Grot (@grafanabot)
d4497432a0 Remove duplicated title from slack notification (#37834) (#37881)
(cherry picked from commit db91a55d49)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-08-13 14:48:08 +02:00
Grot (@grafanabot)
ee64547584 Fix #747; remove 'other variables'. (#37866) (#37880)
(cherry picked from commit e8696f978f)

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
2021-08-13 14:35:36 +02:00
Grot (@grafanabot)
638993ccff [docs] : fix broken link (#37860) (#37877)
found a broken link. This PR points the hyperlink at the new URL 👍

(cherry picked from commit f76248cdbf)

Co-authored-by: Matt Abrams <37156449+zuchka@users.noreply.github.com>
2021-08-13 14:13:25 +02:00
Grot (@grafanabot)
cc1d39872a Variables: Fix issue with empty dropdowns on navigation (#37776) (#37864)
(cherry picked from commit 5449f1c1e6)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-08-13 09:58:16 +02:00
Grot (@grafanabot)
a4154b376f Annotations: Fix alerting annotation coloring (#37412) (#37851)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
(cherry picked from commit aef67994a1)

Co-authored-by: Kyle Brandt <kyle@grafana.com>
2021-08-12 19:02:36 +02:00
Grot (@grafanabot)
a434c52cee Add span duration to left panel in trace viewer (#37806) (#37840)
(cherry picked from commit 4a9fdb8b76)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2021-08-12 15:24:14 +02:00
Grot (@grafanabot)
3415030a1d PasswordField: Fix button role (#37816) (#37832)
* Fix button role

* Fix tests

(cherry picked from commit 059ef4ee9a)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-08-12 12:52:52 +03:00
Grot (@grafanabot)
6325bd89b2 Chore: Low hanging a11y fruits (#37783) (#37831)
* aria-label disallowed on header element

* A11y issues for Getting Started and panel header

* Add unique identifier to search navigation

* Add dashboard header markup

* Fix news panel low hanging fruits

(cherry picked from commit b6ede8d96d)

Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
2021-08-12 11:39:47 +02:00
Grot (@grafanabot)
42a2058b4d Remove pkg-archive from Makefile (#37821) (#37827)
(cherry picked from commit e4779cfb4f)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-08-12 11:15:04 +02:00
Grot (@grafanabot)
e56828d9fa bump plugin-sdk-go to fix tls verify field issue (#37797) (#37801)
(cherry picked from commit 45754edfbc)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-08-11 16:53:47 +02:00
Grot (@grafanabot)
709c5e8db4 Alerting frontend : fix line notifier (#37744) (#37753)
- Fixes #37425
- change `line` type string to uppercase

(cherry picked from commit 5986d99f51)

Co-authored-by: SLAMA <36870081+xy-man@users.noreply.github.com>
2021-08-10 19:40:00 +01:00
Grot (@grafanabot)
9b23169f00 Added missing period. (#37737) (#37749)
(cherry picked from commit 1da779103e)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-08-10 19:25:12 +02:00
Grot (@grafanabot)
1dcecdb89a Plugins: Use file extension allowlist when serving plugin assets instead of checking for UNIX executable (#37688) (#37695)
* explicitly check for plugin binary

* remove check completely

* resolve conflicts

* allow module + logos

* add tests

* simplify

* rework to allowlist

* add case

* remove old stuff

* simplify

* add case insensitive test

(cherry picked from commit e0315dabe8)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-08-10 16:42:46 +02:00
Grot (@grafanabot)
b22b337c87 TimeRangeOption: Make entire list item clickable #37730 (#37735)
(cherry picked from commit 5b575ae91f)

Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
2021-08-10 14:10:44 +02:00
Grot (@grafanabot)
a0f7d34bda Dashboard: Accessible text for search links #37593 (#37690)
(cherry picked from commit 2d33ddf37f)

Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
2021-08-10 11:04:48 +02:00
Grot (@grafanabot)
45e0238642 UI: FileDropzone component to handle file list overwrite (#37685) (#37725)
* UI: FileDropzone component to handle file list overwrite

* FileListItem: use type=button everywhere

* Update packages/grafana-ui/src/components/FileDropzone/FileDropzone.story.tsx

Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>

* FileListItem: add aria-hidden and change cancel text

* Update packages/grafana-ui/src/components/FileDropzone/FileListItem.test.tsx

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

Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
(cherry picked from commit ad6a4edfeb)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-08-10 10:00:09 +01:00
Ivana Huckova
1eb4460cf9 Explore: Fix showing of full log context (#37442) (#37723)
* Fix log context

* Update to auto values insted of unset

* Update comment

* Fix redundant left margin for non-wrapped logs

* Remove unused css styling

* Adjust width and height

(cherry picked from commit a02f9be0c6)
2021-08-10 10:26:35 +02:00
Grot (@grafanabot)
b1efd95af1 influxdb: influxql: update provisioning example (#37701) (#37722)
(cherry picked from commit 488930dbe3)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-08-10 09:36:24 +02:00
Grot (@grafanabot)
c47396f7b5 Toolkit: Fix matchMedia not found error (#37643) (#37720)
(cherry picked from commit 33aeee60ff)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-08-10 09:14:04 +02:00
Grot (@grafanabot)
611b5123ba Updated note as requested. Also adjusted the weight of some of the topics to list data sources alphabetically in TOC. (#37713) (#37714)
(cherry picked from commit b556bafc4d)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-08-09 21:09:25 +02:00
Leonard Gram
90ec5d992a ReleaseNotes: Updated changelog and release notes for 8.1.1 (#37692) (#37712)
* ReleaseNotes: Updated changelog and release notes for 8.1.1

* Update _index.md

* Update CHANGELOG.md

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

Co-authored-by: Grot (@grafanabot) <43478413+grafanabot@users.noreply.github.com>
2021-08-09 20:25:17 +02:00
Grot (@grafanabot)
c20101c3e0 Updated note by adding the word "longer". (#37707) (#37710)
(cherry picked from commit 2bc2315e99)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-08-09 20:05:32 +02:00
Grot (@grafanabot)
8d2b7b134b Docs: Clarify how to enable "Forward OAuth Identity" for data sources (#37696) (#37705)
* Docs: Clarify how to enable "Forward OAuth Identity" for data sources

* Update docs/sources/developers/plugins/add-authentication-for-data-source-plugins.md

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

* Update add-authentication-for-data-source-plugins.md

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

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2021-08-09 18:47:39 +02:00
Grot (@grafanabot)
3e52d66c79 Fix typo. (#37697) (#37700)
(cherry picked from commit acc77d5cef)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-08-09 12:09:03 -04:00
Grot (@grafanabot)
90c87a52f7 "Release: Updated versions in package to 8.1.1" (#37691) 2021-08-09 14:53:33 +02:00
Grot (@grafanabot)
a6d95e8b6e DateTimePicker: Use TZ independent formatter (#37676) (#37680)
(cherry picked from commit a6a09add7a)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-08-09 12:07:50 +02:00
Grot (@grafanabot)
2ee831969d CloudWatch Logs: Fix crash when no region is configured (#37639) (#37646)
(cherry picked from commit e9c032f10f)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2021-08-06 22:16:40 +02:00
Grot (@grafanabot)
302c542aba live: add ha with redis to what's new (#37652) (#37656)
(cherry picked from commit ff1837a768)

Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2021-08-06 21:47:18 +03:00
Connor Lindsey
45c67c5b82 Prettify markdown in docs in v8.1.x (#37647) 2021-08-06 09:20:26 -06:00
Grot (@grafanabot)
b3570b823d Add 8.1.0 release notes link (#37591) (#37641)
(cherry picked from commit 5a54deb38b)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-08-06 15:33:35 +02:00
Grot (@grafanabot)
e8a7f71f31 Plugins: Fix plugin signature status (#37583) (#37625)
(cherry picked from commit 6ff599e25a)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-08-06 10:15:08 +02:00
Grot (@grafanabot)
98a175f158 Tooltip: fix time label mismatched with cursor & hover points (#37615) (#37620)
(cherry picked from commit cf1c2c374f)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-08-05 23:05:08 -05:00
Grot (@grafanabot)
4916a721f8 TooltipPlugin: add crosshair exception (#37285) (#37605)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
(cherry picked from commit 9fa8f5cc95)

Co-authored-by: nikki-kiga <42276368+nikki-kiga@users.noreply.github.com>
2021-08-05 20:31:23 -05:00
Will Browne
f16de24c2f Update publish.yml for 8.1.0 (#37606)
* Update publish.yml

* set target folder
2021-08-05 19:59:03 +02:00
Grot (@grafanabot)
81114a3972 Removed section. (#37601) (#37603)
(cherry picked from commit ef19e2edce)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-08-05 19:21:22 +02:00
Grot (@grafanabot)
82d548f1de ReleaseNotes: Updated changelog and release notes for 8.1.0 (#37589) (#37598)
(cherry picked from commit 2418a99f09)
2021-08-05 17:53:12 +02:00
Grot (@grafanabot)
62e720c06b "Release: Updated versions in package to 8.1.0" (#37587) 2021-08-05 14:49:59 +02:00
Grot (@grafanabot)
c65d3ea147 GraphNG: optimize cursor (#37460) (#37568)
(cherry picked from commit d49ce5ad47)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-08-04 23:38:11 +02:00
Grot (@grafanabot)
3a05320d00 Geomap: Use set to order labels in reducer (#37509) (#37561)
* shared location config

* shared locaiton config

* shared locaiton config

* remove file

* add alpha annotations

* chore: set is already ordered

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

Co-authored-by: An <an.le@grafana.com>
2021-08-04 14:39:29 -05:00
Grot (@grafanabot)
49dca774f3 XYCanvas: useMemo() for className gen (#37513) (#37566)
(cherry picked from commit 27b94139ed)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-08-04 21:12:56 +02:00
Grot (@grafanabot)
889e1ab729 Field: use 0-based field.state.seriesIndex (#37563) (#37565)
(cherry picked from commit 1fe3452886)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-08-04 20:29:00 +02:00
Grot (@grafanabot)
30071cee1a Plugins: Update plugin catalog docs (#37557) (#37562)
* docs(catalog): update documentation for 8.1 changes

* docs(catalog): update the image and video links

* Apply suggestions from code review

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

* make catalog refs consistent

* Update docs/sources/plugins/catalog.md

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

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit e403d54ba4)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-08-04 19:01:18 +02:00
Grot (@grafanabot)
dd15b33f74 Dependency: update collector to v.31.0 (#37546) (#37558)
* update collector to v.31.0

* Change protobuf unmarshal function after upgrade

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

Co-authored-by: ying-jeanne <74549700+ying-jeanne@users.noreply.github.com>
2021-08-04 18:28:58 +02:00
Grot (@grafanabot)
3a69f8e915 Added new section "Support for AES-GCM encryption algorithm". (#37556) (#37560)
(cherry picked from commit 7323ba5ec1)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-08-04 18:28:46 +02:00
Grot (@grafanabot)
bbee1b26c5 Alerting: Refactor Run of the scheduler (#37157) (#37337)
* Alerting: Refactor `Run` of the scheduler

A bit of a refactor to make the diff easier to read for supporting
external Alertmanagers.

We'll introduce another routine that checks the database for
configuration and spawns other routines accordingly.

* Block the wait.

* Fix test

(cherry picked from commit 442a6677fc)

Co-authored-by: gotjosh <josue@grafana.com>
2021-08-04 17:28:18 +01:00
Grot (@grafanabot)
de4bf9b9f3 Catalog: Update enterprise license messaging in PluginDetails (#37547) (#37559)
* feat(catalog): change messaging if enterprise license is missing and add link

* test(catalog): fix failing PluginDetails test

(cherry picked from commit e21ecf237b)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-08-04 18:21:20 +02:00
Ashley Harrison
f3df336b17 Select: Make portalling the menu opt-in, but opt-in *everywhere* (#37501) (#37552)
* Select: Don't portal by default

* Select: Portal all the Selects

* Fix indendentation in this comment

* Select: Remove @example docs until formatting is correct

* Docs: Add some documentation for the Select changes

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

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

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

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

* Update packages/grafana-ui/src/components/Select/types.ts

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

* Update public/app/core/components/TransformersUI/configFromQuery/ConfigFromQueryTransformerEditor.tsx

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

* Update public/app/core/components/TransformersUI/configFromQuery/ConfigFromQueryTransformerEditor.tsx

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

* Update public/app/core/components/TransformersUI/configFromQuery/ConfigFromQueryTransformerEditor.tsx

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

* Update public/app/core/components/TransformersUI/prepareTimeSeries/PrepareTimeSeriesEditor.tsx

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

* Docs: Variants instead of varients

* Update public/app/core/components/TransformersUI/configFromQuery/ConfigFromQueryTransformerEditor.tsx

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 8aa3845f70)
2021-08-04 17:40:54 +02:00
Grot (@grafanabot)
6513bbfaf2 TimeRangePicker: fix DOM nesting (#37550) (#37554)
(cherry picked from commit 1a46123dbf)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-08-04 17:31:41 +02:00
Grot (@grafanabot)
857bd77fc2 small typo fix (#37527) (#37551)
(cherry picked from commit 978384b27e)

Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>
2021-08-04 17:17:21 +02:00
Grot (@grafanabot)
a91f08222e Update dashboard loki query editor (#37541) (#37548)
(cherry picked from commit a0f94866b4)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-08-04 16:51:46 +02:00
Grot (@grafanabot)
8ad4703f6d Plugins: Update Catalog Card UI (#37350) (#37544)
* feat(catalog): lazy load and add alt text to plugin logos

* refactor(catalog): use plugin types, make sure data is available for new ui

* test(catalog): fix up tests after types refactor

* feat(catalog): introduce Tile and PluginBadge components for ui updates

* refactor(catalog): update PluginList to use new components, lazy load images, add creditcard icon

* test(catalog): update Browse.test types

* fix(catalog): if local and remote make sure to get the correct local plugin from array

* refactor(catalog): prefer grafana/ui components over custom Tile component

* chore(catalog): delete redundant components

* feat(catalog): introduce ascending descending name sort for Browse

* refactor(catalog): prefer theme spacing over hardcoded values

* refactor(catalog): update Local and Remote plugin types to match api responses

* fix(catalog): prefer local.hasUpdate and local.signature so updateable plugin signature is valid

* test(catalog): update test plugin mocks

* test(catalog): add tests for sorting and categorise

* test(catalog): add tests for plugin cards, remove grid component

* test(catalog): add tests for PluginBadges component

* refactor(catalog): change enterprise learn more link to open plugin page on website

(cherry picked from commit cc7c54be0e)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-08-04 15:38:13 +02:00
Grot (@grafanabot)
5e26c6148d Remove _url from loading logo (#37480) (#37517)
(cherry picked from commit 0fc7dffee8)

Co-authored-by: Selene <selenepinillos@gmail.com>
2021-08-04 09:27:26 -04:00
Grot (@grafanabot)
48e5f17392 Loki: Update labels in log browser when time range changes (#37520) (#37540)
* Refresh label when time range changes

* Refactor solution

* Add tests

* Update tests comments

* Update test

* Update public/app/plugins/datasource/loki/components/LokiQueryField.tsx

* Update public/app/plugins/datasource/loki/components/LokiQueryField.tsx

(cherry picked from commit 7fd94e69c3)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-08-04 15:05:58 +02:00
Grot (@grafanabot)
db240265ff Catalog: Fix InstallControls for externally managed users (#37531) (#37538)
(cherry picked from commit 224b062cac)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-08-04 14:34:29 +02:00
Grot (@grafanabot)
9a89e0c157 GraphNG: make sure we update when children changes (#37333) (#37521)
(cherry picked from commit e3fe4a2d11)

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2021-08-04 13:53:25 +02:00
Grot (@grafanabot)
0e5a6a62be Plugins: Fix catalog permissions for org and server admins (#37504) (#37529)
* simplify toggle + add link to server admin

* feat(catalog): org admins can configure plugin apps, cannot install/uninstall plugins

* fix(catalog): dont show buttons if user doesn't have install permissions

* feat(catalog): cater for accessing catalog via /plugins and /admin/plugins

* feat(catalog): use location for list links and match.url to define breadcrumb links

* test(catalog): mock isGrafanaAdmin for PluginDetails tests

* test(catalog): preserve default bootdata in PluginDetails mock

* refactor(catalog): move orgAdmin check out of state and make easier to reason with

Co-authored-by: Will Browne <will.browne@grafana.com>
(cherry picked from commit cdcccfcc53)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-08-04 12:58:46 +02:00
Grot (@grafanabot)
4ab256c132 [v8.1.x] Fix: Wrong annotations show on a given dashboard. Correct annotations show on page refresh. #37160 (#37530)
(cherry picked from commit d48febee75)

Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
2021-08-04 12:25:15 +02:00
Grot (@grafanabot)
dd42424a01 DashboardPrompt: Implement beforeunload handler (#37490) (#37524)
(cherry picked from commit 81cf09af9e)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-08-04 11:41:54 +02:00
Grot (@grafanabot)
2549519180 influxdb: more robust query-has-variables check (#37493) (#37522)
* influxdb: moved queryUtils file to better place

* influxdb: more robust query-has-variables check

(cherry picked from commit 4da398014f)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-08-04 11:39:58 +02:00
Grot (@grafanabot)
5291563f6c TimeRangePicker: Accessiblity improvements (#36912) (#37519)
* Add low hanging aria markup

* Add a list of radio buttons

* Add ref to put focus

* Add landmark markup

* Add labels to icon buttons

* Add radio button groupings

* Add keyboard focus styles

* Improve markup

* Update test selector

* Remove testid in favor of text

* Fiddle around with test labels

* Get correct testid selector

* Add aria-expanded to button

* Change order of quick select for keyboard nav

* Create headings for easier heading navigation

* Add another h3

* Add testid

* Use selectors in e2e test

* Add dataid selector for narrow absolute button

* Update e2e test with proper selectors

* Add more verbose aria-label

* Change editor to picker

(cherry picked from commit aba7013ce5)

Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
2021-08-04 10:20:20 +02:00
Grot (@grafanabot)
6f40b883e1 Portal: optimizations (#37459) (#37510)
Co-authored-by: An Le <an.le@grafana.com>
(cherry picked from commit 0b7253406b)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-08-03 16:55:06 -05:00
Grot (@grafanabot)
e3a270a041 [v8.1.x] Annotations: Fix Datasource as template variable not available for annotations (#37507)
(cherry picked from commit d48e65bf74)

Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
2021-08-03 20:28:54 +02:00
achatterjee-grafana
f8b8b4f578 Syncing 8.1 from main into v8.1.x branch. (#37505) 2021-08-03 14:01:25 -04:00
Grot (@grafanabot)
7039d3ce27 Plugins: Add filter for plugin type and update search, filter and sort ui (#37301) (#37495)
* feat(catalog): introduce additive filters for plugin type, installed status and search

* feat(catalog): prefer FilterInput over custom styled search field

* feat(catalog): update Browse page to use new search, filter features

* refactor(catalog): keep filters with usePluginsByFilter hook

* test(catalog): update tests to reflect new filtering and searching

* refactor(catalog): rearrange filterByType radio buttons

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* feat(catalog): ntroduce css for responsive filter layout

* refactor(catalog): introduce pluginfilter type and give filter methods better names

* fix(catalog): default q param to empty string so FiterInput doesn't show clear button on load

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

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-08-03 17:40:58 +02:00
Grot (@grafanabot)
784b924e9f Docs: Update docs for enterprise reporting (#37314) (#37494)
* Docs: Update docs for enterprise reporting

* Apply feedback

* Remove old scheduler section and add screenshots

* Update images links

* Update reporting scheduler intro

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

* Update Send now

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

* Update Send later

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

* Apply more feedback

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

* Apply review feedback

* Apply review feedback

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

* Apply review feedback

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

* Apply more feedback

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 bfc8a5cf49)

Co-authored-by: Tania B <yalyna.ts@gmail.com>
2021-08-03 17:36:58 +02:00
Joan López de la Franca Beltran
b05581cc23 Encryption: Convert functions into global variables (#37240) (#37492) 2021-08-03 17:25:57 +02:00
Grot (@grafanabot)
b6e20abe61 Docs: Documents caching encryption in enterprise config (#36766) (#37491)
* Enterprise: adding documentation of two new configuration flags

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

* Fix grammar

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

Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
2021-08-03 16:48:47 +02:00
Grot (@grafanabot)
62a64d3233 GraphNG: fix y axis autosizing (#37464) (#37487)
(cherry picked from commit 0d2cd90150)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-08-03 09:04:36 -05:00
Grot (@grafanabot)
43cced54a0 Docs: fix wrong formula (#37432) (#37486)
(cherry picked from commit 75c8bd26fc)

Co-authored-by: Park Beomsu <bspark@jam2in.com>
2021-08-03 15:21:57 +02:00
Grot (@grafanabot)
617cf0646d influxdb: better query-has-variable check (#37453) (#37482)
(cherry picked from commit bc0ab3cc7a)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-08-03 15:00:14 +02:00
Grot (@grafanabot)
7442a7c66e Put back signature in drone.yml (#37447) (#37479)
Repository protection will be enabled for grafana/grafana today

(cherry picked from commit e5f52a05f2)

Co-authored-by: Julien Duchesne <julienduchesne@live.com>
2021-08-03 13:51:37 +02:00
Grot (@grafanabot)
dfa1a2cd41 Azure: Fixes annotations query editor not working properly (#37476) (#37477)
(cherry picked from commit 0965132bff)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-08-03 13:11:51 +02:00
Grot (@grafanabot)
ee81dc3b01 Select: Expose menuPortalTarget on SelectBase (#37456) (#37471)
* Select: Expose Select props for greater flexibility

* Select: only expose menuPortalTarget

* Select: Add deprecation notice for menuPortalTarget prop

* Select: Add deprecation warning to component

(cherry picked from commit 9934c883cc)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-08-03 12:22:27 +02:00
Grot (@grafanabot)
6cd4182ec9 [v8.1.x] Annotation: Fix "Enabled" button disappear after Grafana v8.0.6 upgrade (#37469)
(cherry picked from commit f10c5020f1)

Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
2021-08-03 10:24:43 +02:00
Grot (@grafanabot)
716b254973 fix typo (#37457) (#37468)
(cherry picked from commit 312e78ff0b)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-08-03 10:09:01 +02:00
Grot (@grafanabot)
1d12f22190 PasswordField: Don't show password on enter #37444 (#37448)
(cherry picked from commit b0dcbd568a)

Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
2021-08-02 14:09:38 +02:00
Grot (@grafanabot)
fc5e1dbd15 put alerting admin page under ngalert flag (#37437) (#37439)
(cherry picked from commit 73d36d5521)

Co-authored-by: Domas <domas.lapinskas@grafana.com>
2021-08-02 10:39:31 +02:00
Grot (@grafanabot)
22a357cc7d Live: display stream rate, fix duplicate channels in list response (#37365) (#37421) 2021-07-30 21:42:29 +03:00
achatterjee-grafana
bd3e140852 Doc issue 37280 (#37416) (#37419)
* Additional fix: Resized two images in 8.1 what's new to make them smaller

* Fixed some broken links and deleted another empty Grafana 8 alert topic.

* Replaced reference to troubleshooting with state and health check.
2021-07-30 19:11:02 +02:00
Grot (@grafanabot)
7a823fe895 Renderer: delete debug.log file when Grafana is stopped (#37367) (#37413)
(cherry picked from commit 0757ba1c64)

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2021-07-30 18:45:41 +02:00
Grot (@grafanabot)
4eb9c6f06c SDK: update plugin-sdk to v0.111.0 (#37405) (#37409)
(cherry picked from commit 9d496d6f48)

Co-authored-by: idafurjes <36131195+idafurjes@users.noreply.github.com>
2021-07-30 17:27:33 +02:00
Grot (@grafanabot)
9ccc02f5a3 Update Settings Update documentation with the information about fine-grained access control (#37300) (#37396)
(cherry picked from commit 53072bcad1)

Co-authored-by: Vardan Torosyan <vardants@gmail.com>
2021-07-30 13:30:52 +02:00
Grot (@grafanabot)
64bd269f1e Geomap: fix scale calculations (#37375) (#37380)
(cherry picked from commit d269d901fc)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-07-29 23:54:55 +02:00
Grot (@grafanabot)
7b3275d4ed Geomap: zoom full extent (#37174) (#37344)
(cherry picked from commit feb9e528aa)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-07-29 23:49:32 +02:00
Grot (@grafanabot)
b312a60627 Transformers: allow label fields in the reduce processor (#37373) (#37379)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
(cherry picked from commit c564736c68)

Co-authored-by: An <an.le@grafana.com>
2021-07-29 23:25:04 +02:00
Grot (@grafanabot)
0075a3c014 NGAlert: Send resolve signal to alertmanager on alerting -> Normal (#37363) (#37371)
(cherry picked from commit aa904a5a04)

Co-authored-by: Kyle Brandt <kyle@grafana.com>
2021-07-29 20:58:45 +02:00
Grot (@grafanabot)
8c70bebf90 ReleaseNotes: Updated changelog and release notes for 8.1.0-beta3 (#37342) (#37359)
(cherry picked from commit cba765c5f2)
2021-07-29 17:04:46 +02:00
Grot (@grafanabot)
411e19ed4b Alerting: Deduplicate receivers during migration (#36812) (#37353)
* Alerting: Deduplicate receivers during migration

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

* Fix review comments

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

* Better naming of contact points

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

* Handle some edge cases

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

* Don't add routes which point to default contact point

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

Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
2021-07-29 16:52:19 +02:00
Grot (@grafanabot)
62d0c516cb [v8.1.x] Color: fix alpha calculation < 16/255 and State-timeline threshold alpha (#37176)
* Color: fix alpha calculation < 16/255 and State-timeline threshold alpha (#35911)

(cherry picked from commit f78452be30)

* Update packages/grafana-data/src/field/fieldOverrides.ts

* Update packages/grafana-data/src/field/fieldOverrides.ts

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Co-authored-by: dsotirakis <sotirakis.dim@gmail.com>
2021-07-29 08:58:21 -05:00
Grot (@grafanabot)
78b225a5c2 Add fine-grained access control information to the features which now support it (#37303) (#37336)
* Add fine-grained access control information to the features which now support it

* Mention the new permissions in Explore docs

(cherry picked from commit 2c810506a5)

Co-authored-by: Vardan Torosyan <vardants@gmail.com>
2021-07-29 14:29:10 +02:00
Grot (@grafanabot)
a952824e35 Plugins: Perform plugin update check prior to uninstall (#36909) (#37346)
* only uninstall if update is possible

* add .

* update lingo for clarity

(cherry picked from commit 08a73a5291)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-07-29 12:20:29 +02:00
Grot (@grafanabot)
b0dd5762f8 "Release: Updated versions in package to 8.1.0-beta.3" (#37340) 2021-07-29 11:25:20 +02:00
Grot (@grafanabot)
f778fdbbe8 CloudWatch: Add AWS LookoutMetrics (#37329) (#37332)
(cherry picked from commit b62fe58cac)

Co-authored-by: Ilya Stoliar <52413756+ilyastoli@users.noreply.github.com>
2021-07-29 10:07:56 +02:00
Grot (@grafanabot)
d1cd7e7c64 Alerting: support label matcher syntax in alert rule list filter (#36408) (#37229)
* Add filter parsing to rule list filters

* Add unit tests for label parsing

* Make label operators an enum

* add example for parsing function

* Update labels operator regex

* Add tests to rule list for filtering

* add additional test for testing alert instances filtering

* Use tooltip for query syntax example

* refactor to use Matchers for filtering

* Update docs for label filtering on rules list

* style fixes

(cherry picked from commit 5f0bc252bc)

Co-authored-by: Nathan Rodman <nathanrodman@gmail.com>
2021-07-29 09:43:41 +02:00
Grot (@grafanabot)
0f5446d768 SQL: Fix SQL dataframe resampling (fill mode + time intervals) (#36937) (#37330)
* Refactor resample logic

* Adjust test to have one more timestamp out of range

* adjust test + ensure filling

* revert flag flip

* Undo logic - should be timeseries only

* change data calculation based on previous interval

* fix the logics

* fix typo

* fix resample start time, to reuse what sql api returned

* calculate the start point with from truncate by interval

Co-authored-by: Will Browne <will.browne@grafana.com>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
Co-authored-by: Ying WANG <ying.wang@grafana.com>
(cherry picked from commit 180b1973e0)

Co-authored-by: idafurjes <36131195+idafurjes@users.noreply.github.com>
2021-07-29 09:05:59 +02:00
Zoltán Bedi
33ab22229f Exemplars: Disable exemplars only on query it failed (#37296) (#37326)
(cherry picked from commit 9a62db6943)
2021-07-29 08:50:40 +02:00
Grot (@grafanabot)
d74d4d6be9 Stat: fix shared y scale range, reduce plot re-inits (#37324) (#37325)
(cherry picked from commit 78f46e28c7)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-07-29 08:45:34 +02:00
Grot (@grafanabot)
e9bea6053c Geomap: implement basic tooltip support (#37318) (#37322)
Co-authored-by: Bryan Uribe <buribe@hmc.edu>
(cherry picked from commit ced26bc624)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-07-29 08:44:00 +02:00
Grot (@grafanabot)
376cbf75b0 GraphNG: stack by % (#37127) (#37321)
(cherry picked from commit 8b80d2256d)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-07-28 21:36:24 -05:00
Grot (@grafanabot)
65d0e4227e Catalog: Add breadcrumb to plugin details page (#37095) (#37307)
* feat(catalog): introduce a breadcrumb to plugindetails page

* refactor(catalog): use aria-labels and nav element for a11y breadcrumbs

(cherry picked from commit 99891e1a88)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-07-28 17:12:16 +02:00
Grot (@grafanabot)
41315b0935 Alerting: ability to edit alertmanager config as json via UI (#37268) (#37289)
(cherry picked from commit 69dff96c1b)

Co-authored-by: Domas <domas.lapinskas@grafana.com>
2021-07-28 09:58:16 +03:00
Grot (@grafanabot)
0d29421a87 Geomap: fix esri server config (#37283) (#37288)
(cherry picked from commit 5f41c2f334)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-07-28 08:25:23 +02:00
Dimitris Sotirakis
1bad6de8cc Update grabpl version to 2.3.2 (#37255) 2021-07-27 22:07:46 +02:00
nikki-kiga
2fbfe987f0 [v8.1.x] ColorPicker: return values as hex strings and update theme (#37173) (#37232)
* ColorPicker: return values as hex strings and update theme (#37173)

* Color: fix alpha calculation < 16/255 and State-timeline threshold alpha

* SpectrumPalette: Update to getColorByName

* ColorValueEditor: Update to theme2

* SpectrumPalette: Update to theme2

* ColorPickerPopover: Format hex color

* SpectrumPalette: Format hex color

* SpectrumPalette: Refactor hex color alpha helper

* SpectrumPalette: Fix import and update helper

* ColorPickerPopover: Fix test to not make lowercase

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
(cherry picked from commit 3e35021f7e)

* ColorPicker: display colors as rgba in input (#37231)

* SpectrumPalette: change input to display rgba string

* fieldOverrides: remove extra hex string check

(cherry picked from commit 01e984c394)
2021-07-27 09:19:31 -07:00
Grot (@grafanabot)
c2d807a1c8 Graphite: Migrate to React (part 2B: migrate FunctionEditor) (#37070) (#37254)
* Add UMLs

* Add rendered diagrams

* Move QueryCtrl to flux

* Remove redundant param in the reducer

* Use named imports for lodash and fix typing for GraphiteTagOperator

* Add missing async/await

* Extract providers to a separate file

* Clean up async await

* Rename controller functions back to main

* Simplify creating actions

* Re-order controller functions

* Separate helpers from actions

* Rename vars

* Simplify helpers

* Move controller methods to state reducers

* Remove docs (they are added in design doc)

* Move actions.ts to state folder

* Add docs

* Add old methods stubs for easier review

* Check how state dependencies will be mapped

* Rename state to store

* Rename state to store

* Rewrite spec tests for Graphite Query Controller

* Update docs

* Update docs

* Add GraphiteTextEditor

* Add play button

* Add AddGraphiteFunction

* Use Segment to simplify AddGraphiteFunction

* Memoize function defs

* Fix useCallback deps

* Update public/app/plugins/datasource/graphite/state/helpers.ts

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

* Update public/app/plugins/datasource/graphite/state/helpers.ts

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

* Update public/app/plugins/datasource/graphite/state/helpers.ts

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

* Update public/app/plugins/datasource/graphite/state/providers.ts

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

* Update public/app/plugins/datasource/graphite/state/providers.ts

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

* Update public/app/plugins/datasource/graphite/state/providers.ts

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

* Update public/app/plugins/datasource/graphite/state/providers.ts

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

* Update public/app/plugins/datasource/graphite/state/providers.ts

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

* Update public/app/plugins/datasource/graphite/state/providers.ts

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

* Add more type definitions

* Remove submitOnClickAwayOption

This behavior is actually needed to remove parameters in functions

* Load function definitions before parsing the target on initial load

* Add button padding

* Fix loading function definitions

* Change targetChanged to updateQuery to avoid mutating state directly

It's also needed for extra refresh/runQuery execution as handleTargetChanged doesn't handle changing the raw query

* Fix updating query after adding a function

* Simplify updating function params

* Migrate function editor to react

* Simplify setting Segment Select min width

* Remove unnecessary changes to SegmentInput

* Extract view logic to a helper and update types definitions

* Clean up types

* Update FuncDef types and add tests

* Show red border for unknown functions

* Autofocus on new params

* Extract params mapping to a helper

* Split code between params and function editor

* Focus on the first param when a function is added even if it's an optional argument

* Add function editor tests

* Remove todo marker

* Fix adding new functions

* Allow empty value in selects for removing function params

* Add placeholders and fix styling

* Add more docs

* Rename .tsx -> .ts

* Update types

* Use ?? instead of || + add test for mapping options

* Use const (let is not needed here)

* Revert test name change

* Allow removing only optional params and mark additional params as optional (only the first one is required)

* Use theme.typography.bodySmall.fontSize

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

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-07-27 13:47:59 +02:00
Grot (@grafanabot)
3c4754b19f Graphite: Update text editor state on initial load (#37202) (#37248)
* Update current query when props change

* Remove managed state in GraphiteTextEditor

* Fix tests

(cherry picked from commit e8eb73f271)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-07-27 13:10:27 +02:00
Grot (@grafanabot)
c440fd4f5a delay go mod verify until all is copied (#37246) (#37249)
(cherry picked from commit 56702376b6)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-07-27 12:15:32 +02:00
Grot (@grafanabot)
28972eaf4b live: experimental HA with Redis (#36787) (#37241)
Grafana 8.1.0 will include experimental high availability setup support by
using Redis PUB/SUB and data structures for inter-node state sharing.
This commit documents this but also explicitly marks feature as experimental
since integration of Live with Redis may slightly evolve with time as soon as
we get more understanding about Grafana Live usage scenarios.

(cherry picked from commit 75bd0bbacd)

Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2021-07-27 10:06:49 +02:00
Grot (@grafanabot)
a7017f2729 Annotations: fire an event when changing annotations (#37175) (#37228)
(cherry picked from commit ffa0ef9b3d)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-07-26 21:56:03 -07:00
Grot (@grafanabot)
31cc177e31 Geomap: configure legend on map (#37077) (#37235)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
(cherry picked from commit 154c380c8c)

Co-authored-by: An <an.le@grafana.com>
2021-07-26 17:11:35 -07:00
Grot (@grafanabot)
abf351f776 Panels: allow interaction in corners when no title exists (#37169) (#37224)
(cherry picked from commit be4b753aa0)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-07-26 20:53:45 +02:00
Grot (@grafanabot)
1a353a1eea Use dateTime vs new Date() (#37210) (#37215)
(cherry picked from commit 8c8d2fe08b)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-07-26 18:48:36 +02:00
Grot (@grafanabot)
2b97f6a507 Alerting: automatically remove stale alerting states (#36767) (#37214)
* initial attempt at automatic removal of stale states

* test case, need espected states

* finish unit test

* PR feedback

* still multiply by time.second

* pr feedback

(cherry picked from commit b5f464412d)

Co-authored-by: David Parrott <stomp.box.yo@gmail.com>
2021-07-26 18:37:34 +02:00
Grot (@grafanabot)
4478259f70 Alerting: Remove the fixed wait for notification delivery (#37203) (#37207)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
(cherry picked from commit a65975cca0)

Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
2021-07-26 15:42:31 +02:00
Grot (@grafanabot)
38cb26bd5b CloudWatch: Add AWS IVS metrics and dimensions (#37178) (#37206)
(cherry picked from commit 59c691a777)

Co-authored-by: Ilya Stoliar <52413756+ilyastoli@users.noreply.github.com>
2021-07-26 15:22:36 +02:00
Grot (@grafanabot)
1f0339179f UI: Dropzone component (#36646) (#37204)
* Dropzone component

* Add file list

* Add progress, error and cancelation to filelistitem

* Update Dropzone component to support progress

Cancelation
Retry

* Update file name changes

* Rename to FileDropzone

* FileListItem tests

A11y updates for icon buttons
Use value formatter from grafana/data

* Add tests for FileDropzone

Review comments

* export FileDropzoneDefaultChildren

* Change primary text when multiple false

* Review comments addressed

* Extract remove file to constant

* No need to await after await

(cherry picked from commit 04a196da4b)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-07-26 14:01:30 +02:00
Grot (@grafanabot)
f3f8972505 influxdb: influxql: fix dataframe column-names (#37195) (#37200)
(cherry picked from commit b254e4eb31)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-07-26 12:56:42 +02:00
Grot (@grafanabot)
0a08cf10e5 TimeSeries: make cursor hover the nearest non-null/undefined datapoint (#34552) (#37171)
(cherry picked from commit 4c3e197e26)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-07-23 17:23:15 -05:00
Grot (@grafanabot)
a8f5445d47 check for bar value visibility never (#37122) (#37141)
(cherry picked from commit 1de14ea257)

Co-authored-by: nikki-kiga <42276368+nikki-kiga@users.noreply.github.com>
2021-07-23 11:52:54 -07:00
Grot (@grafanabot)
631c12ec91 Removed note about frequent changes. (#37119) (#37163)
(cherry picked from commit 72cac20e1d)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-07-23 17:55:21 +02:00
Grot (@grafanabot)
d388afece6 ReleaseNotes: Updated changelog and release notes for 8.1.0-beta2 (#37150) (#37152) 2021-07-23 14:00:03 +02:00
Grot (@grafanabot)
b0fe99911a ReleaseNotes: Updated changelog and release notes for 8.1.0-beta2 (#37144) (#37149)
* ReleaseNotes: Updated changelog and release notes for 8.1.0-beta2

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

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

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
(cherry picked from commit 3b875def76)
2021-07-23 13:17:47 +02:00
Grot (@grafanabot)
8392ebdacb Docs: Add 8.1.0 beta1 and beta2 release note links (#37140) (#37145)
(cherry picked from commit 0069d13929)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-07-23 12:39:35 +02:00
Grot (@grafanabot)
147704deb9 "Release: Updated versions in package to 8.1.0-beta.2" (#37138) 2021-07-23 10:29:33 +02:00
Grot (@grafanabot)
078d716be9 IconButton: Put tooltip text as aria-label (#36760) (#37137)
* Make tooltip prop aria-label

* Add ariaLabel prop

(cherry picked from commit 8af83b8b78)

Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
2021-07-23 10:12:16 +02:00
Grot (@grafanabot)
04cb471599 Expand the value string in annotations and labels of alerts (#37051) (#37105)
This commit makes it possible to use the value string in
annotations and labels for alerts with "{{ $value }}"

(cherry picked from commit 2f4c893cf3)

Co-authored-by: George Robinson <85952834+gerobinson@users.noreply.github.com>
2021-07-23 09:28:49 +02:00
Grot (@grafanabot)
6564f22772 Gazetteer: Update Countries Json (#37129) (#37132)
(cherry picked from commit 2b51e94537)

Co-authored-by: Bryan Uribe <buribe@hmc.edu>
2021-07-23 09:25:20 +02:00
Grot (@grafanabot)
13cd3ea28b Explore: Fix encoding of internal URLs (#36919) (#37100)
* Encode internal explore url

* Fix tests

* Fix comma

(cherry picked from commit 93b4cc7035)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2021-07-23 09:19:25 +02:00
Grot (@grafanabot)
d5e0665081 Storybook: Add a11y addon (#36790) (#37110)
* Storybook: Add a11y addon

* Update lockfile

* Bump Storybook addon versions

* Put Icon at top

* addon-knobs 6.3.0

(cherry picked from commit 437424d5d6)

Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
2021-07-23 09:17:59 +02:00
Grot (@grafanabot)
909141592d StatPanel: Disable selection on Sparkline (#37125) (#37128)
(cherry picked from commit a1bbe797df)

Co-authored-by: nikki-kiga <42276368+nikki-kiga@users.noreply.github.com>
2021-07-23 09:14:51 +02:00
Grot (@grafanabot)
fda235a862 Infra: Azure authentication in HttpClientProvider (#36932) (#37124)
* Azure middleware in HttpClientProxy

* Azure authentication under feature flag

* Minor fixes

* Add prefixes to not clash with JsonData

* Return error if JsonData cannot be parsed

* Return original string if URL invalid

* Tests for datasource_cache

(cherry picked from commit c1963024ec)

Co-authored-by: Sergey Kostrukov <sergey@kostrukov.com>
2021-07-22 23:12:31 +02:00
Grot (@grafanabot)
154231a58d Doc: first draft of 8.1 what's new (#37021) (#37115)
* Create whats-new-in-v8-1.md

* Updated index page.

* Fixed two relrefs.

* Added section for annotation panel

(cherry picked from commit 013218e075)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-07-22 15:28:48 -04:00
Grot (@grafanabot)
197e4344da Prometheus: Azure authentication in configuration UI (#35860) (#37116)
* Azure authentication settings

* Persisting credentials

* Azure settings

* Prometheus-specific settings component

* Azure Prometheus Resource ID configuration

* DataSourceHttpSettings with extensibility for Azure

* Feature toggle for Azure auth

* Fix snapshot

* Update format of persisted credentials

* AzureSettings renamed to AzureAuthSettings

(cherry picked from commit 4664cba935)

Co-authored-by: Sergey Kostrukov <sergey@kostrukov.com>
2021-07-22 21:22:31 +02:00
Grot (@grafanabot)
64b008e28b ReleaseNotes: Updated changelog and release notes for 8.1.0-beta1 (#37111) (#37112) 2021-07-22 18:38:49 +02:00
Grot (@grafanabot)
bc9ac1199b fix sample.ini (#37106) (#37107)
(cherry picked from commit 6b2d33dc14)

Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2021-07-22 17:25:47 +02:00
Grot (@grafanabot)
2b15e1a962 Folder API: optionally force deleting Grafana 8 alerts when deleting a folder (or error) (#36427) (#37094)
* Folder API: Add an optional query parameter for allowing deleting a  folder containing rules

* Update frontend

- Set forceDeleteRules=true when frontend deletes a folder
- Improve modal text

* Update docs

* Apply suggestions from code review

Co-authored-by: gotjosh <josue@grafana.com>
Co-authored-by: Nathan Rodman <nathanrodman@gmail.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit b96dd1877c)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-07-22 17:56:33 +03:00
Grot (@grafanabot)
4308a77e27 Auth: Pass user role to Grafana using auth proxy (#36729) (#37103)
* Pass role to Grafana using auth proxy

By default, the role will be applied to the default org of the user.
If the request uses the standard header "X-Grafana-Org-Id", the role will be applied to the specified org

Tested in both unit test and manually E2E

* Address comment: only allow the user role to be applied to the default org

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

Co-authored-by: yuwaMSFT2 <yuwa@microsoft.com>
2021-07-22 16:25:51 +02:00
Grot (@grafanabot)
f18749927c "Release: Updated versions in package to 8.1.0-beta.1" (#37091) 2021-07-22 11:21:21 +02:00
2070 changed files with 34135 additions and 86508 deletions

12
.bingo/.gitignore vendored
View File

@@ -1,12 +0,0 @@
# Ignore everything
*
# But not these files:
!.gitignore
!*.mod
!README.md
!Variables.mk
!variables.env
*tmp.mod

View File

@@ -1,14 +0,0 @@
# Project Development Dependencies.
This is directory which stores Go modules with pinned buildable package that is used within this repository, managed by https://github.com/bwplotka/bingo.
- Run `bingo get` to install all tools having each own module file in this directory.
- Run `bingo get <tool>` to install <tool> that have own module file in this directory.
- For Makefile: Make sure to put `include .bingo/Variables.mk` in your Makefile, then use $(<upper case tool name>) variable where <tool> is the .bingo/<tool>.mod.
- For shell: Run `source .bingo/variables.env` to source all environment variable for each tool.
- For go: Import `.bingo/variables.go` to for variable names.
- See https://github.com/bwplotka/bingo or -h on how to add, remove or change binaries dependencies.
## Requirements
- Go 1.14+

View File

@@ -1,25 +0,0 @@
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.4.3. DO NOT EDIT.
# All tools are designed to be build inside $GOBIN.
BINGO_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
GOPATH ?= $(shell go env GOPATH)
GOBIN ?= $(firstword $(subst :, ,${GOPATH}))/bin
GO ?= $(shell which go)
# Below generated variables ensure that every time a tool under each variable is invoked, the correct version
# will be used; reinstalling only if needed.
# For example for wire variable:
#
# In your main Makefile (for non array binaries):
#
#include .bingo/Variables.mk # Assuming -dir was set to .bingo .
#
#command: $(WIRE)
# @echo "Running wire"
# @$(WIRE) <flags/args..>
#
WIRE := $(GOBIN)/wire-v0.5.0
$(WIRE): $(BINGO_DIR)/wire.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/wire-v0.5.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=wire.mod -o=$(GOBIN)/wire-v0.5.0 "github.com/google/wire/cmd/wire"

View File

@@ -1 +0,0 @@
module _ // Fake go.mod auto-created by 'bingo' for go -moddir compatibility with non-Go projects. Commit this file, together with other .mod files.

View File

@@ -1,12 +0,0 @@
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.4.3. DO NOT EDIT.
# All tools are designed to be build inside $GOBIN.
# Those variables will work only until 'bingo get' was invoked, or if tools were installed via Makefile's Variables.mk.
GOBIN=${GOBIN:=$(go env GOBIN)}
if [ -z "$GOBIN" ]; then
GOBIN="$(go env GOPATH)/bin"
fi
WIRE="${GOBIN}/wire-v0.5.0"

View File

@@ -1,5 +0,0 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.16
require github.com/google/wire v0.5.0 // cmd/wire

View File

@@ -1,6 +1,5 @@
[run]
init_cmds = [
["make", "gen-go"],
["go", "run", "build.go", "-dev", "build-cli"],
["go", "run", "build.go", "-dev", "build-server"],
["./bin/grafana-server", "-packaging=dev", "cfg:app_mode=development"]

View File

@@ -4,12 +4,12 @@
# 3. Run `make drone`
# More information about this process here: https://github.com/grafana/deployment_tools/blob/master/docs/infrastructure/drone/signing.md
load('scripts/drone/pipelines/pr.star', 'pr_pipelines')
load('scripts/drone/pipelines/main.star', 'main_pipelines')
load('scripts/drone/pipelines/release.star', 'release_pipelines', 'test_release_pipelines')
load('scripts/drone/version.star', 'version_branch_pipelines')
load('scripts/drone/pipelines/cron.star', 'cronjobs')
load('scripts/drone/vault.star', 'secrets')
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'

File diff suppressed because it is too large Load Diff

4
.github/CODEOWNERS vendored
View File

@@ -22,10 +22,6 @@
go.mod @grafana/backend-platform
go.sum @grafana/backend-platform
# Continuous Integration
.drone.yml @malcolmholmes @dsotirakis @zserge
/scripts/drone/ @malcolmholmes @dsotirakis @zserge
# Cloud Datasources backend code
/pkg/tsdb/cloudwatch @grafana/cloud-datasources @grafana/observability-squad
/pkg/tsdb/azuremonitor @grafana/cloud-datasources

View File

@@ -66,6 +66,9 @@
"packaging/**/*",
"scripts/build/**/*",
"scripts/*.sh",
"scripts/*.star",
".drone.star",
".drone.yml",
"Makefile",
"Dockerfile",
"Dockerfile.ubuntu"
@@ -73,16 +76,6 @@
"action": "updateLabel",
"addLabel": "type/build-packaging"
},
{
"type": "changedfiles",
"matches": [
"scripts/*.star",
".drone.star",
".drone.yml"
],
"action": "updateLabel",
"addLabel": "type/ci"
},
{
"type": "changedfiles",
"matches": [ "public/app/plugins/datasource/grafana-azure-monitor-datasource/**/*", "pkg/tsdb/azuremonitor/**/*"],

View File

@@ -3,7 +3,7 @@ name: publish_docs
on:
push:
branches:
- v8.2.x
- v8.1.x
paths:
- 'docs/sources/**'
- 'packages/grafana-*/**'
@@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v1
- run: git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.GH_BOT_ACCESS_TOKEN }}@github.com/grafana/website-sync ./.github/actions/website-sync
- uses: actions/cache@v2.1.6
- uses: actions/cache@v2.1.5
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

8
.gitignore vendored
View File

@@ -75,7 +75,6 @@ profile.cov
/pkg/cmd/grafana-server/grafana-server
/pkg/cmd/grafana-server/debug
/pkg/extensions/*
/pkg/server/wireexts_enterprise.go
!/pkg/extensions/main.go
/public/app/extensions
debug.test
@@ -123,15 +122,8 @@ compilation-stats.json
!/e2e/**/screenshots/expected/*
/e2e/**/videos/*
# a11y tests
/pa11y-ci-results.json
/pa11y-ci-report
# report dumping the whole system env
/report.*.json
# auto generated frontend docs
/docs/sources/packages_api
# auto generated Go files
*_gen.go

View File

@@ -1,96 +0,0 @@
var config = {
defaults: {
concurrency: 1,
runners: ['axe'],
chromeLaunchConfig: {
args: ['--no-sandbox'],
},
},
urls: [
{
url: '${HOST}/login',
actions: [
"set field input[name='user'] to admin",
"set field input[name='password'] to admin",
"click element button[aria-label='Login button']",
"wait for element [aria-label='Skip change password button'] to be visible",
],
threshold: 3,
},
{
url: '${HOST}/?orgId=1',
threshold: 7,
},
{
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge',
hideElements: '.sidemenu',
threshold: 2,
},
{
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=settings',
rootElement: '.dashboard-settings',
threshold: 10,
},
{
url: '${HOST}/?orgId=1&search=open',
rootElement: '.main-view',
threshold: 15,
},
{
url: '${HOST}/alerting/list',
rootElement: '.main-view',
threshold: 7,
},
{
url: '${HOST}/datasources',
rootElement: '.main-view',
threshold: 36,
},
{
url: '${HOST}/org/users',
rootElement: '.main-view',
threshold: 4,
},
{
url: '${HOST}/org/teams',
rootElement: '.main-view',
threshold: 1,
},
{
url: '${HOST}/plugins',
rootElement: '.main-view',
threshold: 41,
},
{
url: '${HOST}/org',
rootElement: '.main-view',
threshold: 2,
},
{
url: '${HOST}/org/apikeys',
rootElement: '.main-view',
threshold: 5,
},
{
url: '${HOST}/dashboards',
rootElement: '.main-view',
threshold: 8,
},
],
};
function myPa11yCiConfiguration(urls, defaults) {
const HOST_SERVER = process.env.HOST || 'localhost';
const PORT_SERVER = process.env.PORT || '3000';
for (var idx = 0; idx < urls.length; idx++) {
urls[idx] = { ...urls[idx], url: urls[idx].url.replace('${HOST}', `${HOST_SERVER}:${PORT_SERVER}`) };
}
return {
defaults: defaults,
urls: urls,
};
}
module.exports = myPa11yCiConfiguration(config.urls, config.defaults);

View File

@@ -1,83 +0,0 @@
var config = {
defaults: {
concurrency: 1,
runners: ['axe'],
chromeLaunchConfig: {
args: ['--no-sandbox'],
},
},
urls: [
{
url: '${HOST}/login',
actions: [
"set field input[name='user'] to admin",
"set field input[name='password'] to admin",
"click element button[aria-label='Login button']",
"wait for element [aria-label='Skip change password button'] to be visible",
],
},
{
url: '${HOST}/?orgId=1',
},
{
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge',
hideElements: '.sidemenu',
},
{
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=settings',
rootElement: '.dashboard-settings',
},
{
url: '${HOST}/?orgId=1&search=open',
rootElement: '.main-view',
},
{
url: '${HOST}/alerting/list',
rootElement: '.main-view',
},
{
url: '${HOST}/datasources',
rootElement: '.main-view',
},
{
url: '${HOST}/org/users',
rootElement: '.main-view',
},
{
url: '${HOST}/org/teams',
rootElement: '.main-view',
},
{
url: '${HOST}/plugins',
rootElement: '.main-view',
},
{
url: '${HOST}/org',
rootElement: '.main-view',
},
{
url: '${HOST}/org/apikeys',
rootElement: '.main-view',
},
{
url: '${HOST}/dashboards',
rootElement: '.main-view',
},
],
};
function myPa11yCiConfiguration(urls, defaults) {
const HOST_SERVER = process.env.HOST || 'localhost';
const PORT_SERVER = process.env.PORT || '3000';
for (var idx = 0; idx < urls.length; idx++) {
urls[idx] = { ...urls[idx], url: urls[idx].url.replace('${HOST}', `${HOST_SERVER}:${PORT_SERVER}`) };
}
return {
defaults: defaults,
urls: urls,
};
}
module.exports = myPa11yCiConfiguration(config.urls, config.defaults);

View File

@@ -5,7 +5,7 @@ pkg/
node_modules
public/vendor/
vendor/
/data/
data/
e2e/tmp
public/build/
public/sass/*.generated.scss

View File

@@ -1,231 +1,3 @@
<!-- 8.2.1 START -->
# 8.2.1 (2021-10-11)
### Bug fixes
- **Dashboard:** Fix rendering of repeating panels. [#39991](https://github.com/grafana/grafana/pull/39991), [@hugohaggmark](https://github.com/hugohaggmark)
- **Datasources:** Fix deletion of data source if plugin is not found. [#40095](https://github.com/grafana/grafana/pull/40095), [@jackw](https://github.com/jackw)
- **Packaging:** Remove systemcallfilters sections from systemd unit files. [#40176](https://github.com/grafana/grafana/pull/40176), [@kminehart](https://github.com/kminehart)
- **Prometheus:** Add Headers to HTTP client options. [#40214](https://github.com/grafana/grafana/pull/40214), [@dsotirakis](https://github.com/dsotirakis)
<!-- 8.2.1 END -->
<!-- 8.2.0 START -->
# 8.2.0 (2021-10-07)
### Features and enhancements
- **AWS:** Updated AWS authentication documentation. [#39236](https://github.com/grafana/grafana/pull/39236), [@sunker](https://github.com/sunker)
- **Alerting:** Added support Alertmanager data source for upstream Prometheus AM implementation. [#39775](https://github.com/grafana/grafana/pull/39775), [@domasx2](https://github.com/domasx2)
- **Alerting:** Allows more characters in label names so notifications are sent. [#38629](https://github.com/grafana/grafana/pull/38629), [@gotjosh](https://github.com/gotjosh)
- **Alerting:** Get alert rules for a dashboard or a panel using /api/v1/rules endpoints. [#39476](https://github.com/grafana/grafana/pull/39476), [@gerobinson](https://github.com/gerobinson)
- **Annotations:** Improved rendering performance of event markers. [#39984](https://github.com/grafana/grafana/pull/39984), [@torkelo](https://github.com/torkelo)
- **CloudWatch Logs:** Skip caching for log queries. [#39860](https://github.com/grafana/grafana/pull/39860), [@aocenas](https://github.com/aocenas)
- **Explore:** Added an opt-in configuration for Node Graph in Jaeger, Zipkin, and Tempo. [#39958](https://github.com/grafana/grafana/pull/39958), [@connorlindsey](https://github.com/connorlindsey)
- **Packaging:** Add stricter systemd unit options. [#38109](https://github.com/grafana/grafana/pull/38109), [@erdnaxe](https://github.com/erdnaxe)
- **Prometheus:** Metrics browser can now handle label values with special characters. [#39713](https://github.com/grafana/grafana/pull/39713), [@gabor](https://github.com/gabor)
### Bug fixes
- **CodeEditor:** Ensure that we trigger the latest onSave callback provided to the component. [#39835](https://github.com/grafana/grafana/pull/39835), [@mckn](https://github.com/mckn)
- **DashboardList/AlertList:** Fix for missing All folder value. [#39772](https://github.com/grafana/grafana/pull/39772), [@hugohaggmark](https://github.com/hugohaggmark)
### Breaking changes
#### Potential failure to start in Ubuntu 18.04 / Debian 9 / CentOS
- In Grafana v8.2.0, this change can prevent the `grafana-server` service from starting on older versions of systemd, present on Ubuntu 18.04 and slightly older versions of Debian. If running one of those versions, please wait until v8.2.1 is released before upgrading. If you still want to upgrade or have already ugpraded, a simple fix is available here: https://github.com/grafana/grafana/issues/40162#issuecomment-938060240 Issue [#38109](https://github.com/grafana/grafana/issues/38109)
### Plugin development fixes & changes
- **Plugins:** Create a mock icon component to prevent console errors. [#39901](https://github.com/grafana/grafana/pull/39901), [@jackw](https://github.com/jackw)
<!-- 8.2.0 END -->
<!-- 8.2.0-beta2 START -->
# 8.2.0-beta2 (2021-09-30)
### Features and enhancements
- **AccessControl:** Document new permissions restricting data source access. [#39091](https://github.com/grafana/grafana/pull/39091), [@gamab](https://github.com/gamab)
- **TimePicker:** Add fiscal years and search to time picker. [#39073](https://github.com/grafana/grafana/pull/39073), [@oscarkilhed](https://github.com/oscarkilhed)
- **Alerting:** Added support for Unified Alerting with Grafana HA. [#37920](https://github.com/grafana/grafana/pull/37920), [@gotjosh](https://github.com/gotjosh)
- **Alerting:** Added support for tune rule evaluation using configuration options. [#35623](https://github.com/grafana/grafana/pull/35623), [@papagian](https://github.com/papagian)
- **Alerting:** Cleanups alertmanager namespace from key-value store when disabling Grafana 8 alerts. [#39554](https://github.com/grafana/grafana/pull/39554), [@papagian](https://github.com/papagian)
- **Alerting:** Remove `ngalert` feature toggle and introduce two new settings for enabling Grafana 8 alerts and disabling them for specific organisations. [#38746](https://github.com/grafana/grafana/pull/38746), [@papagian](https://github.com/papagian)
- **CloudWatch:** Introduced new math expression where it is necessary to specify the period field. [#39458](https://github.com/grafana/grafana/pull/39458), [@sunker](https://github.com/sunker)
- **InfluxDB:** Added support for $\_\_interval and $\_\_interval_ms in Flux queries for alerting. [#38889](https://github.com/grafana/grafana/pull/38889), [@gabor](https://github.com/gabor)
- **InfluxDB:** Flux queries can use more precise start and end timestamps with nanosecond-precision. [#39415](https://github.com/grafana/grafana/pull/39415), [@gabor](https://github.com/gabor)
- **Plugins Catalog:** Make the catalog the default way to interact with plugins. [#39779](https://github.com/grafana/grafana/pull/39779), [@leventebalogh](https://github.com/leventebalogh)
- **Prometheus:** Removed autocomplete limit for metrics. [#39363](https://github.com/grafana/grafana/pull/39363), [@ivanahuckova](https://github.com/ivanahuckova)
### Bug fixes
- **Alerting:** Fixed an issue where the edit page crashes if you tried to preview an alert without a condition set. [#39659](https://github.com/grafana/grafana/pull/39659), [@peterholmberg](https://github.com/peterholmberg)
- **Alerting:** Fixed rules migration to keep existing Grafana 8 alert rules. [#39541](https://github.com/grafana/grafana/pull/39541), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Fixed the silence file content generated during migration. [#39557](https://github.com/grafana/grafana/pull/39557), [@papagian](https://github.com/papagian)
- **Analytics:** Fixed an issue related to interaction event propagation in Azure Application Insights. [#39752](https://github.com/grafana/grafana/pull/39752), [@sunker](https://github.com/sunker)
- **BarGauge:** Fixed an issue where the cell color was lit even though there was no data. [#39574](https://github.com/grafana/grafana/pull/39574), [@ashharrison90](https://github.com/ashharrison90)
- **BarGauge:** Improved handling of streaming data. [#39737](https://github.com/grafana/grafana/pull/39737), [@ashharrison90](https://github.com/ashharrison90)
- **CloudMonitoring:** Fixed INT64 label unmarshal error. [#39441](https://github.com/grafana/grafana/pull/39441), [@bspellmeyer](https://github.com/bspellmeyer)
- **ConfirmModal:** Fixes confirm button focus on modal open. [#39328](https://github.com/grafana/grafana/pull/39328), [@torkelo](https://github.com/torkelo)
- **Dashboard:** Add option to generate short URL for variables with values containing spaces. [#39552](https://github.com/grafana/grafana/pull/39552), [@hugohaggmark](https://github.com/hugohaggmark)
- **Explore:** No longer hides errors containing refId property. [#39504](https://github.com/grafana/grafana/pull/39504), [@Elfo404](https://github.com/Elfo404)
- Fixed an issue that produced State timeline panel tooltip error when data was not in sync. [#39438](https://github.com/grafana/grafana/pull/39438), [@zoltanbedi](https://github.com/zoltanbedi)
- **InfluxDB:** InfluxQL query editor is set to always use resultFormat. [#39330](https://github.com/grafana/grafana/pull/39330), [@gabor](https://github.com/gabor)
- **Loki:** Fixed creating context query for logs with parsed labels. [#39648](https://github.com/grafana/grafana/pull/39648), [@ivanahuckova](https://github.com/ivanahuckova)
- **PageToolbar:** Fixed alignment of titles. [#39572](https://github.com/grafana/grafana/pull/39572), [@ashharrison90](https://github.com/ashharrison90)
- **Plugins Catalog:** Update to the list of available panels after an install, update or uninstall. [#39293](https://github.com/grafana/grafana/pull/39293), [@leventebalogh](https://github.com/leventebalogh)
- **TimeSeries:** Fixed an issue where the shared cursor was not showing when hovering over in old Graph panel. [#39738](https://github.com/grafana/grafana/pull/39738), [@zoltanbedi](https://github.com/zoltanbedi)
- **Variables:** Fixed issues related to change of focus or refresh pages when pressing enter in a text box variable input. [#39666](https://github.com/grafana/grafana/pull/39666), [@hugohaggmark](https://github.com/hugohaggmark)
- **Variables:** Panel no longer crash when using the adhoc variable in data links. [#39546](https://github.com/grafana/grafana/pull/39546), [@hugohaggmark](https://github.com/hugohaggmark)
### Breaking changes
Grafana v8.2.0-beta1 caused data loss for users having enabled `ngalert` in 8.0.x - 8.1.x and created alerts using the new alerting system. This issue is now fixed except if the deployment has multiple organizations and the feature flag was enabled in the previous version (8.0.x - 8.1.x).
In this scenario (upgrade from 8.0.x - 8.1.x with multiple organizations and `ngalert` enabled to 8.2.0-beta2), the migration will assign existing notification policies and contact points to the first organization and then apply the default alertmanager configuration to all organizations. This will effectively reset notification policies for _all_ organizations. Issue [#39541](https://github.com/grafana/grafana/issues/39541)
### Deprecations
`ngalert` feature toggle it has been deprecated it will be removed in a future release. To enable Grafana 8 alerts, modify your configuration and:
- in the `unified_alerting` section set the `enabled` property to `true`
- in the `alerting` section set the `enabled` property to `false` Issue [#38746](https://github.com/grafana/grafana/issues/38746)
<!-- 8.2.0-beta2 END -->
<!-- 8.2.0-beta1 START -->
# 8.2.0-beta1 (2021-09-16)
### Features and enhancements
- **AccessControl:** Introduce new permissions to restrict access for reloading provisioning configuration. [#38906](https://github.com/grafana/grafana/pull/38906), [@vtorosyan](https://github.com/vtorosyan)
- **Alerting:** Add UI to edit Cortex/Loki namespace, group names, and group evaluation interval. [#38543](https://github.com/grafana/grafana/pull/38543), [@domasx2](https://github.com/domasx2)
- **Alerting:** Add a Test button to test contact point. [#37475](https://github.com/grafana/grafana/pull/37475), [@domasx2](https://github.com/domasx2)
- **Alerting:** Allow creating/editing recording rules for Loki and Cortex. [#38064](https://github.com/grafana/grafana/pull/38064), [@domasx2](https://github.com/domasx2)
- **Alerting:** Sort notification channels by name to make them easier to locate. [#37426](https://github.com/grafana/grafana/pull/37426), [@jstangroome](https://github.com/jstangroome)
- **AzureMonitor:** Add data links to deep link to Azure Portal Azure Resource Graph. [#35591](https://github.com/grafana/grafana/pull/35591), [@shuotli](https://github.com/shuotli)
- **AzureMonitor:** Add support for annotations from Azure Monitor Metrics and Azure Resource Graph services. [#37633](https://github.com/grafana/grafana/pull/37633), [@joshhunt](https://github.com/joshhunt)
- **AzureMonitor:** Show error message when subscriptions request fails in ConfigEditor. [#37837](https://github.com/grafana/grafana/pull/37837), [@joshhunt](https://github.com/joshhunt)
- **Chore:** Update to Golang 1.16.7. [#38604](https://github.com/grafana/grafana/pull/38604), [@dsotirakis](https://github.com/dsotirakis)
- **CloudWatch Logs:** Add link to X-Ray data source for trace IDs in logs. [#39135](https://github.com/grafana/grafana/pull/39135), [@aocenas](https://github.com/aocenas)
- **CloudWatch Logs:** Disable query path using websockets (Live) feature. [#39231](https://github.com/grafana/grafana/pull/39231), [@aocenas](https://github.com/aocenas)
- **CloudWatch/Logs:** Don't group dataframes for non time series queries. [#37998](https://github.com/grafana/grafana/pull/37998), [@aocenas](https://github.com/aocenas)
- **Cloudwatch:** Migrate queries that use multiple stats to one query per stat. [#36925](https://github.com/grafana/grafana/pull/36925), [@sunker](https://github.com/sunker)
- **Dashboard:** Keep live timeseries moving left (v2). [#37769](https://github.com/grafana/grafana/pull/37769), [@ryantxu](https://github.com/ryantxu)
- **Datasources:** Introduce `response_limit` for datasource responses. [#38962](https://github.com/grafana/grafana/pull/38962), [@dsotirakis](https://github.com/dsotirakis)
- **Explore:** Add filter by trace or span ID to `trace to logs` feature. [#38943](https://github.com/grafana/grafana/pull/38943), [@connorlindsey](https://github.com/connorlindsey)
- **Explore:** Download traces as JSON in Explore Inspector. [#38614](https://github.com/grafana/grafana/pull/38614), [@connorlindsey](https://github.com/connorlindsey)
- **Explore:** Reuse Dashboard's QueryRows component. [#38942](https://github.com/grafana/grafana/pull/38942), [@Elfo404](https://github.com/Elfo404)
- **Explore:** Support custom display label for derived fields buttons for Loki datasource. [#37273](https://github.com/grafana/grafana/pull/37273), [@connorlindsey](https://github.com/connorlindsey)
- **Grafana UI:** Update monaco-related dependencies. [#39027](https://github.com/grafana/grafana/pull/39027), [@gabor](https://github.com/gabor)
- **Graphite:** Deprecate browser access mode. [#38783](https://github.com/grafana/grafana/pull/38783), [@ifrost](https://github.com/ifrost)
- **InfluxDB:** Improve handling of intervals in alerting. [#37588](https://github.com/grafana/grafana/pull/37588), [@gabor](https://github.com/gabor)
- **InfluxDB:** InfluxQL query editor: Handle unusual characters in tag values better. [#39170](https://github.com/grafana/grafana/pull/39170), [@gabor](https://github.com/gabor)
- **Jaeger:** Add ability to upload JSON file for trace data. [#37205](https://github.com/grafana/grafana/pull/37205), [@zoltanbedi](https://github.com/zoltanbedi)
- **LibraryElements:** Enable specifying UID for new and existing library elements. [#39019](https://github.com/grafana/grafana/pull/39019), [@hugohaggmark](https://github.com/hugohaggmark)
- **LibraryPanels:** Remove library panel icon from the panel header so you can no longer tell that a panel is a library panel from the dashboard view. [#38749](https://github.com/grafana/grafana/pull/38749), [@hugohaggmark](https://github.com/hugohaggmark)
- **Logs panel:** Scroll to the bottom on page refresh when sorting in ascending order. [#37634](https://github.com/grafana/grafana/pull/37634), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Add fuzzy search to label browser. [#36864](https://github.com/grafana/grafana/pull/36864), [@connorlindsey](https://github.com/connorlindsey)
- **Navigation:** Implement active state for items in the Sidemenu. [#39030](https://github.com/grafana/grafana/pull/39030), [@ashharrison90](https://github.com/ashharrison90)
- **Packaging:** Add stricter systemd unit options. [#38109](https://github.com/grafana/grafana/pull/38109), [@erdnaxe](https://github.com/erdnaxe)
- **Packaging:** Update PID file location from `/var/run` to `/run`. [#35739](https://github.com/grafana/grafana/pull/35739), [@MichaIng](https://github.com/MichaIng)
- **Plugins:** Add Hide OAuth Forward config option. [#36306](https://github.com/grafana/grafana/pull/36306), [@wbrowne](https://github.com/wbrowne)
- **Postgres/MySQL/MSSQL:** Add setting to limit the maximum number of rows processed. [#38986](https://github.com/grafana/grafana/pull/38986), [@marefr](https://github.com/marefr)
- **Prometheus:** Add browser access mode deprecation warning. [#37578](https://github.com/grafana/grafana/pull/37578), [@ivanahuckova](https://github.com/ivanahuckova)
- **Prometheus:** Add interpolation for built-in-time variables to backend. [#39051](https://github.com/grafana/grafana/pull/39051), [@ivanahuckova](https://github.com/ivanahuckova)
- **Tempo:** Add ability to upload trace data in JSON format. [#37407](https://github.com/grafana/grafana/pull/37407), [@zoltanbedi](https://github.com/zoltanbedi)
- **TimeSeries/XYChart:** Allow grid lines visibility control in XYChart and TimeSeries panels. [#38502](https://github.com/grafana/grafana/pull/38502), [@dprokop](https://github.com/dprokop)
- **Transformations:** Convert field types to time string number or boolean. [#38517](https://github.com/grafana/grafana/pull/38517), [@nikki-kiga](https://github.com/nikki-kiga)
- **Value mappings:** Add regular-expression based value mapping. [#38931](https://github.com/grafana/grafana/pull/38931), [@mcdee](https://github.com/mcdee)
- **Zipkin:** Add ability to upload trace JSON. [#37483](https://github.com/grafana/grafana/pull/37483), [@zoltanbedi](https://github.com/zoltanbedi)
### Bug fixes
- **Admin:** Prevent user from deleting user's current/active organization. [#38056](https://github.com/grafana/grafana/pull/38056), [@idafurjes](https://github.com/idafurjes)
- **LibraryPanels:** Fix library panel getting saved in the dashboard's folder. [#38978](https://github.com/grafana/grafana/pull/38978), [@hugohaggmark](https://github.com/hugohaggmark)
- **OAuth:** Make generic teams URL and JMES path configurable. [#37233](https://github.com/grafana/grafana/pull/37233), [@djairhogeuens](https://github.com/djairhogeuens)
- **QueryEditor:** Fix broken copy-paste for mouse middle-click (#39117). [#39117](https://github.com/grafana/grafana/pull/39117), [@glintik](https://github.com/glintik)
- **Thresholds:** Fix undefined color in "Add threshold". [#39113](https://github.com/grafana/grafana/pull/39113), [@glintik](https://github.com/glintik)
- **Timeseries:** Add wide-to-long, and fix multi-frame output. [#38670](https://github.com/grafana/grafana/pull/38670), [@ryantxu](https://github.com/ryantxu)
- **TooltipPlugin:** Fix behavior of Shared Crosshair when Tooltip is set to All. [#37285](https://github.com/grafana/grafana/pull/37285), [@nikki-kiga](https://github.com/nikki-kiga)
### Breaking changes
The `monaco-editor` dependency in `grafana-ui` has been updated to a newer version (`0.27.0`), which is not completely backward compatible with the old version (`0.21.2`). The backward incompatible changes are fairly small, but they do exist, so if your code accesses the raw monaco-objects through the `grafana-ui` package, please check the [monaco-editor changelog](https://github.com/microsoft/monaco-editor/blob/main/CHANGELOG.md) and apply any necessary changes. Issue [#39027](https://github.com/grafana/grafana/issues/39027)
The mandatory `css` prop in `grafana/ui` components has been removed.
Previous versions of `grafana/ui` components were typed incorrectly due to a dependency mismatch between emotion 10 and 11 causing a `css` prop to be added to components that extended react types.
Issue [#38078](https://github.com/grafana/grafana/issues/38078)
Panel queries and/or annotation queries that used more than one statistic will be converted into one query/annotation per statistic. In case an alerting rule was based on a query row that had more than one statistic, it would now be based only on the first statistic for that query row. New alerting rules will not be created for migrated queries. Please note that in most cases it would not make sense to have an alerting rule that is based on multiple statistics anyway. Issue [#36925](https://github.com/grafana/grafana/issues/36925)
### Deprecations
`getHighlighterExpressions` in datasource APIs ( used to highlight logs while editing queries) has been deprecated and will be removed in a future release.
# Deprecation notice
`ExploreQueryFieldProps` interface for query editors has been deprecated and will be removed in a future release. Use `QueryEditorProps` instead. Issue [#38942](https://github.com/grafana/grafana/issues/38942)
### Plugin development fixes & changes
- **Grafana UI:** Fix TS error property `css` is missing in type. [#38078](https://github.com/grafana/grafana/pull/38078), [@jackw](https://github.com/jackw)
<!-- 8.2.0-beta1 END -->
<!-- 8.1.7 START -->
# 8.1.7 (2021-10-06)
### Bug fixes
- **Alerting:** Fix alerts with evaluation interval more than 30 seconds resolving before notification. [#39513](https://github.com/grafana/grafana/pull/39513), [@gerobinson](https://github.com/gerobinson)
- **Elasticsearch/Prometheus:** Fix usage of proper SigV4 service namespace. [#39439](https://github.com/grafana/grafana/pull/39439), [@marefr](https://github.com/marefr)
<!-- 8.1.7 END -->
<!-- 8.1.6 START -->
# 8.1.6 (2021-10-05)
- **Security**: Fixes CVE-2021-39226. For more information, see our [blog](https://grafana.com/blog/2021/10/05/grafana-7.5.11-and-8.1.6-released-with-critical-security-fix/)
<!-- 8.1.6 END -->
<!-- 8.1.5 START -->
# 8.1.5 (2021-09-21)
### Bug fixes
- **BarChart:** Fixes panel error that happens on second refresh. [#39304](https://github.com/grafana/grafana/pull/39304), [@DanCech](https://github.com/DanCech)
<!-- 8.1.5 END -->
<!-- 8.1.4 START -->
# 8.1.4 (2021-09-16)
### Features and enhancements
- **Explore:** Ensure logs volume bar colors match legend colors. [#39072](https://github.com/grafana/grafana/pull/39072), [@ifrost](https://github.com/ifrost)
- **LDAP:** Search all DNs for users. [#38891](https://github.com/grafana/grafana/pull/38891), [@sakjur](https://github.com/sakjur)
### Bug fixes
- **Alerting:** Fix notification channel migration. [#38983](https://github.com/grafana/grafana/pull/38983), [@papagian](https://github.com/papagian)
- **Annotations:** Fix blank panels for queries with unknown data sources. [#39017](https://github.com/grafana/grafana/pull/39017), [@hugohaggmark](https://github.com/hugohaggmark)
- **BarChart:** Fix stale values and x axis labels. [#39188](https://github.com/grafana/grafana/pull/39188), [@leeoniya](https://github.com/leeoniya)
- **Graph:** Make old graph panel thresholds work even if ngalert is enabled. [#38918](https://github.com/grafana/grafana/pull/38918), [@domasx2](https://github.com/domasx2)
- **InfluxDB:** Fix regex to identify `/` as separator. [#39185](https://github.com/grafana/grafana/pull/39185), [@dsotirakis](https://github.com/dsotirakis)
- **LibraryPanels:** Fix update issues related to library panels in rows. [#38963](https://github.com/grafana/grafana/pull/38963), [@hugohaggmark](https://github.com/hugohaggmark)
- **Variables:** Fix variables not updating inside a Panel when the preceding Row uses "Repeat For". [#38935](https://github.com/grafana/grafana/pull/38935), [@axelavargas](https://github.com/axelavargas)
<!-- 8.1.4 END -->
<!-- 8.1.3 START -->
# 8.1.3 (2021-09-08)
@@ -246,8 +18,6 @@ Panel queries and/or annotation queries that used more than one statistic will b
- **Plugins:** Track signed files + add warn log for plugin assets which are not signed. [#38938](https://github.com/grafana/grafana/pull/38938), [@wbrowne](https://github.com/wbrowne)
- **Postgres/MySQL/MSSQL:** Fix region annotations not displayed correctly. [#38936](https://github.com/grafana/grafana/pull/38936), [@marefr](https://github.com/marefr)
- **Prometheus:** Fix validate selector in metrics browser. [#38921](https://github.com/grafana/grafana/pull/38921), [@ivanahuckova](https://github.com/ivanahuckova)
- **Security:** Fix stylesheet injection vulnerability [#38432](https://github.com/grafana/grafana/pull/38432), [@idafurjes](https://github.com/idafurjes). Big thanks to Tobias Hamann and Lauritz Holtmann of usd AG for reporting this issue.
- **Security:** Fix short URL vulnerability [#38436](https://github.com/grafana/grafana/pull/38436), [@idafurjes](https://github.com/idafurjes). Big thanks to Tobias Hamann and Lauritz Holtmann of usd AG for reporting this issue.
<!-- 8.1.3 END -->
<!-- 8.1.2 START -->
@@ -295,6 +65,7 @@ Panel queries and/or annotation queries that used more than one statistic will b
- **Reporting:** Fix timezone parsing for scheduler (enterprise)
<!-- 8.1.1 END -->
<!-- 8.1.0 START -->
# 8.1.0 (2021-08-05)
@@ -877,14 +648,6 @@ Issue [#33352](https://github.com/grafana/grafana/issues/33352)
<!-- 8.0.0-beta1 END -->
<!-- 7.5.11 START -->
# 7.5.11 (2021-10-05)
- **Security**: Fixes CVE-2021-39226. For more information, see our [blog](https://grafana.com/blog/2021/10/05/grafana-7.5.11-and-8.1.6-released-with-critical-security-fix/)
<!-- 7.5.11 END -->
<!-- 7.5.10 START -->
# 7.5.10 (2021-07-15)
@@ -1603,7 +1366,7 @@ This option to group query variable values into groups by tags has been an exper
- **CloudWatch**: Adding support for additional Amazon CloudFront metrics. [#28069](https://github.com/grafana/grafana/pull/28069), [@darrylsepeda](https://github.com/darrylsepeda)
- **CloudWatch**: Re-implement authentication. [#25548](https://github.com/grafana/grafana/pull/25548), [@aknuds1](https://github.com/aknuds1),[@patstrom](https://github.com/patstrom)
- **Dashboard**: Allow shortlink generation. [#27409](https://github.com/grafana/grafana/pull/27409), [@MisterSquishy](https://github.com/MisterSquishy)
- **Docker**: OpenShift compatibility. [#27813](https://github.com/grafana/grafana/pull/27813), [@xlson](https://github.com/xlson)
- **Docker**: OpenShift compatability. [#27813](https://github.com/grafana/grafana/pull/27813), [@xlson](https://github.com/xlson)
- **Elasticsearch**: Support multiple pipeline aggregations for a query. [#27945](https://github.com/grafana/grafana/pull/27945), [@simianhacker](https://github.com/simianhacker)
- **Explore**: Allow shortlink generation. [#28222](https://github.com/grafana/grafana/pull/28222), [@ivanahuckova](https://github.com/ivanahuckova)
- **Explore**: Remove collapsing of visualisations. [#27026](https://github.com/grafana/grafana/pull/27026), [@ivanahuckova](https://github.com/ivanahuckova)
@@ -2106,7 +1869,7 @@ This option to group query variable values into groups by tags has been an exper
- **Datasource/CloudWatch**: Makes CloudWatch Logs query history more readable. [#24795](https://github.com/grafana/grafana/pull/24795), [@kaydelaney](https://github.com/kaydelaney)
- **Download CSV**: Add date and time formatting. [#24992](https://github.com/grafana/grafana/pull/24992), [@ryantxu](https://github.com/ryantxu)
- **Table**: Make last cell value visible when right aligned. [#24921](https://github.com/grafana/grafana/pull/24921), [@peterholmberg](https://github.com/peterholmberg)
- **TablePanel**: Adding sort order persistence. [#24705](https://github.com/grafana/grafana/pull/24705), [@torkelo](https://github.com/torkelo)
- **TablePanel**: Adding sort order persistance. [#24705](https://github.com/grafana/grafana/pull/24705), [@torkelo](https://github.com/torkelo)
- **Transformations**: Display correct field name when using reduce transformation. [#25068](https://github.com/grafana/grafana/pull/25068), [@peterholmberg](https://github.com/peterholmberg)
- **Transformations**: Allow custom number input for binary operations. [#24752](https://github.com/grafana/grafana/pull/24752), [@ryantxu](https://github.com/ryantxu)

View File

@@ -26,12 +26,10 @@ Report a bug by submitting a [bug report](https://github.com/grafana/grafana/iss
Follow the issue template and add additional information that will help us replicate the problem.
For data visualization issues:
- Query results from the inspect drawer (data tab & query inspector)
- Panel settings can be extracted in the panel inspect drawer JSON tab
For a dashboard related issues:
- Dashboard JSON can be found in the dashboard settings JSON model view
For authentication and alerting Grafana server logs are useful.
@@ -42,7 +40,7 @@ If you believe you've found a security vulnerability, please read our [security
### Suggest enhancements
If you have an idea of how to improve Grafana, submit an [enhancement request](https://github.com/grafana/grafana/discussions/new).
If you have an idea of how to improve Grafana, submit an [enhancement request](https://github.com/grafana/grafana/issues/new?labels=type%3A+feature+request&template=2-feature_request.md).
We want to make Grafana accessible to even more people. Submit an [accessibility issue](https://github.com/grafana/grafana/issues/new?labels=type%3A+accessibility&template=3-accessibility.md) to help us understand what we can improve.

View File

@@ -17,7 +17,7 @@ COPY emails emails
ENV NODE_ENV production
RUN yarn build
FROM golang:1.17.0-alpine3.14 as go-builder
FROM golang:1.16.1-alpine3.14 as go-builder
RUN apk add --no-cache gcc g++

View File

@@ -17,7 +17,7 @@ COPY emails emails
ENV NODE_ENV production
RUN yarn build
FROM golang:1.17.0 AS go-builder
FROM golang:1.16 AS go-builder
WORKDIR /src/grafana

View File

@@ -2,10 +2,7 @@
##
## For more information, refer to https://suva.sh/posts/well-documented-makefiles/
WIRE_TAGS = "oss"
-include local/Makefile
include .bingo/Variables.mk
.PHONY: all deps-go deps-js deps build-go build-server build-cli build-js build build-docker-dev build-docker-full lint-go golangci-lint test-go test-js test run run-frontend clean devenv devenv-down protobuf drone help
@@ -30,11 +27,7 @@ node_modules: package.json yarn.lock ## Install node modules.
##@ Building
gen-go: $(WIRE)
@echo "generate go files"
$(WIRE) gen -tags $(WIRE_TAGS) ./pkg/server
build-go: gen-go ## Build all Go binaries.
build-go: ## Build all Go binaries.
@echo "build go files"
$(GO) run build.go build

466
build.go
View File

@@ -3,14 +3,476 @@
package main
import (
"bytes"
"crypto/md5"
"crypto/sha256"
"encoding/json"
"flag"
"fmt"
"go/build"
"io"
"io/ioutil"
"log"
"os"
"os/exec"
"path"
"path/filepath"
"runtime"
"strconv"
"strings"
"time"
)
"github.com/grafana/grafana/pkg/build"
const (
windows = "windows"
linux = "linux"
)
var (
//versionRe = regexp.MustCompile(`-[0-9]{1,3}-g[0-9a-f]{5,10}`)
goarch string
goos string
gocc string
cgo bool
libc string
pkgArch string
version string = "v1"
buildTags []string
// deb & rpm does not support semver so have to handle their version a little differently
linuxPackageVersion string = "v1"
linuxPackageIteration string = ""
race bool
workingDir string
includeBuildId bool = true
buildId string = "0"
serverBinary string = "grafana-server"
cliBinary string = "grafana-cli"
binaries []string = []string{serverBinary, cliBinary}
isDev bool = false
enterprise bool = false
skipRpmGen bool = false
skipDebGen bool = false
printGenVersion bool = false
)
func main() {
log.SetOutput(os.Stdout)
log.SetFlags(0)
os.Exit(build.RunCmd())
var buildIdRaw string
var buildTagsRaw string
flag.StringVar(&goarch, "goarch", runtime.GOARCH, "GOARCH")
flag.StringVar(&goos, "goos", runtime.GOOS, "GOOS")
flag.StringVar(&gocc, "cc", "", "CC")
flag.StringVar(&libc, "libc", "", "LIBC")
flag.StringVar(&buildTagsRaw, "build-tags", "", "Sets custom build tags")
flag.BoolVar(&cgo, "cgo-enabled", cgo, "Enable cgo")
flag.StringVar(&pkgArch, "pkg-arch", "", "PKG ARCH")
flag.BoolVar(&race, "race", race, "Use race detector")
flag.BoolVar(&includeBuildId, "includeBuildId", includeBuildId, "IncludeBuildId in package name")
flag.BoolVar(&enterprise, "enterprise", enterprise, "Build enterprise version of Grafana")
flag.StringVar(&buildIdRaw, "buildId", "0", "Build ID from CI system")
flag.BoolVar(&isDev, "dev", isDev, "optimal for development, skips certain steps")
flag.BoolVar(&skipRpmGen, "skipRpm", skipRpmGen, "skip rpm package generation (default: false)")
flag.BoolVar(&skipDebGen, "skipDeb", skipDebGen, "skip deb package generation (default: false)")
flag.BoolVar(&printGenVersion, "gen-version", printGenVersion, "generate Grafana version and output (default: false)")
flag.Parse()
buildId = shortenBuildId(buildIdRaw)
readVersionFromPackageJson()
if pkgArch == "" {
pkgArch = goarch
}
if printGenVersion {
printGeneratedVersion()
return
}
if len(buildTagsRaw) > 0 {
buildTags = strings.Split(buildTagsRaw, ",")
}
log.Printf("Version: %s, Linux Version: %s, Package Iteration: %s\n", version, linuxPackageVersion, linuxPackageIteration)
if flag.NArg() == 0 {
log.Println("Usage: go run build.go build")
return
}
workingDir, _ = os.Getwd()
for _, cmd := range flag.Args() {
switch cmd {
case "setup":
setup()
case "build-srv", "build-server":
clean()
doBuild("grafana-server", "./pkg/cmd/grafana-server", buildTags)
case "build-cli":
clean()
doBuild("grafana-cli", "./pkg/cmd/grafana-cli", buildTags)
case "build":
//clean()
for _, binary := range binaries {
doBuild(binary, "./pkg/cmd/"+binary, buildTags)
}
case "build-frontend":
yarn("build")
case "sha-dist":
shaFilesInDist()
case "latest":
makeLatestDistCopies()
case "clean":
clean()
default:
log.Fatalf("Unknown command %q", cmd)
}
}
}
func makeLatestDistCopies() {
files, err := ioutil.ReadDir("dist")
if err != nil {
log.Fatalf("failed to create latest copies. Cannot read from /dist")
}
latestMapping := map[string]string{
"_amd64.deb": "dist/grafana_latest_amd64.deb",
".x86_64.rpm": "dist/grafana-latest-1.x86_64.rpm",
".linux-amd64.tar.gz": "dist/grafana-latest.linux-x64.tar.gz",
".linux-amd64-musl.tar.gz": "dist/grafana-latest.linux-x64-musl.tar.gz",
".linux-armv7.tar.gz": "dist/grafana-latest.linux-armv7.tar.gz",
".linux-armv7-musl.tar.gz": "dist/grafana-latest.linux-armv7-musl.tar.gz",
".linux-armv6.tar.gz": "dist/grafana-latest.linux-armv6.tar.gz",
".linux-arm64.tar.gz": "dist/grafana-latest.linux-arm64.tar.gz",
".linux-arm64-musl.tar.gz": "dist/grafana-latest.linux-arm64-musl.tar.gz",
}
for _, file := range files {
for extension, fullName := range latestMapping {
if strings.HasSuffix(file.Name(), extension) {
runError("cp", path.Join("dist", file.Name()), fullName)
}
}
}
}
func readVersionFromPackageJson() {
reader, err := os.Open("package.json")
if err != nil {
log.Fatal("Failed to open package.json")
return
}
defer reader.Close()
jsonObj := map[string]interface{}{}
jsonParser := json.NewDecoder(reader)
if err := jsonParser.Decode(&jsonObj); err != nil {
log.Fatal("Failed to decode package.json")
}
version = jsonObj["version"].(string)
linuxPackageVersion = version
linuxPackageIteration = ""
// handle pre version stuff (deb / rpm does not support semver)
parts := strings.Split(version, "-")
if len(parts) > 1 {
linuxPackageVersion = parts[0]
linuxPackageIteration = parts[1]
}
// add timestamp to iteration
if includeBuildId {
if buildId != "0" {
linuxPackageIteration = fmt.Sprintf("%s%s", buildId, linuxPackageIteration)
} else {
linuxPackageIteration = fmt.Sprintf("%d%s", time.Now().Unix(), linuxPackageIteration)
}
}
}
func yarn(params ...string) {
runPrint(`yarn run`, params...)
}
func genPackageVersion() string {
if includeBuildId {
return fmt.Sprintf("%v-%v", linuxPackageVersion, linuxPackageIteration)
} else {
return version
}
}
func setup() {
args := []string{"install", "-v"}
if goos == windows {
args = append(args, "-buildmode=exe")
}
args = append(args, "./pkg/cmd/grafana-server")
runPrint("go", args...)
}
func printGeneratedVersion() {
fmt.Print(genPackageVersion())
}
func test(pkg string) {
setBuildEnv()
args := []string{"test", "-short", "-timeout", "60s"}
if goos == windows {
args = append(args, "-buildmode=exe")
}
args = append(args, pkg)
runPrint("go", args...)
}
func doBuild(binaryName, pkg string, tags []string) {
libcPart := ""
if libc != "" {
libcPart = fmt.Sprintf("-%s", libc)
}
binary := fmt.Sprintf("./bin/%s-%s%s/%s", goos, goarch, libcPart, binaryName)
if isDev {
//don't include os/arch/libc in output path in dev environment
binary = fmt.Sprintf("./bin/%s", binaryName)
}
if goos == windows {
binary += ".exe"
}
if !isDev {
rmr(binary, binary+".md5")
}
args := []string{"build", "-ldflags", ldflags()}
if goos == windows {
// Work around a linking error on Windows: "export ordinal too large"
args = append(args, "-buildmode=exe")
}
if len(tags) > 0 {
args = append(args, "-tags", strings.Join(tags, ","))
}
if race {
args = append(args, "-race")
}
args = append(args, "-o", binary)
args = append(args, pkg)
if !isDev {
setBuildEnv()
runPrint("go", "version")
libcPart := ""
if libc != "" {
libcPart = fmt.Sprintf("/%s", libc)
}
fmt.Printf("Targeting %s/%s%s\n", goos, goarch, libcPart)
}
runPrint("go", args...)
if !isDev {
// Create an md5 checksum of the binary, to be included in the archive for
// automatic upgrades.
err := md5File(binary)
if err != nil {
log.Fatal(err)
}
}
}
func ldflags() string {
var b bytes.Buffer
b.WriteString("-w")
b.WriteString(fmt.Sprintf(" -X main.version=%s", version))
b.WriteString(fmt.Sprintf(" -X main.commit=%s", getGitSha()))
b.WriteString(fmt.Sprintf(" -X main.buildstamp=%d", buildStamp()))
b.WriteString(fmt.Sprintf(" -X main.buildBranch=%s", getGitBranch()))
if v := os.Getenv("LDFLAGS"); v != "" {
b.WriteString(fmt.Sprintf(" -extldflags \"%s\"", v))
}
return b.String()
}
func rmr(paths ...string) {
for _, path := range paths {
log.Println("rm -r", path)
os.RemoveAll(path)
}
}
func clean() {
if isDev {
return
}
rmr("dist")
rmr("tmp")
rmr(filepath.Join(build.Default.GOPATH, fmt.Sprintf("pkg/%s_%s/github.com/grafana", goos, goarch)))
}
func setBuildEnv() {
os.Setenv("GOOS", goos)
if goos == windows {
// require windows >=7
os.Setenv("CGO_CFLAGS", "-D_WIN32_WINNT=0x0601")
}
if goarch != "amd64" || goos != linux {
// needed for all other archs
cgo = true
}
if strings.HasPrefix(goarch, "armv") {
os.Setenv("GOARCH", "arm")
os.Setenv("GOARM", goarch[4:])
} else {
os.Setenv("GOARCH", goarch)
}
if cgo {
os.Setenv("CGO_ENABLED", "1")
}
if gocc != "" {
os.Setenv("CC", gocc)
}
}
func getGitBranch() string {
v, err := runError("git", "rev-parse", "--abbrev-ref", "HEAD")
if err != nil {
return "main"
}
return string(v)
}
func getGitSha() string {
v, err := runError("git", "rev-parse", "--short", "HEAD")
if err != nil {
return "unknown-dev"
}
return string(v)
}
func buildStamp() int64 {
// use SOURCE_DATE_EPOCH if set.
if s, _ := strconv.ParseInt(os.Getenv("SOURCE_DATE_EPOCH"), 10, 64); s > 0 {
return s
}
bs, err := runError("git", "show", "-s", "--format=%ct")
if err != nil {
return time.Now().Unix()
}
s, _ := strconv.ParseInt(string(bs), 10, 64)
return s
}
func runError(cmd string, args ...string) ([]byte, error) {
ecmd := exec.Command(cmd, args...)
bs, err := ecmd.CombinedOutput()
if err != nil {
return nil, err
}
return bytes.TrimSpace(bs), nil
}
func runPrint(cmd string, args ...string) {
log.Println(cmd, strings.Join(args, " "))
ecmd := exec.Command(cmd, args...)
ecmd.Stdout = os.Stdout
ecmd.Stderr = os.Stderr
err := ecmd.Run()
if err != nil {
log.Fatal(err)
}
}
func md5File(file string) error {
fd, err := os.Open(file)
if err != nil {
return err
}
defer fd.Close()
h := md5.New()
_, err = io.Copy(h, fd)
if err != nil {
return err
}
out, err := os.Create(file + ".md5")
if err != nil {
return err
}
_, err = fmt.Fprintf(out, "%x\n", h.Sum(nil))
if err != nil {
return err
}
return out.Close()
}
func shaFilesInDist() {
filepath.Walk("./dist", func(path string, f os.FileInfo, err error) error {
if path == "./dist" {
return nil
}
if !strings.Contains(path, ".sha256") {
err := shaFile(path)
if err != nil {
log.Printf("Failed to create sha file. error: %v\n", err)
}
}
return nil
})
}
func shaFile(file string) error {
fd, err := os.Open(file)
if err != nil {
return err
}
defer fd.Close()
h := sha256.New()
_, err = io.Copy(h, fd)
if err != nil {
return err
}
out, err := os.Create(file + ".sha256")
if err != nil {
return err
}
_, err = fmt.Fprintf(out, "%x\n", h.Sum(nil))
if err != nil {
return err
}
return out.Close()
}
func shortenBuildId(buildId string) string {
buildId = strings.Replace(buildId, "-", "", -1)
if len(buildId) < 9 {
return buildId
}
return buildId[0:8]
}

View File

@@ -172,12 +172,6 @@ idle_conn_timeout_seconds = 90
# If enabled and user is not anonymous, data proxy will add X-Grafana-User header with username into the request.
send_user_header = false
# Limit the amount of bytes that will be read/accepted from responses of outgoing HTTP requests.
response_limit = 0
# Limits the number of rows that Grafana will process from SQL data sources.
row_limit = 1000000
#################################### Analytics ###########################
[analytics]
# Server reporting, sends usage counters to stats.grafana.org every 24 hours.
@@ -208,12 +202,6 @@ rudderstack_write_key =
# Rudderstack data plane url, enabled only if rudderstack_write_key is also set
rudderstack_data_plane_url =
# Application Insights connection string. Specify an URL string to enable this feature.
application_insights_connection_string =
# Optional. Specifies an Application Insights endpoint URL where the endpoint string is wrapped in backticks ``.
application_insights_endpoint_url =
#################################### Security ############################
[security]
# disable creation of admin user on first start of grafana
@@ -510,11 +498,9 @@ role_attribute_path =
role_attribute_strict = false
groups_attribute_path =
id_token_attribute_name =
team_ids_attribute_path =
auth_url =
token_url =
api_url =
teams_url =
allowed_domains =
team_ids =
allowed_organizations =
@@ -729,67 +715,11 @@ global_session = -1
# global limit of alerts
global_alert_rule = -1
#################################### Unified Alerting ####################
[unified_alerting]
# Enable the Unified Alerting sub-system and interface. When enabled we'll migrate all of your alert rules and notification channels to the new system. New alert rules will be created and your notification channels will be converted into an Alertmanager configuration. Previous data is preserved to enable backwards compatibility but new data is removed.
enabled = false
# Comma-separated list of organization IDs for which to disable unified alerting. Only supported if unified alerting is enabled.
disabled_orgs =
# Specify the frequency of polling for admin config changes.
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
admin_config_poll_interval = 60s
# Specify the frequency of polling for Alertmanager config changes.
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
alertmanager_config_poll_interval = 60s
# Listen address/hostname and port to receive unified alerting messages for other Grafana instances. The port is used for both TCP and UDP. It is assumed other Grafana instances are also running on the same port.
ha_listen_address = "0.0.0.0:9094"
# Explicit address/hostname and port to advertise other Grafana instances. The port is used for both TCP and UDP.
ha_advertise_address = ""
# Comma-separated list of initial instances (in a format of host:port) that will form the HA cluster. Configuring this setting will enable High Availability mode for alerting.
ha_peers = ""
# Time to wait for an instance to send a notification via the Alertmanager. In HA, each Grafana instance will
# be assigned a position (e.g. 0, 1). We then multiply this position with the timeout to indicate how long should
# each instance wait before sending the notification to take into account replication lag.
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
ha_peer_timeout = 15s
# The interval between sending gossip messages. By lowering this value (more frequent) gossip messages are propagated
# across cluster more quickly at the expense of increased bandwidth usage.
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
ha_gossip_interval = 200ms
# The interval between gossip full state syncs. Setting this interval lower (more frequent) will increase convergence speeds
# across larger clusters at the expense of increased bandwidth usage.
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
ha_push_pull_interval = 60s
# Enable or disable alerting rule execution. The alerting UI remains visible. This option has a legacy version in the `[alerting]` section that takes precedence.
execute_alerts = true
# Alert evaluation timeout when fetching data from the datasource. This option has a legacy version in the `[alerting]` section that takes precedence.
# The timeout string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
evaluation_timeout = 30s
# Number of times we'll attempt to evaluate an alert rule before giving up on that evaluation. This option has a legacy version in the `[alerting]` section that takes precedence.
max_attempts = 3
# Minimum interval to enforce between rule evaluations. Rules will be adjusted if they are less than this value or if they are not multiple of the scheduler interval (10s). Higher values can help with resource management as we'll schedule fewer evaluations over time. This option has a legacy version in the `[alerting]` section that takes precedence.
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
min_interval = 10s
#################################### Alerting ############################
[alerting]
# Disable legacy alerting engine & UI features
# Disable alerting engine & UI features
enabled = true
# Makes it possible to turn off alert execution but alerting UI is visible
# Makes it possible to turn off alert rule execution but alerting UI is visible
execute_alerts = true
# Default setting for new alert rules. Defaults to categorize error and timeouts as alerting. (alerting, keep_state)
@@ -965,7 +895,7 @@ app_tls_skip_verify_insecure = false
# 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 = true
plugin_admin_enabled = false
plugin_admin_external_manage_enabled = false
plugin_catalog_url = https://grafana.com/grafana/plugins/

View File

@@ -178,12 +178,6 @@
# If enabled and user is not anonymous, data proxy will add X-Grafana-User header with username into the request, default is false.
;send_user_header = false
# Limit the amount of bytes that will be read/accepted from responses of outgoing HTTP requests.
;response_limit = 0
# Limits the number of rows that Grafana will process from SQL data sources.
;row_limit = 1000000
#################################### Analytics ####################################
[analytics]
# Server reporting, sends usage counters to stats.grafana.org every 24 hours.
@@ -489,14 +483,12 @@
;auth_url = https://foo.bar/login/oauth/authorize
;token_url = https://foo.bar/login/oauth/access_token
;api_url = https://foo.bar/user
;teams_url =
;allowed_domains =
;team_ids =
;allowed_organizations =
;role_attribute_path =
;role_attribute_strict = false
;groups_attribute_path =
;team_ids_attribute_path =
;tls_skip_verify_insecure = false
;tls_client_cert =
;tls_client_key =
@@ -706,67 +698,11 @@
# global limit of alerts
;global_alert_rule = -1
#################################### Unified Alerting ####################
[unified_alerting]
#Enable the Unified Alerting sub-system and interface. When enabled we'll migrate all of your alert rules and notification channels to the new system. New alert rules will be created and your notification channels will be converted into an Alertmanager configuration. Previous data is preserved to enable backwards compatibility but new data is removed.```
;enabled = false
# Comma-separated list of organization IDs for which to disable unified alerting. Only supported if unified alerting is enabled.
;disabled_orgs =
# Specify the frequency of polling for admin config changes.
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
;admin_config_poll_interval = 60s
# Specify the frequency of polling for Alertmanager config changes.
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
;alertmanager_config_poll_interval = 60s
# Listen address/hostname and port to receive unified alerting messages for other Grafana instances. The port is used for both TCP and UDP. It is assumed other Grafana instances are also running on the same port. The default value is `0.0.0.0:9094`.
;ha_listen_address = "0.0.0.0:9094"
# Listen address/hostname and port to receive unified alerting messages for other Grafana instances. The port is used for both TCP and UDP. It is assumed other Grafana instances are also running on the same port. The default value is `0.0.0.0:9094`.
;ha_advertise_address = ""
# Comma-separated list of initial instances (in a format of host:port) that will form the HA cluster. Configuring this setting will enable High Availability mode for alerting.
;ha_peers = ""
# Time to wait for an instance to send a notification via the Alertmanager. In HA, each Grafana instance will
# be assigned a position (e.g. 0, 1). We then multiply this position with the timeout to indicate how long should
# each instance wait before sending the notification to take into account replication lag.
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
;ha_peer_timeout = "15s"
# The interval between sending gossip messages. By lowering this value (more frequent) gossip messages are propagated
# across cluster more quickly at the expense of increased bandwidth usage.
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
;ha_gossip_interval = "200ms"
# The interval between gossip full state syncs. Setting this interval lower (more frequent) will increase convergence speeds
# across larger clusters at the expense of increased bandwidth usage.
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
;ha_push_pull_interval = "60s"
# Enable or disable alerting rule execution. The alerting UI remains visible. This option has a legacy version in the `[alerting]` section that takes precedence.
;execute_alerts = true
# Alert evaluation timeout when fetching data from the datasource. This option has a legacy version in the `[alerting]` section that takes precedence.
# The timeout string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
;evaluation_timeout = 30s
# Number of times we'll attempt to evaluate an alert rule before giving up on that evaluation. This option has a legacy version in the `[alerting]` section that takes precedence.
;max_attempts = 3
# Minimum interval to enforce between rule evaluations. Rules will be adjusted if they are less than this value or if they are not multiple of the scheduler interval (10s). Higher values can help with resource management as we'll schedule fewer evaluations over time. This option has a legacy version in the `[alerting]` section that takes precedence.
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
;min_interval = 10s
#################################### Alerting ############################
[alerting]
# Disable legacy alerting engine & UI features
# Disable alerting engine & UI features
;enabled = true
# Makes it possible to turn off alert execution but alerting UI is visible
# Makes it possible to turn off alert rule execution but alerting UI is visible
;execute_alerts = true
# Default setting for new alert rules. Defaults to categorize error and timeouts as alerting. (alerting, keep_state)
@@ -779,6 +715,7 @@
# This limit will protect the server from render overloading and make sure notifications are sent out quickly
;concurrent_render_limit = 5
# Default setting for alert calculation timeout. Default value is 30
;evaluation_timeout_seconds = 30

View File

@@ -6,7 +6,6 @@ This directory contains guides for contributors to the Grafana project.
- [Contributing documentation](documentation.md)
- [Developer guide](developer-guide.md)
- [Triage issues](triage-issues.md)
- [Merge a pull request](merge-pull-request.md)
The `style-guides` directory contains style guides for the Grafana software project and documentation.

View File

@@ -2,136 +2,71 @@
A Grafana _service_ encapsulates and exposes application logic to the rest of the application, through a set of related operations.
Grafana uses [Wire](https://github.com/google/wire), which is a code generation tool that automates connecting components using [dependency injection](https://en.wikipedia.org/wiki/Dependency_injection). Dependencies between components are represented in Wire as function parameters, encouraging explicit initialization instead of global variables.
Before a service can start communicating with the rest of Grafana, it needs to be registered in the _service registry_.
The service registry keeps track of all available services during runtime. On start-up, Grafana uses the registry to build a dependency graph of services, a _service graph_.
Even though the services in Grafana do different things, they share a number of patterns. To better understand how a service works, let's build one from scratch!
Before a service can start communicating with the rest of Grafana, it needs to be registered with Wire, see `ProvideService` factory function/method in the service example below and how it's being referenced in the wire.go example below.
## Create a service
When Wire is run it will inspect the parameters of `ProvideService` and make sure that all it's dependencies has been wired up and initialized properly.
To start building a service:
**Service example:**
- Create a new Go package `mysvc` in the [pkg/services](/pkg/services) directory.
- Create a `service.go` file inside your new directory.
All services need to implement the [Service](https://godoc.org/github.com/grafana/grafana/pkg/registry#Service) interface:
```go
package example
// Service service is the service responsible for X, Y and Z.
type Service struct {
logger log.Logger
cfg *setting.Cfg
sqlStore *sqlstore.SQLStore
type MyService struct {
}
// ProvideService provides Service as dependency for other services.
func ProvideService(cfg *setting.Cfg, sqlStore *sqlstore.SQLStore) (*Service, error) {
s := &Service{
logger: log.New("service"),
cfg: cfg,
sqlStore: sqlStore,
}
if s.IsDisabled() {
// skip certain initialization logic
return s, nil
}
if err := s.init(); err != nil {
return nil, err
}
return s, nil
}
func (s *Service) init() error {
// additional initialization logic...
func (s *MyService) Init() error {
return nil
}
// IsDisabled returns true if the service is disabled.
//
// Satisfies the registry.CanBeDisabled interface which will guarantee
// that Run() is not called if the service is disabled.
func (s *Service) IsDisabled() bool {
return !s.cfg.IsServiceEnabled()
}
// Run runs the service in the background.
//
// Satisfies the registry.BackgroundService interface which will
// guarantee that the service can be registered as a background service.
func (s *Service) Run(ctx context.Context) error {
// background service logic...
<-ctx.Done()
return ctx.Err()
}
```
[wire.go](/pkg/server/wire.go)
The `Init` method is used to initialize and configure the service to make it ready to use. Services that return an error halt Grafana's startup process and cause the error to be logged as it exits.
## Register a service
Every service needs to be registered with the application for it to be included in the service graph.
To register a service, call the `registry.RegisterService` function in an `init` function within your package.
```go
// +build wireinject
package server
import (
"github.com/google/wire"
"github.com/grafana/grafana/pkg/example"
"github.com/grafana/grafana/pkg/services/sqlstore"
)
var wireBasicSet = wire.NewSet(
example.ProvideService,
)
var wireSet = wire.NewSet(
wireBasicSet,
sqlstore.ProvideService,
)
var wireTestSet = wire.NewSet(
wireBasicSet,
)
func Initialize(cla setting.CommandLineArgs, opts Options, apiOpts api.ServerOptions) (*Server, error) {
wire.Build(wireExtsSet)
return &Server{}, nil
func init() {
registry.RegisterService(&MyService{})
}
func InitializeForTest(cla setting.CommandLineArgs, opts Options, apiOpts api.ServerOptions, sqlStore *sqlstore.SQLStore) (*Server, error) {
wire.Build(wireExtsTestSet)
return &Server{}, nil
}
```
## Background services
`init` functions are only run whenever a package is imported, so we also need to import the package in the application. In the `server.go` file under `pkg/server`, import the package we just created:
A background service is a service that runs in the background of the lifecycle between Grafana starts up and shutdown. If you want a service to be run in the background your Service should satisfy the `registry.BackgroundService` interface and add it as argument to the [ProvideBackgroundServiceRegistry](/pkg/server/backgroundsvcs/background_services.go) function and add it as argument to `NewBackgroundServiceRegistry` to register it as a background service.
```go
import _ "github.com/grafana/grafana/pkg/services/mysvc"
```
You can see an example implementation above of the Run method.
## Dependencies
## Disabled services
Grafana uses the [inject](https://github.com/facebookgo/inject) package to inject dependencies during runtime.
If you want to guarantee that a background service is not run by Grafana when certain criteria is met/service is disabled your service should satisfy the `registry.CanBeDisabled` interface. When the service.IsDisabled method return false Grafana would not call the service.Run method.
For example, to access the [bus](communication.md), add it to the `MyService` struct:
If you want to run certain initialization code if service is disabled or not, you need to handle this in the service factory method.
```go
type MyService struct {
Bus bus.Bus `inject:""`
}
```
You can see an example implementation above of the IsDisabled method and custom initialization code when service is disabled.
You can also inject other services in the same way:
## Run Wire / generate code
```go
type MyService struct {
Service other.Service `inject:""`
}
```
When running `make run` it will call `make gen-go` on the first run. `gen-go` in turn will call the wire binary and generate the code in [wire_gen.go](/pkg/server/wire_gen.go). The wire binary is installed using [bingo](https://github.com/bwplotka/bingo) which will make sure to download and install all the tools needed, including the Wire binary at using a specific version.
## OSS vs Enterprise
Grafana OSS and Grafana Enterprise shares code and dependencies. Grafana Enterprise might need to override/extend certain OSS services.
There's a [wireexts_oss.go](/pkg/server/wireexts_oss.go) that has the `wireinject` and `oss` build tags as requirements. Here services that might have other implementations, e.g. Grafana Enterprise, can be registered.
Similarly, there's a wireexts_enterprise.go file in the Enterprise source code repository where other service implementations can be overridden/be registered.
To extend oss background service create a specific background interface for that type and inject that type to [ProvideBackgroundServiceRegistry](/pkg/server/backgroundsvcs/background_services.go) instead of the concrete type. Then add a wire binding for that interface in [wireexts_oss.go](/pkg/server/wireexts_oss.go) and in the enterprise wireexts file.
> **Note:** Any injected dependency needs to be an exported field. Any unexported fields result in a runtime error.
## Methods

View File

@@ -55,17 +55,6 @@ Pull requests that create new UI components or modify existing ones must adhere
- Use the [Grafana theme palette](/contribute/style-guides/themes.md) for styling. It contains colors with good contrast which aids accessibility.
- Use [RTL](https://testing-library.com/docs/dom-testing-library/api-accessibility/) for writing unit tests. It helps to create accessible components.
Pull requests that introduce accessibility(a11y) errors:
We use [pa11y-ci](https://github.com/pa11y/pa11y-ci) to collect accessibility errors on [some URLs on the project](https://github.com/grafana/grafana/issues/36555), threshold errors are specified per URL.
If the contribution introduces new a11y errors, our continuous integration will fail, preventing you to merge on the main branch. In those cases there are two alternatives for moving forward:
- Check the error log on the pipeline step `test-a11y-frontend-pr`, identify what was the error, and fix it.
- Locally run the command `yarn test:accessibility-report` that generates an HTML accessibility report, then go to the URL that contains your change, identify the error, and fix it. Keep in mind, a local Grafana instance needs to be running on `http://localhost:3000`.
You can also prevent introducing a11y errors by installing an a11y plugin in your browser, for example, axe DevTools, Accessibility Insights for Web among others.
### Backend-specific guidelines
Please refer to the [backend style guidelines](/contribute/style-guides/backend.md).
@@ -113,8 +102,6 @@ For changes to panels, the area should be the name of the panel, suffixed with P
- `GraphPanel: Fix legend sorting issues`
- `Docs: Changed url to URL in all documentation files`
If you're unsure, please have a look at the existing [changelog](https://github.com/grafana/grafana/blob/main/CHANGELOG.md) for inspiration/guidance.
### Pull request titles
The Grafana team _squashes_ all commits into one when we accept a pull request. The title of the pull request becomes the subject line of the squashed commit message. We still encourage contributors to write informative commit messages, as they becomes a part of the Git commit body.

View File

@@ -1,118 +0,0 @@
# Merge a pull request
When a pull request has been reviewed and approved by at least one person and all checks have passed it's time to merge the pull request.
## Who is expected to merge a pull request?
Maintainers are responsible for merging all pull requests. If a maintainer has opened a pull request the general rule is that the same maintainer merges the pull request. If a non-maintainer has opened a pull request it's suggested that one of the maintainers reviewing the pull request merges the pull request.
## Checklist/summary
The following checklist/summary should give you a quick overview of what to ask/consider before merging a pull request.
- Reviewed and approved?
- All checks passed?
- Proper pull request title?
- Milestone assigned?
- Add to changelog/release notes?
- Needs backporting?
## Before merge
Before actually merging a pull request there's a couple of things to take into consideration.
### Format the pull request title
Make sure that the pull request title is properly formatted according to `<Area>: <Summary>` and try to make the summary short and understandable for the community as a whole.
All commits in a pull request are squashed when merged and the pull request title will be the default subject line of the squashed commit message. It's also used for [changelog/release notes](#include-in-changelog-and-release-notes).
See [formatting guidelines](create-pull-request.md#formatting-guidelines) for more information.
### Assign a milestone
It's recommended to add a milestone to every pull request. This makes it easier to track what changes did go into a certain release. Without this you're basically left with going through git commits which could be a lot harder.
There's also various tooling built that in some cases requires a pull request to be assigned a milestone, for example [generating changelog/release notes](#include-in-changelog-and-release-notes).
### Include in changelog and release notes?
At Grafana we generate the [changelog](https://github.com/grafana/grafana/blob/main/CHANGELOG.md) and [release notes](https://grafana.com/docs/grafana/latest/release-notes/) based on merged pull requests. Including changes in the changelog/release notes is very important to provide a somewhat complete picture of what changes a Grafana release actually includes.
Exactly what changes should be added to the changelog is hard to answer but some general guidance would be any change that you think would be interesting for the community as a whole. Use your best judgement and/or ask other maintainers for advice.
There's a GitHub action available in the repository named [Update changelog](https://github.com/grafana/grafana/blob/main/.github/workflows/update-changelog.yml) that can manually be triggered to re-generate the changelog and release notes for any release.
To include a pull request in the changelog/release notes the general rule of thumb is that a milestone should be assigned and labeled with `add to changelog`.
The changelog/release notes are divided into sections and here's a description of how you make a pull request show up in a certain section.
**Features and enhancements:**
Milestone assigned and labeled with `add to changelog` and any of the other section rules don't apply.
**Bug fixes:**
Milestone assigned and labeled with `add to changelog` and either labeled with `type/bug` or the pull request title contains `fix` or `fixes`.
**Plugin development fixes & changes:**
Milestone assigned and labeled with `area/grafana/toolkit`, `area/grafana/ui` or `area/grafana/runtime`.
**Deprecations:**
In case the pull request introduces a deprecation you should document this. Label the pull request with `add to changelog` and use the following template at the end of the pull request description describing the deprecation change.
```md
# Deprecation notice
<Deprecation description>
```
**Breaking changes:**
In case the pull request introduces a breaking change you should document this. Label the pull request with `add to changelog` and `breaking change` and use the following template at the end of the pull request description describing the breaking change.
```md
# Release notice breaking change
<Breaking change description>
```
### Should the pull request be backported?
If your pull request has changes that need to go into one or several existing release branches you need to backport the changes. Please refer to [Backport PR](.github/bot.md#backport-pr) for detailed instructions.
Some examples when backport is required:
- The change needs to be released in the next upcoming patch release, e.g. v8.1.3, so you have to backport it, e.g. into the v8.1.x release branch.
- You have a change to be released in the next major/minor release, e.g. v8.0.0, and there's already a release branch, e.g. v8.0.x, you have to backport it, e.g. into the v8.0.x release branch.
- The change includes documentation changes that needs to be updated for one or multiple older versions, then you have to backport it to each release branch.
Some examples when backport is not required:
- The change is supposed to be released in the next major/minor release, e.g. v8.0.0, but the release branch, e.g. v8.0.x, has not yet been created.
> **Note:** You can still backport a pull request after it's been merged.
## Doing the actual merge
Time to actually merge the pull request changes. All commits in a pull request are squashed, hence the GitHub `Squash and merge` button is used to initialize the merge.
This will present you with options allowing you to optionally change the commit message before merging. Please remember that developers might use the commit information when reviewing changes of files, doing git blame and resolving merge conflicts etc., trying to quickly figure out what the actual change was. But there's not really any best practices around this, the following is an attempt to bring some guidance.
Do:
- Make sure the pull request title is formatted properly before merging, this will automatically give you a good and short summary of the commit/change.
- Leave `Co-authored-by:` lines as is so that co-authors will be accounted for the contribution.
- Remove any commit information that doesn't bring any context to the change.
Consider:
- Add any references to issues that the pull request fixes/closes/references to ease giving quick context to things. Doing this allows cross-reference between the commit and referenced issue(s).
Finalize the merge by clicking on the `Confirm squash and merge` button.
## After the merge
Make sure to close any referenced/related issues. It's recommended to assign the same milestone on the issues that the pull request fixes/closes, but not required.

View File

@@ -4,13 +4,13 @@ This style guide applies to all documentation created for Grafana products.
For information about how to write technical documentation, refer to the following resources:
- [Google Technical Writing courses](https://developers.google.com/tech-writing)
- [Divio documentation system](https://documentation.divio.com/)
- [Vue writing principles](https://v3.vuejs.org/guide/contributing/writing-guide.html#principles)
* [Google Technical Writing courses](https://developers.google.com/tech-writing)
* [Divio documentation system](https://documentation.divio.com/)
* [Vue writing principles](https://v3.vuejs.org/guide/contributing/writing-guide.html#principles)
## Contributing
The _Documentation style guide_ is a living document. Add to it whenever a style decision is made or a question is answered regarding style, grammar, or word choice.
The *Documentation style guide* is a living document. Add to it whenever a style decision is made or a question is answered regarding style, grammar, or word choice.
## Published guides
@@ -46,14 +46,10 @@ Avoid _master_ or _slave_.
## Grafana-specific style
The following guidelines are specific to Grafana documentation. For the most part, these are _guidelines_ are not rigid rules. If you have questions, then please ask in the #docs channel of Grafana Slack.
The following guidelines are specific to Grafana documentation. For the most part, these are *guidelines* are not rigid rules. If you have questions, then please ask in the #docs channel of Grafana Slack.
### General
Per the [Voice and tone](https://developers.google.com/style/tone) section of the Google developer documentation style guide:
> In your documents, aim for a voice and tone that's conversational, friendly, and respectful without being overly colloquial or frivolous; a voice that's casual and natural and approachable, not pedantic or pushy. Try to sound like a knowledgeable friend who understands what the developer wants to do.
- Use active voice:
- Active: Grafana displays the heatmap visualization.
- Passive: The heatmap visualization is displayed.
@@ -108,7 +104,6 @@ However, sometimes we need to use headings as numbered steps. This is mostly in
If that is the case, then use the following format for headings:
##### Step 1. Install the software
##### Step 2. Run the software
### Images
@@ -154,7 +149,6 @@ In general, "integration" is not capitalized. Only capitalize it if it is capita
The first letter of the name of an integration is always capitalized, even if the original named source is lowercase.
**Examples:**
- MySQL Integration
- CockroachDB Integration
- Etcd Integration
@@ -218,20 +212,16 @@ Warnings tell the user not to do something. For example:
- Do not assume everyone is using Linux. Make sure instructions include enough information for Windows and Mac users to successfully complete procedures.
- Do not add `$` before commands. Make it easy for users to copy and paste commands.
- **Right:** `sudo yum install grafana`
- **Wrong:** `$ sudo yum install grafana`
- Include `sudo` before commands that require `sudo` to work.
For terminal examples and Grafana configuration, use a `bash` code block:
```bash
sudo yum install grafana
```
For HTTP request/response, use an `http` code block:
```http
GET /api/dashboards/id/1/permissions HTTP/1.1
Accept: application/json
@@ -269,7 +259,6 @@ Two words if used as a verb, one word if used as a noun.
Two words, not one.
**Exceptions:**
- "datasource" used as an identifier
- "datasource" in a URL
- Use "data source" instead of "datasource" unless used as an identifier, in code, or as part of a URL.
@@ -278,8 +267,7 @@ Two words, not one.
#### display (verb)
_Display_ is a transitive verb, which means it always needs a direct object.
*Display* is a transitive verb, which means it always needs a direct object.
- Correct, active voice: Grafana displays your list of active alarms.
- Correct, but passive voice: Your list of active alarms is displayed.
- Incorrect: The list of active alarms displays.
@@ -339,7 +327,6 @@ Two words, not one.
**Incorrect:** webserver
### MS SQL Server
Always use "MS SQL" when referring to MS SQL Server application.
Incorrect UI spellings will be corrected in a later version of Grafana.

View File

@@ -23,13 +23,20 @@ Inspired by https://martinfowler.com/bliki/PageObject.html
Let's start with a simple [JSX](https://reactjs.org/docs/introducing-jsx.html) example containing a single input field that we want to populate during our E2E test:
```jsx
<input className="gf-form-input login-form-input" type="text" />
<input
className="gf-form-input login-form-input"
type="text"
/>
```
We _could_ target the field with a CSS selector like `.gf-form-input.login-form-input` but that would be brittle as style changes occur frequently. Furthermore there is nothing that signals to future developers that this input is part of an E2E test. At Grafana, we use `aria-label` attributes as our preferred way of defining selectors instead of [`data-*`](https://mdn.io/docs/Web/HTML/Global_attributes/data-*) as they also aid in [accessibility](https://mdn.io/docs/Learn/Accessibility/What_is_accessibility):
```jsx
<input aria-label="Username input field" className="gf-form-input login-form-input" type="text" />
<input
aria-label="Username input field"
className="gf-form-input login-form-input"
type="text"
/>
```
The next step is to create a `Page` representation in our E2E framework to glue the test with the real implementation using the `pageFactory` function. For that function we can supply a `url` and `selectors` like in the example below:
@@ -38,6 +45,7 @@ The next step is to create a `Page` representation in our E2E framework to glue
export const Login = {
// Called via `Login.visit()`
url: '/login',
// Called via `Login.username()`
username: 'Username input field',
};
@@ -59,7 +67,11 @@ Now that we have a `Page` called `Login` in our `Pages` const we can use that to
```jsx
import { selectors } from '@grafana/e2e-selectors';
<input aria-label={selectors.pages.Login.username} className="gf-form-input login-form-input" type="text" />;
<input
aria-label={selectors.pages.Login.username}
className="gf-form-input login-form-input"
type="text"
/>
```
The last step in our example is to use our `Login` page as part of a test.
@@ -74,7 +86,9 @@ describe('Login test', () => {
e2e.pages.Login.visit();
// To prevent flaky tests, always do a `.should` on any selector that you expect to be in the DOM.
// Read more here: https://docs.cypress.io/guides/core-concepts/retry-ability.html#Commands-vs-assertions
e2e.pages.Login.username().should('be.visible').type('admin');
e2e.pages.Login.username()
.should('be.visible')
.type('admin');
});
});
```
@@ -140,28 +154,25 @@ describe('List test', () => {
e2e.pages.DataSources.visit();
// To prevent flaky tests, always do a .should on any selector that you expect to be in the DOM.
// Read more here: https://docs.cypress.io/guides/core-concepts/retry-ability.html#Commands-vs-assertions
e2e.pages.DataSources.dataSources('B').should('be.visible').click();
e2e.pages.DataSources.dataSources('B')
.should('be.visible')
.click();
});
});
```
## Aria-Labels vs data-testid
Our selectors are set up to work with both aria-labels and data-testid attributes. Aria-labels help assistive technologies such as screenreaders identify interactive elements of a page for our users.
Our selectors are set up to work with both aria-labels and data-testid attributes. Aria-labels help assistive technologies such as screenreaders identify interactive elements of a page for our users.
A good example of a time to use an aria-label might be if you have a button with an X to close:
```
<button aria-label="close">X<button>
```
It might be clear visually that the X closes the modal, but audibly it would not be clear for example.
```
<button aria-label="close">Close<button>
```
The example might read aloud to a user as "Close, Close" or something similar.
The above example for example might read aloud to a user "Close, Close" or something similar.
However adding aria-labels to elements that are already clearly labeled or not interactive can be confusing and redundant for users with assistive technologies.
@@ -174,18 +185,16 @@ In such cases rather than adding unnecessary aria-labels to components so as to
We have added support for this in our selectors, to use:
Prefix your selector string with "data-testid":
```typescript
export const Components = {
Login: {
openButton: 'open-button', // this would look for an aria-label
closeButton: 'data-testid modal-close-button', // this would look for a data-testid
openButton: "data-testid-open", // this would look for a data-testid
closeButton: "close-button" // this would look for an aria-label
},
};
```
and in your component, import the selectors and add the data test id:
```
<button data-testid={Selectors.Components.Login.closeButton}>
```
<button data-testid={Selectors.Components.Login.openButton}>
```

View File

@@ -5,7 +5,6 @@ Generally we follow the Airbnb [React Style Guide](https://github.com/airbnb/jav
## Table of Contents
- [Frontend Style Guide](#frontend-style-guide)
- [Table of Contents](#table-of-contents)
- [Basic rules](#basic-rules)
- [Naming conventions](#naming-conventions)
@@ -29,12 +28,12 @@ Generally we follow the Airbnb [React Style Guide](https://github.com/airbnb/jav
- [Linting](#linting)
- [React](#react)
- [Props](#props)
- [Name callback props and handlers with an "on" prefix.](#name-callback-props-and-handlers-with-an-on-prefix)
- [React Component definitions](#react-component-definitions)
- [React Component constructor](#react-component-constructor)
- [React Component defaultProps](#react-component-defaultprops)
- [Name callback props and handlers with an "on" prefix.](#name-callback-props-and-handlers-with-an-on-prefix)
- [React Component definitions](#react-component-definitions)
- [React Component constructor](#react-component-constructor)
- [React Component defaultProps](#react-component-defaultprops)
- [State management](#state-management)
- [Proposal for removing or replacing Angular dependencies](https://github.com/grafana/grafana/pull/23048)
## Basic rules
@@ -195,12 +194,12 @@ _SASS styles are deprecated. Please migrate to Emotion whenever you need to modi
### Typing
In general, you should let Typescript infer the types so that there's no need to explicitly define type for each variable.
In general, you should let Typescript infer the types so that there's no need to explicitly define type for each variable.
There are some exceptions to this:
```typescript
// Typescript needs to know type of arrays or objects otherwise it would infer it as array of any
// Typescript needs to know type of arrays or objects otherwise it would infer it as array of any
// bad
const stringArray = [];
@@ -209,7 +208,7 @@ const stringArray = [];
const stringArray: string[] = [];
```
Specify function return types explicitly in new code. This improves readability by being able to tell what a function returns just by looking at the signature. It also prevents errors when a function's return type is broader than expected by the author.
Specify function return types explicitly in new code. This improves readability by being able to tell what a function returns just by looking at the signature. It also prevents errors when a function's return type is broader than expected by the author.
> **Note:** We don't have linting for this enabled because of lots of old code that needs to be fixed first.
@@ -217,18 +216,18 @@ Specify function return types explicitly in new code. This improves readability
// bad
function transform(value?: string) {
if (!value) {
return undefined;
return undefined
}
return applyTransform(value);
}
return applyTransform(value)
};
// good
function transform(value?: string): TransformedValue | undefined {
if (!value) {
return undefined;
return undefined
}
return applyTransform(value);
}
return applyTransform(value)
};
```
### File and directory naming conventions
@@ -245,8 +244,6 @@ For files exporting multiple utility functions, use the name that describes the
- Use `reducers.ts` Redux reducers.
- Use `*.test.ts(x)` for test files.
- Use kebab case for directory names: lowercase, words delimited by hyphen ( `-` ). For example, `features/new-important-feature/utils.ts`.
### Code organization
Organize your code in a directory that encloses feature code:

View File

@@ -120,7 +120,7 @@ Example use cases:
### Typography
For font family, font sizes and line heights use the variables under `theme.typography`.
For font family, font sizes and line heights use the variables under `theme.typography`.
#### Using `ThemeContext` directly

212
cue/data/gen.cue Normal file
View File

@@ -0,0 +1,212 @@
package grafanaschema
import "github.com/grafana/grafana/cue/scuemata"
Family: scuemata.#Family & {
lineages: [
[
{ // 0.0
// Unique numeric identifier for the dashboard.
// TODO must isolate or remove identifiers local to a Grafana instance...?
id?: number
// Unique dashboard identifier that can be generated by anyone. string (8-40)
uid?: string
// Title of dashboard.
title?: string
// Description of dashboard.
description?: string
gnetId?: string
// Tags associated with dashboard.
tags?: [...string]
// Theme of dashboard.
style: *"light" | "dark"
// Timezone of dashboard,
timezone?: *"browser" | "utc"
// Whether a dashboard is editable or not.
editable: bool | *true
// 0 for no shared crosshair or tooltip (default).
// 1 for shared crosshair.
// 2 for shared crosshair AND shared tooltip.
graphTooltip: >=0 & <=2 | *0
// Time range for dashboard, e.g. last 6 hours, last 7 days, etc
time?: {
from: string | *"now-6h"
to: string | *"now"
}
// Timepicker metadata.
timepicker?: {
// Whether timepicker is collapsed or not.
collapse: bool | *false
// Whether timepicker is enabled or not.
enable: bool | *true
// Whether timepicker is visible or not.
hidden: bool | *false
// Selectable intervals for auto-refresh.
refresh_intervals: [...string] | *["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"]
}
// Templating.
templating?: list: [...{...}]
// Annotations.
annotations?: list: [...{
builtIn: number | *0
// Datasource to use for annotation.
datasource: string
// Whether annotation is enabled.
enable?: bool | *true
// Whether to hide annotation.
hide?: bool | *false
// Annotation icon color.
iconColor?: string
// Name of annotation.
name?: string
type: string | *"dashboard"
// Query for annotation data.
rawQuery?: string
showIn: number | *0
}]
// Auto-refresh interval.
refresh?: string
// Version of the JSON schema, incremented each time a Grafana update brings
// changes to said schema.
schemaVersion: number | *25
// Version of the dashboard, incremented each time the dashboard is updated.
version?: number
panels?: [...#Panel]
// Dashboard panels. Panels are canonically defined inline
// because they share a version timeline with the dashboard
// schema; they do not vary independently. We create a separate,
// synthetic Family to represent them in Go, for ease of generating
// e.g. JSON Schema.
#Panel: {
// The panel plugin type id.
type: !=""
// Internal - the exact major and minor versions of the panel plugin
// schema. Hidden and therefore not a part of the data model, but
// expected to be filled with panel plugin schema versions so that it's
// possible to figure out which schema version matched on a successful
// unification.
// _pv: { maj: int, min: int }
// The major and minor versions of the panel plugin for this schema.
// TODO 2-tuple list instead of struct?
panelSchema?: { maj: number, min: number }
// Panel title.
title?: string
// Description.
description?: string
// Whether to display the panel without a background.
transparent: bool | *false
// Name of default datasource.
datasource?: string
// Grid position.
gridPos?: {
// Panel
h: number & >0 | *9
// Panel
w: number & >0 & <=24 | *12
// Panel x
x: number & >=0 & <24 | *0
// Panel y
y: number & >=0 | *0
// true if fixed
static?: bool
}
// Panel links.
// links?: [..._panelLink]
// Name of template variable to repeat for.
repeat?: string
// Direction to repeat in if 'repeat' is set.
// "h" for horizontal, "v" for vertical.
repeatDirection: *"h" | "v"
// Schema for panel targets is specified by datasource
// plugins. We use a placeholder definition, which the Go
// schema loader either left open/as-is with the Base
// variant of the Dashboard and Panel families, or filled
// with types derived from plugins in the Instance variant.
// When working directly from CUE, importers can extend this
// type directly to achieve the same effect.
targets?: [...{...}]
// The values depend on panel type
options: {...}
fieldConfig: {
defaults: {
// The display value for this field. This supports template variables blank is auto
displayName?: string
// This can be used by data sources that return and explicit naming structure for values and labels
// When this property is configured, this value is used rather than the default naming strategy.
displayNameFromDS?: string
// Human readable field metadata
description?: string
// An explict path to the field in the datasource. When the frame meta includes a path,
// This will default to `${frame.meta.path}/${field.name}
//
// When defined, this value can be used as an identifier within the datasource scope, and
// may be used to update the results
path?: string
// True if data source can write a value to the path. Auth/authz are supported separately
writeable?: bool
// True if data source field supports ad-hoc filters
filterable?: bool
// Numeric Options
unit?: string
// Significant digits (for display)
decimals?: number
min?: number
max?: number
// // Convert input values into a display string
// mappings?: ValueMapping[];
// // Map numeric values to states
// thresholds?: ThresholdsConfig;
// // Map values to a display color
// color?: FieldColor;
// // Used when reducing field values
// nullValueMode?: NullValueMode;
// // The behavior when clicking on a result
links?: [...]
// Alternative to empty string
noValue?: string
// Can always exist. Valid fields within this are
// defined by the panel plugin - that's the
// PanelFieldConfig that comes from the plugin.
custom?: {}
}
overrides: [...{
matcher: {
id: string | *""
options?: _
}
properties: [...{
id: string | *""
value?: _
}]
}]
}
}
}
]
]
}
#Latest: {
#Dashboard: Family.latest
#Panel: Family.latest._Panel
}

View File

@@ -8,10 +8,10 @@ package scuemata
// the larger Dashboard schema.
#PanelSchema: {
// Defines plugin specific options for a panel
PanelOptions: {...} @cuetsy(kind="interface")
PanelOptions: {...}
// Define the custom properties that exist within standard field config
PanelFieldConfig?: {...} @cuetsy(kind="interface")
PanelFieldConfig?: {...}
// Panels may define their own types
...

View File

@@ -14,7 +14,6 @@ package scuemata
// its position in the list of lineages - e.g., 0.0 corresponds to the first
// schema in the first lineage.
#Family: {
compose?: {...}
lineages: [#Lineage, ...#Lineage]
migrations: [...#Migration]
let lseq = lineages[len(lineages)-1]

93
cue/ui/gen.cue Normal file
View File

@@ -0,0 +1,93 @@
package grafanaschema
TableCellDisplayMode: {
Auto: "auto",
ColorText: "color-text",
ColorBackground: "color-background",
GradientGauge: "gradient-gauge",
LcdGauge: "lcd-gauge",
JSONView: "json-view",
BasicGauge: "basic",
Image: "image",
} @cuetsy(targetType="enum")
TableFieldOptions: {
width?: number
align: FieldTextAlignment | *"auto"
displayMode: TableCellDisplayMode | *"auto"
hidden?: bool // ?? default is missing or false ??
} @cuetsy(targetType="interface")
TableSortByFieldState: {
displayName: string
desc?: bool
} @cuetsy(targetType="interface")
TooltipDisplayMode: "single" | "multi" | "none" @cuetsy(targetType="enum")
FieldTextAlignment: "auto" | "left" | "right" | "center" @cuetsy(targetType="type")
AxisPlacement: "auto" | "top" | "right" | "bottom" | "left" | "hidden" @cuetsy(targetType="enum")
PointVisibility: "auto" | "never" | "always" @cuetsy(targetType="enum")
DrawStyle: "line" | "bars" | "points" @cuetsy(targetType="enum")
LineInterpolation: "linear" | "smooth" | "stepBefore" | "stepAfter" @cuetsy(targetType="enum")
ScaleDistribution: "linear" | "log" @cuetsy(targetType="enum")
GraphGradientMode: "none" | "opacity" | "hue" | "scheme" @cuetsy(targetType="enum")
LineStyle: {
fill?: "solid" | "dash" | "dot" | "square"
dash?: [number]
} @cuetsy(targetType="interface")
LineConfig: {
lineColor?: string
lineWidth?: number
lineInterpolation?: LineInterpolation
lineStyle?: LineStyle
spanNulls?: bool
} @cuetsy(targetType="interface")
FillConfig: {
fillColor?: string
fillOpacity?: number
fillBelowTo?: string
} @cuetsy(targetType="interface")
PointsConfig: {
showPoints?: PointVisibility
pointSize?: number
pointColor?: string
pointSymbol?: string
} @cuetsy(targetType="interface")
ScaleDistributionConfig: {
type: ScaleDistribution
log?: number
} @cuetsy(targetType="interface")
AxisConfig: {
axisPlacement?: AxisPlacement
axisLabel?: string
axisWidth?: number
axisSoftMin?: number
axisSoftMax?: number
scaleDistribution?: ScaleDistributionConfig
} @cuetsy(targetType="interface")
HideSeriesConfig: {
tooltip: bool
legend: bool
graph: bool
} @cuetsy(targetType="interface")
LegendPlacement: "bottom" | "right" @cuetsy(targetType="type")
LegendDisplayMode: "list" | "table" | "hidden" @cuetsy(targetType="enum")
TableFieldOptions: {
width?: number
align: FieldTextAlignment | *"auto"
displayMode: TableCellDisplayMode | *"auto"
hidden?: bool
} @cuetsy(targetType="interface")
GraphFieldConfig: LineConfig & FillConfig & PointsConfig & AxisConfig & {
drawStyle?: DrawStyle
gradientMode?: GraphGradientMode
hideFrom?: HideSeriesConfig
} @cuetsy(targetType="interface")
VizLegendOptions: {
displayMode: LegendDisplayMode
placement: LegendPlacement
calcs: [string]
} @cuetsy(targetType="interface")
VizTooltipOptions: {
mode: TooltipDisplayMode
} @cuetsy(targetType="interface")

View File

@@ -55,9 +55,6 @@ Jaeger block runs both Jaeger and Loki container. Loki container sends traces to
| 1.0 | graphite1 | 8280 | 2203 | 2203 |
| 0.9 | graphite09 | 8380 | 2303 | 2303 |
## Debugging setup in VS Code
An example of launch.json is provided in `devenv/vscode/launch.json`. It basically does what Makefile and .bra.toml do. The 'program' field is set to the folder name so VS Code loads all *.go files in it instead of just main.go.
## Troubleshooting
### Containers that read from log files fail to start (Mac OS)

View File

@@ -13,6 +13,7 @@
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": 3151,
"links": [],
@@ -89,7 +90,9 @@
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "CPU per host",
"tooltip": {
"shared": true,
@@ -98,24 +101,33 @@
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false
"align": false,
"alignLevel": null
}
},
{
@@ -187,7 +199,9 @@
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Login Count per host",
"tooltip": {
"shared": true,
@@ -196,24 +210,33 @@
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false
"align": false,
"alignLevel": null
}
}
],
@@ -232,4 +255,4 @@
"title": "Datasource tests - OpenTSDB v2.3",
"uid": "rZRUGik7k",
"version": 3
}
}

View File

@@ -511,6 +511,7 @@
},
"id": 41,
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "list",
@@ -612,6 +613,7 @@
},
"id": 42,
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "list",
@@ -714,6 +716,7 @@
},
"id": 32,
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "list",
@@ -816,6 +819,7 @@
},
"id": 44,
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "list",
@@ -2066,6 +2070,7 @@
"id": 29,
"maxDataPoints": 500,
"options": {
"graph": {},
"legend": {
"calcs": [
"last"

View File

@@ -13,11 +13,13 @@
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": 625,
"links": [],
"panels": [
{
"datasource": null,
"gridPos": {
"h": 4,
"w": 24,
@@ -36,10 +38,13 @@
"target": ""
}
],
"timeFrom": null,
"timeShift": null,
"transparent": true,
"type": "text"
},
{
"cacheTimeout": null,
"datasource": "gdev-testdata",
"gridPos": {
"h": 8,
@@ -102,7 +107,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -160,6 +166,7 @@
"type": "state-timeline"
},
{
"cacheTimeout": null,
"datasource": "gdev-testdata",
"gridPos": {
"h": 15,
@@ -200,7 +207,8 @@
"mode": "absolute",
"steps": [
{
"color": "blue"
"color": "blue",
"value": null
},
{
"color": "green",
@@ -259,9 +267,10 @@
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"viz": false,
"graph": false,
"legend": false,
"tooltip": false
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
@@ -284,7 +293,8 @@
"mode": "absolute",
"steps": [
{
"color": "blue"
"color": "blue",
"value": null
},
{
"color": "green",
@@ -333,6 +343,7 @@
"type": "timeseries"
},
{
"cacheTimeout": null,
"datasource": "gdev-testdata",
"gridPos": {
"h": 13,
@@ -375,7 +386,8 @@
"mode": "absolute",
"steps": [
{
"color": "blue"
"color": "blue",
"value": null
},
{
"color": "#EAB839",
@@ -461,7 +473,8 @@
"mode": "absolute",
"steps": [
{
"color": "blue"
"color": "blue",
"value": null
},
{
"color": "#EAB839",
@@ -509,6 +522,7 @@
"type": "status-history"
},
{
"cacheTimeout": null,
"datasource": "gdev-testdata",
"gridPos": {
"h": 3,
@@ -548,7 +562,7 @@
"fillOpacity": 74,
"gradientMode": "none",
"hideFrom": {
"viz": false,
"graph": false,
"legend": false,
"tooltip": false
},
@@ -559,7 +573,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -664,7 +679,7 @@
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"viz": false,
"graph": false,
"legend": false,
"tooltip": false
},
@@ -698,7 +713,8 @@
"mode": "absolute",
"steps": [
{
"color": "blue"
"color": "blue",
"value": null
}
]
},
@@ -741,6 +757,7 @@
"type": "barchart"
},
{
"cacheTimeout": null,
"datasource": "gdev-testdata",
"gridPos": {
"h": 3,
@@ -766,6 +783,7 @@
"type": "text"
},
{
"cacheTimeout": null,
"datasource": "gdev-testdata",
"gridPos": {
"h": 6,
@@ -805,7 +823,7 @@
"fillOpacity": 50,
"gradientMode": "hue",
"hideFrom": {
"viz": false,
"graph": false,
"legend": false,
"tooltip": false
},
@@ -830,7 +848,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -905,6 +924,8 @@
"stringInput": ""
}
],
"timeFrom": null,
"timeShift": null,
"title": "Interpolation mode: smooth",
"type": "timeseries"
},
@@ -923,7 +944,7 @@
"fillOpacity": 40,
"gradientMode": "hue",
"hideFrom": {
"viz": false,
"graph": false,
"legend": false,
"tooltip": false
},
@@ -948,7 +969,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -1023,6 +1045,8 @@
"stringInput": "1,20,90,30,5,0"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Interpolation mode: Step before",
"type": "timeseries"
},
@@ -1041,7 +1065,7 @@
"fillOpacity": 40,
"gradientMode": "hue",
"hideFrom": {
"viz": false,
"graph": false,
"legend": false,
"tooltip": false
},
@@ -1066,7 +1090,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -1141,10 +1166,13 @@
"stringInput": "1,20,90,30,5,0"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Interpolation mode: Step after",
"type": "timeseries"
},
{
"cacheTimeout": null,
"datasource": "gdev-testdata",
"gridPos": {
"h": 8,
@@ -1182,9 +1210,12 @@
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"gradientMode": {
"label": "None",
"value": "none"
},
"hideFrom": {
"viz": false,
"graph": false,
"legend": false,
"tooltip": false
},
@@ -1209,7 +1240,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -1229,6 +1261,7 @@
},
"id": 41,
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "list",
@@ -1267,6 +1300,8 @@
"stringInput": "10,11,12,11,10,11,12,12,11,10,9,10,11,12,10,10,11,12,13,11,10,9,10,11,12,13,14,10,10"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Auto min max",
"type": "timeseries"
},
@@ -1284,9 +1319,12 @@
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"gradientMode": {
"label": "None",
"value": "none"
},
"hideFrom": {
"viz": false,
"graph": false,
"legend": false,
"tooltip": false
},
@@ -1313,7 +1351,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -1333,6 +1372,7 @@
},
"id": 32,
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "list",
@@ -1371,6 +1411,8 @@
"stringInput": "10,11,12,11,10,11,12,12,11,10,9,10,11,12,200,10,11,12,13,11,10,9,10,11,12,13,14,10,10"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Hard min 0, max 30",
"type": "timeseries"
},
@@ -1390,9 +1432,12 @@
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"gradientMode": {
"label": "None",
"value": "none"
},
"hideFrom": {
"viz": false,
"graph": false,
"legend": false,
"tooltip": false
},
@@ -1417,7 +1462,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -1437,6 +1483,7 @@
},
"id": 44,
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "list",
@@ -1475,10 +1522,13 @@
"stringInput": "10,11,12,11,10,11,12,12,11,10,9,10,11,12,200,10,11,12,13,11,10,9,10,11,12,13,14,10,10"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Soft min 0, soft max 30",
"type": "timeseries"
},
{
"cacheTimeout": null,
"datasource": "gdev-testdata",
"gridPos": {
"h": 5,
@@ -1520,7 +1570,7 @@
"fillOpacity": 0,
"gradientMode": "opacity",
"hideFrom": {
"viz": false,
"graph": false,
"legend": false,
"tooltip": false
},
@@ -1545,7 +1595,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -1718,6 +1769,7 @@
"type": "timeseries"
},
{
"cacheTimeout": null,
"datasource": "gdev-testdata",
"gridPos": {
"h": 5,
@@ -1755,9 +1807,12 @@
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"gradientMode": {
"label": "None",
"value": "none"
},
"hideFrom": {
"viz": false,
"graph": false,
"legend": false,
"tooltip": false
},
@@ -1789,7 +1844,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -2077,9 +2133,12 @@
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"gradientMode": {
"label": "None",
"value": "none"
},
"hideFrom": {
"viz": false,
"graph": false,
"legend": false,
"tooltip": false
},
@@ -2111,7 +2170,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -2401,7 +2461,7 @@
"fillOpacity": 82,
"gradientMode": "hue",
"hideFrom": {
"viz": false,
"graph": false,
"legend": false,
"tooltip": false
},
@@ -2433,7 +2493,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -2512,6 +2573,7 @@
"type": "timeseries"
},
{
"cacheTimeout": null,
"datasource": "gdev-testdata",
"gridPos": {
"h": 3,
@@ -2547,7 +2609,7 @@
"fillOpacity": 80,
"gradientMode": "hue",
"hideFrom": {
"viz": false,
"graph": false,
"legend": false,
"tooltip": false
},
@@ -2558,7 +2620,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -2592,6 +2655,7 @@
"y": 83
},
"id": 49,
"maxDataPoints": null,
"options": {
"bucketOffset": 0,
"bucketSize": 10,
@@ -2655,7 +2719,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -2689,6 +2754,7 @@
"y": 83
},
"id": 77,
"maxDataPoints": null,
"options": {
"showHeader": true
},
@@ -2772,4 +2838,4 @@
"title": "New Features in v8.0",
"uid": "8mux8PqGz",
"version": 17
}
}

View File

@@ -19,10 +19,12 @@
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": null,
"gridPos": {
"h": 26,
"w": 6,
@@ -32,6 +34,7 @@
"id": 7,
"links": [],
"options": {
"folderId": null,
"maxItems": 100,
"query": "",
"showHeadings": true,
@@ -42,10 +45,13 @@
},
"pluginVersion": "8.1.0-pre",
"tags": [],
"timeFrom": null,
"timeShift": null,
"title": "Starred",
"type": "dashlist"
},
{
"datasource": null,
"gridPos": {
"h": 13,
"w": 6,
@@ -69,10 +75,13 @@
"tags": [
"panel-tests"
],
"timeFrom": null,
"timeShift": null,
"title": "tag: panel-tests",
"type": "dashlist"
},
{
"datasource": null,
"gridPos": {
"h": 13,
"w": 6,
@@ -82,6 +91,7 @@
"id": 3,
"links": [],
"options": {
"folderId": null,
"maxItems": 1000,
"query": "",
"showHeadings": false,
@@ -98,10 +108,13 @@
"gdev",
"demo"
],
"timeFrom": null,
"timeShift": null,
"title": "tag: dashboard-demo",
"type": "dashlist"
},
{
"datasource": null,
"gridPos": {
"h": 26,
"w": 6,
@@ -111,6 +124,7 @@
"id": 5,
"links": [],
"options": {
"folderId": null,
"maxItems": 1000,
"query": "",
"showHeadings": false,
@@ -127,10 +141,13 @@
"gdev",
"datasource-test"
],
"timeFrom": null,
"timeShift": null,
"title": "Data source tests",
"type": "dashlist"
},
{
"datasource": null,
"gridPos": {
"h": 13,
"w": 6,
@@ -156,10 +173,13 @@
"templating",
"gdev"
],
"timeFrom": null,
"timeShift": null,
"title": "tag: templating ",
"type": "dashlist"
},
{
"datasource": null,
"gridPos": {
"h": 13,
"w": 6,
@@ -185,6 +205,8 @@
"gdev",
"demo"
],
"timeFrom": null,
"timeShift": null,
"title": "tag: transforms",
"type": "dashlist"
}
@@ -228,4 +250,4 @@
"title": "Grafana Dev Overview & Home",
"uid": "j6T00KRZz",
"version": 2
}
}

View File

@@ -19,10 +19,12 @@
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
@@ -35,6 +37,7 @@
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false,
"viz": false
@@ -46,7 +49,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -76,7 +80,6 @@
},
"orientation": "auto",
"showValue": "auto",
"stacking": "none",
"text": {},
"tooltip": {
"mode": "single"
@@ -84,7 +87,7 @@
},
"targets": [
{
"csvContent": "Time,Name,Stat1,Stat2\n2020-01-01T00:00:00Z,Stockholm, 10, 15\n2020-01-01T00:00:00Z,New York, 19, 5\n2020-01-01T00:00:00Z,London, 10, 1\n2020-01-01T00:00:00Z,Negative, 15, -5\n2020-01-01T00:00:00Z,Long value, 15,10",
"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"
}
@@ -93,6 +96,7 @@
"type": "barchart"
},
{
"datasource": null,
"description": "Should be smaller given the longer value",
"fieldConfig": {
"defaults": {
@@ -106,6 +110,7 @@
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false,
"viz": false
@@ -118,7 +123,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -148,7 +154,6 @@
},
"orientation": "auto",
"showValue": "auto",
"stacking": "none",
"text": {},
"tooltip": {
"mode": "single"
@@ -165,6 +170,7 @@
"type": "barchart"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
@@ -177,6 +183,7 @@
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false,
"viz": false
@@ -188,7 +195,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -218,7 +226,6 @@
},
"orientation": "auto",
"showValue": "auto",
"stacking": "none",
"text": {},
"tooltip": {
"mode": "single"
@@ -235,6 +242,7 @@
"type": "barchart"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
@@ -247,6 +255,7 @@
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false,
"viz": false
@@ -258,7 +267,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -288,7 +298,6 @@
},
"orientation": "auto",
"showValue": "always",
"stacking": "none",
"text": {},
"tooltip": {
"mode": "single"
@@ -318,6 +327,7 @@
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false,
"viz": false
@@ -329,7 +339,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -357,9 +368,8 @@
},
"orientation": "auto",
"showValue": "auto",
"stacking": "none",
"text": {
"titleSize": 10,
"size": 10,
"valueSize": 25
},
"tooltip": {
@@ -376,6 +386,7 @@
"type": "barchart"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
@@ -388,6 +399,7 @@
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false,
"viz": false
@@ -400,7 +412,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -430,7 +443,6 @@
},
"orientation": "horizontal",
"showValue": "auto",
"stacking": "none",
"text": {},
"tooltip": {
"mode": "single"
@@ -447,6 +459,7 @@
"type": "barchart"
},
{
"datasource": null,
"description": "",
"fieldConfig": {
"defaults": {
@@ -460,6 +473,7 @@
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false,
"viz": false
@@ -471,7 +485,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -501,7 +516,6 @@
},
"orientation": "horizontal",
"showValue": "auto",
"stacking": "none",
"text": {},
"tooltip": {
"mode": "single"
@@ -538,4 +552,4 @@
"title": "BarChart - Panel Tests - Value sizing",
"uid": "WFlOM-jM1",
"version": 9
}
}

View File

@@ -1,395 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"editable": true,
"graphTooltip": 0,
"links": [],
"liveNow": false,
"panels": [
{
"fieldConfig": {
"defaults": {
"color": {
"mode": "continuous-GrYlRd"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 11,
"w": 9,
"x": 0,
"y": 0
},
"id": 62,
"options": {
"basemap": {
"config": {},
"type": "default"
},
"controls": {
"mouseWheelZoom": true,
"showAttribution": true,
"showDebug": false,
"showScale": false,
"showZoom": true
},
"layers": [
{
"config": {
"color": {
"field": "Price",
"fixed": "dark-green"
},
"fillOpacity": 0.4,
"shape": "circle",
"showLegend": true,
"size": {
"field": "Count",
"fixed": 5,
"max": 15,
"min": 2
}
},
"location": {
"gazetteer": "public/gazetteer/usa-states.json",
"lookup": "State",
"mode": "auto"
},
"type": "markers"
}
],
"view": {
"id": "coords",
"lat": 38.297683,
"lon": -99.228359,
"shared": true,
"zoom": 3.98
}
},
"targets": [
{
"csvFileName": "flight_info_by_state.csv",
"refId": "A",
"scenarioId": "csv_file"
}
],
"title": "Size, color mapped to different fields + share view",
"type": "geomap"
},
{
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
},
{
"color": "#EAB839",
"value": 90
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 11,
"w": 9,
"x": 9,
"y": 0
},
"id": 66,
"options": {
"basemap": {
"config": {},
"type": "default"
},
"controls": {
"mouseWheelZoom": true,
"showAttribution": true,
"showDebug": false,
"showScale": false,
"showZoom": true
},
"layers": [
{
"config": {
"color": {
"field": "Price",
"fixed": "dark-green"
},
"fillOpacity": 0.4,
"shape": "circle",
"showLegend": true,
"size": {
"field": "Count",
"fixed": 5,
"max": 15,
"min": 2
}
},
"location": {
"gazetteer": "public/gazetteer/usa-states.json",
"lookup": "State",
"mode": "auto"
},
"type": "markers"
}
],
"view": {
"id": "coords",
"lat": 38.297683,
"lon": -99.228359,
"shared": true,
"zoom": 3.98
}
},
"targets": [
{
"csvFileName": "flight_info_by_state.csv",
"refId": "A",
"scenarioId": "csv_file"
}
],
"title": "Thresholds legend",
"type": "geomap"
},
{
"fieldConfig": {
"defaults": {
"color": {
"mode": "continuous-BlYlRd"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 11,
"w": 9,
"x": 0,
"y": 11
},
"id": 63,
"options": {
"basemap": {
"config": {},
"type": "default"
},
"controls": {
"mouseWheelZoom": true,
"showAttribution": true,
"showDebug": false,
"showScale": false,
"showZoom": true
},
"layers": [
{
"config": {
"blur": 27,
"radius": 25,
"weight": {
"field": "Count",
"fixed": 1,
"max": 1,
"min": 0
}
},
"location": {
"gazetteer": "public/gazetteer/usa-states.json",
"lookup": "State",
"mode": "auto"
},
"type": "heatmap"
}
],
"view": {
"id": "coords",
"lat": 38.251497,
"lon": -100.932144,
"shared": false,
"zoom": 4.15
}
},
"targets": [
{
"csvFileName": "flight_info_by_state.csv",
"refId": "A",
"scenarioId": "csv_file"
}
],
"title": "Heatmap data layer",
"transformations": [],
"type": "geomap"
},
{
"fieldConfig": {
"defaults": {
"color": {
"mode": "continuous-GrYlRd"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 11,
"w": 9,
"x": 9,
"y": 11
},
"id": 65,
"options": {
"basemap": {
"config": {
"server": "world-imagery"
},
"type": "esri-xyz"
},
"controls": {
"mouseWheelZoom": true,
"showAttribution": true,
"showDebug": false,
"showScale": false,
"showZoom": true
},
"layers": [
{
"config": {
"color": {
"fixed": "#ff001e"
},
"fillOpacity": 0.4,
"shape": "star",
"showLegend": true,
"size": {
"field": "Count",
"fixed": 5,
"max": 15,
"min": 2
}
},
"location": {
"gazetteer": "public/gazetteer/usa-states.json",
"lookup": "State",
"mode": "auto"
},
"type": "markers"
}
],
"view": {
"id": "coords",
"lat": 40.159084,
"lon": -96.508021,
"shared": true,
"zoom": 3.83
}
},
"targets": [
{
"csvFileName": "flight_info_by_state.csv",
"refId": "A",
"scenarioId": "csv_file"
}
],
"title": "Base layer ArcGIS wold imagery + star shape + share view",
"type": "geomap"
}
],
"refresh": "",
"schemaVersion": 30,
"style": "dark",
"tags": [
"gdev",
"panel-tests"
],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
]
},
"timezone": "",
"title": "Panel Tests - Geomap",
"uid": "2xuwrgV7z",
"version": 5
}

View File

@@ -19,10 +19,12 @@
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": null,
"description": "",
"fieldConfig": {
"defaults": {
@@ -64,7 +66,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "orange",
@@ -109,6 +112,7 @@
"type": "timeseries"
},
{
"datasource": null,
"description": "",
"fieldConfig": {
"defaults": {
@@ -150,7 +154,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "orange",
@@ -195,6 +200,7 @@
"type": "timeseries"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
@@ -235,7 +241,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "orange",
@@ -321,7 +328,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "orange",
@@ -365,6 +373,7 @@
"type": "timeseries"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
@@ -405,7 +414,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "orange",
@@ -451,6 +461,7 @@
"startValue": 1
}
],
"timeFrom": null,
"title": "Color bars by discrete thresholds",
"type": "timeseries"
},
@@ -496,7 +507,8 @@
"mode": "absolute",
"steps": [
{
"color": "blue"
"color": "blue",
"value": null
},
{
"color": "green",
@@ -585,7 +597,8 @@
"mode": "absolute",
"steps": [
{
"color": "blue"
"color": "blue",
"value": null
},
{
"color": "green",
@@ -674,7 +687,8 @@
"mode": "absolute",
"steps": [
{
"color": "blue"
"color": "blue",
"value": null
},
{
"color": "green",
@@ -722,6 +736,7 @@
"type": "timeseries"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
@@ -762,7 +777,8 @@
"mode": "absolute",
"steps": [
{
"color": "blue"
"color": "blue",
"value": null
},
{
"color": "green",
@@ -843,4 +859,4 @@
"title": "Panel Tests - Graph NG - By value color schemes",
"uid": "aBXrJ0R7z",
"version": 11
}
}

View File

@@ -92,6 +92,7 @@
"interval": "1m",
"links": [],
"options": {
"graph": {},
"legend": {
"displayMode": "hidden",
"placement": "bottom"
@@ -180,6 +181,7 @@
"links": [],
"maxDataPoints": 10,
"options": {
"graph": {},
"legend": {
"displayMode": "hidden",
"placement": "bottom"
@@ -268,6 +270,7 @@
"links": [],
"maxDataPoints": 20,
"options": {
"graph": {},
"legend": {
"displayMode": "hidden",
"placement": "bottom"
@@ -355,6 +358,7 @@
"interval": "1m",
"links": [],
"options": {
"graph": {},
"legend": {
"displayMode": "hidden",
"placement": "bottom"
@@ -443,6 +447,7 @@
"links": [],
"maxDataPoints": 80,
"options": {
"graph": {},
"legend": {
"displayMode": "hidden",
"placement": "bottom"
@@ -531,6 +536,7 @@
"links": [],
"maxDataPoints": 50,
"options": {
"graph": {},
"legend": {
"displayMode": "hidden",
"placement": "bottom"

View File

@@ -99,6 +99,7 @@
"links": [],
"maxDataPoints": 9,
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "hidden",
@@ -193,6 +194,7 @@
"links": [],
"maxDataPoints": 9,
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "hidden",
@@ -287,6 +289,7 @@
"links": [],
"maxDataPoints": 9,
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "hidden",
@@ -381,6 +384,7 @@
"links": [],
"maxDataPoints": 9,
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "hidden",
@@ -475,6 +479,7 @@
"links": [],
"maxDataPoints": 9,
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "hidden",
@@ -569,6 +574,7 @@
"links": [],
"maxDataPoints": 9,
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "hidden",
@@ -663,6 +669,7 @@
"links": [],
"maxDataPoints": 100,
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "hidden",
@@ -757,6 +764,7 @@
"links": [],
"maxDataPoints": 100,
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "hidden",
@@ -851,6 +859,7 @@
"links": [],
"maxDataPoints": 100,
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "hidden",

View File

@@ -8,17 +8,12 @@
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"links": [
{
@@ -48,6 +43,7 @@
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false,
"viz": false
@@ -73,7 +69,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -94,6 +91,7 @@
"id": 3,
"links": [],
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "list",
@@ -134,6 +132,8 @@
"target": ""
}
],
"timeFrom": null,
"timeShift": null,
"title": "Show gaps",
"type": "timeseries"
},
@@ -153,6 +153,7 @@
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false,
"viz": false
@@ -179,7 +180,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -200,6 +202,7 @@
"id": 2,
"links": [],
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "list",
@@ -248,6 +251,8 @@
"target": ""
}
],
"timeFrom": null,
"timeShift": null,
"title": "Gaps & null between every point for series B",
"type": "timeseries"
},
@@ -267,6 +272,7 @@
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false,
"viz": false
@@ -293,7 +299,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -314,6 +321,7 @@
"id": 6,
"links": [],
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "list",
@@ -382,6 +390,8 @@
"target": ""
}
],
"timeFrom": null,
"timeShift": null,
"title": "No nulls but unaligned series",
"type": "timeseries"
},
@@ -400,6 +410,7 @@
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false,
"viz": false
@@ -425,7 +436,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -446,6 +458,7 @@
"id": 4,
"links": [],
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "list",
@@ -486,6 +499,8 @@
"target": ""
}
],
"timeFrom": null,
"timeShift": null,
"title": "Connected",
"type": "timeseries"
},
@@ -505,6 +520,7 @@
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false,
"viz": false
@@ -531,7 +547,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -552,6 +569,7 @@
"id": 5,
"links": [],
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "list",
@@ -600,6 +618,8 @@
"target": ""
}
],
"timeFrom": null,
"timeShift": null,
"title": "Same as above but connected",
"type": "timeseries"
},
@@ -619,6 +639,7 @@
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false,
"viz": false
@@ -645,7 +666,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -666,6 +688,7 @@
"id": 7,
"links": [],
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "list",
@@ -734,6 +757,8 @@
"target": ""
}
],
"timeFrom": null,
"timeShift": null,
"title": "Same as above but connected",
"type": "timeseries"
},
@@ -752,6 +777,7 @@
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false,
"viz": false
@@ -777,7 +803,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -828,6 +855,9 @@
},
"id": 11,
"options": {
"graph": {
"realTimeUpdates": false
},
"legend": {
"asTable": false,
"calcs": [],
@@ -873,6 +903,8 @@
"stringInput": "1,20,90,30,5,0"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Null values in first series & show gaps ",
"transformations": [],
"type": "timeseries"
@@ -892,6 +924,7 @@
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false,
"viz": false
@@ -917,7 +950,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -968,6 +1002,9 @@
},
"id": 9,
"options": {
"graph": {
"realTimeUpdates": false
},
"legend": {
"asTable": false,
"calcs": [],
@@ -1013,11 +1050,14 @@
"stringInput": "10,25,null,null,50,10"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Null values in second series show gaps (bugged)",
"transformations": [],
"type": "timeseries"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
@@ -1031,6 +1071,7 @@
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false,
"viz": false
@@ -1056,7 +1097,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -1076,6 +1118,7 @@
},
"id": 13,
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "list",
@@ -1114,10 +1157,13 @@
"stringInput": "1,20,90,null,30,5,0"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Span nulls below 1hr",
"type": "timeseries"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
@@ -1159,7 +1205,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -1216,5 +1263,5 @@
"timezone": "",
"title": "Panel Tests - Graph NG - Gaps and Connected",
"uid": "8mmCAF1Mz",
"version": 2
}
"version": 12
}

View File

@@ -80,6 +80,7 @@
"id": 2,
"maxDataPoints": 50,
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "hidden",
@@ -150,6 +151,7 @@
"id": 3,
"maxDataPoints": 50,
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "hidden",
@@ -220,6 +222,7 @@
"id": 4,
"maxDataPoints": 50,
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "hidden",
@@ -290,6 +293,7 @@
"id": 5,
"maxDataPoints": 50,
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "hidden",
@@ -360,6 +364,7 @@
"id": 6,
"maxDataPoints": 50,
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "hidden",
@@ -430,6 +435,7 @@
"id": 7,
"maxDataPoints": 50,
"options": {
"graph": {},
"legend": {
"calcs": [],
"displayMode": "hidden",

View File

@@ -113,6 +113,9 @@
"id": 47,
"maxDataPoints": 500,
"options": {
"graph": {
"realTimeUpdates": false
},
"legend": {
"asTable": false,
"displayMode": "hidden",
@@ -234,6 +237,9 @@
"id": 48,
"maxDataPoints": 20,
"options": {
"graph": {
"realTimeUpdates": false
},
"legend": {
"asTable": false,
"displayMode": "hidden",
@@ -355,6 +361,9 @@
"id": 55,
"maxDataPoints": 20,
"options": {
"graph": {
"realTimeUpdates": false
},
"legend": {
"asTable": false,
"displayMode": "hidden",
@@ -476,6 +485,9 @@
"id": 56,
"maxDataPoints": 90,
"options": {
"graph": {
"realTimeUpdates": false
},
"legend": {
"asTable": false,
"displayMode": "hidden",
@@ -597,6 +609,9 @@
"id": 52,
"maxDataPoints": 10,
"options": {
"graph": {
"realTimeUpdates": false
},
"legend": {
"asTable": false,
"displayMode": "hidden",
@@ -718,6 +733,9 @@
"id": 53,
"maxDataPoints": 10,
"options": {
"graph": {
"realTimeUpdates": false
},
"legend": {
"asTable": false,
"displayMode": "hidden",
@@ -839,6 +857,9 @@
"id": 54,
"maxDataPoints": 10,
"options": {
"graph": {
"realTimeUpdates": false
},
"legend": {
"asTable": false,
"displayMode": "hidden",
@@ -960,6 +981,9 @@
"id": 57,
"maxDataPoints": 10,
"options": {
"graph": {
"realTimeUpdates": false
},
"legend": {
"asTable": false,
"displayMode": "hidden",
@@ -1160,6 +1184,9 @@
},
"id": 60,
"options": {
"graph": {
"realTimeUpdates": false
},
"legend": {
"asTable": false,
"displayMode": "hidden",
@@ -1441,6 +1468,7 @@
"interval": null,
"maxDataPoints": 100,
"options": {
"graph": {},
"legend": {
"displayMode": "list",
"placement": "right"
@@ -1571,6 +1599,9 @@
"id": 63,
"maxDataPoints": 10,
"options": {
"graph": {
"realTimeUpdates": false
},
"legend": {
"asTable": false,
"displayMode": "hidden",
@@ -1706,6 +1737,9 @@
"id": 64,
"maxDataPoints": 10,
"options": {
"graph": {
"realTimeUpdates": false
},
"legend": {
"asTable": false,
"displayMode": "hidden",
@@ -1841,6 +1875,9 @@
"id": 65,
"maxDataPoints": 10,
"options": {
"graph": {
"realTimeUpdates": false
},
"legend": {
"asTable": false,
"displayMode": "hidden",
@@ -1976,6 +2013,9 @@
"id": 66,
"maxDataPoints": 100,
"options": {
"graph": {
"realTimeUpdates": false
},
"legend": {
"asTable": false,
"displayMode": "hidden",
@@ -2139,6 +2179,9 @@
"id": 32,
"maxDataPoints": 100,
"options": {
"graph": {
"realTimeUpdates": false
},
"legend": {
"asTable": false,
"displayMode": "list",
@@ -2276,6 +2319,9 @@
"id": 35,
"maxDataPoints": 100,
"options": {
"graph": {
"realTimeUpdates": false
},
"legend": {
"asTable": false,
"displayMode": "list",
@@ -2427,6 +2473,9 @@
"id": 31,
"maxDataPoints": 200,
"options": {
"graph": {
"realTimeUpdates": false
},
"legend": {
"asTable": true,
"displayMode": "table",
@@ -2577,6 +2626,9 @@
"id": 51,
"maxDataPoints": 200,
"options": {
"graph": {
"realTimeUpdates": false
},
"legend": {
"asTable": true,
"displayMode": "table",
@@ -2716,6 +2768,9 @@
},
"id": 19,
"options": {
"graph": {
"realTimeUpdates": false
},
"legend": {
"asTable": false,
"displayMode": "hidden",
@@ -2821,6 +2876,9 @@
},
"id": 20,
"options": {
"graph": {
"realTimeUpdates": false
},
"legend": {
"asTable": false,
"displayMode": "hidden",
@@ -2925,6 +2983,9 @@
},
"id": 21,
"options": {
"graph": {
"realTimeUpdates": false
},
"legend": {
"asTable": false,
"displayMode": "hidden",
@@ -3030,6 +3091,9 @@
},
"id": 9,
"options": {
"graph": {
"realTimeUpdates": false
},
"legend": {
"asTable": false,
"displayMode": "hidden",
@@ -3151,6 +3215,9 @@
},
"id": 46,
"options": {
"graph": {
"realTimeUpdates": false
},
"legend": {
"asTable": false,
"displayMode": "list",
@@ -3291,6 +3358,7 @@
},
"id": 68,
"options": {
"graph": {},
"legend": {
"displayMode": "hidden",
"placement": "bottom"

View File

@@ -13,11 +13,13 @@
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": 632,
"links": [],
"panels": [
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
@@ -27,7 +29,7 @@
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"viz": false,
"graph": false,
"legend": false,
"tooltip": false
},
@@ -38,7 +40,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -86,7 +89,7 @@
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"viz": false,
"graph": false,
"legend": false,
"tooltip": false
},
@@ -97,7 +100,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -135,6 +139,7 @@
"type": "histogram"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
@@ -144,7 +149,7 @@
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"viz": false,
"graph": false,
"legend": false,
"tooltip": false
},
@@ -155,7 +160,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -206,6 +212,7 @@
"type": "histogram"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
@@ -215,7 +222,7 @@
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"viz": false,
"graph": false,
"legend": false,
"tooltip": false
},
@@ -226,7 +233,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -277,6 +285,7 @@
"type": "histogram"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
@@ -291,7 +300,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -343,6 +353,7 @@
"type": "table"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
@@ -357,7 +368,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -427,4 +439,4 @@
"title": "Panel Tests - Histogram",
"uid": "UTv--wqMk",
"version": 4
}
}

View File

@@ -8,21 +8,17 @@
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
@@ -59,7 +55,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -85,12 +82,9 @@
"displayMode": "list",
"placement": "bottom"
},
"mergeValues": true,
"mode": "changes",
"rowHeight": 0.98,
"showValue": "always",
"tooltip": {
"mode": "single"
}
"showValue": "always"
},
"pluginVersion": "7.5.0-pre",
"targets": [
@@ -119,6 +113,7 @@
"type": "state-timeline"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
@@ -156,7 +151,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -177,17 +173,9 @@
"options": {
"alignValue": "center",
"colWidth": 1,
"legend": {
"displayMode": "list",
"placement": "bottom"
},
"mergeValues": true,
"mode": "changes",
"rowHeight": 0.98,
"showValue": "always",
"tooltip": {
"mode": "single"
}
"showValue": "always"
},
"targets": [
{
@@ -219,6 +207,7 @@
"type": "state-timeline"
},
{
"datasource": null,
"description": "Should show gaps",
"fieldConfig": {
"defaults": {
@@ -257,7 +246,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -278,17 +268,9 @@
"options": {
"alignValue": "center",
"colWidth": 1,
"legend": {
"displayMode": "list",
"placement": "bottom"
},
"mergeValues": true,
"mode": "changes",
"rowHeight": 0.98,
"showValue": "always",
"tooltip": {
"mode": "single"
}
"showValue": "always"
},
"targets": [
{
@@ -319,6 +301,7 @@
"type": "state-timeline"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
@@ -336,7 +319,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -355,6 +339,7 @@
"y": 19
},
"id": 4,
"interval": null,
"maxDataPoints": 20,
"options": {
"alignValue": "center",
@@ -364,11 +349,9 @@
"displayMode": "list",
"placement": "bottom"
},
"mode": "samples",
"rowHeight": 0.98,
"showValue": "always",
"tooltip": {
"mode": "single"
}
"showValue": "always"
},
"pluginVersion": "7.5.0-pre",
"targets": [
@@ -427,5 +410,5 @@
"timezone": "utc",
"title": "Timeline Demo",
"uid": "mIJjFy8Kz",
"version": 3
}
"version": 13
}

View File

@@ -8,22 +8,18 @@
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": 329,
"links": [],
"panels": [
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
@@ -38,7 +34,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -66,10 +63,7 @@
},
"mergeValues": true,
"rowHeight": 0.9,
"showValue": "always",
"tooltip": {
"mode": "single"
}
"showValue": "always"
},
"pluginVersion": "7.5.0-pre",
"targets": [
@@ -171,6 +165,7 @@
1616557148000
],
[
null,
1616558756000
],
[
@@ -178,6 +173,7 @@
1616561658000
],
[
null,
1616562446000
],
[
@@ -185,6 +181,7 @@
1616564104000
],
[
null,
1616564548000
],
[
@@ -200,6 +197,7 @@
"type": "state-timeline"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
@@ -214,7 +212,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -242,10 +241,7 @@
},
"mergeValues": true,
"rowHeight": 0.9,
"showValue": "always",
"tooltip": {
"mode": "single"
}
"showValue": "always"
},
"pluginVersion": "7.5.0-pre",
"targets": [
@@ -271,6 +267,7 @@
"type": "state-timeline"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
@@ -285,7 +282,8 @@
"mode": "percentage",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "#EAB839",
@@ -308,6 +306,7 @@
"y": 21
},
"id": 4,
"interval": null,
"maxDataPoints": 20,
"options": {
"colWidth": 0.9,
@@ -317,10 +316,7 @@
"placement": "bottom"
},
"rowHeight": 0.9,
"showValue": "always",
"tooltip": {
"mode": "single"
}
"showValue": "always"
},
"pluginVersion": "7.5.0-pre",
"targets": [
@@ -375,5 +371,5 @@
"timezone": "utc",
"title": "Timeline Modes",
"uid": "mIJjFy8Gz",
"version": 13
"version": 12
}

View File

@@ -20,10 +20,12 @@
},
"description": "",
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
@@ -49,6 +51,10 @@
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "line"
}
@@ -58,7 +64,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -115,6 +122,7 @@
"type": "timeseries"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
@@ -129,7 +137,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -200,6 +209,7 @@
"type": "table"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
@@ -214,7 +224,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -280,6 +291,7 @@
"type": "table"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
@@ -294,7 +306,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -364,6 +377,7 @@
"type": "table"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
@@ -378,7 +392,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -431,6 +446,7 @@
"type": "table"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
@@ -454,7 +470,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -548,4 +565,4 @@
"title": "Transforms - Config from query",
"uid": "Juj4_7ink",
"version": 1
}
}

View File

@@ -19,6 +19,7 @@
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"links": [],
"panels": [
@@ -38,7 +39,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -85,7 +87,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -143,6 +146,7 @@
"type": "table"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
@@ -153,7 +157,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -204,6 +209,7 @@
"type": "stat"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
@@ -215,7 +221,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -279,7 +286,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -326,7 +334,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -384,6 +393,7 @@
"type": "table"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
@@ -394,7 +404,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -443,6 +454,7 @@
"type": "bargauge"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
@@ -454,7 +466,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
}
]
}
@@ -517,6 +530,7 @@
"type": "gauge"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
@@ -527,7 +541,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -597,4 +612,4 @@
"title": "Transforms - Rows to fields",
"uid": "PMtIInink",
"version": 1
}
}

View File

@@ -24,12 +24,12 @@
- influxdb
telegraf:
image: telegraf:latest
image: telegraf:1.19.1
links:
- influxdb
depends_on:
- influxdb_cli
volumes:
- ./docker/blocks/influxdb/telegraf.conf:/etc/telegraf/telegraf.conf:ro
- /var/log:/var/log/host
- /var/log:/var/log
- ../data/log:/var/log/grafana

View File

@@ -44,7 +44,7 @@
[[inputs.logparser]]
files = [
"/var/log/host/*.log",
"/var/log/*.log",
"/var/log/grafana/*.log"
]
[inputs.logparser.grok]

View File

@@ -1,5 +1,5 @@
influxdb1:
image: influxdb:1.8
image: influxdb:1.8.6
container_name: influxdb1
ports:
- '2004:2004'
@@ -22,11 +22,11 @@
FD_PORT: 8086
telegraf-influxdb1:
image: telegraf:latest
image: telegraf:1.19.1
links:
- influxdb1
volumes:
- ./docker/blocks/influxdb1/telegraf.conf:/etc/telegraf/telegraf.conf:ro
- /var/log:/var/log/host
- /var/log:/var/log
- ../data/log:/var/log/grafana

View File

@@ -52,7 +52,7 @@
[[inputs.logparser]]
files = [
"/var/log/host/*.log",
"/var/log/*.log",
"/var/log/grafana/*.log"
]
[inputs.logparser.grok]

View File

@@ -1,11 +1,11 @@
# datasource URL: http://localhost:3100/
loki:
image: grafana/loki:latest
image: grafana/loki:master
ports:
- "3100:3100"
command: -config.file=/etc/loki/local-config.yaml
promtail:
image: grafana/promtail:latest
image: grafana/promtail:master
volumes:
- ./docker/blocks/loki/config.yaml:/etc/promtail/docker-config.yaml
- /var/log:/var/log

View File

@@ -1,13 +1,18 @@
# This Dockerfile builds an image for a client_golang example.
# Builder image, where we build the example.
FROM golang:1.17 AS builder
FROM golang:1.15.1 AS builder
# Download prometheus/client_golang/examples/random first
RUN CGO_ENABLED=0 GOOS=linux go install -tags netgo -ldflags '-w' github.com/prometheus/client_golang/examples/random@latest
RUN go get github.com/prometheus/client_golang/examples/random
WORKDIR /go/src/github.com/prometheus/client_golang
WORKDIR /go/src/github.com/prometheus/client_golang/prometheus
RUN go get -d
WORKDIR /go/src/github.com/prometheus/client_golang/examples/random
RUN CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags '-w'
# Final image.
FROM scratch
LABEL maintainer "The Prometheus Authors <prometheus-developers@googlegroups.com>"
COPY --from=builder /go/bin/random .
COPY --from=builder /go/src/github.com/prometheus/client_golang/examples/random .
EXPOSE 8080
ENTRYPOINT ["/random"]

View File

@@ -1 +0,0 @@
grafana/provisioning/dashboards/alerts/alert-*

View File

@@ -1,66 +0,0 @@
# Grafana Unified Alerting High Availability (HA) test setup
A set of docker compose services which together creates a Grafana HA test setup for unified alerting.
Included services
- Grafana
- Mysql - Grafana configuration database, exporter for metrics and session storage
- Prometheus - Monitoring of Grafana and used as data source
- Nginx - Reverse proxy for Grafana and Prometheus. Enables browsing Grafana/Prometheus UI using a hostname
## Prerequisites
### Build grafana docker container
Build a Grafana docker container from current branch and commit and tag it as grafana/grafana:dev.
```bash
$ cd <grafana repo>
$ make build-docker-full
```
### Virtual host names
#### Alternative 1 - Use dnsmasq
```bash
$ sudo apt-get install dnsmasq
$ echo 'address=/loc/127.0.0.1' | sudo tee /etc/dnsmasq.d/dnsmasq-loc.conf > /dev/null
$ sudo /etc/init.d/dnsmasq restart
$ ping whatever.loc
PING whatever.loc (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.076 ms
--- whatever.loc ping statistics ---
1 packet transmitted, 1 received, 0% packet loss, time 1998ms
```
#### Alternative 2 - Manually update /etc/hosts
Update your `/etc/hosts` to be able to access Grafana and/or Prometheus UI using a hostname.
```bash
$ cat /etc/hosts
127.0.0.1 grafana.loc
127.0.0.1 prometheus.loc
```
## Start services
```bash
$ docker-compose up -d
```
Browse
- http://grafana.loc/
- http://prometheus.loc/
## Test alerting
### Create contact points
TBD
### Create alerts
TBD
### Create silences
TBD

View File

@@ -1,90 +0,0 @@
version: "2.1"
services:
db:
image: mysql:5.6
platform: linux/x86_64
environment:
MYSQL_ROOT_PASSWORD: rootpass
MYSQL_DATABASE: grafana
MYSQL_USER: grafana
MYSQL_PASSWORD: password
command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci, --innodb_monitor_enable=all, --max-connections=1001]
ports:
- 3306
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 10s
retries: 10
mysqld-exporter:
image: prom/mysqld-exporter
environment:
- DATA_SOURCE_NAME=root:rootpass@(db:3306)/
ports:
- 9104
depends_on:
db:
condition: service_healthy
prometheus:
image: prom/prometheus:v2.4.2
volumes:
- ./prometheus/:/etc/prometheus/
environment:
- VIRTUAL_HOST=prometheus.loc
ports:
- 909
nginx-proxy:
image: jwilder/nginx-proxy
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
depends_on:
db:
condition: service_healthy
grafana1:
image: grafana/grafana:dev
volumes:
- ./grafana/provisioning/:/etc/grafana/provisioning/
environment:
- VIRTUAL_HOST=grafana.loc
- GF_FEATURE_TOGGLES_ENABLE=ngalert
- GF_UNIFIED_ALERTING_HA_PEERS=ha-test-unified-alerting_grafana2_1:9094,ha-test-unified-alerting_grafana1_1:9094
- GF_SERVER_ROOT_URL=http://grafana.loc
- GF_DATABASE_NAME=grafana
- GF_DATABASE_USER=grafana
- GF_DATABASE_PASSWORD=password
- GF_DATABASE_TYPE=mysql
- GF_DATABASE_HOST=db:3306
- GF_DATABASE_MAX_OPEN_CONN=300
- GF_SESSION_PROVIDER=mysql
- GF_SESSION_PROVIDER_CONFIG=grafana:password@tcp(db:3306)/grafana?allowNativePasswords=true
ports:
- 3010:3000
depends_on:
db:
condition: service_healthy
grafana2:
image: grafana/grafana:dev
volumes:
- ./grafana/provisioning/:/etc/grafana/provisioning/
environment:
- VIRTUAL_HOST=grafana.loc
- GF_FEATURE_TOGGLES_ENABLE=ngalert
- GF_UNIFIED_ALERTING_HA_PEERS=ha-test-unified-alerting_grafana2_1:9094,ha-test-unified-alerting_grafana1_1:9094
- GF_SERVER_ROOT_URL=http://grafana.loc
- GF_DATABASE_NAME=grafana
- GF_DATABASE_USER=grafana
- GF_DATABASE_PASSWORD=password
- GF_DATABASE_TYPE=mysql
- GF_DATABASE_HOST=db:3306
- GF_DATABASE_MAX_OPEN_CONN=300
- GF_SESSION_PROVIDER=mysql
- GF_SESSION_PROVIDER_CONFIG=grafana:password@tcp(db:3306)/grafana?allowNativePasswords=true
ports:
- 3020:3000
depends_on:
db:
condition: service_healthy

View File

@@ -1,203 +0,0 @@
local numAlerts = std.extVar('alerts');
local condition = std.extVar('condition');
local arr = std.range(1, numAlerts);
local alertDashboardTemplate = {
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": null,
"links": [],
"panels": [
{
"alert": {
"conditions": [
{
"evaluator": {
"params": [
65
],
"type": "gt"
},
"operator": {
"type": "and"
},
"query": {
"params": [
"A",
"5m",
"now"
]
},
"reducer": {
"params": [],
"type": "avg"
},
"type": "query"
}
],
"executionErrorState": "alerting",
"frequency": "10s",
"handler": 1,
"for": "1m",
"name": "bulk alerting",
"noDataState": "no_data",
"notifications": [
{
"id": 2
}
]
},
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "Prometheus",
"fill": 1,
"gridPos": {
"h": 9,
"w": 12,
"x": 0,
"y": 0
},
"id": 2,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"$$hashKey": "object:117",
"expr": "go_goroutines",
"format": "time_series",
"intervalFactor": 1,
"refId": "A"
}
],
"thresholds": [
{
"colorMode": "critical",
"fill": true,
"line": true,
"op": "gt",
"value": 50
}
],
"timeFrom": null,
"timeShift": null,
"title": "Panel Title",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
}
],
"schemaVersion": 16,
"style": "dark",
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "",
"title": "New dashboard",
"uid": null,
"version": 0
};
{
['alert-' + std.toString(x) + '.json']:
alertDashboardTemplate + {
panels: [
alertDashboardTemplate.panels[0] +
{
alert+: {
name: 'Alert rule ' + x,
conditions: [
alertDashboardTemplate.panels[0].alert.conditions[0] +
{
evaluator+: {
params: [condition]
}
},
],
},
},
],
uid: 'alert-' + x,
title: 'Alert ' + x
},
for x in arr
}

View File

@@ -1,172 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"links": [],
"panels": [
{
"aliasColors": {
"Active alerts": "#bf1b00"
},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "Prometheus",
"fill": 1,
"gridPos": {
"h": 12,
"w": 24,
"x": 0,
"y": 0
},
"id": 2,
"interval": "",
"legend": {
"alignAsTable": true,
"avg": false,
"current": true,
"max": false,
"min": false,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "null",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [
{
"alias": "Active grafana instances",
"dashes": true,
"fill": 0
}
],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "sum(increase(grafana_alerting_notification_sent_total[1m])) by(job)",
"format": "time_series",
"instant": false,
"interval": "1m",
"intervalFactor": 1,
"legendFormat": "Notifications sent",
"refId": "A"
},
{
"expr": "min(grafana_alerting_active_alerts) without(instance)",
"format": "time_series",
"interval": "1m",
"intervalFactor": 1,
"legendFormat": "Active alerts",
"refId": "B"
},
{
"expr": "count(up{job=\"grafana\"})",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "Active grafana instances",
"refId": "C"
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "Notifications sent vs active alerts",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": "0",
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": 3
}
}
],
"schemaVersion": 16,
"style": "dark",
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-1h",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "",
"title": "Overview",
"uid": "xHy7-hAik",
"version": 6
}

View File

@@ -1,14 +0,0 @@
apiVersion: 1
providers:
- name: 'Alerts'
folder: 'Alerts'
type: file
options:
path: /etc/grafana/provisioning/dashboards/alerts
- name: 'MySQL'
folder: 'MySQL'
type: file
options:
path: /etc/grafana/provisioning/dashboards/mysql

View File

@@ -1,16 +0,0 @@
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
access: proxy
url: http://prometheus:9090
jsonData:
timeInterval: 10s
queryTimeout: 30s
httpMethod: POST
- name: Loki
type: loki
access: proxy
url: http://loki:3100

View File

@@ -1,47 +0,0 @@
# my global config
global:
scrape_interval: 10s # By default, scrape targets every 15 seconds.
evaluation_interval: 10s # By default, scrape targets every 15 seconds.
# scrape_timeout is set to the global default (10s).
# Load and evaluate rules in this file every 'evaluation_interval' seconds.
#rule_files:
# - "alert.rules"
# - "first.rules"
# - "second.rules"
# alerting:
# alertmanagers:
# - scheme: http
# static_configs:
# - targets:
# - "127.0.0.1:9093"
scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
- job_name: 'grafana'
dns_sd_configs:
- names:
- 'grafana'
type: 'A'
port: 3000
refresh_interval: 10s
- job_name: 'mysql'
dns_sd_configs:
- names:
- 'mysqld-exporter'
type: 'A'
port: 9104
refresh_interval: 10s
- job_name: 'loki'
dns_sd_configs:
- names:
- 'loki'
type: 'A'
port: 3100
refresh_interval: 10s

View File

@@ -1,21 +0,0 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "grafana-server",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/pkg/cmd/grafana-server",
"env": {},
"args": [
"--homepath=${workspaceFolder}",
"--packaging=dev",
"cfg:app_mode=development",
]
}
]
}

View File

@@ -25,29 +25,17 @@ Edit content in the `sources` directory.
Use the Hugo shortcode [relref](https://gohugo.io/content-management/cross-references/#use-ref-and-relref) any time you are linking to other internal docs pages.
Syntax is:
```
{{< relref "example.md" >}}
```
You might need to add more context for the link (containing folders and so on, `folder/example.md`) if Hugo says the relref is ambiguous.
You might need to add more context for the link (containing folders and so on, `folder/example.md`) if Hugo says the relref is ambiguous.
### Managing redirects
When moving content around or removing pages it's important that users following old links are properly redirected to the new location. We do this using the [aliases](https://gohugo.io/content-management/urls/#aliases) feature in Hugo.
If you are moving a page, add an `aliases` entry in the front matter referencing the old location of the page which will redirect the old url to the new location.
If you are removing a page, add an `aliases` entry in the front matter of the most-applicable page referencing the location of the page being removed.
If you are copying an existing page as the basis for a new one, be sure to remove any `aliases` entries in the front matter in your copy to avoid conflicting redirects.
### Edit the side menu
The side menu is automatically build from the file structure. Use the [weight](https://gohugo.io/templates/lists/#by-weight) front matter parameter to order pages.
To specify different menu text from the page title, use the front matter parameter `menuTitle`.
### Add images
Images are currently hosted in the grafana/website repo.
@@ -56,9 +44,6 @@ Images are currently hosted in the grafana/website repo.
## Deploy changes to grafana.com
When a PR is merged with changes in the `docs/sources` directory, those changes are automatically synced by a GitHub action (`.github/workflows/publish.yml`) to the grafana/website repo.
When a PR is merged to main with changes in the `docs/sources` directory, those changes are automatically synced to the grafana/website repo and published to the staging site.
- A PR that targets the `main` branch syncs to the `content/docs/grafana/next` directory in the `website` repository, and publishes to `https://grafana.com/docs/grafana/next/`.
- A PR targeting the `latest/current` release branch syncs to the `content/docs/grafana/latest` directory in the `website` repository, and publishes to `https://grafana.com/docs/grafana/latest/`.
Once the sync is complete, the website will automatically publish to production - no further action is needed.
Generally, someone from marketing will publish to production each day: so as long as the sync is successful your docs edits will be published. Alternatively, you can refer to [publishing to production](https://github.com/grafana/website#publishing-to-production-grafanacom) if you'd like to do it yourself.

View File

@@ -16,8 +16,6 @@ To see all settings currently applied to the Grafana server, refer to [View serv
## Config file locations
The default settings for a Grafana instance are stored in the `$WORKING_DIR/conf/defaults.ini` file. _Do not_ change the location in this file.
_Do not_ change `defaults.ini`! Grafana defaults are stored in this file. Depending on your OS, make all configuration changes in either `custom.ini` or `grafana.ini`.
- Default configuration from `$WORKING_DIR/conf/defaults.ini`
@@ -53,11 +51,9 @@ Semicolons (the `;` char) are the standard way to comment out lines in a `.ini`
A common problem is forgetting to uncomment a line in the `custom.ini` (or `grafana.ini`) file which causes the configuration option to be ignored.
## Override configuration with environment variables
## Configure with environment variables
Do not use environment variables to _add_ new configuration settings. Instead, use environmental variables to _override_ existing options.
To override an option:
All options in the configuration file can be overridden using environment variables using the syntax:
```bash
GF_<SectionName>_<KeyName>
@@ -439,14 +435,6 @@ The length of time that Grafana maintains idle connections before closing them.
If enabled and user is not anonymous, data proxy will add X-Grafana-User header with username into the request. Default is `false`.
### response_limit
Limits the amount of bytes that will be read/accepted from responses of outgoing HTTP requests. Default is `0` which means disabled.
### row_limit
Limits the number of rows that Grafana will process from SQL (relational) data sources. Default is `1000000`.
<hr />
## [analytics]
@@ -472,14 +460,6 @@ Analytics ID here. By default this feature is disabled.
Google Tag Manager ID, only enabled if you enter an ID here.
### application_insights_connection_string
If you want to track Grafana usage via Azure Application Insights, then specify _your_ Application Insights connection string. Since the connection string contains semicolons, you need to wrap it in backticks (`). By default, tracking usage is disabled.
### application_insights_endpoint_url
Optionally, use this option to override the default endpoint address for Application Insights data collecting. For details, refer to the [Azure documentation](https://docs.microsoft.com/en-us/azure/azure-monitor/app/custom-endpoints?tabs=js).
<hr />
## [security]
@@ -1123,83 +1103,9 @@ Sets a global limit on number of alert rules that can be created. Default is -1
For more information about the Grafana 8 alerts, refer to [Unified Alerting]({{< relref "../alerting/unified-alerting/_index.md" >}}).
### enabled
### admin_config_poll_interval_seconds
Enable the Unified Alerting sub-system and interface. When enabled we'll migrate all of your alert rules and notification channels to the new system. New alert rules will be created and your notification channels will be converted into an Alertmanager configuration. Previous data is preserved to enable backwards compatibility but new data is removed. The default value is `false`.
Alerting Rules migrated from dashboards and panels will include a link back via the `annotations`.
### disabled_orgs
Comma-separated list of organization IDs for which to disable Grafana 8 Unified Alerting.
### admin_config_poll_interval
Specify the frequency of polling for admin config changes. The default value is `60s`.
The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
### alertmanager_config_poll_interval
Specify the frequency of polling for Alertmanager config changes. The default value is `60s`.
The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
### ha_listen_address
Listen address/hostname and port to receive unified alerting messages for other Grafana instances. The port is used for both TCP and UDP. It is assumed other Grafana instances are also running on the same port. The default value is `0.0.0.0:9094`.
### ha_advertise_address
Explicit address/hostname and port to advertise other Grafana instances. The port is used for both TCP and UDP.
### ha_peers
Comma-separated list of initial instances (in a format of host:port) that will form the HA cluster. Configuring this setting will enable High Availability mode for alerting.
### ha_peer_timeout
Time to wait for an instance to send a notification via the Alertmanager. In HA, each Grafana instance will
be assigned a position (e.g. 0, 1). We then multiply this position with the timeout to indicate how long should
each instance wait before sending the notification to take into account replication lag. The default value is `15s`.
The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
### ha_gossip_interval
The interval between sending gossip messages. By lowering this value (more frequent) gossip messages are propagated
across cluster more quickly at the expense of increased bandwidth usage. The default value is `200ms`.
The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
### ha_push_pull_interval
The interval between gossip full state syncs. Setting this interval lower (more frequent) will increase convergence speeds
across larger clusters at the expense of increased bandwidth usage. The default value is `60s`.
The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
### execute_alerts
Enable or disable alerting rule execution. The default value is `true`. The alerting UI remains visible. This option has a [legacy version in the alerting section]({{< relref "#execute_alerts-1">}}) that takes precedence.
### evaluation_timeout
Sets the alert evaluation timeout when fetching data from the datasource. The default value is `30s`. This option has a [legacy version in the alerting section]({{< relref "#evaluation_timeout_seconds">}}) that takes precedence.
The timeout string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
### max_attempts
Sets a maximum number of times we'll attempt to evaluate an alert rule before giving up on that evaluation. The default value is `3`. This option has a [legacy version in the alerting section]({{< relref "#max_attempts-1">}}) that takes precedence.
### min_interval
Sets the minimum interval to enforce between rule evaluations. The default value is `10s` which equals the scheduler interval. Rules will be adjusted if they are less than this value or if they are not multiple of the scheduler interval (10s). Higher values can help with resource management as we'll schedule fewer evaluations over time. This option has [a legacy version in the alerting section]({{< relref "#min_interval_seconds">}}) that takes precedence.
The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
> **Note.** This setting has precedence over each individual rule frequency. If a rule frequency is lower than this value, then this value is enforced.
Specify the frequency of polling for admin config changes. The default value is `60`.
<hr>
@@ -1209,7 +1115,7 @@ For more information about the Alerting feature in Grafana, refer to [Alerts ove
### enabled
Set to `false` to [enable Grafana 8 alerting]({{<relref "#unified_alerting">}}) and to disable legacy alerting engine. Default is `true`.
Set to `false` to disable alerting engine and hide Alerting in the Grafana UI. Default is `true`.
### execute_alerts
@@ -1661,7 +1567,7 @@ ha_engine_address = 127.0.0.1:6379
## [plugin.grafana-image-renderer]
For more information, refer to [Image rendering]({{< relref "../image-rendering/" >}}).
For more information, refer to [Image rendering]({{< relref "image_rendering.md" >}}).
### rendering_timezone
@@ -1697,7 +1603,7 @@ It can be useful to set this to `true` when troubleshooting.
### rendering_args
Additional arguments to pass to the headless browser instance. Defaults are `--no-sandbox,--disable-gpu`. The list of Chromium flags can be found at (https://peter.sh/experiments/chromium-command-line-switches/). Separate multiple arguments with commas.
Additional arguments to pass to the headless browser instance. Default is --no-sandbox. The list of Chromium flags can be found at (https://peter.sh/experiments/chromium-command-line-switches/). Separate multiple arguments with commas.
### rendering_chrome_bin
@@ -1755,7 +1661,7 @@ For more information about Grafana Enterprise, refer to [Grafana Enterprise]({{<
### enable
Keys of alpha features to enable, separated by space.
Keys of alpha features to enable, separated by space. Available alpha features are: `ngalert`
## [date_formats]

View File

@@ -10,8 +10,6 @@ weight = 200
If you are running Grafana in a Docker image, then you configure Grafana using [environment variables]({{< relref "../administration/configuration.md#configure-with-environment-variables" >}}) rather than directly editing the configuration file. If you want to save your data, then you also need to designate persistent storage or bind mounts for the Grafana container.
> **Note:** These examples use the Grafana Enterprise docker image. You can use the Grafana Open Source edition by changing the docker image to `grafana/grafana-oss`.
## Save your Grafana data
If you do not designate a location for information storage, then all your Grafana data disappears as soon as you stop your container. To save your data, you need to set up persistent storage or bind mounts for your container.
@@ -23,7 +21,7 @@ If you do not designate a location for information storage, then all your Grafan
docker volume create grafana-storage
# start grafana
docker run -d -p 3000:3000 --name=grafana -v grafana-storage:/var/lib/grafana grafana/grafana-enterprise
docker run -d -p 3000:3000 --name=grafana -v grafana-storage:/var/lib/grafana grafana/grafana
```
### Run Grafana container using bind mounts
@@ -35,7 +33,7 @@ mkdir data # creates a folder for your data
ID=$(id -u) # saves your user id in the ID variable
# starts grafana with your user id and using the data folder
docker run -d --user $ID --volume "$PWD/data:/var/lib/grafana" -p 3000:3000 grafana/grafana-enterprise:8.2.1
docker run -d --user $ID --volume "$PWD/data:/var/lib/grafana" -p 3000:3000 grafana/grafana:7.2.1
```
## Default paths
@@ -59,7 +57,7 @@ Example:
```bash
# Run Grafana while logging to both standard out and /var/log/grafana/grafana.log
docker run -p 3000:3000 -e "GF_LOG_MODE=console file" grafana/grafana-enterprise
docker run -p 3000:3000 -e "GF_LOG_MODE=console file" grafana/grafana
```
## Configure Grafana with Docker Secrets
@@ -85,7 +83,7 @@ docker run -d \
-e "GF_AWS_default_ACCESS_KEY_ID=YOUR_ACCESS_KEY" \
-e "GF_AWS_default_SECRET_ACCESS_KEY=YOUR_SECRET_KEY" \
-e "GF_AWS_default_REGION=us-east-1" \
grafana/grafana-enterprise
grafana/grafana
```
You may also specify multiple profiles to `GF_AWS_PROFILES` (e.g.

View File

@@ -0,0 +1,212 @@
+++
title = "Image rendering"
description = ""
keywords = ["grafana", "image", "rendering", "plugin"]
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/old-alerting/notifications.md" >}}).
> **Note:** Image rendering of dashboards is not supported at this time.
While an image is being rendered, the PNG image is temporarily written to the file system. When the image is rendered, the PNG image is temporarily written to the `png` folder in the Grafana `data` folder.
A background job runs every 10 minutes and removes temporary images. You can configure how long an image should be stored before being removed by configuring the [temp-data-lifetime]({{< relref "../administration/configuration/#temp-data-lifetime" >}}) setting.
You can also render a PNG by clicking the dropdown arrow next to a panel title, then clicking **Share > Direct link rendered image**.
## Memory requirements
Minimum free memory recommendation is 16GB on the system doing the rendering.
Rendering images can require a lot of memory, mainly because Grafana creates browser instances in the background for the actual rendering. If multiple images are rendered in parallel, then the rendering has a bigger memory footprint. One advantage of using the remote rendering service is that the rendering will be done on the remote system, so your local system resources will not be affected by rendering.
## Alerting and render limits
Alert notifications can include images, but rendering many images at the same time can overload the server where the renderer is running. For instructions of how to configure this, see [concurrent_render_limit]({{< relref "../administration/configuration/#concurrent_render_limit" >}}).
## Install Grafana Image Renderer plugin
The [Grafana image renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer) is a plugin that runs on the backend and handles rendering panels and dashboards as PNG images using headless Chrome.
To install the plugin, refer to the [Grafana Image Renderer Installation instructions](https://grafana.com/grafana/plugins/grafana-image-renderer/?tab=installation).
## Run in custom Grafana Docker image
We recommend setting up another Docker container for rendering and using remote rendering. Refer to [Remote rendering service]({{< relref "#remote-rendering-service" >}}) for instructions.
If you still want to install the plugin in the Grafana Docker image, refer to [Build with Grafana Image Renderer plugin pre-installed]({{< relref "../installation/docker/#build-with-grafana-image-renderer-plugin-pre-installed" >}}).
## Remote rendering service
> Requires an internet connection.
The [Grafana Image Renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer) can also be run as a remote HTTP rendering service. In this setup, Grafana renders an image by making a HTTP request to the remote rendering service, which in turn renders the image and returns it back in the HTTP response to Grafana.
You can run the remote HTTP rendering service using Docker or as a standalone Node.js application.
### Run in Docker
The following example shows how to run Grafana and the remote HTTP rendering service in two separate Docker containers using Docker Compose.
Create a `docker-compose.yml` with the following content:
```yaml
version: '2'
services:
grafana:
image: grafana/grafana:main
ports:
- '3000:3000'
environment:
GF_RENDERING_SERVER_URL: http://renderer:8081/render
GF_RENDERING_CALLBACK_URL: http://grafana:3000/
GF_LOG_FILTERS: rendering:debug
renderer:
image: grafana/grafana-image-renderer:latest
ports:
- 8081
```
And then run:
```bash
docker-compose up
```
## Run as standalone Node.js application
The following example describes how to build and run the remote HTTP rendering service as a standalone Node.js application and configure Grafana appropriately.
1. Clone the [Grafana image renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer) Git repository.
1. Install dependencies and build:
```bash
yarn install --pure-lockfile
yarn run build
```
1. Run the server:
```bash
node build/app.js server --port=8081
```
1. Update Grafana configuration:
```
[rendering]
server_url = http://localhost:8081/render
callback_url = http://localhost:3000/
```
1. Restart Grafana.
## PhantomJS
> Starting from Grafana v7.0.0, all PhantomJS support has been removed. Please use the Grafana Image Renderer plugin or remote rendering service.
## Troubleshoot image rendering
Enable debug log messages for rendering in the Grafana configuration file and inspect the Grafana server log.
```bash
[log]
filters = rendering:debug
```
### Grafana image renderer plugin and remote rendering service
The plugin and rendering service uses [Chromium browser](https://www.chromium.org/) which depends on certain libraries.
If you don't have all of those libraries installed in your system you may encounter errors when trying to render an image, e.g.
```bash
Rendering failed: Error: Failed to launch chrome!/var/lib/grafana/plugins/grafana-image-renderer/chrome-linux/chrome:
error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory\n\n\nTROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
```
In general you can use the [`ldd`](<https://en.wikipedia.org/wiki/Ldd_(Unix)>) utility to figure out what shared libraries
are not installed in your system:
```bash
cd <grafana-image-render plugin directory>
ldd chrome-linux/chrome
linux-vdso.so.1 (0x00007fff1bf65000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2047945000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f2047924000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f204791a000)
libX11.so.6 => not found
libX11-xcb.so.1 => not found
libxcb.so.1 => not found
libXcomposite.so.1 => not found
...
```
**Ubuntu:**
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 libxcb-dri3-0 libgbm1
```
**Debian:**
On Debian 9 (Stretch) the following dependencies have been confirmed as needed for the image rendering to function.
```bash
libx11 libcairo bcairo2 libcairo2 libxtst6 libxcomposite1 libx11-xcb1 libxcursor1 libxdamage1 libnss3 libcups libcups2 libXss libXss1 libxss1 libxrandr2 libasound2 libatk1.0-0 libatk-bridge2.0-0 libpangocairo-1.0-0 libgtk-3-0 libgbm1
```
On Debian 10 (Buster) the following dependencies have been confirmed as needed for the image rendering to function.
```bash
libxdamage1 libxext6 libxi6 libxtst6 libnss3 libnss3 libcups2 libxss1 libxrandr2 libasound2 libatk1.0-0 libatk-bridge2.0-0 libpangocairo-1.0-0 libpango-1.0-0 libcairo2 libatspi2.0-0 libgtk3.0-cil libgdk3.0-cil libx11-xcb-dev libgbm1
```
**Centos:**
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 alsa-lib
```
### Certificate signed by internal certificate authorities
In many cases, Grafana runs on internal servers and uses certificates that have not been signed by a CA ([Certificate Authority](https://en.wikipedia.org/wiki/Certificate_authority)) known to Chrome, and therefore cannot be validated. Chrome internally uses NSS ([Network Security Services](https://en.wikipedia.org/wiki/Network_Security_Services)) for cryptographic operations such as the validation of certificates.
If you are using the Grafana Image Renderer with a Grafana server that uses a certificate signed by such a custom CA (for example a company-internal CA), rendering images will fail and you will see messages like this in the Grafana log:
```
t=2019-12-04T12:39:22+0000 lvl=error msg="Render request failed" logger=rendering error=map[] url="https://192.168.106.101:3443/d-solo/zxDJxNaZk/graphite-metrics?orgId=1&refresh=1m&from=1575438321300&to=1575459921300&var-Host=master1&panelId=4&width=1000&height=500&tz=Europe%2FBerlin&render=1" timestamp=0001-01-01T00:00:00.000Z
t=2019-12-04T12:39:22+0000 lvl=error msg="Rendering failed." logger=context userId=1 orgId=1 uname=admin error="Rendering failed: Error: net::ERR_CERT_AUTHORITY_INVALID at https://192.168.106.101:3443/d-solo/zxDJxNaZk/graphite-metrics?orgId=1&refresh=1m&from=1575438321300&to=1575459921300&var-Host=master1&panelId=4&width=1000&height=500&tz=Europe%2FBerlin&render=1"
t=2019-12-04T12:39:22+0000 lvl=error msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=GET path=/render/d-solo/zxDJxNaZk/graphite-metrics status=500 remote_addr=192.168.106.101 time_ms=310 size=1722 referer="https://grafana.xxx-xxx/d/zxDJxNaZk/graphite-metrics?orgId=1&refresh=1m"
```
(The severity-level `error` in the above messages might be misspelled with a single `r`)
If this happens, then you have to add the certificate to the trust store. If you have the certificate file for the internal root CA in the file `internal-root-ca.crt.pem`, then use these commands to create a user specific NSS trust store for the Grafana user (`grafana` for the purpose of this example) and execute the following steps:
```[root@server ~]# [ -d /usr/share/grafana/.pki/nssdb ] || mkdir -p /usr/share/grafana/.pki/nssdb
[root@merver ~]# certutil -d sql:/usr/share/grafana/.pki/nssdb -A -n internal-root-ca -t C -i /etc/pki/tls/certs/internal-root-ca.crt.pem
[root@server ~]# chown -R grafana: /usr/share/grafana/.pki/nssdb
```
### Custom Chrome/Chromium
As a last resort, if you already have [Chrome](https://www.google.com/chrome/) or [Chromium](https://www.chromium.org/)
installed on your system, then you can configure [Grafana Image renderer plugin](#grafana-image-renderer-plugin) to use this
instead of the pre-packaged version of Chromium.
> Please note that this is not recommended, since you may encounter problems if the installed version of Chrome/Chromium is not
> compatible with the [Grafana Image renderer plugin](#grafana-image-renderer-plugin).
To override the path to the Chrome/Chromium executable, set an environment variable and make sure that it's available for the Grafana process. For example:
```bash
export GF_PLUGIN_RENDERING_CHROME_BIN="/usr/bin/chromium-browser"
```

View File

@@ -154,7 +154,7 @@ Since not all datasources have the same configuration settings we only have the
| maxSeries | number | Influxdb | Max number of series/tables that Grafana processes |
| httpMethod | string | Prometheus | HTTP Method. 'GET', 'POST', defaults to POST |
| customQueryParameters | string | Prometheus | Query parameters to add, as a URL-encoded string. |
| manageAlerts | boolean | Prometheus and Loki | Manage alerts via Alerting UI |
| manageAlerts | boolean | Prometheus and Loki | Manage alerts via Alerting UI |
| esVersion | string | Elasticsearch | Elasticsearch version (E.g. `7.0.0`, `7.6.1`) |
| timeField | string | Elasticsearch | Which field that should be used as timestamp |
| interval | string | Elasticsearch | Index date time format. nil(No Pattern), 'Hourly', 'Daily', 'Weekly', 'Monthly' or 'Yearly' |
@@ -185,7 +185,6 @@ Since not all datasources have the same configuration settings we only have the
| maxOpenConns | number | MySQL, PostgreSQL and MSSQL | Maximum number of open connections to the database (Grafana v5.4+) |
| maxIdleConns | number | MySQL, PostgreSQL and MSSQL | Maximum number of connections in the idle connection pool (Grafana v5.4+) |
| connMaxLifetime | number | MySQL, PostgreSQL and MSSQL | Maximum amount of time in seconds a connection may be reused (Grafana v5.4+) |
| keepCookies | array | _All_ | Cookies that needs to be passed along while communicating with datasources |
#### Secure Json Data

View File

@@ -16,12 +16,6 @@ To prevent this type of exploitation from happening, we recommend that you apply
You can configure Grafana to only allow certain IP addresses or hostnames to be used as data source URLs and proxied through the Grafana data source proxy. Refer to [data_source_proxy_whitelist]({{< relref "../administration/configuration/#data-source-proxy-whitelist" >}}) for usage instructions.
## Request security
The request security configuration option allows users to limit requests from the Grafana server. It targets requests that are generated by users. For more information, refer to [Request security]({{< relref "../enterprise/request-security.md" >}}) in [Grafana Enterprise]({{< relref "../enterprise" >}}).
> **Note:** Request security is available in Grafana Enterprise v7.4 and later versions.
## Firewall rules
Configure a firewall to restrict Grafana from making network requests to sensitive internal web services.

View File

@@ -9,14 +9,14 @@ weight = 400
> Refer to [Fine-grained access control]({{< relref "../../enterprise/access-control/_index.md" >}}) in Grafana Enterprise to understand how you can control access with fine-grained permissions.
If you are a Grafana server admin, then you can view useful statistics about your Grafana server in the Stats & Licensing tab.
If you are a Grafana server admin, then you can view useful statistics about your Grafana server in the Stats tab.
> **Note:** Only Grafana server administrators can access the **Server Admin** menu. For more information about about administrative permissions, refer to [Grafana server admin]({{< relref "../../permissions/_index.md" >}}).
## View server stats
1. Log in to your Grafana server with an account that has the Grafana Admin flag set.
1. Hover your cursor over the **Server Admin** (shield) icon in the side menu and then click the **Stats & Licensing** tab.
1. Hover your cursor over the **Server Admin** (shield) icon in the side menu and then click the **Stats** tab.
## Available stats

View File

@@ -5,26 +5,26 @@ weight = 110
# Grafana alerts
Alerts allow you to learn 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 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.
Grafana 8.0 has new and improved alerts that centralize alerting information for Grafana managed alerts as well as alerts from Prometheus-compatible data sources into one user interface and API.
Grafana 8.0 has new and improved alerts. The new alerting system is 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.
> **Note:** Grafana 8 alerts are an [opt-in]({{< relref "./unified-alerting/opt-in.md" >}}) feature. Out of the box, Grafana still supports old [legacy dashboard alerts]({{< relref "./old-alerting/_index.md" >}}). We encourage you to create issues in the Grafana GitHub repository for bugs found while testing Grafana 8 alerts.
> **Note:** Out of the box, Grafana still supports old [legacy dashboard alerts]({{< relref "./old-alerting/_index.md" >}}). We encourage you to create issues in the Grafana GitHub repository for bugs found while testing Grafana 8 alerts.
Alerts have four main components:
- Alerting rule - One or more queries and/or expressions, conditions, evaluation frequencies, and the (optional) duration that a condition must be met before creating an alert.
- 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.
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 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" >}}).
For handling notifications for Grafana managed alerts, we use an embedded alert manager. 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.
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.
> **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 just one organization. Otherwise all contact points, notification policies, silences, and templates for Grafana managed alerts will be visible by all organizations.
> **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.
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 is 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 the respective tab.
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.
> **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" >}}).

View File

@@ -1,13 +1,13 @@
+++
title = "What's New with Grafana 8 alerts"
title = "What's New with Grafana 8 Alerts"
description = "What's New with Grafana 8 Alerts"
keywords = ["grafana", "alerting", "guide"]
weight = 112
+++
# What's New with Grafana 8 alerts
# What's New with Grafana 8 Alerts
The alerts released with Grafana 8.0 centralizes alerting information for Grafana managed alerts and alerts from Prometheus-compatible datasources in one UI and API. 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 datasources in a single, searchable view.
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.
## Multi-dimensional alerting

View File

@@ -50,7 +50,7 @@ These examples show how often and when reminders are sent for a triggered alert.
## List of supported notifiers
| Name | Type | Supports images | Supports alert rule tags |
| Name | Type | Supports images | Support alert rule tags |
| --------------------------------------------- | ------------------------- | ------------------ | ----------------------- |
| [DingDing](#dingdingdingtalk) | `dingding` | yes, external only | no |
| [Discord](#discord) | `discord` | yes | no |
@@ -70,7 +70,7 @@ These examples show how often and when reminders are sent for a triggered alert.
| Telegram | `telegram` | yes | no |
| Threema | `threema` | yes, external only | no |
| VictorOps | `victorops` | yes, external only | yes |
| [Webhook](#webhook) | `webhook` | yes, external only | yes |
| [Webhook](#webhook) | `webhook` | yes, external only | yes | |
### Email
@@ -258,12 +258,12 @@ Alertmanager handles alerts sent by client applications such as Prometheus serve
### Sensu Go
Grafana alert notifications can be sent to [Sensu](<(https://sensu.io)>) Go as events via the API. This operation requires an API key. For information on creating this key, refer to [Sensu Go documentation](https://docs.sensu.io/sensu-go/latest/operations/control-access/use-apikeys/#api-key-authentication).
Grafana alert notifications can be sent to [Sensu]((https://sensu.io)) Go as events via the API. This operation requires an API key. For information on creating this key, refer to [Sensu Go documentation](https://docs.sensu.io/sensu-go/latest/operations/control-access/use-apikeys/#api-key-authentication).
## 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 "../../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.

View File

@@ -6,9 +6,9 @@ weight = 113
# Overview of Grafana 8 alerts
Grafana 8.0 has a new and improved alerting sub-system that centralizes alerting information for Grafana managed alerts and alerts from Prometheus-compatible data sources into one user interface and API.
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:** Grafana 8 alerts is an [opt-in]({{< relref "../unified-alerting/opt-in.md" >}}) feature. Out of the box, Grafana still supports old [legacy dashboard alerts]({{< relref "../old-alerting/_index.md" >}}). We encourage you to create issues in the Grafana GitHub repository for bugs found while testing Grafana 8 alerts.
> **Note:** Grafana 8 alerts (beta) is an [opt-in]({{< relref"./opt-in.md" >}}) feature. Out of the box, Grafana still supports old [legacy dashboard alerts]({{< relref "../old-alerting/_index.md" >}}). We encourage you to create issues in the Grafana GitHub repository for bugs found while testing this new feature.
Grafana 8 alerts have four main components:
@@ -45,18 +45,16 @@ Alerting rules can only query backend data sources with alerting enabled:
## 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" >}}). See also, [View alert rules and their current state]({{< relref "alerting-rules/rule-list.md" >}}).
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 |
| ------------------------------------------------- | --------- | ---------------------------------------------------------------------------------------- |
| `grafana_alerting_alerts` | gauge | How many alerts by state |
| `grafana_alerting_request_duration` | histogram | Histogram of requests to the Alerting API |
| `grafana_alerting_active_configurations` | gauge | The number of active, non default Alertmanager configurations for grafana managed alerts |
| `grafana_alerting_rule_evaluations_total` | counter | The total number of rule evaluations |
| `grafana_alerting_rule_evaluation_failures_total` | counter | The total number of rule evaluation failures |
| `grafana_alerting_rule_evaluation_duration` | summary | The duration for a rule to execute |
| `grafana_alerting_rule_group_rules` | gauge | The number of rules |
| 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 |
## Limitation
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.
- [View alert rules and their current state]({{< relref "alerting-rules/rule-list.md" >}})

View File

@@ -1,27 +0,0 @@
+++
title = "Alert groups"
description = "Alert groups"
keywords = ["grafana", "alerting", "alerts", "groups"]
weight = 400
+++
# View alert groups
Alert groups shows grouped alerts from an alertmanager instance. Alertmanager will group alerts based on common label values. This prevents duplicate alerts from being fired by grouping common alerts into a single alert group. By default, the alerts are grouped by the label keys for the root policy in [notification policies]({{< relref "./notification-policies.md" >}}).
## Show alert groups for an external Alertmanager
Grafana alerting UI supports alert groups from external Alertmanager data sources. 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.
## View different alert groupings
To view a grouping other than the default use the **custom group by** dropdown to select combinations of labels to group alerts by. This is useful for debugging and verifying your notification policies grouping.
If an alert does not contain labels specified in the grouping of the route policy or the custom grouping it will be added to a catch all group with a header of `No grouping`.
## Filter alerts
You can use the following filters to view only alerts that match specific criteria:
- **Filter alerts by label -** Search by alert labels using label selectors in the **Search** input. eg: `environment=production,region=~US|EU,severity!=warning`
- **Filter alerts by state -** In **States** Select which alert states you want to see. All others are hidden.

View File

@@ -4,7 +4,7 @@ aliases = ["/docs/grafana/latest/alerting/rules/"]
weight = 130
+++
# Create and manage alerting rules
# 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.

View File

@@ -7,7 +7,7 @@ weight = 400
# Create a Cortex or Loki managed recording rule
You can create and manage recording rules for an external Cortex or Loki instance. Recording rules calculate frequently needed expressions or computationally expensive expressions in advance and save the result as a new set of time series. Querying this new time series is faster, especially for dashboards since they query the same expression every time the dashboards refresh.
You can create and manage recording rules for an external Cortex or Loki instance. Recording rules calculate frequently needed expressions or computationally expensive expressions in advance and save the result as a new set of time series. Querying this new time series is faster, especially for dashboards since they query the same expression every time the dashboards refresh.
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 data source), only supports viewing of rules. If you want to edit rules, then configure one of the other rule storage types.
@@ -34,7 +34,7 @@ This section describes the fields you fill out to create a recording rule.
### Rule type
- **Rule name -** Enter a descriptive name. The name will get displayed in the alert rule list. It will also get added as an `alertname` label to every alert instance that is created from this rule. Recording rules names must be valid [metric names](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels).
- **Rule name -** Enter a descriptive name. The name will get displayed in the alert rule list. It will also get added as an `alertname` label to every alert instance that is created from this rule. Recording rules names must be valid [metric names](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels).
- **Rule type -** Select **Cortex / Loki managed recording rule**.
- **Data source -** Select a Prometheus or Loki data source. Only data sources that support Cortex ruler API are available.
- **Namespace -** Select an existing rule namespace or click **Add new** and enter a name to create a new one. Namespaces can contain one or more rule groups and have only organizational purpose.
@@ -48,6 +48,7 @@ Enter a PromQL or LogQL expression. The result of this expression will get recor
![Query section](/static/img/docs/alerting/unified/rule-edit-cortex-recording-rule-query-8-2.png 'Query section screenshot')
### Details
You can optionally define labels in the details section.

View File

@@ -33,8 +33,6 @@ This section describes the fields you fill out to create an alert.
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.
> **Note:** Grafana does not support alert queries with template variables. More information is available at <https://community.grafana.com/t/template-variables-are-not-supported-in-alert-queries-while-setting-up-alert/2514>.
#### 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.
@@ -77,11 +75,11 @@ See or [expressions documentation]({{< relref "../../../panels/expressions.md" >
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 Option | Description |
| -------------- | ----------------------------------------------------------------------------------------------------------- |
| No Data | Set alert state to `NoData` and rule state to `Normal` (notifications are not sent on NoData states). |
| Alerting | Set alert rule state to `Alerting`. |
| Ok | Set alert rule state to `Normal`. |
| Alerting | Set alert rule state to `Alerting`. |
| Ok | Set alert rule state to `Normal`. |
| Error or timeout option | Description |
| ----------------------- | ---------------------------------- |

View File

@@ -15,7 +15,7 @@ A namespace contains one or more groups. To rename a namespace, find a group tha
1. Hover your cursor over the Alerting (bell) icon in the side menu.
1. Locate a group that belongs to the namespace you want to edit and click the edit (pen) icon.
1. Enter a new name in the **Namespace** field, then click **Save changes**.
1. Enter a new name in the **Namespace** field, then click **Save changes**.
A new namespace is created and all groups are copied into this namespace from the old one. The old namespace is deleted.
@@ -31,4 +31,4 @@ The rules within a group are run sequentially at a regular interval, the default
If you remaned the group, a new group is created that has all the rules from the old group, and the old group deleted.
![Group list](/static/img/docs/alerting/unified/rule-list-edit-cortex-loki-icon-8-2.png 'Rule group list screenshot')
![Group edit modal](/static/img/docs/alerting/unified/rule-list-cortex-loki-edit-ns-group-8-2.png 'Rule group edit modal screenshot')
![Group edit modal](/static/img/docs/alerting/unified/rule-list-cortex-loki-edit-ns-group-8-2.png 'Rule group edit modal screenshot')

View File

@@ -11,7 +11,7 @@ Contact points define where to send notifications about alerts that match a part
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:** In v8.0 and v8.1, the configuration of the embedded Alertmanager was shared across organisations. Users running one of these versions 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.
> **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

View File

@@ -35,7 +35,7 @@ To edit a specific policy, find it in the specific routing table and click **Edi
### 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. If the field is empty (default), then all notifications are sent in a single group. Use a special label `...` to group alerts by all labels, which effectively disables grouping.
- **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
@@ -43,7 +43,7 @@ Group timing options
- **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 routing policy fields
### 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.

View File

@@ -4,55 +4,31 @@ description = "Enable Grafana 8 Alerts"
weight = 128
+++
# Opt-in to Grafana 8 alerts
# Enable Grafana 8 Alerts
This topic describes how to enable Grafana 8 alerts as well as the rules and restrictions that govern the migration of existing dashboard alerts to this new alerting system. You can also [disable Grafana 8 alerts]({{< relref "./opt-in.md#disable-grafana-8-alerts" >}}) if needed.
Setting the `ngalert` feature toggle enables the new Grafana 8 alerting system.
Before you begin, we recommend that you backup Grafana's database. If you are using PostgreSQL as the backend data source, then the minimum required version is 9.5.
> **Note:** We recommend that you 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.
## Enable Grafana 8 alerts
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.
To enable Grafana 8 alerts:
> **Note:** Since the new system stores the notification log and silences on disk, we require the use of persistent disks for using Grafana 8 alerts. Otherwise, the silences and notification log will get lost on a restart, and you might get unwanted or duplicate notifications.
1. Go to your custom configuration file located in $WORKING_DIR/conf/custom.ini.
1. In the [unified alerts]({{< relref "../../administration/configuration.md#unified_alerting" >}}) section, set the `enabled` property to `true`.
1. Next, in the [alerting]({{< relref "../../administration/configuration.md#alerting" >}}) section of the configuration file, update the configuration for the legacy dashboard alerts by setting the `enabled` property to `false`.
1. Restart Grafana for the configuration changes to take effect.
> **Note:** Before Grafana v8.2, to enable or disable Grafana 8 alerts, users configured the `ngalert` feature toggle. This toggle option is no longer available.
> **Note:** There is no `Keep Last State` option for [`No Data` and `Error handling`]({{< relref "./alerting-rules/create-grafana-managed-rule/#no-data--error-handling" >}}) in Grafana 8 alerts. This option becomes `Alerting` during the legacy rule migration.
Moreover, before v8.2, notification logs and silences were stored on a disk. If you did not use persistent disks, any configured silences and logs would get lost on a restart, resulting in unwanted or duplicate notifications.
As of Grafana 8.2, we no longer require the use of a persistent disk. Instead, the notification logs and silences are stored regularly (every 15 minutes), and a clean shutdown to the database. If you used the file-based approach, Grafana will read the existing file and persisting it eventually.
## Migrating legacy alerts to Grafana 8 alerting system
When Grafana 8 alerting is enabled, existing legacy dashboard alerts migrate in a format compatible with the Grafana 8 alerting system. In the Alerting page of your Grafana instance, you can view the migrated alerts alongside new alerts.
Read and write access to legacy dashboard alerts was governed by the dashboard and folder permissions storing them. In Grafana 8, alerts inherit the permissions of the folders they are stored in. During migration, legacy dashboard alert permissions are matched to the new rules permissions as follows:
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.
- 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.
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.
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.
Since `Hipchat` and `Sensu` notification channels are no longer supported, legacy alerts associated with these channels are not automatically migrated to Grafana 8 alerting. Assign the legacy alerts to a supported notification channel so that you continue to receive notifications for those alerts.
Silences (expiring after one year) are created for all paused dashboard alerts.
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.
### Limitation
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.
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.
## Disabling Grafana 8 Alerting after migration
## Disable Grafana 8 alerts
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.
To disable Grafana 8 alerts and enable legacy dashboard alerts:
1. Go to your custom configuration file located in $WORKING_DIR/conf/custom.ini.
1. In the [unified alerts]({{< relref "../../administration/configuration.md#unified_alerting" >}}) section, set the `enabled` property to `false`.
1. Next, in the [alerting]({{< relref "../../administration/configuration.md#alerting" >}}) section of the configuration file, update the configuration for the legacy dashboard alerts by setting the `enabled` property to `true`.
1. Restart Grafana for the configuration changes to take effect.
> **Note:** If you choose to migrate from Grafana 8 alerts to legacy dashboard alerts, you will lose any new alerts that you created in the Grafana 8 alerting system.
> **Note:** Any alerting rules created in the Grafana 8 Alerting system will be lost when migrating back to dashboard alerts

View File

@@ -33,14 +33,9 @@ To add a silence:
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 **Operator** field is the operator to match against the label value. The available operators are:
- `=`: Select labels that are exactly equal to the provided string.
- `!=`: Select labels that are not equal to the provided string.
- `=~`: Select labels that regex-match the provided string.
- `!~`: Select labels that do not regex-match the provided string.
- The **Value** field matches against the corresponding value for the specified **Label** name. How it matches depends on the **Operator** value.
- 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
@@ -55,8 +50,8 @@ Grafana alerting UI supports managing external Alertmanager silences. Once you a
## Create a URL to silence form with defaults filled in
When linking to a silence form, provide the default matching labels and comment via `matchers` and `comment` query parameters. The `matchers` parameter requires one more matching labels of the type `[label][operator][value]` joined by a comma while the `operator` parameter can be one of the following: `=` (equals, not regex), `!=` (not equals, not regex), `=~` (equals, regex), `!~` (not equals, regex).
When linking to a silence form, provide the default matching labels and comment via `matchers` and `comment` query parameters. The `matchers` parameter requires one more matching labels of the type `[label][operator][value]` joined by a comma while the `operator` parameter can be one of the following: `=` (equals, not regex), `!=` (not equals, not regex), `=~` (equals, regex), `!~` (not equals, 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/alerting/silence/new?matchers=severity%3Dcritical%2Ccluster!~europe-*&comment=Silence%20critical%20EU%20alert`.
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

@@ -7,44 +7,45 @@ weight = 700
# Azure AD OAuth2 authentication
The Azure AD authentication allows you to use an Azure Active Directory tenant as an identity provider for Grafana. You can use Azure AD Application Roles to assign users and groups to Grafana roles from the Azure Portal. This topic has the following sections:
> Only available in Grafana v6.7+
- [Create the Azure AD application](#create-the-azure-ad-application)
- [Enable Azure AD OAuth in Grafana](#enable-azure-ad-oauth-in-grafana)
The Azure AD authentication allows you to use an Azure Active Directory tenant as an identity provider for Grafana. You can use Azure AD Application Roles to assign users and groups to Grafana roles from the Azure Portal.
## Create the Azure AD application
To enable the Azure AD OAuth2, register your application with Azure AD.
To enable the Azure AD OAuth2 you must register your application with Azure AD.
1. Log in to [Azure Portal](https://portal.azure.com), then click **Azure Active Directory** in the side menu.
1. Log in to [Azure Portal](https://portal.azure.com) and click **Azure Active Directory** in the side menu. If you have access to more than one tenant, select your account in the upper right. Set your session to the Azure AD tenant you wish to use.
1. If you have access to more than one tenant, select your account in the upper right. Set your session to the Azure AD tenant you wish to use.
1. Under **Manage** in the side menu, click **App Registrations** and then **New Registration**. Provide a fitting name.
1. Under **Manage** in the side menu, click **App Registrations** > **New Registration**. Enter a descriptive name.
1. Under **Redirect URI**, select **Web** as the app type.
1. Under **Redirect URI**, select the app type **Web**.
1. Add the redirect URL `https://<grafana domain>/login/azuread`, then click **Register**.
1. Add the following redirect URLs `https://<grafana domain>/login/azuread` and `https://<grafana domain>` then click **Register**. The app's **Overview** page opens.
1. Note the **Application ID**. This is the OAuth client ID.
1. The app's **Overview** page is displayed. Note the **Application ID**. This is the OAuth client ID.
1. Click **Endpoints** from the top menu.
- Note the **OAuth 2.0 authorization endpoint (v2)** URL. This is the authorization URL.
- Note the **OAuth 2.0 authorization endpoint (v2)**. This is the auth URL.
- Note the **OAuth 2.0 token endpoint (v2)**. This is the token URL.
1. Click **Certificates & secrets**, then add a new entry under **Client secrets** with the following configuration.
1. Click **Certificates & secrets** and then add a new entry under **Client secrets**.
- Description: Grafana OAuth
- Expires: Never
1. Click **Add** then copy the key value. This is the OAuth client secret.
1. Click **Add**, and then copy the key value. This is the OAuth client secret.
1. Click **Manifest**, then define the required Application Role values for Grafana: Viewer, Editor, or Admin. If not defined, all users will have the Viewer role. Every role requires a unique ID which you can generate on Linux with `uuidgen`, and on Windows through Microsoft PowerShell with `New-Guid`.
1. Click **Manifest**.
1. Include the unique ID in the configuration file:
- Define the required Application Role values for Grafana: Viewer, Editor, Admin. Otherwise, all users will have the Viewer role.
- Every role requires a unique ID.
- Generate the unique ID on Linux with `uuidgen`, and on Windows through Microsoft
PowerShell with `New-Guid`.
- Include the unique ID in the configuration file:
```json
```json
"appRoles": [
{
"allowedMemberTypes": [
@@ -83,7 +84,7 @@ To enable the Azure AD OAuth2, register your application with Azure AD.
"value": "Editor"
}
],
```
```
1. Go to **Azure Active Directory** and then to **Enterprise Applications**. Search for your application and click on it.
@@ -93,7 +94,7 @@ To enable the Azure AD OAuth2, register your application with Azure AD.
1. Add the following to the [Grafana configuration file]({{< relref "../administration/configuration.md#config-file-locations" >}}):
```
```ini
[auth.azuread]
name = Azure AD
enabled = true
@@ -108,44 +109,46 @@ allowed_groups =
```
You can also use these environment variables to configure **client_id** and **client_secret**:
```
GF_AUTH_AZUREAD_CLIENT_ID
GF_AUTH_AZUREAD_CLIENT_SECRET
```
**Note:** Verify that the Grafana [root_url]({{< relref "../administration/configuration/#root-url" >}}) is set in your Azure Application Redirect URLs.
**Note:** Ensure that the [root_url]({{< relref "../administration/configuration/#root-url" >}}) in Grafana is set in your Azure Application Reply URLs (**App** -> **Settings** -> **Reply URLs**)
### Configure allowed groups
To limit access to authenticated users who are members of one or more groups, set `allowed_groups`
to a comma- or space-separated list of group object IDs. You can find object IDs for a specific group on the Azure portal:
1. Go to **Azure Active Directory -> Groups**. If you want to only give access to members of the group `example` with an ID of `8bab1c86-8fba-33e5-2089-1d1c80ec267d`, then set the following:
1. Go to **Azure Active Directory -> Groups**.
```
allowed_groups = 8bab1c86-8fba-33e5-2089-1d1c80ec267d
```
For example, if you want to only give access to members of the group `example` with an ID of `8bab1c86-8fba-33e5-2089-1d1c80ec267d`, set the following:
1. Verify that [group attributes](https://docs.microsoft.com/en-us/azure/active-directory/hybrid/how-to-connect-fed-group-claims#configure-the-azure-ad-application-registration-for-group-attributes) is enabled in your Azure AD Application Registration manifest file by navigating to **Azure Portal** > **Azure Active Directory** > **Application Registrations** > **Select Application** -> **Manifest**, and set the following:
```ini
allowed_groups = 8bab1c86-8fba-33e5-2089-1d1c80ec267d
```
```
"groupMembershipClaims": "ApplicationGroup, SecurityGroup"
```
You'll need to ensure that you've [enabled group attributes](https://docs.microsoft.com/en-us/azure/active-directory/hybrid/how-to-connect-fed-group-claims#configure-the-azure-ad-application-registration-for-group-attributes) in your Azure AD Application Registration manifest file. Navigate to **Azure Portal** -> **Azure Active Directory** -> **Application Registrations** -> **Select Application** -> **Manifest**, and set the following:
```json
"groupMembershipClaims": "ApplicationGroup, SecurityGroup"
```
### Configure allowed domains
The `allowed_domains` option limits access to users who belong to specific domains. Separate domains with space or comma. For example,
The `allowed_domains` option limits access to users who belong to specific domains. Separate domains with space or comma.
```
```ini
allowed_domains = mycompany.com mycompany.org
```
### Team Sync (Enterprise only)
> Only available in Grafana Enterprise v6.7+
With Team Sync you can map your Azure AD groups to teams in Grafana so that your users will automatically be added to
the correct teams.
You can reference Azure AD groups by group object ID, like `8bab1c86-8fba-33e5-2089-1d1c80ec267d`.
To learn more, refer to the [Team Sync]({{< relref "team-sync.md" >}}) documentation.
[Learn more about Team Sync]({{< relref "team-sync.md" >}})

View File

@@ -55,30 +55,24 @@ You can also specify the SSL/TLS configuration used by the client.
Set `empty_scopes` to true to use an empty scope during authentication. By default, Grafana uses `user:email` as scope.
### Email address
Grafana determines a user's email address by querying the OAuth provider until it finds an e-mail address:
Grafana will attempt to determine the user's e-mail address by querying the OAuth provider as described below in the following order until an e-mail address is found:
1. Check for the presence of an e-mail address via the `email` field encoded in the OAuth `id_token` parameter.
1. Check for the presence of an e-mail address using the [JMESPath](http://jmespath.org/examples.html) specified via the `email_attribute_path` configuration option. The JSON used for the path lookup is the HTTP response obtained from querying the UserInfo endpoint specified via the `api_url` configuration option.
**Note**: Only available in Grafana v6.4+.
1. Check for the presence of an e-mail address in the `attributes` map encoded in the OAuth `id_token` parameter. By default Grafana will perform a lookup into the attributes map using the `email:primary` key, however, this is configurable and can be adjusted by using the `email_attribute_name` configuration option.
1. Query the `/emails` endpoint of the OAuth provider's API (configured with `api_url`), then check for the presence of an email address marked as a primary address.
1. If no email address is found in steps (1-4), then the email address of the user is set to an empty string.
1. Query the `/emails` endpoint of the OAuth provider's API (configured with `api_url`) and check for the presence of an e-mail address marked as a primary address.
1. If no e-mail address is found in steps (1-4), then the e-mail address of the user is set to the empty string.
### Roles
Grafana will also attempt to do role mapping through OAuth as described below.
Grafana checks for the presence of a role using the [JMESPath](http://jmespath.org/examples.html) specified via the `role_attribute_path` configuration option. The JMESPath is applied to the `id_token` first. If there is no match, then the UserInfo endpoint specified via the `api_url` configuration option is tried next. The result after evaluation of the `role_attribute_path` JMESPath expression should be a valid Grafana role, for example, `Viewer`, `Editor` or `Admin`.
Check for the presence of a role using the [JMESPath](http://jmespath.org/examples.html) specified via the `role_attribute_path` configuration option. The JSON used for the path lookup is the HTTP response obtained from querying the UserInfo endpoint specified via the `api_url` configuration option. The result after evaluating the `role_attribute_path` JMESPath expression needs to be a valid Grafana role, i.e. `Viewer`, `Editor` or `Admin`.
For more information, refer to the [JMESPath examples](#jmespath-examples).
Grafana also attempts to map teams through OAuth as described below.
### Groups / Teams
Check for the presence of groups using the [JMESPath](http://jmespath.org/examples.html) specified via the `groups_attribute_path` configuration option. The JSON used for the path lookup is the HTTP response obtained from querying the UserInfo endpoint specified via the `api_url` configuration option. After evaluating the `groups_attribute_path` JMESPath expression, the result should be a string array of groups.
Similarly, group mappings are made using [JMESPath](http://jmespath.org/examples.html) with the `groups_attribute_path` configuration option. The `id_token` is attempted first, followed by the UserInfo from the `api_url`. The result of the JMESPath expression should be a string array of groups.
Furthermore, Grafana will check for the presence of at least one of the teams specified via the `team_ids` configuration option using the [JMESPath](http://jmespath.org/examples.html) specified via the `team_ids_attribute_path` configuration option. The JSON used for the path lookup is the HTTP response obtained from querying the Teams endpoint specified via the `teams_url` configuration option (using `/teams` as a fallback endpoint). The result should be a string array of Grafana Team IDs. Using this setting ensures that only certain teams is allowed to authenticate to Grafana using your OAuth provider.
### Login
See [JMESPath examples](#jmespath-examples) for more information.
Customize user login using `login_attribute_path` configuration option. Order of operations is as follows:
@@ -132,8 +126,6 @@ scopes = account email
auth_url = https://bitbucket.org/site/oauth2/authorize
token_url = https://bitbucket.org/site/oauth2/access_token
api_url = https://api.bitbucket.org/2.0/user
teams_url = https://api.bitbucket.org/2.0/user/permissions/workspaces
team_ids_attribute_path = values[*].workspace.slug
team_ids =
allowed_organizations =
```

View File

@@ -26,10 +26,10 @@ instance, if you access Grafana at `http://203.0.113.31:3000`, you should use
http://203.0.113.31:3000/login/gitlab
```
Finally, select _read_api_as the_Scope_and submit the form. Note that if you're
Finally, select _read_api_ as the _Scope_ and submit the form. Note that if you're
not going to use GitLab groups for authorization (i.e. not setting
`allowed_groups`, see below), you can select_read_user_ instead of _read_api_as
the_Scope_, thus giving a more restricted access to your GitLab API.
`allowed_groups`, see below), you can select _read_user_ instead of _read_api_ as
the _Scope_, thus giving a more restricted access to your GitLab API.
You'll get an _Application Id_ and a _Secret_ in return; we'll call them
`GITLAB_APPLICATION_ID` and `GITLAB_SECRET` respectively for the rest of this
@@ -94,8 +94,8 @@ display name, especially if the display name contains spaces or special
characters. Make sure you always use the group or subgroup name as it appears
in the URL of the group or subgroup.
Here's a complete example with `allow_sign_up` enabled, with access limited to
the `example` and `foo/bar` groups. The example also promotes all GitLab Admins to Grafana Admins:
Here's a complete example with `allow_sign_up` enabled, and access limited to
the `example` and `foo/bar` groups:
```ini
[auth.gitlab]
@@ -103,28 +103,13 @@ enabled = true
allow_sign_up = true
client_id = GITLAB_APPLICATION_ID
client_secret = GITLAB_SECRET
scopes = read_api
scopes = api
auth_url = https://gitlab.com/oauth/authorize
token_url = https://gitlab.com/oauth/token
api_url = https://gitlab.com/api/v4
allowed_groups = example, foo/bar
role_attribute_path = is_admin && 'Admin' || 'Viewer'
```
### Map roles
You can use GitLab OAuth to map roles. During mapping, Grafana checks for the presence of a role using the [JMESPath](http://jmespath.org/examples.html) specified via the `role_attribute_path` configuration option.
For the path lookup, Grafana uses JSON obtained from querying GitLab's API [`/api/v4/user`](https://docs.gitlab.com/ee/api/users.html#list-current-user-for-normal-users) endpoint. The result of evaluating the `role_attribute_path` JMESPath expression must be a valid Grafana role, for example, `Viewer`, `Editor` or `Admin`. For more information about roles and permissions in Grafana, refer to [Organization roles]({{< relref "../permissions/organization_roles.md" >}}).
An example Query could look like the following:
```bash
role_attribute_path = is_admin && 'Admin' || 'Viewer'
```
This allows every GitLab Admin to be an Admin in Grafana.
### Team Sync (Enterprise only)
> Only available in Grafana Enterprise v6.4+

View File

@@ -27,11 +27,11 @@ Here is an example showing height distribution of people.
For more information about histogram visualization options, refer to [Histogram]({{< relref "../visualizations/histogram.md" >}}).
Histograms only look at _value distributions_ over a specific time range. The problem with histograms is that you cannot see any trends or changes in the distribution over time. This is where heatmaps become useful.
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
A _heatmap_ is like a histogram, but over time, where each time slice represents its own histogram. Instead of using bar height as a representation of frequency, it uses cells, and colors the cell proportional to the number of values in the bucket.
A _heatmap_ is like a histogram, but over time where each time slice represents its own histogram. Instead of using bar height as a representation of frequency, it uses cells and colors the cell proportional to the number of values in the bucket.
In this example, you can clearly see what values are more common and how they trend over time.
@@ -41,23 +41,22 @@ For more information about heatmap visualization options, refer to [Heatmap]({{<
## Pre-bucketed data
There are a number of data sources supporting histogram over time, like Elasticsearch (by using a Histogram bucket
There are a number of data sources supporting histogram over time like Elasticsearch (by using a Histogram bucket
aggregation) or Prometheus (with [histogram](https://prometheus.io/docs/concepts/metric_types/#histogram) metric type
and _Format as_ option set to Heatmap). But generally, any data source could be used as long as it meets the requirement
that it either returns series with names representing bucket bounds, or that it returns series sorted by the bounds
in ascending order.
and _Format as_ option set to Heatmap). But generally, any data source could be used if it meets the requirements:
returns series with names representing bucket bound or returns series sorted by the bound in ascending order.
## Raw data vs aggregated
If you use the heatmap with regular time series data (not pre-bucketed), then it's important to keep in mind that your data
is often already aggregated by your time series backend. Most time series queries do not return raw sample data,
but instead include a group by time interval or maxDataPoints limit coupled with an aggregation function (usually average).
is often already aggregated by your time series backend. Most time series queries do not return raw sample data
but include a group by time interval or maxDataPoints limit coupled with an aggregation function (usually average).
This all depends on the time range of your query of course. But the important point is to know that the histogram bucketing
that Grafana performs might be done on already aggregated and averaged data. To get more accurate heatmaps, it is better
to do the bucketing during metric collection, or to store the data in Elasticsearch or any other data source which
that Grafana performs might be done on already aggregated and averaged data. To get more accurate heatmaps it is better
to do the bucketing during metric collection or store the data in Elasticsearch, or in the other data source which
supports doing histogram bucketing on the raw data.
If you remove or lower the group by time (or raise maxDataPoints) in your query to return more data points, your heatmap will be
more accurate, but this can also be very CPU and memory taxing for your browser, possibly causing hangs or crashes if the number of
If you remove or lower the group by time (or raise maxDataPoints) in your query to return more data points your heatmap will be
more accurate but this can also be very CPU and memory taxing for your browser and could cause hangs and crashes if the number of
data points becomes unreasonably large.

View File

@@ -22,7 +22,7 @@ To identify unique series within a set of time series, Grafana stores dimensions
## Labels
Each time series in Grafana optionally has labels. Labels are set a of key/value pairs for identifying dimensions. Example labels could be `{location=us}` or `{country=us,state=ma,city=boston}`. Within a set of time series, the combination of its name and labels identifies each series. For example, `temperature {country=us,state=ma,city=boston}` could identify the series of temperature values for the city of Boston in the US.
Each time series in Grafana optionally has labels. labels are set a of key/value pairs for identifying dimensions. Example labels could are `{location=us}` or `{country=us,state=ma,city=boston}`. Within a set of time series, the combination of its name and labels identifies each series. For example, `temperature {country=us,state=ma,city=boston}`.
Different sources of time series data have dimensions stored natively, or common storage patterns that allow the data to be extracted into dimensions.
@@ -32,7 +32,7 @@ In table databases such SQL, these dimensions are generally the `GROUP BY` param
## Multiple dimensions in table format
In SQL or SQL-like databases that return table responses, additional dimensions are usually represented as columns in the query response table.
In SQL or SQL-like databases that return table responses, additional dimensions usually columns in the query response table.
### Single dimension
@@ -44,7 +44,7 @@ SELECT BUCKET(StartTime, 1h), AVG(Temperature) AS Temp, Location FROM T
ORDER BY time asc
```
This query would return a table with three columns with data types time, number, and string respectively:
Might return a table with three columns that each respectively have data types time, number, and string.
| StartTime | Temp | Location |
| --------- | ---- | -------- |
@@ -53,7 +53,7 @@ This query would return a table with three columns with data types time, number,
| 10:00 | 26 | LGA |
| 10:00 | 22 | BOS |
The table format is a _long_ formatted time series, also called _tall_. It has repeated time stamps, and repeated values in Location. In this case, we have two time series in the set that would be identified as `Temp {Location=LGA}` and `Temp {Location=BOS}`.
The table format is _long_ formatted time series, also called _tall_. It has repeated time stamps, and repeated values in Location. In this case, we have two time series in the set that would be identified as `Temp {Location=LGA}` and `Temp {Location=BOS}`.
Individual time series from the set are extracted by using the time typed column `StartTime` as the time index of the time series, the numeric typed column `Temp` as the series name, and the name and values of the string typed `Location` column to build the labels, such as Location=LGA.
@@ -80,6 +80,6 @@ In this case the labels that represent the dimensions will have two keys based o
### Multiple values
In the case of SQL-like data sources, more than one numeric column can be selected, with or without additional string columns to be used as dimensions. For example, `AVG(Temperature) AS AvgTemp, MAX(Temperature) AS MaxTemp`. This, if combined with multiple dimensions, can result in a lot of series. Selecting multiple values is currently only designed to be used with visualization.
In the case SQL-like data sources, more than one numeric column can be selected, with or without additional string columns to be used as dimensions. For example, `AVG(Temperature) AS AvgTemp, MAX(Temperature) AS MaxTemp`. This, if combined with multiple dimensions can result in a lot of series. Selecting multiple values is currently only designed to be used with visualization.
Additional technical information on tabular time series formats and how dimensions are extracted can be found in [the developer documentation on data frames as time series]({{< relref "../developers/plugins/data-frames.md#data-frames-as-time-series" >}}).

View File

@@ -15,9 +15,9 @@ Imagine you wanted to know how the temperature outside changes throughout the da
| 10:00 | 26°C |
| 11:00 | 27°C |
Temperature data like this is one example of what we call a _time series_a sequence of measurements, ordered in time. Every row in the table represents one individual measurement at a specific time.
Temperature data like this is one example of what we call a _time series_a sequence of measurements, ordered in time. Every row in the table represents one individual measurement at a specific time.
Tables are useful when you want to identify individual measurements, but they 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.
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.
{{< figure src="/static/img/docs/example_graph.png" class="docs-image--no-shadow" max-width="850px" >}}
@@ -29,14 +29,14 @@ Temperature data like the one in the example, is far from the only example of a
While each of these examples are sequences of chronologically ordered measurements, they also share other attributes:
- New data is appended at the end, at regular intervalsfor example, hourly at 09:00, 10:00, 11:00, and so on.
- Measurements are seldom updated after they were addedfor example, yesterday's temperature doesn't change.
- New data is appended at the end, at regular intervalsfor example, hourly at 09:00, 10:00, 11:00, and so on.
- Measurements are seldom updated after they were addedfor example, yesterday's temperature doesn't change.
Time series are powerful. They help you understand the past by letting you analyze the state of the system at any point in time. Time series could tell you that the server crashed moments after the free disk space went down to zero.
Time series can also help you predict the future, by uncovering trends in your data. If the number of registered users has been increasing monthly by 4% for the past few months, you can predict how big your user base is going to be at the end of the year.
Some time series have patterns that repeat themselves over a known period. For example, the temperature is typically higher during the day, before it dips down at night. By identifying these periodic, or _seasonal_, time series, you can make confident predictions about the next period. If you know that the system load peaks every day around 18:00, you can add more machines right before.
Some time series have patterns that repeat themselves over a known period. For example, the temperature is typically higher during the day, before it dips down at night. By identifying these periodic, or _seasonal_, time series, you can make confident predictions about the next period. If we know that the system load peaks every day around 18:00, we can add more machines right before.
## Aggregating time series
@@ -45,7 +45,7 @@ Depending on what you're measuring, the data can vary greatly. What if you wante
Combining a collection of measurements is called _aggregation_. There are several ways to aggregate time series data. Here are some common ones:
- **Average** returns the sum of all values divided by the total number of values.
- **Min** and **Max** return the smallest and largest value in the collection.
- **Min** and **Max** return the smallest, and largest value in the collection.
- **Sum** returns the sum of all values in the collection.
- **Count** returns the number of values in the collection.
@@ -81,26 +81,26 @@ We could even take it a step further, by calculating the deltas of these deltas:
1572524345, +30, -1, +1, +0
```
If measurements are taken at regular intervals, most of these delta-of-deltas will be 0. Because of optimizations like these, TSDBs use drastically less space than other databases.
If measurements are taken at regular intervals, most of these delta-of-deltas will be 0. Because of optimizations like these, TSDBs uses drastically less space than other databases.
Another feature of a TSDB is the ability to filter measurements using _tags_. Each data point is labeled with a tag that adds context information, such as where the measurement was taken. Here's an example of the [InfluxDB data format](https://docs.influxdata.com/influxdb/v1.7/write_protocols/line_protocol_tutorial/#syntax) that demonstrates how each measurement is stored.
```
weather,location=us-midwest temperature=82 1465839830100400200
| -------------------- -------------- |
| | | |
| | | |
+-----------+--------+-+---------+-+---------+
|measurement|,tag_set| |field_set| |timestamp|
+-----------+--------+-+---------+-+---------+
```
Here are some of the TSDBs supported by Grafana:
- [Graphite](https://graphiteapp.org/)
- [InfluxDB](https://www.influxdata.com/products/influxdb-overview/)
- [Prometheus](https://prometheus.io/)
```
weather,location=us-midwest temperature=82 1465839830100400200
| -------------------- -------------- |
| | | |
| | | |
+-----------+--------+-+---------+-+---------+
|measurement|,tag_set| |field_set| |timestamp|
+-----------+--------+-+---------+-+---------+
```
### Collecting time series data
Now that we have a place to store our time series, how do we actually gather the measurements? To collect time series data, you'd typically install a _collector_ on the device, machine, or instance you want to monitor. Some collectors are made with a specific database in mind, and some support different output destinations.

View File

@@ -1,8 +0,0 @@
+++
title = "Copyright notice"
aliases = ["/docs/grafana/next/copyright-notice"]
+++
# Copyright notice
Copyright &#169; 2021 Raintank, Inc. dba Grafana Labs. All Rights Reserved

View File

@@ -7,42 +7,121 @@ weight = 4
# Playlist
A playlist displays a list of dashboards that are in a sequence. Use a playlist to build situational awareness or to present your metrics to your team or visitors. Grafana automatically scales dashboards to any resolution, which makes them perfect for big screens. This topic has the following sections:
A playlist is a list of dashboards that are displayed in a sequence. You might use a playlist to build situational awareness or to present your metrics to your team or visitors.
- [Access, share, and control a playlist](#access-share-and-control-a-playlist)
- [Create a playlist](#create-a-playlist)
- [Edit or delete a playlist](#edit-or-delete-a-playlist)
- [Share a playlist](#share-a-playlist-in-a-view-mode)
Grafana automatically scales dashboards to any resolution, which makes them perfect for big screens.
## Access, share, and control a playlist
You can access the Playlist feature from Grafana's side menu, in the Dashboards submenu.
Use the information in this section to access existing playlists. Start and control the display of a playlist using one of the five available modes.
{{< figure src="/static/img/docs/v50/playlist.png" max-width="25rem">}}
### Access playlist
## Create a playlist
1. Hover your cursor over Grafanas side menu.
1. Click **Playlists**. You will see a list of existing playlists.
You create a playlist to present dashboards in a sequence, with a set order and time interval between dashboards.
### Start a playlist
1. To access the Playlist feature, hover your cursor over Grafana's side menu.
1. Click **Playlists**.
1. Click **New playlist**.
1. In the **Name** text box, enter a name for your playlist.
1. In the **Interval** text box, enter a time interval.
1. [Access](#access-playlist) the playlist page to see a list of existing playlists.
1. Find the playlist you want to start, then click **Start playlist**. The start playlist dialog opens.
1. Select one of the five playlist modes available based on the information in the following table.
1. Click **Start <playlist name>**.
The time interval is the amount of time for Grafana to stay on a particular dashboard before advancing to the next one on the playlist.
The playlist displays each dashboard for the time specified in the `Interval` field, set when creating or editing a playlist. Once a playlist starts, you can [control](#control-a-playlist) it using the navbar at the top of your screen.
1. Next to the dashboard(s) you want to add to your playlist, click **Add to playlist**.
1. Click **Create**.
| Mode | Description |
| --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Normal mode | <ul><li>The side menu remains visible.</li></ul><ul><li>The navbar, row, and panel controls appear at the top of the screen.</li></ul> |
| TV mode | <ul><li>The side menu and dashboard submenu (including variable drop-downs and dashboard links) are hidden or removed.</li></ul><ul><li>The navbar, row, and panel controls appear at the top of the screen.</li></ul><ul><li>Enabled automatically after one minute of user inactivity.</li></ul><ul><li>Enable it manually using the `d v` sequence shortcut, or by appending the parameter `?inactive` to the dashboard URL.</li></ul><ul><li>Disable it with any mouse movement or keyboard action.</li></ul> |
| TV mode (with auto fit panels) | <ul><li>The side menu and dashboard submenu (including variable drop-downs and dashboard links) are hidden or removed.</li></ul><ul><li>The navbar, row and panel controls appear at the top of the screen.</li></ul><ul><li>Dashboard panels automatically adjust to optimize space on screen.</li></ul><ul> |
| Kiosk mode | <ul><li>The side menu, navbar, ro and panel controls are completely hidden/removed from view.</li></ul><ul><li>You can enable it manually using the `d v` sequence shortcut after the playlist has started.</li></ul><ul><li>You can disable it manually with the same shortcut.</li></ul> |
| Kiosk mode (with auto fit panels) | <ul><li>The side menu, navbar, row, and panel controls are completely hidden/removed from view.</li></ul><ul><li>Dashboard panels automatically adjust to optimize space on screen.</li></ul> |
## Edit a playlist
### Control a playlist
You can edit playlists while creating them or after saving them.
You can control a playlist in **Normal** or **TV** mode after it's started, using the navigation bar at the top of your screen. Press the Esc key in your keyboard to stop the playlist.
1. To access the Playlist feature, hover your cursor over Grafana's side menu.
1. Click **Playlists**.
1. Click on the Playlist that you want to edit.
### Edit the Name of a playlist
1. Double-click within the **Name** text box.
1. Enter a name.
1. Click **Save** to save your changes.
### Edit the Interval of a playlist
1. Double-click within the **Interval** text box.
1. Enter a time interval.
1. Click **Save** to save your changes.
### Add a dashboard to a playlist
1. Next to the dashboard you want to add, click **Add to playlist**.
1. Click **Save** to save your changes.
### Search for a dashboard to add
1. Click the **Search dashboards by name** text box.
1. Search for the playlist by name or regular expression.
1. If needed, filter your results by starred status or tags.
By default, your starred dashboards will appear as options to add to the Playlist.
1. Click **Save** to save your changes.
### Rearrange dashboard order
1. Next to the dashboard you want to move, click the up or down arrow.
1. Click **Save** to save your changes.
### Remove a dashboard
1. Click **Remove[x]** to remove a dashboard from the playlist.
1. Click **Save** to save your changes.
### Delete a playlist
1. Click **Playlists**.
1. Next to the Playlist you want to delete, click **Remove[x]**.
## Save a playlist
You can save a playlist to add it to your **Playlists** page, where you can start it. Be sure that all the dashboards you want to appear in your playlist are added when creating or editing the playlist before saving it.
1. To access the Playlist feature, hover your cursor over Grafana's side menu.
1. Click **Playlists**.
1. Click on the playlist.
1. Edit the playlist.
- Ensure that your playlist has a **Name**, **Interval**, and at least one **Dashboard** added to it.
1. Click **Save**.
## Start a playlist
You can start a playlist in five different view modes, which determine how the menus and navigation bar are displayed on the dashboards.
By default, each dashboard is displayed for the amount of time entered in the Interval field, which can be set while creating or editing a playlist. Once a playlist is started, it can be controlled using the navbar at the top of your screen.
1. From the Dashboards submenu, click **Playlists**.
1. Next to the playlist you want to start, click **Start playlist**.
1. In the dropdown, select the mode you want the playlist to display in.
- **Normal mode:**
- The side menu remains visible.
- The navbar, row and panel controls appear at the top of the screen.
- **TV mode:**
- The side menu is hidden/removed.
- The navbar, row and panel controls appear at the top of the screen.
- Enabled automatically after one minute of user inactivity.
- You can enable it manually using the `d v` sequence shortcut, or by appending the parameter `?inactive` to the dashboard URL.
- You can disable it with any mouse movement or keyboard action.
- **TV mode (with auto fit panels):**
- The side menu is hidden/removed.
- The navbar, row and panel controls appear at the top of the screen.
- Dashboard panels automatically adjust to optimize space on screen.
- **Kiosk mode:**
- The side menu, navbar, row and panel controls are completely hidden/removed from view.
- You can enable it manually using the `d v` sequence shortcut after the playlist has started.
- You can disable it manually with the same shortcut.
- **Kiosk mode (with auto fit panels):**
- The side menu, navbar, row and panel controls are completely hidden/removed from view.
- Dashboard panels automatically adjust to optimize space on screen.
## Control a playlist
You can control a playlist in **Normal** or **TV** mode after it's started, using the navigation bar at the top of your screen.
| Button | Result |
| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -53,37 +132,7 @@ You can control a playlist in **Normal** or **TV** mode after it's started, usin
| Time range | Displays data within a time range. It can be set to display the last 5 minutes up to 5 years ago, or a custom time range, using the down arrow. |
| Refresh (circle arrow) | Reloads the dashboard, to display the current data. It can be set to reload automatically every 5 seconds to 1 day, using the drop down arrow. |
## Create a playlist
You can create a playlist to present dashboards in a sequence, with a set order and time interval between dashboards.
1. In the playlist page, click **New playlist**. The New playlist page opens.
1. In the **Name** text box, enter a descriptive name.
1. In the **Interval** text bos, enter a time interval. Grafana displays a particular dashboard for the interval of time specified here before moving on to the next dashboard.
1. In Dashboards, add existing dashboards to the playlist using **Add by title** and **Add by tag** drop-down options. The dashboards you add are listed in a sequential order.
1. If needed:
- Search for a dashboard by its name, a regular expression, or a tag.
- Filter your results by starred status or tags.
1. If needed, rearrange the order of the dashboard you have added using the up and down arrow icon.
1. Optionally, remove a dashboard from the playlist by clicking the x icon beside dashboard.
1. Click **Save**.
{{< figure src="/static/img/docs/dashboards/create-playlist-8-2.png" max-width="25rem">}}
## Edit or delete a playlist
You can edit a playlist by updating its name, interval time, and by adding, removing, and rearranging the order of dashboards. On the rare occasion when you no longer need a playlist, you can delete it.
### Edit a playlist
1. In the playlist page, click **Edit playlist**. The Edit playlist page opens.
1. Update the name and time interval, then add or remove dashboards from the playlist using instructions in [Create a playlist](#create-a-playlist).
1. Click **Save** to save your changes.
### Delete a playlist
1. In the playlist page, click **Edit playlist**. A prompts opens asking you to confirm the action.
1. Click **delete**.
> Shortcut: Press the Esc key to stop the playlist from your keyboard.
## Share a playlist in a view mode

View File

@@ -10,7 +10,7 @@ weight = 150
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:** Currently, the [Cortex implementation of Prometheus Alertmanager](https://cortexmetrics.io/docs/proposals/scalable-alertmanager/) is required to edit rules.
> **Note:** Currently, the [Cortex implementation of Prometheus Alertmanager](https://cortexmetrics.io/docs/proposals/scalable-alertmanager/) is required to edit rules.
## Provision the Alertmanager data source

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