Compare commits

..

152 Commits

Author SHA1 Message Date
Guilherme Caulada
5e7d575327 Remove failing windows test backend step 2023-05-08 17:07:16 -03:00
Guilherme Caulada
afaefd4516 Fix pipeline for release-9.4.10 (#862) 2023-05-08 15:07:00 -03:00
Grot (@grafanabot)
c2c6e61df6 Release: Bump version to 9.4.10 (#861)
"Release: Updated versions in package to 9.4.10"
2023-05-08 12:31:58 -03:00
Horst Gutmann
d12a747a5d [v9.4.x] CI: Add Windows backend tests in more places (#66438) (#68008)
* CI: Add Windows backend tests in more places

* CI: Add promotion pipeline for publishing new windows-test-images

* CI: Ignore windows backend-test failures for now

* CI: Fix linting issue in ci_images.star file

(cherry picked from commit b2fc285a5d)

Backport of https://github.com/grafana/grafana/pull/66438
2023-05-08 17:04:37 +03:00
Grot (@grafanabot)
bcdc8cd5ab [v9.4.x] AzureMonitor: Fix logs query multi-resource and timespan values (#67931)
AzureMonitor: Fix logs query multi-resource and timespan values (#67914)

* Update TimeGrain interface methods

- Make them util functions because it's simpler

* Update logs ds to appropiately set resources and timespan

* Set timespan using RCF times

* Update tests

(cherry picked from commit 9d16718acc)

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2023-05-05 20:19:04 +03:00
Isabel
1b2f5a3798 [v9.4.x] docs: fix create dashboard steps (#67865)
fixed merge conflict for backport
2023-05-04 13:07:27 -04:00
Grot (@grafanabot)
eafc315dc1 [v9.4.x] Docs: updates Grafana installation for Red Hat, Fedora, RHEL, SUSE, and OpenSUSE (#67773)
Docs: updates Grafana installation for Red Hat, Fedora, RHEL, SUSE, and OpenSUSE (#65232)

* removes references to CentOS

* starts reorg

* complete restructure

* updates alias

* Update docs/sources/setup-grafana/installation/rpm/index.md

* Apply suggestions from code review

Co-authored-by: Dan Cech <dcech@grafana.com>

* incorporates review feedback

* adds install on suse/opensuse

* updates aliases

* Apply suggestions from code review

Co-authored-by: Dan Cech <dcech@grafana.com>

* removes start server content from both topics; adds link to start server docs in Next steps

* Apply suggestions from code review

Co-authored-by: Dan Cech <dcech@grafana.com>

* incorporates review feedback

* Apply suggestions from code review

* typo fix

---------

Co-authored-by: Dan Cech <dcech@grafana.com>
(cherry picked from commit fcdbb7a86f)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-05-04 12:04:01 -05:00
Grot (@grafanabot)
2760aa808d [v9.4.x] Docs/updates install landing page (#67774)
Docs/updates install landing page (#64809)

* copy edit

* copy edits plus some restructuring

* Apply suggestions from code review

Co-authored-by: Dan Cech <dcech@grafana.com>

---------

Co-authored-by: Dan Cech <dcech@grafana.com>
(cherry picked from commit 3b37135b5b)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-05-04 11:59:14 -05:00
Christopher Moyer
9b77be4a08 [Docs v9.4x] Manual backport - Link to config exemplars leads goes to top of page (#67687) (#67856)
Link to config exemplars leads goes to top of page (#67687)

* Link to config exemplars leads goes to top of page

The link to the configure exemplars in a Prometheus datasource leads to the top of the page.  I have referenced the correct link that would take it to the right section.

https://grafana.com/docs/grafana/latest/datasources/prometheus/#configure-exemplars

* Update docs/sources/fundamentals/exemplars/index.md

---------

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
(cherry picked from commit 681925fb63)

Co-authored-by: samu6851 <samuel.oswalt@grafana.com>
2023-05-04 11:53:07 -05:00
Grot (@grafanabot)
2ca13f2b57 [v9.4.x] docs: updates windows/mac install topics (#67775)
docs: updates windows/mac install topics (#64740)

* updates windows/mac install topics

* corrects typo

* Apply suggestions from code review

Co-authored-by: Dan Cech <dcech@grafana.com>

* tweaks

---------

Co-authored-by: Dan Cech <dcech@grafana.com>
(cherry picked from commit d67ad9efc4)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-05-04 11:46:49 -05:00
Grot (@grafanabot)
fbb48cb826 [v9.4.x] docs: Updates installation instruction for Debian/Ubuntu (#67776)
docs: Updates installation instruction for Debian/Ubuntu (#64232)

* draft changes

* Apply suggestions from code review

Co-authored-by: Dan Cech <dcech@grafana.com>

* reworks debian/ubuntu instructions, updates start server topic

* Apply suggestions from code review

Co-authored-by: Dan Cech <dcech@grafana.com>

* incorporates feedback; restructures to align with writers toolkit guidelines

* Apply suggestions from code review

Co-authored-by: Dan Cech <dcech@grafana.com>

* tweaks structure of server topic; renames directory, corrects relrefs

* corrects spelling

* Apply suggestions from code review

Co-authored-by: Dan Cech <dcech@grafana.com>

* removed web parameter

* removes unnecessary word

* incorporates feedback from internal reviewer

* updates alias

* updates alias

* adjust alias

---------

Co-authored-by: Dan Cech <dcech@grafana.com>
(cherry picked from commit 13af5afaf3)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-05-04 11:30:33 -05:00
Grot (@grafanabot)
a567819719 [v9.4.x] InfluxDB: Fix adding FROM statement when the measurement is an empty string (#67834)
InfluxDB: Fix adding FROM statement when the measurement is an empty string (#67827)

* If the measurement empty don't add FROM statement

* Add comment line

(cherry picked from commit 764f87b485)

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2023-05-04 17:09:17 +03:00
Sofia Papagiannaki
ff88bb0102 [v9.4.x] Chore: Upgrade Go to 1.20.4 (#67760)
Chore: Upgrade Go to 1.20.4
2023-05-04 10:53:16 +03:00
Grot (@grafanabot)
6a80a658b8 [v9.4.x] docs: add semi relative time ranges (#67753)
docs: add semi relative time ranges (#67559)

* add semi-relative time range section

* added second example and reworded

* formatting fixes

* added alerting note and fixed formatting

* wording fix

(cherry picked from commit 0271a1d094)

Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
2023-05-03 11:55:43 -04:00
Grot (@grafanabot)
30504b6857 [v9.4.x] Update index.md (#67727)
Update index.md (#67172)

Clarified some of the intro text and added JSON outer element to make the samples clearer

(cherry picked from commit 66ad704292)

Co-authored-by: Nabeel Saad <saadnabs@hotmail.com>
2023-05-03 08:46:51 -05:00
Grot (@grafanabot)
be58e9f116 [v9.4.x] InfluxDB: Fix querying retention policies on flux mode (#67724)
InfluxDB: Fix querying retention policies on flux mode (#67722)

Query retention policies only on InfluxQL mode

(cherry picked from commit 373e4cab9a)

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2023-05-03 16:11:03 +03:00
Grot (@grafanabot)
ad4357b07e [v9.4.x] docs: move misplaced Configure legend page (#67670)
docs: move misplaced Configure legend page (#67597)

* move configure legend page and add alias

* updated page weight and tried fixing alias

* fixed alias

* add preemptive alias for current page location

* apply suggestion from review

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* apply suggestions from review

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* apply suggestions from review

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

---------

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 688459f25c)

Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
2023-05-02 11:51:44 -04:00
Grot (@grafanabot)
04d7c5f790 [v9.4.x] Theme: Fix wrong code segment in theme.md (#65438)
Theme: Fix wrong code segment in theme.md (#62488)

* fix wrong markdown

* fix prettier

(cherry picked from commit 3335d46c5f)

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
2023-05-02 12:16:26 +00:00
Isabel
ee278fe3b9 [9.4.x] docs: reverse what's new order in TOC (#67605)
fixed merge conflict for backport
2023-05-01 17:37:34 -04:00
Grot (@grafanabot)
101927cf04 [v9.4.x] Add Grafana Free as supporting Enterprise features (#67600)
Add Grafana Free as supporting Enterprise features (#67568)

Per https://docs.google.com/document/d/14aOVLPq0FNqQKN4axTTEvjraY_OafhiDM_2NYSHF33A/edit#heading=h.lo4c6e71q7vo Grafana Cloud Free will include all the features of Grafana Advanced in Q2

(cherry picked from commit 999a2ce92d)

Co-authored-by: Ron D <106610617+rgnvldr@users.noreply.github.com>
2023-05-01 15:11:14 -05:00
Leon Sorokin
9ec538568a [v9.4.x] TimeSeries: Fix leading null-fill for missing intervals (#67572)
* TimeSeries: Fix leading null-fill for missing intervals (#67570)

(cherry picked from commit e5aeb7c322)

# Conflicts:
#	packages/grafana-ui/src/components/GraphNG/nullInsertThreshold.ts

* fix jest
2023-04-29 04:15:14 -06:00
Isabel
63ecb1c359 [v9.4.x] docs: fixing merge conflict for backport (#67564)
fixing merge conflict for backport

Co-authored-by: sarah-spang <86264026+sarah-spang@users.noreply.github.com>
2023-04-28 17:03:34 -04:00
Grot (@grafanabot)
885057c4d2 [v9.4.x] Grafana Cloud: Put cloud artifacts to */release dir (#67530)
Grafana Cloud: Put cloud artifacts to `*/release` dir (#66168)

Put cloud artifacts to */release dir

(cherry picked from commit a2634495e5)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2023-04-28 18:23:20 +03:00
Grot (@grafanabot)
8f169dc42d [v9.4.x] Grafana Cloud: Add VariantLinuxAmd64 in build variants (#67527)
Grafana Cloud: Add `VariantLinuxAmd64` in build variants (#66167)

Add VariantLinuxAmd64 in build variants

(cherry picked from commit 8dd87a79f7)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2023-04-28 18:22:13 +03:00
Grot (@grafanabot)
1e7a0c9738 [v9.4.x] Influxdb: Handle legacy Influxdb influxql annotations with target in migration (#67503)
Influxdb: Handle legacy Influxdb influxql annotations with target in migration (#63225)

* handle legacy influxdb annotations with target in migration

* add types

* don't check tags that are empty strings and give annotation a type

(cherry picked from commit 7a3f7e26ce)

Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
2023-04-28 08:55:26 -04:00
Grot (@grafanabot)
82f3e6f5a7 [v9.4.x] docs: update dashboard settings page (#67430)
docs: update dashboard settings page (#67359)

Update index.md

(cherry picked from commit 55c36b04ca)

Co-authored-by: MattiasSegerdahl <102952046+MattiasSegerdahl@users.noreply.github.com>
2023-04-27 13:49:22 -04:00
Christopher Moyer
f5f29e203b [Docs 9.4x] Update configure tracing (#67163) (#67414)
Update configure tracing (#67163)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
(cherry picked from commit 97ddfa631b)

Co-authored-by: MattiasSegerdahl <102952046+MattiasSegerdahl@users.noreply.github.com>
2023-04-27 11:53:06 -05:00
Grot (@grafanabot)
59898b231c [v9.4.x] Docs: Fix broken links to section on Variable syntax page (#67409)
Docs: Fix broken links to section on Variable syntax page (#67340)

These links have a trailing slash which don't work when linking to a
specific element.

(cherry picked from commit 278a8fccc9)

Co-authored-by: Eric Wang <2069450+ericdwang@users.noreply.github.com>
2023-04-27 12:09:24 -04:00
Horst Gutmann
0fdb063576 [v9.4.x] Chore: Update SAML lib (#828)
Update SAML lib
2023-04-27 14:36:34 +03:00
Horst Gutmann
6d1b00c745 AuthJWT: Fix JWT query param leak (CVE-2023-1387) [9.4.x] (#823)
* fix JWT query param leak

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
(cherry picked from commit 9e205a0)

* skip broken test

(cherry picked from commit 58e235a)
2023-04-27 14:36:34 +03:00
Grot (@grafanabot)
44c3c5f269 [v9.4.x] Alerting: Fix misleading status code in provisioning API (#67357)
Alerting: Fix misleading status code in provisioning API (#67331)

Fixes #66249

(cherry picked from commit dfc99cdd19)

Co-authored-by: Uwe Sommerlatt <uwe.sommerlatt@gmail.com>
2023-04-27 11:41:38 +03:00
Grot (@grafanabot)
ded351dc79 [v9.4.x] Azure Monitor: Fix bug that was not showing resources for certain locations (#66617)
Azure Monitor: Fix bug that was not showing resources for certain locations (#66502)

(cherry picked from commit d43482a463)

Co-authored-by: Alyssa Bull <58453566+alyssabull@users.noreply.github.com>
2023-04-26 15:38:46 +03:00
Grot (@grafanabot)
2a6ac647d2 [v9.4.x] Changelog: Updated changelog for 9.4.9 (#67265)
Changelog: Updated changelog for 9.4.9 (#67264)

(cherry picked from commit d5bad429dd)
2023-04-26 12:22:47 +03:00
Grot (@grafanabot)
ac8fd7966a Release: Bump version to 9.4.9 (#67261)
"Release: Updated versions in package to 9.4.9"
2023-04-26 12:09:29 +03:00
Grot (@grafanabot)
eb2d0db641 [v9.4.x] Doc: Fix typo (#67242)
Doc: Fix typo (#66929)

Update index.md

(cherry picked from commit ff61772218)

Co-authored-by: oneoneonepig <oneoneonepig@users.noreply.github.com>
2023-04-25 14:28:10 -05:00
Grot (@grafanabot)
46232f03bb [v9.4.x] docs: Update Screenshot (#67235)
Update Screenshot (#67233)

(cherry picked from commit ad964a0e1d)

Co-authored-by: Stefan Dunkler <stefan.dun@gmail.com>
2023-04-25 14:47:38 -04:00
Grot (@grafanabot)
ffe711cb14 [v9.4.x] Expressions/threshold: Fix incorrect thresholds args length (#66925)
Expressions/threshold: Fix incorrect thresholds args length (#66859)

(cherry picked from commit 350de3f3bf)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2023-04-20 13:16:54 +02:00
Grot (@grafanabot)
63347e0da2 [v9.4.x] Docs: adds legacy wording to api docs (#66941)
Docs: adds legacy wording to api docs (#66937)

adds legacy wording to api docs

(cherry picked from commit 9b529ef0cd)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2023-04-20 11:13:24 +00:00
Gilles De Mey
647edf7f58 Alerting: Fix share URL for Prometheus rules on subpath (#66752) (#66802) 2023-04-20 11:29:37 +02:00
Grot (@grafanabot)
4a7153cabe [v9.4.x] AzureMonitor: Ensure dimension labels are consistent (#66873)
AzureMonitor: Ensure dimension labels are consistent (#66783)

Ensure dimension labels are consistent

(cherry picked from commit c161b28f29)

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2023-04-19 19:17:52 +03:00
Grot (@grafanabot)
1f415749a0 [v9.4.x] [docs] remove auth/saml alias from team sync page (#66855)
[docs] remove auth/saml alias from team sync page (#66796)

removed auth/saml alias from team sync page

(cherry picked from commit 60e6ff1038)

Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
2023-04-19 10:00:55 -04:00
Emil Tullstedt
e37bbc7178 Chore: Upgrade Go to 1.20.3 (#66836)
Backport of #66264.
2023-04-19 14:00:22 +02:00
Grot (@grafanabot)
50d9084d35 [v9.4.x] CloudMonitor: Correctly re-render VisualMetricQueryEditor on TimeRange updates (#66786)
CloudMonitor: Correctly re-render `VisualMetricQueryEditor` on `TimeRange` updates (#66756)

Compare string value rather than object

(cherry picked from commit adf12d0e90)

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2023-04-18 16:34:55 +00:00
Grot (@grafanabot)
f650293066 [v9.4.x] Update index.md (#66717)
Update index.md (#66698)

The useful links were down as they were using /docs/grafana/next/ instead of /docs/grafana/latest/ in the path

(cherry picked from commit 58e3b3a90e)

Co-authored-by: Sébastien Dauphin <dauphin.sebastien@gmail.com>
2023-04-18 14:02:35 +02:00
Grot (@grafanabot)
a7ac9d0b3b [v9.4.x] Trace View: Update the queryType to traceql for checking if same trace when clicking span link (#66670)
Trace View: Update the queryType to traceql for checking if same trace when clicking span link (#66645)

* TraceView: update the queryType to traceql for checking if same trace when clicking span link

* TraceView: linting

* TraceView: remove traceid check completely

(cherry picked from commit 6462c81f81)

Co-authored-by: Eric Mustin <mustin.eric@gmail.com>
2023-04-18 01:01:36 +01:00
Grot (@grafanabot)
36470ebcf3 [v9.4.x] docs: add missing alias (#66675)
docs: add missing alias (#66621)

added missing alias

(cherry picked from commit 2b7f41f4df)

Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
2023-04-17 10:09:14 -04:00
Grot (@grafanabot)
5d2034188b [v9.4.x] removed duplicate query data source section (#66681)
removed duplicate query data source section (#66605)

(cherry picked from commit 1e53b29eee)

Co-authored-by: lwandz13 <126723338+lwandz13@users.noreply.github.com>
2023-04-17 06:50:16 -07:00
Grot (@grafanabot)
b4d141ed1c [v9.4.x] Alerting: Update migration to put alerts to the default folder if dashboard folder is missing (#66593)
Alerting: Update migration to put alerts to the default folder if dashboard folder is missing (#65577)

* extract function

* use context logger

* put alert to general folder if folder is missing

* move folderHelper init

* add test

* Update pkg/services/sqlstore/migrations/ualert/ualert.go

Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>

---------

Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
(cherry picked from commit 7b2f44762e)

Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
2023-04-15 08:08:57 +02:00
Isabel
8f761197a4 [v9.4.x] docs: put the numbers before dashboard elements (#66614)
resolving merge conflict for backport PR

Co-authored-by: samu6851 <samuel.oswalt@grafana.com>
2023-04-14 16:12:26 -04:00
Grot (@grafanabot)
d6785c9223 [v9.4.x] Google Cloud Monitoring: Fix project variable (#66602)
Google Cloud Monitoring: Fix project variable (#66524)

Google Cloud Monitoring: fix project variable

Also fix typo found while debugging

(cherry picked from commit 02951e8a26)

Co-authored-by: Adam Simpson <adam@adamsimpson.net>
2023-04-14 15:29:30 +00:00
Grot (@grafanabot)
6286cba8ee [v9.4.x] InfluxDB: Fix querying with hardcoded retention policy (#66587)
InfluxDB: Fix querying with hardcoded retention policy (#66466)

* Use default retention policy instead of hardcoded retention policy

* Load retention policies for the editor

* Fix the typo

* Add more comment line

* Update comment

* Better error message

* Put back getTagKeys and getTagValues

* Fix unit test

(cherry picked from commit 6d53c87862)

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2023-04-14 16:18:37 +03:00
lwandz13
0ec31973de [v9.4.x]docs:remove duplicate exemplars section (#66398) (#66421)
remove duplicate exemplars section (#66398)

(cherry picked from commit 5197fca70c)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2023-04-13 06:53:35 -07:00
Grot (@grafanabot)
cd8cd0f246 [v9.4.x] Auth: Remove the session cookie only if it's invalid or revoked (#66430)
Auth: Remove the session cookie only if it's invalid or revoked (#65984)

Remove the cookie if it's invalid or revoked

(cherry picked from commit 4cac95d1c2)

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
2023-04-13 09:53:31 +02:00
Grot (@grafanabot)
21e2f26688 [v9.4.x] InfluxDB: Fix Interpolation when querying variables (#66393)
InfluxDB: Fix Interpolation when querying variables (#65875)

Interpolate variables with InfluxQueryModel

(cherry picked from commit 4e71c91cfd)

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2023-04-12 18:01:15 +03:00
Grot (@grafanabot)
49680128cd [v9.4.x] Expressions: Fix expression load with legacy UID -100 (#66387)
Expressions: Fix expression load with legacy UID -100 (#65950)

* Fix expressions instance settings loading

* Introduce a new method to get name or uid

* Update public/app/features/plugins/datasource_srv.ts

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

* Move getNameOrUid method outside the class

---------

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

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2023-04-12 16:53:09 +02:00
Grot (@grafanabot)
edae149230 [v9.4.x] AccessControl: Allow editors to access GET /api/datasources (#66375)
AccessControl: Allow editors to access GET /api/datasources (#66343)

Allow editors to access GET /datasources

(cherry picked from commit 2c21090931)

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
2023-04-12 15:55:33 +02:00
Dimitris Sotirakis
0366e6f469 [v9.4.x] CI: Split /bin/build artifacts * subcommand (#66005) (#66344)
CI: Split `/bin/build artifacts *` subcommand (#66005)

* Split go files

* Modify publishartifacts.go

* Split main

* FIXME: Temp add GCSCopy to gcloud/storage

* Fix lint

* Exported flags

* Update starlark - make drone

* Further backend lint fixes

* Add fallback_test.go

* Fix go imports order

* make drone

* Remove GCSCopy from static assets

* Remove GCSCopy from storybook

* Fix lint

* Remove GCSCopy

* Remove success logline

* drone yaml cleanup

* Add artifacts-editions flag

* Fix starlark

* Add default sting slice in artifacts packages command

(cherry picked from commit 24d348f804)

# Conflicts:
#	.drone.yml
2023-04-12 12:36:33 +03:00
Isabel
0a2401f393 [v9.4] docs: update broken link (#66321)
fixed merge conflict
2023-04-11 16:22:51 -04:00
Grot (@grafanabot)
bca5541355 [v9.4.x] Remove "Open source" label from all "RBAC" pages (#66247)
Remove "Open source" label from all "RBAC" pages (#66129)

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit dec3361331)

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2023-04-11 11:39:52 +03:00
Grot (@grafanabot)
a5b8b383e6 [v9.4.x] Remove "Open source" label from "Recorded queries" page (#66251)
Remove "Open source" label from "Recorded queries" page (#66127)

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit a5499bbf70)

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2023-04-11 11:38:44 +03:00
Grot (@grafanabot)
19cc5aae59 [v9.4.x] fixed broken links (#66178)
fixed broken links (#66153)

(cherry picked from commit ce00465d9b)

Co-authored-by: lwandz13 <126723338+lwandz13@users.noreply.github.com>
2023-04-07 19:06:30 +03:00
Grot (@grafanabot)
2a3f141ca5 [v9.4.x] Alerting: Fix explore link in alert detail view (#66165)
Alerting: Fix explore link in alert detail view (#66106)

(cherry picked from commit cb8a5b2c96)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2023-04-07 14:35:19 +02:00
Grot (@grafanabot)
bfb21e7621 [v9.4.x] Alerting: Fix docs link when creating or editing rules (#66163)
Alerting: Fix docs link when creating or editing rules (#66019)

(cherry picked from commit 3e12b72f58)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2023-04-07 14:41:38 +03:00
Grot (@grafanabot)
cd323622b7 [v9.4.x] CloudMonitoring: Add project selector for MQL editor[fix] (#65844)
CloudMonitoring: Add project selector for MQL editor[fix] (#65567)

(cherry picked from commit 81cb84d098)

Co-authored-by: Alyssa Bull <58453566+alyssabull@users.noreply.github.com>
2023-04-06 20:10:29 +00:00
Grot (@grafanabot)
b0c69c9eec [v9.4.x] Docs: Small fixes for Template Variables Doc (#66138)
Docs: Small fixes for Template Variables Doc (#65947)

* Docs: Small fixes for Template Variables Doc

* Docs: Minor fix to Variables Docs

- Added missing word

* Update docs/sources/dashboards/variables/add-template-variables/index.md

Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>

* empty commit to trigger linting

* small change to trigger linting

---------

Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
Co-authored-by: Isabel Matwawana <isabel.matwawana@grafana.com>
(cherry picked from commit 3685dd56e1)

Co-authored-by: sarah-spang <86264026+sarah-spang@users.noreply.github.com>
2023-04-06 14:35:33 -05:00
Grot (@grafanabot)
0c3bf3f0e9 [v9.4.x] Docs: Add content to what's new 9.4 (#66122)
Docs: Add content to what's new 9.4 (#65895)

* Docs: Add content to what's new 9.4

* Update docs/sources/whatsnew/whats-new-in-v9-4.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/whatsnew/whats-new-in-v9-4.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

---------

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
(cherry picked from commit 75f5cb061e)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2023-04-06 07:50:58 -05:00
Grot (@grafanabot)
b40bf8b3f5 [v9.4.x] docs: fixes link (#66068)
docs: fixes link (#66051)

* fixes link

* Update docs/sources/setup-grafana/configure-security/configure-authentication/enhanced-ldap/index.md

Co-authored-by: melGL <81323402+melgl@users.noreply.github.com>

---------

Co-authored-by: melGL <81323402+melgl@users.noreply.github.com>
(cherry picked from commit 421b911c45)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-04-06 07:21:24 -05:00
Grot (@grafanabot)
876f6e8727 [v9.4.x] Docs: Add example to extract a specific label value (#66018)
Docs: Add the index function

(cherry picked from commit a39190b613)

Co-authored-by: Simon Crute <simonc6372@users.noreply.github.com>
2023-04-05 15:15:53 +01:00
Grot (@grafanabot)
1148da45d3 [v9.4.x] Docs: Updated Grafana OSS Introduction (#66024)
Docs: Updated Grafana OSS Introduction (#66004)

* Added Phlare and added static data sources to intro instead of it just being TSDB sources

* Update docs/sources/introduction/_index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/introduction/_index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

---------

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
(cherry picked from commit e8813916c9)

Co-authored-by: Alex Close <alex.kirtley-close@grafana.com>
2023-04-05 08:23:53 -05:00
Eric Leijonmarck
d37fa06f05 [v9.4.x] Auth: Fix orgrole picker disabled if isSynced user (#65553)
Auth: Fix orgrole picker disabled if isSynced user (#64033)

* fix: disable orgrolepicker if externaluser is synced

* add disable to role picker

* just took me 2 hours to center the icon

* wip

* fix: check externallySyncedUser for API call

* remove check from store

* add: tests

* refactor authproxy and made tests run

* add: feature toggle

* set feature toggle for tests

* add: IsProviderEnabled

* refactor: featuretoggle name

* IsProviderEnabled tests

* add specific tests for isProviderEnabled

* fix: org_user tests

* add: owner to featuretoggle

* add missing authlabels

* remove fmt

* feature toggle

* change config

* add test for a different authmodule

* test refactor

* gen feature toggle again

* fix basic auth user able to change the org role

* test for basic auth role

* make err.base to error

* lowered lvl of log and input mesg

(cherry picked from commit 3cd952b8ba)
2023-04-05 09:55:43 +01:00
Grot (@grafanabot)
f9f0dd8b1b [v9.4.x] Build: Add CloudMode to build versions (#65987)
Build: Add CloudMode to build versions (#65651)

* Add CloudMode to build versions

* Use linux-amd64 variant without musl for cloud mode

* Add cloud mode to version folder on package upload

* Use musl variant for CloudMode

* Only sign rpm packages if there's any to sign

* Remove trailing whitespace

(cherry picked from commit 8f282b8a6e)

Co-authored-by: Guilherme Caulada <guilherme.caulada@grafana.com>
2023-04-05 11:37:03 +03:00
Grot (@grafanabot)
1daa365107 [v9.4.x] Docs: Added note to contact Support (#65958)
Docs: Added note to contact Support (#65235)

* Added note to contact Support

* Update docs/sources/setup-grafana/configure-security/configure-authentication/enhanced-ldap/index.md

* Update docs/sources/setup-grafana/configure-security/configure-authentication/enhanced-ldap/index.md

* makes prettier

* Apply suggestions from code review

---------

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
(cherry picked from commit 445734888b)

Co-authored-by: melGL <81323402+melgl@users.noreply.github.com>
2023-04-04 21:42:47 +03:00
Konrad Lalik
cd4cb967a5 [v9.4.x] Alerting: Disable alerting incompatible panels in the dashboard picke… (#65780)
* Alerting: Disable alerting incompatible panels in the dashboard picker (#65341)

* Hide dashboard hint when dashboard already selected

* Disable panels of types other than graph and timeseries

* Add a test checking disabled panels

* Make all panels selectable

* Fix tests

(cherry picked from commit bde77e4f79)

* Skip flakey test
2023-04-04 09:54:01 +02:00
Dimitris Sotirakis
285d5809c5 [v9.4.x] Backport #65797 and #65806 to v9.4.x (#65857)
* CI: Make `init-enterprise` depend on `grabpl` (#65797)

Make init-enterprise depend on grabpl

# Conflicts:
#	.drone.yml

(cherry picked from commit 821633c796)

# Conflicts:
#	.drone.yml
#	scripts/drone/pipelines/test_frontend.star

* CI: Exclude cloud related tags from tag events  (#65806)

* Exclude cloud related tags

* Fix starlark lint errors

(cherry picked from commit a18ea77aac)

# Conflicts:
#	.drone.yml
2023-04-04 08:36:57 +02:00
Grot (@grafanabot)
7d7751d5b0 [v9.4.x] update enhanced-ldap (#65867)
update enhanced-ldap (#65687)

* update enhanced-ldap

documenting a potential issue with ldap active sync, when search filter and username attributes do not match.

* Update docs/sources/setup-grafana/configure-security/configure-authentication/enhanced-ldap/index.md

* formats example

* Update docs/sources/setup-grafana/configure-security/configure-authentication/enhanced-ldap/index.md

---------

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
(cherry picked from commit 99ac39f0d2)

Co-authored-by: annelaurefroment <49911675+annelaurefroment@users.noreply.github.com>
2023-04-03 11:24:08 -05:00
Grot (@grafanabot)
53d2e59cff [v9.4.x] Docs: Add transformations doc link for What's New v9.2 (#65850)
Docs: Add transformations doc link for What's New v9.2 (#65673)

* Add transformations doc link

Add transformations doc link to `Transformations: INNER JOINs` section.

Related issue: https://github.com/grafana/grafana/issues/65671

* Apply suggestions from code review

Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>

---------

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
(cherry picked from commit b86c0bc4fa)

Co-authored-by: Christine Wang <wang.christiney@gmail.com>
2023-04-03 11:17:54 -05:00
Horst Gutmann
bf3f1368a7 [v9.4.x] CI: Move release integration pipeline to standalone promotion pipeline (#65787) (#65800)
CI: Move release integration pipeline to standalone promotion pipeline (#65787)

(cherry picked from commit e9aef20eb4)
2023-04-03 14:08:05 +03:00
Grot (@grafanabot)
8500eb1c18 [v9.4.x] Alerting: Fix integration test for creating silences (#65790)
Alerting: Fix integration test for creating silences (#65722)

* fix integration test for creating silences

to create correct silence with endsAt in the future

* Update api_alertmanager_test.go

(cherry picked from commit ed8628e39d)

Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
2023-04-03 12:45:19 +03:00
Grot (@grafanabot)
f13eff4287 [v9.4.x] Angular: Prevent angular from loading when disabled (#65777)
* Angular: Prevent angular from loading when disabled (#65755)

* Angular: Prevent angular from loading when disabled

* remove stuff

(cherry picked from commit 093498a03b)

* Update

---------

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-04-03 12:10:06 +03:00
Sofia Papagiannaki
ecaeafd4f3 [9.4.x]: API: Fix "Updated by" Column in dashboard versions table (#65626)
* API: Fix  "Updated by" Column in dashboard versions table (#65351)

* API: Fix dashboard versions created by field

* Add tests

* Update OpenAPI specs

* Apply suggestion from code review

(cherry picked from commit 3cd3bb00ec)

* Fix guardian call
2023-03-31 11:56:36 +02:00
Alexander Weaver
e9d53761fb Alerting: Introduce proper feature toggles for common state history backend combinations (#65650)
* Alerting: Introduce proper feature toggles for common state history backend combinations (#65497)

* define 3 feature toggles for rollout phases

* Pass feature toggles along

* Implement first feature toggle

* Try a different strategy with fall-throughs to specific configurations

* Apply toggle overrides once outside of backend composition

* Emit log messages when we coerce backends

* Run code generator for feature toggle files

* Improve wording in flag descs

* Re-run generator

* Use code-generated constants instead of plain strings

* Use converted enum values rather than strings for pre-parsing

(cherry picked from commit b2abb63286)

* Remove generated file that is only present in future versions
2023-03-30 14:29:43 -05:00
Grot (@grafanabot)
66e3f8dc23 [v9.4.x] Docs: Fix markup for URL (#65649)
Docs: Fix markup for URL (#65576)

* Docs: Fix markup for URL

* updates absolute URL to a relref

---------

Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
(cherry picked from commit 940768cf76)

Co-authored-by: sarah-spang <86264026+sarah-spang@users.noreply.github.com>
2023-03-30 21:59:14 +03:00
Grot (@grafanabot)
fc6b8f9c6c [v9.4.x] Give more detail and context on http_addr in grafana.ini (#65644)
Give more detail and context on http_addr in grafana.ini (#65187)

* Give more detail and context on http_addr in grafana.ini

This particular configuration item is misleadingly named (it's about networking addresses rather than HTTP) and there are a bunch of ways users can misread, misconfigure, and create a situation where grafana won't start due to a bind error.

I'm trying to outline a couple of extra things about what this covers and provide good default advice, leaving room for specialists who know what they're doing to still use this, with more clarity.

* Update _index.md

* Apply suggestions from code review

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update _index.md

removed recommendation note about http_addr

* makes prettier

---------

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
(cherry picked from commit 765073a776)

Co-authored-by: David Allen <david.allen@grafana.com>
2023-03-30 12:34:10 -05:00
Alexander Weaver
76c3e1863b Alerting: Fix and re-enable filters instance labels in log line test (#65622)
Alerting: Fix and re-enable `filters instance labels in log line` test (#65618)

Fix and reenable test

(cherry picked from commit 5e87ea745d)
2023-03-30 09:44:48 -05:00
Grot (@grafanabot)
a3ef453ff6 [v9.4.x] Docs: updates type to integration (#65592)
Docs: updates type to integration (#65591)

* Docs: updates type to integration

* fixes link

* fixes links

(cherry picked from commit c77aa11545)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2023-03-30 10:27:49 +02:00
Grot (@grafanabot)
37f2a0aa32 [v9.4.x] Docs: Fix Nightly Builds URL (#65570)
Docs: Fix Nightly Builds URL (#65552)

Update _index.md

URL for Nightly Builds leads to standard download page.
- Updated to direct to correct Nightly Downloads page: https://grafana.com/grafana/download/nightly?edition=oss

(cherry picked from commit 8717cd0761)

Co-authored-by: sarah-spang <86264026+sarah-spang@users.noreply.github.com>
2023-03-29 16:39:37 -05:00
Grot (@grafanabot)
1b9abfeec8 [v9.4.x] Docs: Update version for "What's New" section (#65571)
Docs: Update version for "What's New" section (#65554)

(cherry picked from commit 906086c91b)

Co-authored-by: sarah-spang <86264026+sarah-spang@users.noreply.github.com>
2023-03-29 16:39:17 -05:00
Alexander Weaver
3bf0352fbb Alerting: No longer index state history log streams by instance labels (#65563)
Alerting: No longer index state history log streams by instance labels (#65474)

* Remove private labels

* No longer index by instance labels

* Labels are now invariant, only build them once

* Remove bucketing since everything is in a single stream

* Refactor statesToStreams to only return a single unified log stream

* Don't query on labels that no longer exist

* Move selector logic to loki layer, genericize client to work in terms of straight logQL

* Add support for line-level label filters in query

* Combine existing selector tests for better parallelism

* Tests for logQL construction

* Underscore instead of dot for unwrapping labels in logql

(cherry picked from commit a416100abc)
2023-03-29 16:11:12 -05:00
ismail simsek
132900fe2e [v9.4.x] InfluxDB: Fix sending retention policy with InfluxQL queries (#65532)
InfluxDB: Fix sending retention policy with InfluxQL queries (#63820)

* Send retention policy if that is specified

* Define the type

* Update default retention policy name

* Update unit tests

* fix unit tests

* fix unit tests again

* Load retention policies at first

* Fix tests

* Fix Editor tests

* Remove unused code

* A simpler approach

* Even simpler

* Even simpler

(cherry picked from commit 0aee7338ad)
2023-03-29 21:57:44 +03:00
Grot (@grafanabot)
009fa712c2 [v9.4.x] configure HTTPS documentation (#65560)
configure HTTPS documentation  (#65271)

* configure HTTPS settings for grafana

* Apply suggestions from code review

* Apply suggestions from code review

* rewrites and restructures content

* Apply suggestions from code review

* PR feedback review; https docs

* Update docs/sources/setup-grafana/set-up-https.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/setup-grafana/set-up-https.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/setup-grafana/set-up-https.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/setup-grafana/set-up-https.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/setup-grafana/set-up-https.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/setup-grafana/set-up-https.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/setup-grafana/set-up-https.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* errata

* make prettier

* Apply suggestions from code review

---------

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
(cherry picked from commit 4839f1543a)

Co-authored-by: David Allen <david.allen@grafana.com>
2023-03-29 13:23:49 -05:00
Yuri Tseretyan
413ac1ec7d Chore: Update alerting to commit 518e63bb07c5 (#65488)
* update alerting module to 518e63bb07c5
* update slack test to cover json and text response content-type cases
2023-03-29 13:07:06 -04:00
Grot (@grafanabot)
266a7407f6 [v9.4.x] Dashboards: Evaluate provisioned dashboard titles in a backwards compatible way (#65440)
Backport from #65184 using github.com/xorcare/pointer instead of the newer util.Pointer.

(cherry picked from commit b210a39cb7)

---------

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2023-03-29 11:25:44 +02:00
Grot (@grafanabot)
90db06d65b [v9.4.x] docs: fix enhanced ldap alias (#65485)
docs: fix enhanced ldap alias (#65478)

fixed alias

(cherry picked from commit 4b29b1d741)

Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
2023-03-28 14:43:42 -05:00
Grot (@grafanabot)
a080d453b4 [v9.4.x] docs: update elasticsearch grafana play link (#65480)
docs: update elasticsearch grafana play link (#65280)

(cherry picked from commit 0d3e0e7cc4)

Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
2023-03-28 14:30:33 -05:00
Grot (@grafanabot)
8374ef84df [v9.4.x] Remove redundant content or delete this page entirely (#65473)
Remove redundant content or delete this page entirely (#65446)

* Remove redundant content or delete this page entirely

The top of the page has redundant content pitching Grafana Cloud.

"You can also configure the MS SQL Server data source on a Grafana Cloud instance without having to host Grafana yourself."  Which is directly under the highlighted area explaining the same thing.  The same content is floating in the right side of all the pages as well.

Removed "> **Note:** You must install Grafana 5.1+ in order to use the integrated MS SQL data source."

Wait, why does this page exist if the data source page has the relevant updated content?  https://grafana.com/docs/grafana/latest/datasources/mssql/

* makes prettier

---------

Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
(cherry picked from commit 2b73f8cfd5)

Co-authored-by: mallettjared <110853992+mallettjared@users.noreply.github.com>
2023-03-28 12:58:52 -05:00
Gilles De Mey
ef6476d92b Alerting: Use displayNameFromDS if available in preview (#65342) (#65445) 2023-03-28 18:15:52 +02:00
Grot (@grafanabot)
144efd25b8 [v9.4.x] MegaMenu: Fixes mega menu showing scroll indicator when it shouldn't (#65465)
MegaMenu: Fixes mega menu showing scroll indicator when it shouldn't (#65452)

* MegaMenu: Fixes mega menu showing scroll indicator when it shouldn't

* fixing css

(cherry picked from commit 273e05a9a2)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-03-28 18:55:09 +03:00
Grot (@grafanabot)
cb5c92a375 [v9.4.x] CI: Allow overwriting of existing GitHub release assets (#65459)
CI: Allow overwriting of existing GitHub release assets (#65127)

* CI: Allow overwriting of existing GitHub release assets

This closes #63698

* Use c for *cli.Context in publishgithub.go

(cherry picked from commit 4ab3bd6f7e)

Co-authored-by: Horst Gutmann <horst.gutmann@grafana.com>
2023-03-28 17:31:14 +02:00
Gilles De Mey
6a73b2b726 Email: Mark HTML comments as "safe" in email templates (#64546) (#65443) 2023-03-28 17:26:15 +02:00
Grot (@grafanabot)
d3c37d28ed [v9.4.x] Alerting: Add alert instance labels to Loki log lines in addition to stream labels (#65454)
Alerting: Add alert instance labels to Loki log lines in addition to stream labels (#65403)

Add instance labels to log line

(cherry picked from commit de1637afe5)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2023-03-28 17:11:43 +03:00
Grot (@grafanabot)
1b8d220d96 [v9.4.x] Alerting: Add "backend" label to state history writes metrics (#65453)
Alerting: Add "backend" label to state history writes metrics (#65395)

* Add backend label to state history writes metrics

* Update test expectations

(cherry picked from commit dd04757fc9)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2023-03-28 17:06:57 +03:00
Grot (@grafanabot)
8fad42fa6f [v9.4.x] DateTimePicker: Can now select time correctly (#65431) 2023-03-28 13:11:52 +02:00
Grot (@grafanabot)
9d00d07a6a [v9.4.x] Alerting: Fix wrong text in step4 (#65348)
Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>
Fix wrong text in step4 (#65279)
2023-03-28 13:04:32 +02:00
Grot (@grafanabot)
7b874aa327 [v9.4.x] Increase coverage of 'Grafana Cloud' labels (#64752)
Increase coverage of 'Grafana Cloud' labels (#64646)

* Add 'Grafana Cloud' label to content

All pages are applicable to both 'Open source' and 'Grafana Cloud'

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Add 'Grafana Cloud' label to administration content with some exceptions

- Enterprise licensing is 'Open source' and 'Enterprise'.
- 'Manage Organizations', 'Provision Grafana', and 'Stats and License' are 'Open source' only.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Remove OSS from enterprise-licensing content

* Apply suggestions from code review

---------

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit dca5adeb98)

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2023-03-28 11:51:36 +01:00
Will Browne
0d7efc076c [v9.4.x] Plugins: Markdown fetch retry with lowercase (#65388)
cherry pick
2023-03-28 12:19:20 +02:00
Grot (@grafanabot)
d14faf3cc0 [v9.4.x] Docs: Add 'tenant_id' for Loki clients (Auditing & Analytics) (#65401)
Docs: Add 'tenant_id' for Loki clients (Auditing & Analytics) (#63098)

* Docs: Add 'tenant_id' for Loki clients (Auditing & Analytics)

* Apply suggestions from code review

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Apply suggestions from code review

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

---------

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>
(cherry picked from commit f9abd8608e)

Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
2023-03-27 23:49:19 +03:00
Sofia Papagiannaki
67dd929f5e [v9.4.x]: Upgrade golang.org/x/net to 0.7.0 (#65337)
* go mod tidy

* go get golang.org/x/net@v0.7.0
2023-03-27 17:57:49 +03:00
Grot (@grafanabot)
72dad41413 [v9.4.x] Navigation: Sanitize homeUrl (#65365)
Navigation: Sanitize homeUrl (#65293)

sanitize homeUrl

(cherry picked from commit f948482386)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-03-27 15:41:32 +01:00
Dimitris Sotirakis
84e9267612 [v9.4.x] CI: Cleanup unnecessary grabpl dependencies (#65330) (#65347)
CI: Cleanup unnecessary `grabpl` dependencies (#65330)

* Remove unnecessary grabpl dependencies

* Revert test-frontend change

(cherry picked from commit 89d642e001)

# Conflicts:
#	.drone.yml
2023-03-27 16:41:23 +03:00
Virginia Cepeda
9bafdcb72a Alerting: Improve showing nextEvaluationDate for rules (#65205) (#65227)
* Improve showing nextEvaluationDate for rules

Co-Authored-By: Konrad Lalik <konradlalik@gmail.com>

* Improve imports and comments

---------

Co-authored-by: Konrad Lalik <konradlalik@gmail.com>
(cherry picked from commit b90aed4fd7)
2023-03-27 10:32:20 -03:00
Grot (@grafanabot)
bb3e08a0a1 [v9.4.x] Alerting: Fix stats that display alert count when using unified alerting (#64951)
* Alerting: Fix stats that display alert count when using unified alerting (#64852)

* Alerting: Fix stats when using unified alerting

(cherry picked from commit 02a8f62021)

* bundle services is not needed for 9.4.x

---------

Co-authored-by: gotjosh <josue.abreu@gmail.com>
2023-03-27 14:30:27 +01:00
Grot (@grafanabot)
0680231781 [v9.4.x] Database: Don't sleep 10ms before every request (#65334)
Database: Don't sleep 10ms before every request (#64832)

Previously every DB operation would wait 10ms before even trying.
Now we try first, and defer creating the ticker until we need it.

(cherry picked from commit f4a5f91496)

Co-authored-by: Bryan Boreham <bjboreham@gmail.com>
2023-03-27 12:30:50 +03:00
Grot (@grafanabot)
8288d962ef [v9.4.x] Docs: Use correct function in labels and annotations docs (#65253)
Docs: Use correct function in labels and annotations docs (#65032)

Use correct function in labels and annotations docs

(cherry picked from commit 0464aebc8e)

Co-authored-by: Martin Beentjes <martinbeentjes@users.noreply.github.com>
2023-03-27 11:10:12 +02:00
Dimitris Sotirakis
bd37c60b50 [v9.4.x] CI: Remove grabpl dependency from publish-packages steps (#65329) (#65333)
CI: Remove `grabpl` dependency from `publish-packages` steps (#65329)

Remove grabpl dependency from publish packages

(cherry picked from commit 3b00d2c273)

# Conflicts:
#	.drone.yml
2023-03-27 11:29:02 +03:00
Jack Baldry
e37fb197b2 [v9.4.x] Add @imatwawana to CODEOWNERS for her area of responsibility (#65158)
Add @imatwawana to CODEOWNERS for her area of responsibility (#64963)


(cherry picked from commit 8941ca813c)

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2023-03-26 10:42:44 +01:00
Grot (@grafanabot)
0f87c31a2c [v9.4.x] Changelog: Updated changelog for 9.4.7 (#65296)
Changelog: Updated changelog for 9.4.7 (#65292)

(cherry picked from commit a02a28f229)
2023-03-23 12:52:45 -05:00
Grot (@grafanabot)
97fc76da27 [v9.4.x] Docs/updates amazon cloudwatch (#65282)
Docs/updates amazon cloudwatch (#64987)

* updated AWS to Amazon in the index file

* edited query editor index file -AWS with Amazon

(cherry picked from commit 0975e53fc0)

Co-authored-by: lwandz13 <126723338+lwandz13@users.noreply.github.com>
2023-03-23 08:50:55 -07:00
Gilles De Mey
54fe185e80 Alerting: Paginate result previews (#65257) (#65273)
Co-authored-by: konrad147 <konradlalik@gmail.com>
Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>
2023-03-23 16:01:52 +01:00
Grot (@grafanabot)
96d1d9981d [v9.4.x] Changelog: Updated changelog for 9.4.7 (#65269)
Changelog: Updated changelog for 9.4.7 (#65268)

(cherry picked from commit da97139489)
2023-03-23 14:28:25 +01:00
Grot (@grafanabot)
f54cf0865a [v9.4.x] Expressions: More robust expression check (#65177)
Expressions: More robust expression check (#65006)

More robust expression check

(cherry picked from commit 1328878ace)

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2023-03-22 20:57:17 +01:00
Dimitris Sotirakis
ffe9b71a27 [v9.4.x] CD: Remove fetch-images dependency from AWS marketplace automation (#65173) (#65197)
CD: Remove `fetch-images` dependency from AWS marketplace automation (#65173)

* Remove fetch-images dependency

* Fix starlark link

(cherry picked from commit d0be9610f0)

# Conflicts:
#	.drone.yml
2023-03-22 18:56:03 +02:00
Grot (@grafanabot)
4a825cad7b [v9.4.x] Changelog: Updated changelog for 9.4.7 (#65209)
Changelog: Updated changelog for 9.4.7 (#65208)

(cherry picked from commit adcdf190bb)
2023-03-22 17:47:28 +01:00
ismail simsek
ca91072d5b [v9.4.x] Fix xss in Graphite functions tooltip (#805)
Fix xss in Graphite functions tooltip (#804)

(cherry picked from commit 87aad3f11836f810ee1fdfee27827e746ef36055)

Co-authored-by: Ludovic Viaud <ludovic.viaud@gmail.com>
2023-03-22 17:41:54 +01:00
Grot (@grafanabot)
b1c73a9984 [v9.4.x] SQL Datasources: Prevent Call Stack Overflows with Large Numbers of Values for Variable (#65182)
SQL Datasources: Prevent Call Stack Overflows with Large Numbers of Values for Variable (#64937)

* Push values with every map call to avoid hitting the maximum call stack size.

* Add test and refactor to for of

* Use native fill instead of lodash

---------

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

Co-authored-by: Kyle Cunningham <codeincarnate@users.noreply.github.com>
2023-03-22 15:17:47 +01:00
Konrad Lalik
721605af13 Alerting: Prometheus-compatible Alertmanager timings editor (#64526) (#65124)
* Alerting: Prometheus-compatible Alertmanager timings editor (#64526)

* Change Alertmanager timings editor

* Update timing inputs for default policy editor

* Switch prom duration inputs in notification policy form

* Fix a11y issues

* Fix validation

* Add timings forms tests

* Fix default policy form and add more tests

* Add notification policy form tests

* Add todo item

* Remove unused code

* Use default timings object to fill placeholder values

(cherry picked from commit d8e32cc929)

* Adjust code and tests to v.9.4 codebase

* Remove unused code, remove TODO item
2023-03-22 13:26:14 +01:00
Grot (@grafanabot)
950b15d0aa [v9.4.x] Alerting: Fix attachment of external labels to Loki state history log streams (#65142)
Alerting: Fix attachment of external labels to Loki state history log streams (#65140)

Fix attachment of external labels, add tests

(cherry picked from commit 07368dec74)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2023-03-22 09:15:44 +02:00
Alexander Weaver
788dc25416 Alerting: Switch to snappy-compressed-protobuf for outgoing push requests to Loki (#65137)
* Alerting: Switch to snappy-compressed-protobuf for outgoing push requests to Loki (#65077)

* Encode with snappy, always

* JSON encoder type

* Headers

* Copy labels formatter from promtail

* Implement snappy-proto encoding

* Create encoder interface, test both encoders, choose snappy-proto by default

* Make encoder configurable at the LokiCfg level

* Export both encoders

* Touch up comment and tests

* Drop unnecessary conversions after move to plain strings to appease linter

(cherry picked from commit bf54f2672e)

* Sample fields got renamed between 9.4 and main
2023-03-21 16:42:01 -05:00
Alexander Weaver
744c1164e7 Alerting: Fix ambiguous handling of equals in labels when bucketing Loki state history streams (#65135)
Alerting: Fix ambiguous handling of equals in labels when bucketing Loki state history streams (#65013)

* Use JSON instead of data.Labels string format as label repr

* Drop debug log line

(cherry picked from commit cc7e5ce62e)
2023-03-21 19:59:57 +02:00
Brendan O'Handley
2c6ad8867f Prometheus: Feedback link for metric encyclopedia plus performance im… (#64773)
Prometheus: Feedback link for metric encyclopedia plus performance improvements (#64576)

* add filtered results

* add feedback link

* correctly debounce fuzzy search thank you leon

* reduce calls to filterMetrics()in letter search

* clean up the alphabet type

* bug fix, filter type should be subtractive

* each filter is don;t explicitly, subtracting from the results of each

* Revert "each filter is don;t explicitly, subtracting from the results of each"

This reverts commit 5648788451.

* each filter is filtered explicitly, one after the other, subtracting from the results of each

(cherry picked from commit 2e4b134743)
2023-03-21 11:56:49 -04:00
Grot (@grafanabot)
4b6a015256 [v9.4.x] Alerting: Elide requests to Loki if nothing should be recorded (#65118)
Alerting: Elide requests to Loki if nothing should be recorded (#65011)

Exit early if no log streams or annotations

(cherry picked from commit e39d7f44c9)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2023-03-21 16:50:47 +02:00
Grot (@grafanabot)
4452c15714 [v9.4.x] Fix x-value being formatted as time when not necessary (#65114)
Fix x-value being formatted as time when not necessary (#65095)

(cherry picked from commit 24ecc7d0dc)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2023-03-21 16:13:14 +02:00
Grot (@grafanabot)
4b95a36e82 [v9.4.x] Docs: fix numbering and rename topic (#65107)
Docs: fix numbering and rename topic (#65093)

* Docs: fix numbering and rename topic

* fixes typo

* removes full stops

* deletes :

(cherry picked from commit 89c65e22d3)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2023-03-21 14:14:04 +01:00
Dimitris Sotirakis
612edc2665 [v9.4.x] CI: Update grabpl to 3.0.30 (#65028) (#65091)
CI: Update `grabpl` to `3.0.30` (#65028)

Update grabpl

(cherry picked from commit 4a80233bed)

# Conflicts:
#	.drone.yml
2023-03-21 12:14:17 +02:00
Grot (@grafanabot)
fa2a8b2bd5 [v9.4.x] Docs: Add documentation on how to debug backend plugins (#65088)
Docs: Add documentation on how to debug backend plugins (#64814)

* Docs: Add documentation on how to debug backend plugins

* Changes from PR reviews

* PR review changes

(cherry picked from commit 41b0c17aae)

Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>
2023-03-21 10:43:03 +01:00
Horst Gutmann
29d69eb16f [v9.4.x] Update CODEOWNERship for grafana-delivery team (#64973) (#65018)
Update CODEOWNERship for grafana-delivery team (#64973)

(cherry picked from commit 2897ee37bf)
2023-03-21 11:27:45 +02:00
Grot (@grafanabot)
553b90d1e7 [v9.4.x] CloudWatch Logs: Revert "Queries in an expression should run synchronously (#64443)" (#65067)
CloudWatch Logs: Revert "Queries in an expression should run synchronously (#64443)" (#65036)

Revert "CloudWatch Logs: Queries in an expression should run synchronously (#64443)"

This reverts commit 74436d31de.

(cherry picked from commit 972e611f76)

Co-authored-by: Shirley <4163034+fridgepoet@users.noreply.github.com>
2023-03-20 19:51:38 +01:00
Grot (@grafanabot)
50952f0a7a [v9.4.x] [Docs] - Add Warning about Version Downgrade and Alerting to Grafana … (#65062)
[Docs] - Add Warning about Version Downgrade and Alerting to Grafana … (#64896)

* [Docs] - Add Warning about Version Downgrade and Alerting to Grafana v9.4 Upgrade Instructions

Add Warning about Version Downgrade and Alerting to Grafana v9.4 Upgrade Instructions

* Update docs/sources/upgrade-guide/upgrade-v9.4/index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/upgrade-guide/upgrade-v9.4/index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* makes prettier

---------

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
(cherry picked from commit 661e44ae6d)

Co-authored-by: SeamusGrafana <102023327+SeamusGrafana@users.noreply.github.com>
2023-03-20 13:03:28 -05:00
Grot (@grafanabot)
bc4e9e3215 [v9.4.x] Information about SQLite limitations (#65066)
Information about SQLite limitations (#64990)

* Update _index.md

I am creating this PR to add more content about the SQLite (the default database for Grafana) limitations. SQLite is fine for small environments but not suitable when monitoring many Dashboards and sending lots of alerts frequently.

For e.g. this issue is just from this week and then got followed up by 3-4 more similar issues (all related to SQLite and are linked with this issue)

Closes #64664

By adding more information, will have less frequency of such issues reported by users.

Also, once this PR get submitted, will also create a new PR about the possible workaround to not get the error message "database locked" while using SQLite.

* Update docs/sources/setup-grafana/installation/_index.md

Thank you. Also, can you please add this link to the High Availablity text as hyperlink.

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/setup-grafana/installation/_index.md

* Update docs/sources/setup-grafana/installation/_index.md

---------

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
(cherry picked from commit ccfe09d20e)

Co-authored-by: Usman Ahmad <69509548+usmangt@users.noreply.github.com>
2023-03-20 12:06:09 -05:00
Grot (@grafanabot)
6a1d736f03 [v9.4.x] KVStore: Include database field in migration (#65037)
KVStore: Include database field in migration (#62790)

(cherry picked from commit b0213a4877)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2023-03-20 12:44:03 +01:00
Konrad Lalik
bf3422740b Alerting: Fix notification policies matcher filter (#64967) 2023-03-20 07:55:50 +01:00
Grot (@grafanabot)
231cb2b835 [v9.4.x] AzureMonitor: Fix query variable migration (#64982)
AzureMonitor: Fix query variable migration (#63991)

* AzureMonitor: Fix query variable migration

Somehow the query object becomes "unwriteable" post 9.4. To workaround
this I clone the query object before doing any migrations which removes
the immutability and allows the migrations to function as they did.

Fixes #63943

* refactor deepClone out to keep object the same

(cherry picked from commit 3498785184)

Co-authored-by: Adam Simpson <adam@adamsimpson.net>
2023-03-18 21:21:40 +02:00
Grot (@grafanabot)
a440178397 [v9.4.x] Vendor errors.Join from Go standard library to avoid version incompatibilities (#64986)
Vendor errors.Join from Go standard library to avoid version incompatibilities (#64985)

Vendor errors.Join from std lib

(cherry picked from commit 40c5713cbd)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2023-03-17 14:42:31 -05:00
Grot (@grafanabot)
85c794d932 [v9.4.x] Alerting: Create new state history "fanout" backend that dispatches to multiple other backends at once (#64983)
Alerting: Create new state history "fanout" backend that dispatches to multiple other backends at once (#64774)

* Rename RecordStatesAsync to Record

* Rename QueryStates to Query

* Implement fanout writes

* Implement primary queries

* Simplify error joining

* Add test for query path

* Add tests for writes and error propagation

* Allow fanout backend to be configured

* Touch up log messages and config validation

* Consistent documentation for all backend structs

* Parse and normalize backend names more consistently against an enum

* Touch-ups to documentation

* Improve clarity around multi-record blocking

* Keep primary and secondaries more distinct

* Rename fanout backend to multiple backend

* Simplify config keys for multi backend mode

(cherry picked from commit a31672fa40)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2023-03-17 20:13:12 +02:00
Grot (@grafanabot)
1f498f9ff7 [v9.4.x] AzureMonitor: Increase wait for credentials to be ready in E2E test (#64980)
AzureMonitor: Increase wait for credentials to be ready in E2E test (#64969)

Increase wait for credentials to be ready

(cherry picked from commit edc47964b6)

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2023-03-17 16:56:12 +00:00
Grot (@grafanabot)
7e5e3d78d0 [v9.4.x] SQLStore: Fix setting query retries for integration tests (#64972)
SQLStore: Fix setting query tries for integration tests (#64944)

* SQLStore: Pass testinfra database configuration to the test database

* Add test

* Bypass gocyclo check for initTestDB

(cherry picked from commit f5cb8c660e)

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2023-03-17 18:05:30 +02:00
Grot (@grafanabot)
c5f4ef6c3e [v9.4.x] Alerting: Handful of small adjustments to log levels and parameters (#64954)
Alerting: Handful of small adjustments to log levels and parameters (#64572)

Calculate duration earlier in scheduler

(cherry picked from commit 9bcf8819d3)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2023-03-17 14:33:55 +02:00
Grot (@grafanabot)
69a7d5d6a6 [v9.4.x] SQLStore: Fix SQLite error propagation if query retries are disabled (#64948)
SQLStore: Fix SQLite error propagation if query retries are disabled (#64904)

* SQLStore: Add test when query retrying is disabled

* Fix condition

* Add test cases for sqlite3.ErrLocked

(cherry picked from commit 41843464d1)

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2023-03-17 13:33:37 +02:00
Grot (@grafanabot)
3d1085c6ad [v9.4.x] Navigation: handle case when there is no alerting node at all (#64950)
Navigation: handle case when there is no alerting node at all (#64941)

* handle case when there is no alerting node at all

* update backend tests

(cherry picked from commit f4c62a5c5d)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-03-17 13:27:40 +02:00
Grot (@grafanabot)
5d6a6677a2 [v9.4.x] Alerting: QoL improvements to the unified alerting multi-replica devenv (#64939)
Alerting: QoL improvements to the unified alerting multi-replica devenv (#64907)

(cherry picked from commit 406431df4e)

Co-authored-by: gotjosh <josue.abreu@gmail.com>
2023-03-17 10:59:13 +00:00
Grot (@grafanabot)
b5c092f03e [v9.4.x] Navigation: Correctly create Alerts and incidents section when using legacy alerting (#64926)
Navigation: Correctly create `Alerts and incidents` section when using legacy alerting (#64924)

check for legacy alerting node as well

(cherry picked from commit 54dd8943ca)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-03-16 20:17:48 +02:00
Grot (@grafanabot)
46030b3b69 [v9.4.x] LogContext: Fix height of upper group when using logsContextDatasourceUi (#64617)
LogContext: Fix height of upper group when using `logsContextDatasourceUi` (#64602)

fix wrong height being set

(cherry picked from commit 7cde6acbef)

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
2023-03-16 08:09:01 -07:00
Grot (@grafanabot)
0e11822954 [v9.4.x] Fix broken link in "Publish a plugin" page and lint the page with doc-validator (#64895)
Fix broken link in "Publish a plugin" page and lint the page with doc-validator (#64881)

* Use one sentence per line for better line based diffing

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Add missing and required description front matter

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Fix heading hierarchy

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Fix doc-validator linting errors

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Add doc-validator make target

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Fix nested lists

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

---------

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 68e38aad6a)

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2023-03-16 12:22:47 +00:00
337 changed files with 8503 additions and 3536 deletions

View File

@@ -1,5 +1,5 @@
// BETTERER RESULTS V2.
//
//
// If this file contains merge conflicts, use `betterer merge` to automatically resolve them:
// https://phenomnomnominal.github.io/betterer/docs/results-file/#merge
//
@@ -2128,9 +2128,6 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "7"],
[0, 0, 0, "Unexpected any. Specify a different type.", "8"]
],
"public/app/angular/services/nav_model_srv.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],
"public/app/angular/services/ng_react.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"],
@@ -4280,27 +4277,20 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
[0, 0, 0, "Do not use any type assertions.", "2"],
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
[0, 0, 0, "Do not use any type assertions.", "4"],
[0, 0, 0, "Do not use any type assertions.", "5"],
[0, 0, 0, "Do not use any type assertions.", "6"],
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
[0, 0, 0, "Unexpected any. Specify a different type.", "6"],
[0, 0, 0, "Unexpected any. Specify a different type.", "7"],
[0, 0, 0, "Do not use any type assertions.", "8"],
[0, 0, 0, "Do not use any type assertions.", "9"],
[0, 0, 0, "Unexpected any. Specify a different type.", "10"],
[0, 0, 0, "Do not use any type assertions.", "11"],
[0, 0, 0, "Unexpected any. Specify a different type.", "9"],
[0, 0, 0, "Do not use any type assertions.", "10"],
[0, 0, 0, "Unexpected any. Specify a different type.", "11"],
[0, 0, 0, "Do not use any type assertions.", "12"],
[0, 0, 0, "Do not use any type assertions.", "13"],
[0, 0, 0, "Unexpected any. Specify a different type.", "14"],
[0, 0, 0, "Do not use any type assertions.", "14"],
[0, 0, 0, "Unexpected any. Specify a different type.", "15"],
[0, 0, 0, "Unexpected any. Specify a different type.", "16"],
[0, 0, 0, "Unexpected any. Specify a different type.", "17"],
[0, 0, 0, "Unexpected any. Specify a different type.", "18"],
[0, 0, 0, "Do not use any type assertions.", "19"],
[0, 0, 0, "Unexpected any. Specify a different type.", "20"],
[0, 0, 0, "Do not use any type assertions.", "21"],
[0, 0, 0, "Unexpected any. Specify a different type.", "22"],
[0, 0, 0, "Unexpected any. Specify a different type.", "23"],
[0, 0, 0, "Do not use any type assertions.", "24"]
[0, 0, 0, "Do not use any type assertions.", "17"]
],
"public/app/features/plugins/importPanelPlugin.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
@@ -5856,8 +5846,8 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
[0, 0, 0, "Do not use any type assertions.", "6"],
[0, 0, 0, "Do not use any type assertions.", "5"],
[0, 0, 0, "Unexpected any. Specify a different type.", "6"],
[0, 0, 0, "Unexpected any. Specify a different type.", "7"],
[0, 0, 0, "Unexpected any. Specify a different type.", "8"],
[0, 0, 0, "Unexpected any. Specify a different type.", "9"],
@@ -5867,13 +5857,13 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "13"],
[0, 0, 0, "Unexpected any. Specify a different type.", "14"],
[0, 0, 0, "Unexpected any. Specify a different type.", "15"],
[0, 0, 0, "Unexpected any. Specify a different type.", "16"],
[0, 0, 0, "Do not use any type assertions.", "17"],
[0, 0, 0, "Do not use any type assertions.", "16"],
[0, 0, 0, "Unexpected any. Specify a different type.", "17"],
[0, 0, 0, "Unexpected any. Specify a different type.", "18"],
[0, 0, 0, "Unexpected any. Specify a different type.", "19"],
[0, 0, 0, "Unexpected any. Specify a different type.", "20"],
[0, 0, 0, "Unexpected any. Specify a different type.", "21"],
[0, 0, 0, "Do not use any type assertions.", "22"],
[0, 0, 0, "Do not use any type assertions.", "21"],
[0, 0, 0, "Unexpected any. Specify a different type.", "22"],
[0, 0, 0, "Unexpected any. Specify a different type.", "23"],
[0, 0, 0, "Unexpected any. Specify a different type.", "24"],
[0, 0, 0, "Unexpected any. Specify a different type.", "25"],
@@ -5883,8 +5873,7 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "29"],
[0, 0, 0, "Unexpected any. Specify a different type.", "30"],
[0, 0, 0, "Unexpected any. Specify a different type.", "31"],
[0, 0, 0, "Unexpected any. Specify a different type.", "32"],
[0, 0, 0, "Unexpected any. Specify a different type.", "33"]
[0, 0, 0, "Unexpected any. Specify a different type.", "32"]
],
"public/app/plugins/datasource/influxdb/influx_query_model.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
@@ -5906,8 +5895,7 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "16"],
[0, 0, 0, "Unexpected any. Specify a different type.", "17"],
[0, 0, 0, "Unexpected any. Specify a different type.", "18"],
[0, 0, 0, "Unexpected any. Specify a different type.", "19"],
[0, 0, 0, "Unexpected any. Specify a different type.", "20"]
[0, 0, 0, "Unexpected any. Specify a different type.", "19"]
],
"public/app/plugins/datasource/influxdb/influx_series.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],

View File

@@ -14,6 +14,7 @@ load(
"artifacts_page_pipeline",
"enterprise2_pipelines",
"enterprise_pipelines",
"integration_test_pipelines",
"oss_pipelines",
"publish_artifacts_pipelines",
"publish_npm_pipelines",
@@ -24,6 +25,10 @@ load(
"publish_image_pipelines_public",
"publish_image_pipelines_security",
)
load(
"scripts/drone/pipelines/ci_images.star",
"publish_ci_windows_test_image_pipeline",
)
load("scripts/drone/pipelines/github.star", "publish_github_pipeline")
load("scripts/drone/pipelines/aws_marketplace.star", "publish_aws_marketplace_pipeline")
load("scripts/drone/version.star", "version_branch_pipelines")
@@ -52,6 +57,8 @@ def main(_ctx):
publish_packages_pipeline() +
artifacts_page_pipeline() +
version_branch_pipelines() +
integration_test_pipelines() +
publish_ci_windows_test_image_pipeline() +
cronjobs() +
secrets()
)

1611
.drone.yml

File diff suppressed because it is too large Load Diff

76
.github/CODEOWNERS vendored
View File

@@ -34,19 +34,25 @@ SUPPORT.md @torkelo
UPGRADING_DEPENDENCIES.md @grafana/docs-grafana
WORKFLOW.md @torkelo
# Set up, dashboards/visualization, best practices: Chris Moyer
# Alerting: Brenda Muir
/docs/sources/administration/ @Eve832 @GrafanaWriter
/docs/sources/alerting/ @brendamuir
/docs/sources/dashboards/ @chri2547
/docs/sources/datasources/ @Eve832 @GrafanaWriter
/docs/sources/explore/ @Eve832 @GrafanaWriter
/docs/sources/getting-started/ @chri2547
/docs/sources/old-alerting/ @brendamuir
/docs/sources/release-notes/ @Eve832 @GrafanaWriter
/docs/sources/setup-grafana/ @chri2547
/docs/sources/whatsnew/ @Eve832 @GrafanaWriter
# Technical documentation
/docs/ @Eve832 @jdbaldry
/docs/sources/ @Eve832
/docs/sources/administration/ @Eve832 @GrafanaWriter
/docs/sources/alerting/ @brendamuir
/docs/sources/dashboards/ @imatwawana
/docs/sources/datasources/ @Eve832 @GrafanaWriter
/docs/sources/explore/ @Eve832 @GrafanaWriter
/docs/sources/fundamentals @chri2547
/docs/sources/getting-started/ @chri2547
/docs/sources/introduction/ @chri2547
/docs/sources/old-alerting/ @brendamuir
/docs/sources/panels-visualizations/ @imatwawana
/docs/sources/release-notes/ @Eve832 @GrafanaWriter
/docs/sources/setup-grafana/ @chri2547
/docs/sources/upgrade-guide/ @chri2547 @imatwawana
/docs/sources/whatsnew/ @chri2547 @imatwawana
/docs/sources/developers/plugins/ @Eve832 @josmperez @grafana/plugins-platform-frontend @grafana/plugins-platform-backend
/docs/sources/developers/plugins/backend/ @Eve832 @grafana/plugins-platform-backend
# Backend code
/go.mod @grafana/backend-platform
@@ -220,14 +226,14 @@ WORKFLOW.md @torkelo
# Continuous Integration
.drone.yml @grafana/grafana-release-eng
.drone.star @grafana/grafana-release-eng
/scripts/drone/ @grafana/grafana-release-eng
/pkg/build/ @grafana/grafana-release-eng
/.dockerignore @grafana/grafana-release-eng
/Dockerfile @grafana/grafana-release-eng
/Makefile @grafana/grafana-release-eng
/scripts/build/ @grafana/grafana-release-eng
.drone.yml @grafana/grafana-delivery
.drone.star @grafana/grafana-delivery
/scripts/drone/ @grafana/grafana-delivery
/pkg/build/ @grafana/grafana-delivery
/.dockerignore @grafana/grafana-delivery
/Dockerfile @grafana/grafana-delivery
/Makefile @grafana/grafana-delivery
/scripts/build/ @grafana/grafana-delivery
# OSS Plugin Partnerships backend code
/pkg/tsdb/cloudwatch/ @grafana/aws-plugins
@@ -453,25 +459,25 @@ lerna.json @grafana/frontend-ops
/scripts/benchmark-access-control.sh @grafana/grafana-authnz-team
/scripts/check-breaking-changes.sh @grafana/plugins-platform-frontend
/scripts/ci-* @grafana/grafana-release-eng
/scripts/circle-* @grafana/grafana-release-eng
/scripts/ci-* @grafana/grafana-delivery
/scripts/circle-* @grafana/grafana-delivery
/scripts/ci-frontend-metrics.sh @grafana/user-essentials @grafana/plugins-platform-frontend @grafana/grafana-bi-squad
/scripts/cli/ @grafana/user-essentials
/scripts/clean-git-or-error.sh @grafana/grafana-as-code
/scripts/grafana-server/ @grafana/user-essentials
/scripts/helpers/ @grafana/grafana-release-eng
/scripts/helpers/ @grafana/grafana-delivery
/scripts/import_many_dashboards.sh @torkelo
/scripts/mixin-check.sh @bergquist
/scripts/openapi3/ @grafana/grafana-partnerships-team
/scripts/prepare-packagejson.js @grafana/frontend-ops
/scripts/protobuf-check.sh @grafana/plugins-platform-backend
/scripts/stripnulls.sh @grafana/grafana-as-code
/scripts/tag_release.sh @grafana/grafana-release-eng
/scripts/trigger_docker_build.sh @grafana/grafana-release-eng
/scripts/trigger_grafana_packer.sh @grafana/grafana-release-eng
/scripts/trigger_windows_build.sh @grafana/grafana-release-eng
/scripts/validate-devenv-dashboards.sh @grafana/grafana-release-eng
/scripts/verify-repo-update/ @grafana/grafana-release-eng
/scripts/tag_release.sh @grafana/grafana-delivery
/scripts/trigger_docker_build.sh @grafana/grafana-delivery
/scripts/trigger_grafana_packer.sh @grafana/grafana-delivery
/scripts/trigger_windows_build.sh @grafana/grafana-delivery
/scripts/validate-devenv-dashboards.sh @grafana/grafana-delivery
/scripts/verify-repo-update/ @grafana/grafana-delivery
/scripts/webpack/ @grafana/frontend-ops
/scripts/generate-a11y-report.sh @grafana/user-essentials
@@ -570,9 +576,9 @@ embed.go @grafana/grafana-as-code
/.github/pr-commands.json @marefr
/.github/renovate.json5 @grafana/frontend-ops
/.github/teams.yml @armandgrillet
/.github/workflows/backport.yml @grafana/grafana-release-eng
/.github/workflows/bump-version.yml @grafana/grafana-release-eng
/.github/workflows/close-milestone.yml @grafana/grafana-release-eng
/.github/workflows/backport.yml @grafana/grafana-delivery
/.github/workflows/bump-version.yml @grafana/grafana-delivery
/.github/workflows/close-milestone.yml @grafana/grafana-delivery
/.github/workflows/cloud-data-sources-code-coverage.yml @grafana/partner-plugins @grafana/aws-plugins
/.github/workflows/codeowners-validator.yml @tolzhabayev
/.github/workflows/codeql-analysis.yml @DanCech
@@ -599,8 +605,8 @@ embed.go @grafana/grafana-as-code
/.github/workflows/scripts/json-file-to-job-output.js @grafana/plugins-platform-frontend
/.github/workflows/scripts/pr-get-job-link.js @grafana/plugins-platform-frontend
/.github/workflows/stale.yml @grafana/user-essentials
/.github/workflows/update-changelog.yml @grafana/grafana-release-eng
/.github/workflows/update-changelog.yml @grafana/grafana-delivery
/.github/workflows/snyk.yml @grafana/security-team
# Conf
/conf/defaults.ini @torkelo

2
.gitignore vendored
View File

@@ -79,6 +79,8 @@ public/css/*.min.css
/devenv/docker-compose.override.yaml
/devenv/.env
/devenv/docker/blocks/tempo/tempo-data/
/devenv/docker/ha-test-unified-alerting/logs/webhook/dumps/
/devenv/docker/ha-test-unified-alerting/logs/webhook/webhook-listener.log
conf/custom.ini
/conf/provisioning/**/custom.yaml

View File

@@ -1,3 +1,31 @@
<!-- 9.4.9 START -->
# 9.4.9 (2023-04-24)
### Features and enhancements
- **Chore:** Upgrade Go to 1.20.3. [#66264](https://github.com/grafana/grafana/pull/66264), [@sakjur](https://github.com/sakjur)
<!-- 9.4.9 END -->
<!-- 9.4.7 START -->
# 9.4.7 (2023-03-16)
### Bug fixes
- **Alerting:** Update scheduler to receive rule updates only from database. [#64780](https://github.com/grafana/grafana/pull/64780), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Influxdb:** Re-introduce backend migration feature toggle. [#64842](https://github.com/grafana/grafana/pull/64842), [@itsmylife](https://github.com/itsmylife)
- **Security:** Fixes for CVE-2023-1410. [#65278](https://github.com/grafana/grafana/pull/65278), [@itsmylife](https://github.com/itsmylife)
### Breaking changes
The InfluxDB backend migration feature toggle (influxdbBackendMigration) has been reintroduced in this version as issues were discovered with backend processing of InfluxDB data. Unless this feature toggle is enabled, all InfluxDB data will be parsed in the frontend. This frontend processing is the default behavior.
In Grafana 9.4.4, InfluxDB data parsing started to be handled in the backend. If you have upgraded to 9.4.4 and then added new transformations on InfluxDB data, those panels will fail to render. To resolve this either:
- Remove the affected panel and re-create it
- Edit the `time` field as `Time` in `panel.json` or `dashboard.json` Issue [#64842](https://github.com/grafana/grafana/issues/64842)
<!-- 9.4.7 END -->
<!-- 9.4.3 START -->
# 9.4.3 (2023-03-02)

View File

@@ -2,7 +2,7 @@
ARG BASE_IMAGE=alpine:3.17
ARG JS_IMAGE=node:18-alpine3.17
ARG GO_IMAGE=golang:1.20.1-alpine3.17
ARG GO_IMAGE=golang:1.20.4-alpine3.17
ARG GO_SRC=go-builder
ARG JS_SRC=js-builder

View File

@@ -173,7 +173,7 @@ build-docker-full-ubuntu: ## Build Docker image based on Ubuntu for development.
DOCKER_BUILDKIT=1 \
docker build \
--build-arg BASE_IMAGE=ubuntu:20.04 \
--build-arg GO_IMAGE=golang:1.20.1 \
--build-arg GO_IMAGE=golang:1.20.4 \
--tag grafana/grafana:dev-ubuntu .
##@ Services

View File

@@ -29,11 +29,12 @@ function Foo(props: FooProps) {
const styles = useStyles2(getStyles);
// Use styles with className
}
```
const getStyles = (theme: GrafanaTheme2) => css({
padding: theme.spacing(1,2)
});
const getStyles = (theme: GrafanaTheme2) =>
css({
padding: theme.spacing(1, 2),
});
```
#### Get the theme object

View File

@@ -0,0 +1,12 @@
FROM golang:1.19
ADD webhook-listener.go /go/src/webhook/webhook-listener.go
WORKDIR /go/src/webhook
RUN mkdir /tmp/logs
RUN go build -o /bin webhook-listener.go
ENV PORT 8080
ENTRYPOINT [ "/bin/webhook-listener" ]

View File

@@ -32,7 +32,7 @@ services:
environment:
- VIRTUAL_HOST=prometheus.loc
ports:
- 909
- 9090
nginx-proxy:
image: jwilder/nginx-proxy
ports:
@@ -43,48 +43,53 @@ services:
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
extends:
file: ./grafana-service.yml
service: grafana
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
extends:
file: ./grafana-service.yml
service: grafana
ports:
- 3020:3000
depends_on:
db:
condition: service_healthy
grafana1:
condition: service_healthy
grafana3:
extends:
file: ./grafana-service.yml
service: grafana
ports:
- 3030:3000
depends_on:
db:
condition: service_healthy
grafana2:
condition: service_healthy
grafana4:
extends:
file: ./grafana-service.yml
service: grafana
ports:
- 3040:3000
depends_on:
db:
condition: service_healthy
grafana3:
condition: service_healthy
webhook:
image: webhook-receiver
build:
context: .
dockerfile: Dockerfile
ports:
- "18081:8080"
volumes:
- "./logs/webhook:/tmp/logs:rw"

View File

@@ -0,0 +1,23 @@
services:
grafana:
image: grafana/grafana-dev:3a22eba17f23b18faa27436ab2f9c3ea977b550b
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,ha-test-unified-alerting-grafana3-1:9094,ha-test-unified-alerting-grafana4-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
healthcheck:
test: timeout 10s bash -c ':> /dev/tcp/127.0.0.1/3000' || exit 1
interval: 5s
timeout: 15s
retries: 3

View File

@@ -0,0 +1,181 @@
package main
import (
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
"path"
"path/filepath"
"sync"
"time"
)
var (
fingerprints = make(Fingerprints)
mu sync.Mutex
waitSeconds int
logFile bool
logFileName = filepath.Join(os.TempDir(), "/logs/webhook-listener.log")
dumpDir = filepath.Join(os.TempDir(), "/logs/dumps")
)
type Alert struct {
Fingerprint string `json:"fingerprint"`
StartsAt time.Time `json:"startsAt"`
Status string `json:"status"`
}
type Data struct {
Receiver string `json:"receiver"`
Status string `json:"status"`
Alerts []Alert `json:"alerts"`
}
// Fingerprints keeps track of the number of alerts received
// by fingerprint and StartsAt time.
type Fingerprints map[string]map[time.Time]tracker
type tracker struct {
Updates int `json:"updates"`
Statuses []string `json:"statuses"`
}
func updateFingerprints(v Data) {
mu.Lock()
defer mu.Unlock()
for _, alert := range v.Alerts {
m, ok := fingerprints[alert.Fingerprint]
if !ok {
m = make(map[time.Time]tracker)
}
t, ok := m[alert.StartsAt]
if !ok {
t = tracker{
Updates: 0,
Statuses: []string{},
}
}
t.Updates += 1
t.Statuses = append(t.Statuses, alert.Status)
m[alert.StartsAt] = t
fingerprints[alert.Fingerprint] = m
}
}
func parseFlags() {
flag.BoolVar(&logFile, "log-file", true, "Whether to log to file")
flag.IntVar(&waitSeconds, "wait-seconds", 0, "The number of seconds to wait before sending an HTTP response")
flag.Parse()
}
func saveDump(data []byte) {
if !logFile {
return
}
if len(data) == 0 {
fmt.Println("empty dump - not saving")
return
}
ts := time.Now().UnixNano()
name := path.Join(dumpDir, fmt.Sprintf("%d.json", ts))
for i := 1; i <= 1000; i++ {
if _, err := os.Stat(name); os.IsNotExist(err) {
break
}
name = path.Join(dumpDir, fmt.Sprintf("%d_%04d.json", ts, i))
}
log.Printf("saving dump to %s", name)
err := os.WriteFile(name, data, os.ModePerm)
if err != nil {
log.Printf("cannot save to file %s: %s\n", name, err)
}
}
func main() {
parseFlags()
_, err := os.Stat(dumpDir)
if os.IsNotExist(err) {
err = os.MkdirAll(dumpDir, os.ModePerm)
if err != nil {
log.Panicf("can't create directory '%s'", dumpDir)
}
}
if logFile {
//create your file with desired read/write permissions
f, err := os.OpenFile(logFileName, os.O_WRONLY|os.O_CREATE|os.O_APPEND, os.ModePerm)
if err != nil {
log.Fatal(err)
}
defer f.Close()
log.SetOutput(f)
}
waitDuration := time.Duration(waitSeconds) * time.Second
http.HandleFunc("/", func(writer http.ResponseWriter, request *http.Request) {
writer.WriteHeader(http.StatusOK)
writer.Write([]byte(landingPage))
})
http.HandleFunc("/listen", func(w http.ResponseWriter, r *http.Request) {
log.Printf("got submission from: %s\n", r.RemoteAddr)
b, err := ioutil.ReadAll(r.Body)
if err != nil {
log.Println(err)
w.WriteHeader(http.StatusBadRequest)
return
}
saveDump(b)
v := Data{}
if err := json.Unmarshal(b, &v); err != nil {
log.Println(err)
w.WriteHeader(http.StatusBadRequest)
return
}
fmt.Printf("receiver: %s, status: %s\n", v.Receiver, v.Status)
updateFingerprints(v)
<-time.After(waitDuration)
})
http.HandleFunc("/fingerprints", func(w http.ResponseWriter, r *http.Request) {
b, err := func() ([]byte, error) {
mu.Lock()
defer mu.Unlock()
return json.Marshal(fingerprints)
}()
if err != nil {
log.Println(err)
w.WriteHeader(http.StatusInternalServerError)
return
}
w.Header().Add("Content-Type", "application/json")
w.Write(b)
})
log.Println("Listening")
log.Printf("Wait Duration %v\n", waitDuration)
http.ListenAndServe("0.0.0.0:8080", nil)
}
const landingPage = `
<!doctype html>
<html>
<head>
<title>Webhook listener</title>
</head>
<body>
<h1>Webhook Listener<h1>
<p> For setup, please point your webhook configuration to the "/listen" endpoint. </p>
<p> For debugging, please use the "/fingerprints" endpoint. </p>
</body>
</html>
`

View File

@@ -26,3 +26,8 @@ docs-local-static: pull
if [ ! -d "$(LOCAL_STATIC_PATH)" ]; then echo "local path (website project) $(LOCAL_STATIC_PATH) not found"]; exit 1; fi
$(PODMAN) run --init -v $(shell pwd)/sources:$(CONTENT_PATH):Z \
-v $(shell pwd)/$(LOCAL_STATIC_PATH):/hugo/static:Z -p $(PORT) --rm -it $(IMAGE)
.PHONY: doc-validator/%
doc-validator/%: ## Run doc-validator on a specific path. To lint the path /docs/sources/administration, run 'make doc-validator/administration'.
doc-validator/%:
$(PODMAN) run --init -v "$(shell pwd)/sources:/sources" grafana/doc-validator:latest --skip-image-validation --include=$(subst doc-validator/,,$@) ./sources /docs/grafana/latest

View File

@@ -40,7 +40,7 @@ title: Grafana documentation
</div>
<h5>Grafana Cloud</h5>
</a>
<a href="https://grafana.com/grafana/download" class="nav-cards__item nav-cards__item--install">
<a href="https://grafana.com/grafana/nightly?edition=oss" class="nav-cards__item nav-cards__item--install">
<div class="nav-cards__icon fa fa-moon-o">
</div>
<h5>Nightly builds</h5>
@@ -70,8 +70,8 @@ title: Grafana documentation
<h4>Provisioning</h4>
<p>Learn how to automate your Grafana configuration.</p>
</a>
<a href="{{< relref "whatsnew/whats-new-in-v9-2/" >}}" class="nav-cards__item nav-cards__item--guide">
<h4>What's new in v9.2</h4>
<a href="{{< relref "whatsnew/whats-new-in-v9-4/" >}}" class="nav-cards__item nav-cards__item--guide">
<h4>What's new in v9.4</h4>
<p>Explore the features and enhancements in the latest release.</p>
</a>

View File

@@ -1,4 +1,10 @@
---
cascade:
labels:
products:
- cloud
- enterprise
- oss
description: Administration
title: Administration
weight: 40

View File

@@ -8,6 +8,10 @@ aliases:
- ../enterprise/license/license-expiration/
- ../enterprise/license/license-restrictions/
- license-restrictions/
cascade:
labels:
products:
- enterprise
description: Activate and manage a Grafana Enterprise license
keywords:
- grafana
@@ -99,7 +103,7 @@ GF_SERVER_ROOT_URL=https://grafana.example.com/
### Step 4. Restart Grafana
To finalize the installation of Grafana Enterprise, restart Grafana to enable all Grafana Enterprise features. Refer to [restart Grafana]({{< relref "../../setup-grafana/restart-grafana/" >}}) for more information.
To finalize the installation of Grafana Enterprise, restart Grafana to enable all Grafana Enterprise features. Refer to [restart Grafana]({{< relref "../../setup-grafana/start-restart-grafana/" >}}) for more information.
## License expiration
@@ -121,7 +125,7 @@ If your license has expired, most of Grafana keeps working as normal. Some enter
2. Log in to your [Grafana Cloud Account](/login) and make sure you're in the correct organization in the dropdown at the top of the page.
3. Under the **Grafana Enterprise** section in the menu bar to the left, choose licenses and download the currently valid license with which you want to run Grafana. If you cannot see a valid license on Grafana.com, please contact your account manager at Grafana Labs to renew your subscription.
4. Replace the current `license.jwt`-file with the one you've just downloaded.
5. [Restart Grafana]({{< relref "../../setup-grafana/restart-grafana/" >}}).
5. [Restart Grafana]({{< relref "../../setup-grafana/start-restart-grafana/" >}}).
### If your license expires

View File

@@ -121,6 +121,6 @@ To restart Grafana on a Kubernetes cluster,
1. After you update the service, navigate to your Grafana instance, sign in with Grafana Admin credentials, and navigate to the Statistics and Licensing page to validate that your license is active.
For more information about restarting Grafana, refer to [Restart Grafana]({{< relref "../../../../setup-grafana/restart-grafana/" >}}).
For more information about restarting Grafana, refer to [Restart Grafana]({{< relref "../../../../setup-grafana/start-restart-grafana/" >}}).
> If you experience issues when you update the EKS cluster, refer to [Amazon EKS troubleshooting](https://docs.aws.amazon.com/eks/latest/userguide/troubleshooting.html).

View File

@@ -127,4 +127,4 @@ Choose one of the following options to update the [license_validation_type]({{<
To activate Grafana Enterprise features, start (or restart) Grafana.
For information about restarting Grafana, refer to [Restart Grafana]({{< relref "../../../../setup-grafana/restart-grafana/" >}}).
For information about restarting Grafana, refer to [Restart Grafana]({{< relref "../../../../setup-grafana/start-restart-grafana/" >}}).

View File

@@ -8,6 +8,10 @@ description: Describes how to use organizations to isolate dashboard to users an
keywords:
- organizations
- dashboards
labels:
products:
- enterprise
- oss
menuTitle: Manage organizations
title: Manage organizations
weight: 200

View File

@@ -5,6 +5,10 @@ description: Describes provisioning settings for Grafana using configuration fil
keywords:
- grafana
- provisioning
labels:
products:
- enterprise
- oss
title: Provision Grafana
weight: 600
---

View File

@@ -7,6 +7,10 @@ keywords:
- query
- queries
- recorded
labels:
products:
- cloud
- enterprise
title: Recorded queries
weight: 300
---

View File

@@ -3,6 +3,11 @@ aliases:
- ../../enterprise/access-control/
- ../../enterprise/access-control/about-rbac/
- ../../enterprise/access-control/roles/
cascade:
labels:
products:
- cloud
- enterprise
description: Role-based access control (RBAC) provides a standardized way of granting,
changing, and revoking access so that users can view and modify Grafana resources,
such as users and reports.

View File

@@ -11,6 +11,10 @@ keywords:
- configuration
- server
- settings
labels:
products:
- enterprise
- oss
title: Stats and license
weight: 400
---

View File

@@ -6,7 +6,7 @@ title: Explore Alerting
weight: 105
---
# Explore Alerting
# Introduction to Alerting
Whether youre starting or expanding your implementation of Grafana Alerting, learn more about the key concepts and available features that help you create, manage, and take action on your alerts and improve your teams ability to resolve issues quickly.

View File

@@ -315,7 +315,7 @@ The `toUpper` function returns all text in uppercase.
#### Example
```
{{ toLower "Hello, world!" }}
{{ toUpper "Hello, world!" }}
```
```

View File

@@ -25,9 +25,9 @@ You can also use notification templating to customize notification messages for
If you've created an OnCall contact point in the Grafana OnCall application, you can view it in the Alerting application.
## Supported contact point types
## Supported contact point integrations
The following table lists the contact point types supported by Grafana.
The following table lists the contact point integrations supported by Grafana.
| Name | Type | Grafana Alertmanager | Other Alertmanagers |
| ------------------------------------------------ | ------------------------- | -------------------- | -------------------------------------------------------------------------------------------------------- |
@@ -54,6 +54,6 @@ The following table lists the contact point types supported by Grafana.
## Useful links
[Manage contact points](https://grafana.com/docs/grafana/next/alerting/manage-notifications/create-contact-point/)
[Manage contact points](/docs/grafana/latest/alerting/manage-notifications/create-contact-point/)
[Create and edit notification templates](https://grafana.com/docs/grafana/next/alerting/manage-notifications/create-message-template/)
[Create and edit notification templates](/docs/grafana/latest/alerting/manage-notifications/template-notifications/create-notification-templates/)

View File

@@ -76,6 +76,23 @@ You can configure grouping to be `group_by: [alertname]` (take note that the `en
1. Make any changes using instructions in [Add new specific policy](#add-new-specific-policy).
1. Click **Save policy**.
## Searching for policies
Grafana allows you to search within the tree of policies by the following:
- **Label matchers**
- **Contact Points**
To search by contact point, simply enter a part or full name you are looking for.
To search by label matchers simply enter a valid matcher in the **Search by matchers** input field. Multiple matchers can be combined with a comma (`,`).
An example of a valid matchers search input is:
`severity=high, region=~EMEA|NASA`
> All matched policies will be **exact** matches, we currently do not support regex-style or partial matching.
## Example
An example of an alert configuration.

View File

@@ -71,6 +71,16 @@ The name of the annotation is {{ .Name }}, and the value is {{ .Value }}
{{ end }}
```
## The index function
To print a specific annotation or label use the `index` function.
```
{{ range .Alerts }}
The name of the alert is {{ index .Labels "alertname" }}
{{ end }}
```
## If statements
You can use if statements in templates. For example, to print `There are no alerts` if there are no alerts in `.Alerts` you would write the following:

View File

@@ -26,12 +26,11 @@ External alertmanagers should now be configured as data sources using Grafana Co
To add an external Alertmanager, complete the following steps.
1. Click Configuration and then Data sources.
2. Search for Alertmanager.
3. Choose your Implementation and fill out the fields on the page, as required.
1. Search for Alertmanager.
1. Choose your Implementation and fill out the fields on the page, as required.
If you are provisioning your data source, set the flag `handleGrafanaManagedAlerts` in the `jsonData` field to `true` to send Grafana-managed alerts to this Alertmanager.
If you are provisioning your data source, set the flag `handleGrafanaManagedAlerts` in the `jsonData` field to `true` to send Grafana-managed alerts to this Alertmanager.
**Note:**
Prometheus, Grafana Mimir, and Cortex implementations of Alertmanager are supported. For Prometheus, contact points and notification policies are read-only in the Grafana Alerting UI.
**Note:**: Prometheus, Grafana Mimir, and Cortex implementations of Alertmanager are supported. For Prometheus, contact points and notification policies are read-only in the Grafana Alerting UI.
4. Click Save & test.
1. Click Save & test.

View File

@@ -85,7 +85,7 @@ spec:
app: grafana
```
4. Make sure your grafana deployment has the label matching the selector, e.g. `app:grafana`.
4. Make sure your grafana deployment has the label matching the selector, e.g. `app:grafana`:
5. Add in the grafana.ini:

View File

@@ -1,6 +1,12 @@
---
aliases:
- features/dashboard/dashboards/
cascade:
labels:
products:
- cloud
- enterprise
- oss
title: Dashboards
weight: 70
---

View File

@@ -30,7 +30,13 @@ Dashboards and panels allow you to show your data in visual form. Each panel nee
For more information about data sources, refer to [Data sources]({{< relref "../../../datasources/" >}}) for specific guidelines.
1. In the Visualization list, select a visualization type.
1. Click the Refresh dashboard icon to query the data source.
![Refresh dashboard icon](/media/docs/grafana/dashboards/screenshot-refresh-dashboard-9.5.png)
1. In the visualization list, select a visualization type.
![Visualization selector](/media/docs/grafana/dashboards/screenshot-select-visualization-9-5.png)
Grafana displays a preview of your query results with the visualization applied.
@@ -48,9 +54,12 @@ Dashboards and panels allow you to show your data in visual form. Each panel nee
- [Configure thresholds]({{< relref "../../../panels-visualizations/configure-thresholds/" >}})
- [Configure standard options]({{< relref "../../../panels-visualizations/configure-standard-options/" >}})
1. Add a note to describe the visualization (or describe your changes) and then click **Save** in the upper-right corner of the page.
1. When you've finished editing your panel, click **Save** to save the dashboard.
Notes can be helpful if you need to revert the dashboard to a previous version.
Alternatively, click **Apply** if you want to see your changes applied to the dashboard first. Then click the save icon in the dashboard header.
1. Enter a name for your dashboard and select a folder, if applicable.
1. Click **Save**.
## Configure repeating rows

View File

@@ -1,6 +1,6 @@
---
title: Modify dashboard settings
menuTitle: Dashboard settings
menuTitle: Modify dashboard settings
weight: 8
keywords:
- time settings
@@ -12,7 +12,7 @@ keywords:
# Modify dashboard settings
The dashboard settings page enables you to:
The dashboard settings page allows you to:
- Edit general dashboard properties, including time settings
- Add annotation queries
@@ -31,7 +31,7 @@ Adjust dashboard time settings when you want to change the dashboard timezone, t
1. On the **Dashboard settings** page, click **General**.
1. Navigate to the **Time Options** section.
1. Specify time settings according to the following descriptions.
1. Specify time settings as follows.
- **Timezone:** Specify the local time zone of the service or system that you are monitoring. This can be helpful when monitoring a system or service that operates across several time zones.
- **Default:** Grafana uses the default selected time zone for the user profile, team, or organization. If no time zone is specified for the user profile, a team the user is a member of, or the organization, then Grafana uses the local browser time.
@@ -62,7 +62,7 @@ the dashboard. These dropdowns make it easy to change the data being displayed i
For more information about variables, refer to [Variables]({{< relref "../../variables/" >}}).
1. On the **Dashboard settings** page, click **Variable** in the left side section menu and then the **Add variable** button.
1. In the **General** section, the the name of the variable. This is the name that you will later use in queries.
1. In the **General** section, the name of the variable. This is the name that you will later use in queries.
1. Select a variable **Type**.
> **Note:** The variable type you select impacts which fields you populate on the page.
@@ -74,7 +74,7 @@ For more information about variables, refer to [Variables]({{< relref "../../var
Dashboard links enable you to place links to other dashboards and web sites directly below the dashboard header. Links provide for easy navigation to other, related dashboards and content.
1. On the **Dashboard settings** page, click **Links** in the left side section menu and then the **Add link** button.
1. Enter title and and in the **Type** field, select **Dashboard** or **Link**.
1. Enter title and in the **Type** field, select **Dashboard** or **Link**.
1. To add a dashboard link:
a. Add an optional tag. Tags are useful creating a dynamic dropdown of dashboards that all have a specific tag.
b. Select any of the dashboard link **Options**.

View File

@@ -29,25 +29,25 @@ The following image and descriptions highlights all dashboards features.
{{< figure src="/static/img/docs/v91/dashboard-features/dashboard-features.png" width="700px" >}}
- **Grafana home** (1): Click the Grafana home icon to be redirected to the home page configured in the Grafana instance.
- **Dashboard title** (2): When you click the dashboard title you can search for dashboard contained in the current folder.
- **Share dashboard** (3): Use this option to share the current dashboard by link or snapshot. You can also export the dashboard definition from the share modal.
- **Add a new panel** (4): Use this option to add a panel, dashboard row, or library panel to the current dashboard.
- **Dashboard settings** (5): Use this option to change dashboard name, folder, and tags and manage variables and annotation queries. For more information about dashboard settings, refer to [Modify dashboard settings]({{< relref "../build-dashboards/modify-dashboard-settings/" >}}).
- **Time picker dropdown** (6): Click to select relative time range options and set custom absolute time ranges.
- (1) **Grafana home**: Click the Grafana home icon to be redirected to the home page configured in the Grafana instance.
- (2) **Dashboard title**: When you click the dashboard title you can search for dashboard contained in the current folder.
- (3) **Share dashboard**: Use this option to share the current dashboard by link or snapshot. You can also export the dashboard definition from the share modal.
- (4) **Add a new panel**: Use this option to add a panel, dashboard row, or library panel to the current dashboard.
- (5) **Dashboard settings**: Use this option to change dashboard name, folder, and tags and manage variables and annotation queries. For more information about dashboard settings, refer to [Modify dashboard settings]({{< relref "../build-dashboards/modify-dashboard-settings/" >}}).
- (6) **Time picker dropdown**: Click to select relative time range options and set custom absolute time ranges.
- You can change the **Timezone** and **fiscal year** settings from the time range controls by clicking the **Change time settings** button.
- Time settings are saved on a per-dashboard basis.
- **Zoom out time range** (7): Click to zoom out the time range. For more information about how to use time range controls, refer to [Common time range controls]({{< relref "#common-time-range-controls" >}}).
- **Refresh dashboard** (8): Click to immediately trigger queries and refresh dashboard data.
- **Refresh dashboard time interval** (9): Click to select a dashboard auto refresh time interval.
- **View mode** (10): Click to display the dashboard on a large screen such as a TV or a kiosk. View mode hides irrelevant information such as navigation menus. For more information about view mode, refer to [How to Create Kiosks to Display Dashboards on a TV](https://grafana.com/blog/2019/05/02/grafana-tutorial-how-to-create-kiosks-to-display-dashboards-on-a-tv/).
- **Dashboard panel** (11): The primary building block of a dashboard is the panel. To add a new panel, dashboard row, or library panel, click **Add panel**.
- (7) **Zoom out time range**: Click to zoom out the time range. For more information about how to use time range controls, refer to [Common time range controls]({{< relref "#common-time-range-controls" >}}).
- (8) **Refresh dashboard**: Click to immediately trigger queries and refresh dashboard data.
- (9) **Refresh dashboard time interval**: Click to select a dashboard auto refresh time interval.
- (10) **View mode**: Click to display the dashboard on a large screen such as a TV or a kiosk. View mode hides irrelevant information such as navigation menus. For more information about view mode, refer to [How to Create Kiosks to Display Dashboards on a TV](https://grafana.com/blog/2019/05/02/grafana-tutorial-how-to-create-kiosks-to-display-dashboards-on-a-tv/).
- (11) **Dashboard panel**: The primary building block of a dashboard is the panel. To add a new panel, dashboard row, or library panel, click **Add panel**.
- Library panels can be shared among many dashboards.
- To move a panel, drag the panel header to another location.
- To resize a panel, click and drag the lower right corner of the panel.
- **Graph legend** (12): Change series colors, y-axis and series visibility directly from the legend.
- **Search** (13): Click **Search** to search for dashboards by name or panel title.
- **Dashboard row** (14): A dashboard row is a logical divider within a dashboard that groups panels together.
- (12) **Graph legend**: Change series colors, y-axis and series visibility directly from the legend.
- (13) **Search**: Click **Search** to search for dashboards by name or panel title.
- (14) **Dashboard row**: A dashboard row is a logical divider within a dashboard that groups panels together.
- Rows can be collapsed or expanded allowing you to hide parts of the dashboard.
- Panels inside a collapsed row do not issue queries.
- Use [repeating rows]({{< relref "../build-dashboards/create-dashboard/#configure-repeating-rows" >}}) to dynamically create rows based on a template variable.
@@ -85,7 +85,7 @@ This section describes supported time units and relative ranges, the common time
Grafana supports the following time units: `s (seconds)`, `m (minutes)`, `h (hours)`, `d (days)`, `w (weeks)`, `M (months)`, `Q (quarters)` and `y (years)`.
The minus operator enables you to step back in time, relative to now. If you want to display the full period of the unit (day, week, month, etc...), append `/<time unit>` to the end. To view fiscal periods, use `fQ (fiscal quarter)` and `fy (fiscal year)` time units.
The minus operator enables you to step back in time, relative to the current date and time, or `now`. If you want to display the full period of the unit (day, week, month, etc...), append `/<time unit>` to the end. To view fiscal periods, use `fQ (fiscal quarter)` and `fy (fiscal year)` time units.
The plus operator enables you to step forward in time, relative to now. For example, you can use this feature to look at predicted data in the future.
@@ -104,13 +104,15 @@ The following table provides example relative ranges:
| This Year | `now/Y` | `now/Y` |
| Previous fiscal year | `now-1y/fy` | `now-1y/fy` |
#### Note about Grafana Alerting
{{% admonition type="Note" %}}
For Grafana Alerting, we do not support the following syntaxes at this time.
Grafana Alerting does not support the following syntaxes at this time:
- now+n for future timestamps.
- now-1n/n for "start of n until end of n" because this is an absolute timestamp.
{{% /admonition %}}
### Common time range controls
The dashboard and panel time controls have a common UI.
@@ -155,6 +157,32 @@ You can set an absolute time range in the following ways:
This section also displays recently used absolute ranges.
#### Semi-relative time range
{{% admonition type="Note" %}}
Grafana Alerting does not support semi-relative time ranges.
{{% /admonition %}}
You can also use the absolute time range settings to set a semi-relative time range. Semi-relative time range dashboards are useful when you need to monitor the progress of something over time, but you also want to see the entire history from a starting point.
Set a semi-relative time range by setting the start time to an absolute timestamp and the end time to a “now” that is relative to the current time. For example:
**Start time:** `2023-05-01 00:00:00`
**End time:** `now`
If you wanted to track the progress of something during business hours, you could set a time range that covers the current day, but starting at 8am, like so:
**Start time:** `now/d+8h`
**End time:** `now`
This is equivalent to the **Today so far** time range preset, but it starts at 8:00am instead of 12:00am by appending +8h to the periodic start time.
Using a semi-relative time range, as time progresses, your dashboard will automatically and progressively zoom out to show more history and fewer details. At the same rate, as high data resolution decreases, historical trends over the entire time period will become more clear.
#### Zoom out (Cmd+Z or Ctrl+Z)
Click the **Zoom out** icon to view a larger time range in the dashboard or panel visualization.

View File

@@ -44,17 +44,17 @@ weight: 100
The following table lists the types of variables shipped with Grafana.
| Variable type | Description |
| :---------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Query | Query-generated list of values such as metric names, server names, sensor IDs, data centers, and so on. [Add a query variable]({{< relref "#add-a-query-variable" >}}). |
| Custom | Define the variable options manually using a comma-separated list. [Add a custom variable]({{< relref "#add-a-custom-variable" >}}). |
| Text box | Display a free text input field with an optional default value. [Add a text box variable]({{< relref "#add-a-text-box-variable" >}}). |
| Constant | Define a hidden constant. [Add a constant variable]({{< relref "#add-a-constant-variable" >}}). |
| Data source | Quickly change the data source for an entire dashboard. [Add a data source variable]({{< relref "#add-a-data-source-variable" >}}). |
| Interval | Interval variables represent time spans. [Add an interval variable]({{< relref "#add-an-interval-variable" >}}). |
| Ad hoc filters | Key/value filters that are automatically added to all metric queries for a data source (InfluxDB, Prometheus, and Elasticsearch only). [Add ad hoc filters]({{< relref "#add-ad-hoc-filters" >}}). |
| Global variables | Built-in variables that can be used in expressions in the query editor. Refer to [Global variables]({{< relref "#global-variables" >}}). |
| Chained variables | Variable queries can contain other variables. Refer to [Chained variables]({{< relref "#chained-variables" >}}). |
| Variable type | Description |
| :---------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Query | Query-generated list of values such as metric names, server names, sensor IDs, data centers, and so on. [Add a query variable]({{< relref "#add-a-query-variable" >}}). |
| Custom | Define the variable options manually using a comma-separated list. [Add a custom variable]({{< relref "#add-a-custom-variable" >}}). |
| Text box | Display a free text input field with an optional default value. [Add a text box variable]({{< relref "#add-a-text-box-variable" >}}). |
| Constant | Define a hidden constant. [Add a constant variable]({{< relref "#add-a-constant-variable" >}}). |
| Data source | Quickly change the data source for an entire dashboard. [Add a data source variable]({{< relref "#add-a-data-source-variable" >}}). |
| Interval | Interval variables represent time spans. [Add an interval variable]({{< relref "#add-an-interval-variable" >}}). |
| Ad hoc filters | Key/value filters that are automatically added to all metric queries for a data source (Prometheus, Loki, InfluxDB, and Elasticsearch only). [Add ad hoc filters]({{< relref "#add-ad-hoc-filters" >}}). |
| Global variables | Built-in variables that can be used in expressions in the query editor. Refer to [Global variables]({{< relref "#global-variables" >}}). |
| Chained variables | Variable queries can contain other variables. Refer to [Chained variables]({{< relref "#chained-variables" >}}). |
## Enter General options
@@ -194,7 +194,7 @@ Ad hoc filters are one of the most complex and flexible variable options availab
Interpolating a variable with multiple values selected is tricky as it is not straight forward how to format the multiple values into a string that is valid in the given context where the variable is used. Grafana tries to solve this by allowing each data source plugin to inform the templating interpolation engine what format to use for multiple values.
> **Note:** The **Custom all value** option on the variable must be blank for Grafana to format all values into a single string. If leave it blank, then the Grafana concatenates (adds together) all the values in the query. Something like `value1,value2,value3`. If a custom `all` value is used, then instead the value will be something like `*` or `all`.
> **Note:** The **Custom all value** option on the variable must be blank for Grafana to format all values into a single string. If it is left blank, then Grafana concatenates (adds together) all the values in the query. Something like `value1,value2,value3`. If a custom `all` value is used, then instead the value will be something like `*` or `all`.
#### Multi-value variables with a Graphite data source
@@ -281,6 +281,8 @@ This variable is the `$__interval` variable in milliseconds, not a time interval
This variable is only available in the Singlestat panel and can be used in the prefix or suffix fields on the Options tab. The variable will be replaced with the series name or alias.
> **Note:** The Singlestat panel is no longer available from Grafana 8.0.
### $\_\_org
This variable is the ID of the current organization.
@@ -398,7 +400,7 @@ apps.fakesite.web_server_01.cpu.*
#### InfluxDB example
In this example, you have several data centers. Each data center has a different subset of hosts. It is based on the [InfluxDB Templated](https://play.grafana.org/d/000000002/influxdb-templated?orgId=1).
In this example, you have several data centers. Each data center has a different subset of hosts. It is based on the [InfluxDB Templated](https://play.grafana.org/d/000000002/influxdb-templated?orgId=1) dashboard.
In this example, when the user changes the value of the `datacenter` variable, it changes the dropdown options returned by the `host` variable. The `host` variable uses the **Multi-value** option and **Include all option**, allowing users to select some or all options presented at any time. The `datacenter` does not use either option, so you can only select one data center at a time.
@@ -407,7 +409,7 @@ In this example, when the user changes the value of the `datacenter` variable, i
The query for this variable basically says, "Give me all the data centers that exist."
```
SHOW TAG VALUES WITH KEY = "datacenter"
SHOW TAG VALUES WITH KEY = "datacenter"
```
The values returned are `America`, `Africa`, `Asia`, and `Europe`.

View File

@@ -22,7 +22,7 @@ Panel titles and metric queries can refer to variables using two different synta
This syntax is easy to read, but it does not allow you to use a variable in the middle of a word.
**Example:** apps.frontend.$server.requests.count
- `${var_name}` Use this syntax when you want to interpolate a variable in the middle of an expression.
- `${var_name:<format>}` This format gives you more control over how Grafana interpolates values. Refer to [Advanced variable format options]({{< relref "#advanced-variable-format-options/" >}}) for more detail on all the formatting types.
- `${var_name:<format>}` This format gives you more control over how Grafana interpolates values. Refer to [Advanced variable format options]({{< relref "#advanced-variable-format-options" >}}) for more detail on all the formatting types.
- `[[varname]]` Do not use. Deprecated old syntax, will be removed in a future release.
Before queries are sent to your data source the query is _interpolated_, meaning the variable is replaced with its current value. During
@@ -30,7 +30,7 @@ interpolation, the variable value might be _escaped_ in order to conform to the
For example, a variable used in a regex expression in an InfluxDB or Prometheus query will be regex escaped. Read the data source specific
documentation topic for details on value escaping during interpolation.
For advanced syntax to override data source default formatting, refer to [Advanced variable format options]({{< relref "#advanced-variable-format-options/" >}}).
For advanced syntax to override data source default formatting, refer to [Advanced variable format options]({{< relref "#advanced-variable-format-options" >}}).
## Advanced variable format options

View File

@@ -2,6 +2,12 @@
aliases:
- data-sources/
- overview/
cascade:
labels:
products:
- cloud
- enterprise
- oss
title: Data sources
weight: 60
---

View File

@@ -6,19 +6,19 @@ aliases:
- cloudwatch/
- preconfig-cloudwatch-dashboards/
- provision-cloudwatch/
description: Guide for using AWS CloudWatch in Grafana
description: Guide for using Amazon CloudWatch in Grafana
keywords:
- grafana
- cloudwatch
- guide
menuTitle: AWS CloudWatch
title: AWS CloudWatch data source
menuTitle: Amazon CloudWatch
title: Amazon CloudWatch data source
weight: 200
---
# AWS CloudWatch data source
# Amazon CloudWatch data source
Grafana ships with built-in support for AWS CloudWatch.
Grafana ships with built-in support for Amazon CloudWatch.
This topic describes queries, templates, variables, and other configuration specific to the CloudWatch data source.
For instructions on how to add a data source to Grafana, refer to the [administration documentation]({{< relref "../../administration/data-source-management/" >}}).

View File

@@ -3,7 +3,7 @@ aliases:
- ../../data-sources/aws-cloudwatch/query-editor/
- ../cloudwatch/
- ./
description: Guide for using the AWS CloudWatch data source's query editor
description: Guide for using the Amazon CloudWatch data source's query editor
keywords:
- grafana
- aws
@@ -11,11 +11,11 @@ keywords:
- guide
- queries
menuTitle: Query editor
title: AWS CloudWatch query editor
title: Amazon CloudWatch query editor
weight: 300
---
# AWS CloudWatch query editor
# Amazon CloudWatch query editor
This topic explains querying specific to the CloudWatch data source.
For general documentation on querying data sources in Grafana, see [Query and transform data]({{< relref "../../../panels-visualizations/query-transform-data" >}}).

View File

@@ -63,4 +63,4 @@ You can alternatively use other sorting criteria, such as **Alphabetical**, to r
In the above example, a Lucene query filters documents based on the `hostname` property using a variable named `$hostname`.
The example also uses a variable in the _Terms_ group by field input box, which you can use to quickly change how data is grouped.
To view an example dashboard on Grafana Play, see the [Elasticsearch Templated Dashboard](https://play.grafana.org/d/CknOEXDMk/elasticsearch-templated?orgId=1d).
To view an example dashboard on Grafana Play, see the [Elasticsearch Templated Dashboard](https://play.grafana.org/d/z8OZC66nk/elasticsearch-8-2-0-sample-flight-data?orgId=1).

View File

@@ -14,7 +14,7 @@ weight: 300
# Loki query editor
The Loki data source's query editor helps you create [log]({{< relref "#create-a-logs-query" >}}) and [metric]({{< relref "#create-a-metrics-query" >}}) queries that use Loki's query language, [LogQL](/docs/loki/latest/logql/).
The Loki data source's query editor helps you create [log]({{< relref "#create-a-log-query" >}}) and [metric]({{< relref "#create-a-metric-query" >}}) queries that use Loki's query language, [LogQL](/docs/loki/latest/logql/).
This topic explains querying specific to the Loki data source.
For general documentation on querying data sources in Grafana, see [Query and transform data]({{< relref "../../../panels-visualizations/query-transform-data" >}}).

View File

@@ -59,21 +59,11 @@ Set the data source's basic configuration options carefully:
| `Disable metrics lookup` | Checking this option will disable the metrics chooser and metric/label support in the query field's autocomplete. This helps if you have performance issues with bigger Prometheus instances. |
| `Custom query parameters` | Add custom parameters to the Prometheus query URL. For example `timeout`, `partial_response`, `dedup`, or `max_source_resolution`. Multiple parameters should be concatenated together with an '&amp;'. |
| **Exemplars configuration** | |
| `Internal link` | Enable this option is you have an internal link. When you enable this option, you will see a data source selector. Select the backend tracing data store for your exemplar data. |
| `Data source` | You will see this option only if you enable `Internal link` option. Select the backend tracing data store for your exemplar data. |
| `URL` | You will see this option only if the `Internal link` option is disabled. Enter the full URL of the external link. You can interpolate the value from the field with `${__value.raw }` macro. |
| `URL Label` | (Optional) add a custom display label to override the value of the `Label name` field. |
| `Label name` | Add a name for the exemplar traceID property. |
**Exemplars configuration:**
| Name | Description |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Internal link** | Enable this option if you have an internal link. When enabled, this reveals the data source selector. Select the backend tracing data store for your exemplar data. |
| **Data source** | _(Visible only if you enable `Internal link`)_ Selects the backend tracing data store for your exemplar data. |
| **URL** | _(Visible only if you disable `Internal link`)_ Defines the external link's full URL. You can interpolate the value from the field by using the [`${__value.raw}` macro]({{< relref "../..//panels-visualizations/configure-data-links/#value-variables" >}}). |
| **URL label** | _(Optional)_ Adds a custom display label to override the value of the `Label name` field. |
| **Label name** | Adds a name for the exemplar traceID property. |
| `Internal link` | Enable this option if you have an internal link. When enabled, this reveals the data source selector. Select the backend tracing data store for your exemplar data. |
| `Data source` | _(Visible only if you enable `Internal link`)_ Selects the backend tracing data store for your exemplar data. |
| `URL` | _(Visible only if you disable `Internal link`)_ Defines the external link's full URL. You can interpolate the value from the field by using the [`${__value.raw}` macro]({{< relref "../..//panels-visualizations/configure-data-links/#value-variables" >}}). |
| `URL Label` | _(Optional)_ Adds a custom display label to override the value of the `Label name` field. |
| `Label name` | Adds a name for the exemplar traceID property. |
### Provision the data source
@@ -107,12 +97,6 @@ datasources:
url: 'http://localhost:3000/explore?orgId=1&left=%5B%22now-1h%22,%22now%22,%22Jaeger%22,%7B%22query%22:%22$${__value.raw}%22%7D%5D'
```
## Query the data source
The Prometheus query editor includes a code editor and visual query builder.
For details, see the [query editor documentation]({{< relref "./query-editor" >}}).
## View Grafana metrics with Prometheus
Grafana exposes metrics for Prometheus on the `/metrics` endpoint.

View File

@@ -13,9 +13,9 @@ keywords:
title: 'Alerting HTTP API '
---
# Alerting API
# Legacy Alerting API
> **Note:** Starting with v9.0, the Alerting HTTP API is deprecated. It will be removed in a future release.
> **Note:** Starting with v9.0, the Legacy Alerting HTTP API is deprecated. It will be removed in a future release.
This topic is relevant for the [legacy dashboard alerts](https://grafana.com/docs/grafana/v8.5/alerting/old-alerting/) only.

View File

@@ -14,7 +14,9 @@ keywords:
title: 'Alerting Notification Channels HTTP API '
---
# Alerting Notification Channels API
# Legacy Alerting Notification Channels API
> **Note:** Starting with v9.0, the Legacy Alerting Notification Channels API is deprecated. It will be removed in a future release.
This page documents the Alerting Notification Channels API.

View File

@@ -81,3 +81,90 @@ Finally start your plugin in development mode. Go to your plugin root directory
```
After this, you should be able to see your plugin listed in Grafana and test your changes. Note that any change in the fronted will require you to refresh your browser while changes in the backend may require to rebuild your plugin binaries and reload the plugin (`mage && mage reloadPlugin` for local development or `docker-compose up` again if you are using docker-compose).
## Run your backend plugin with a debugger
> Note: The following method only works with a local Grafana instance and currently doesn't work with Docker.
You can run a backend plugin and attach a debugger to it, which allows you to set breakpoints and debug your backend plugin directly from your IDE of choice.
We support Visual Studio Code and GoLand out of the box, but this feature can also work with any other IDE or debugger.
1. Go to your plugin's folder.
1. Check your `go.mod` and make sure `grafana-plugin-sdk-go` is at least on `v0.156.0`
- If not, update it to the latest version:
```
go get -u github.com/grafana/grafana-plugin-sdk-go
```
1. Build your plugin at least once:
```
yarn build && mage
```
1. Install your plugin into your local Grafana instance.
Now that your plugin is ready to run, follow the instructions bellow for your IDE of choice.
### Visual Studio Code
1. If it's not already present, go to your plugin's folder and place the following file inside `.vscode/launch.json`:
```json
{
"version": "0.2.0",
"configurations": [
{
"name": "Standalone debug mode",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${workspaceFolder}/pkg",
"env": {},
"args": ["-standalone"]
}
]
}
```
1. Press `F5` to run your plugin in debug mode.
1. Start Grafana, if it's not already running.
> If you re-run the configuration, Grafana will automatically reload the plugin.
### GoLand
1. Create a new Run/Debug configuration:
- **Run kind**: Package
- **Package path**: your `pkg` package
- **Program arguments**: `-standalone`
1. Run the config (with or without the debugger).
1. Start Grafana, if it's not already running.
> If you re-run the configuration, Grafana will automatically reload the plugin.
### Other IDEs
Configure your code editor to run the following steps:
1. Build the executable with debug flags.
```
mage build:debug
```
1. Run the plugin's executable (inside `dist`) with `-standalone -debug` flags.
```
./gpx_xyz_linux_amd64 -standalone -debug
```
1. Attach a debugger to the process.
Then, you can start Grafana, if it's not already running.
> If you re-run the configuration, Grafana will automatically reload the plugin.
### Notes
- All logs are printed in the plugin's `stdout` rather than in Grafana logs.
- If the backend plugin doesn't serve requests after turning off debug mode, you can force reset the standalone mode. To do so, delete the files `dist/standalone.txt` and `dist/pid.txt` alongside the executable file, and then restart Grafana.
- We currently do not support debugging backend plugins running inside Docker.

View File

@@ -2,15 +2,18 @@
aliases:
- share-a-plugin/
- package-a-plugin/
description: Learn how to package and share your plugin.
title: Publish a plugin
type: docs
---
# Publish a plugin
You've just built your first plugin, and now you want to share it with the world. In this guide, you'll learn how to package and share your plugin with others.
You've just built your first plugin, and now you want to share it with the world.
In this guide, you'll learn how to package and share your plugin with others.
For Grafana to be able to load a plugin, it first needs to be built. When you build a plugin from source, a `dist` directory is created that contains the production build, or _plugin assets_, for your plugin.
For Grafana to be able to load a plugin, it first needs to be built.
When you build a plugin from source, a `dist` directory is created that contains the production build, or _plugin assets_, for your plugin.
When the Grafana server starts, it recursively looks in the plugin directory for any directory that contains a `plugin.json` file and tries to load the plugin assets in the same directory.
@@ -35,7 +38,7 @@ There are three steps needed to package a plugin:
make sure that all the binaries are executable and have a `0755` (`-rwxr-xr-x`) permission
1. [Sign the plugin]({{< relref "sign-a-plugin/" >}}).
1. [Sign the plugin]({{< relref "./sign-a-plugin" >}}).
1. Rename `dist` directory to match your plugin id and create a ZIP archive
@@ -44,7 +47,8 @@ There are three steps needed to package a plugin:
zip myorg-simple-panel-1.0.0.zip myorg-simple-panel -r
```
1. (Optional) Verify your plugin is packaged correctly using [zipinfo](https://linux.die.net/man/1/zipinfo). It should look like this:
1. (Optional) Verify your plugin is packaged correctly using [zipinfo](https://linux.die.net/man/1/zipinfo).
It should look like this:
```
zipinfo grafana-clickhouse-datasource-1.1.2.zip
@@ -76,22 +80,23 @@ drwxr-xr-x 0 bx stor 22-Mar-24 23:23 grafana-clickhouse-datasource/img/
22 files, 92516655 bytes uncompressed, 34319591 bytes compressed: 62.9%
```
# Publish your plugin on Grafana.com
## Publish your plugin on Grafana.com
The best way to share your plugin with the world is to publish it on [Grafana Plugins](https://grafana.com/plugins). By having your plugin published on Grafana.com, more users will be able to discover your plugin.
The best way to share your plugin with the world is to publish it on [Grafana Plugins](/plugins).
By having your plugin published on Grafana.com, more users will be able to discover your plugin.
Before you submit your plugin, we ask that you read our guidelines and frequently asked questions.
## Guidelines
### Guidelines
To speed up the time it takes to review your plugin:
- Get familiar with our plugin [publishing and signing criteria](publishing-and-signing-criteria.md)
- Get familiar with our plugin [publishing and signing criteria]({{< relref "./publishing-and-signing-criteria" >}})
- Check that your plugin is ready for review using the [plugin validator](https://github.com/grafana/plugin-validator).
- Read our [6 tips for improving your Grafana plugin before you publish](https://grafana.com/blog/2021/01/21/6-tips-for-improving-your-grafana-plugin-before-you-publish/).
- Read our [6 tips for improving your Grafana plugin before you publish](/blog/2021/01/21/6-tips-for-improving-your-grafana-plugin-before-you-publish/).
- Refer to [plugin-examples](https://github.com/grafana/grafana-plugin-examples) to review best practices for building your plugin.
## Frequently Asked Questions
### Frequently Asked Questions
**Do I need to submit a private plugin?**
@@ -111,21 +116,25 @@ To speed up the time it takes to review your plugin:
**How can I update my plugin's catalog page?**
- The plugin's catalog page content is extracted from the plugin README file. To update the plugin's catalog page, it is necessary to submit an updated plugin with the new content included in the README file.
- The plugin's catalog page content is extracted from the plugin README file.
To update the plugin's catalog page, it is necessary to submit an updated plugin with the new content included in the README file.
**Can I unlist my plugin from the Grafana Plugin's Catalog in case of a bug?**
- In the event of a bug, unlisting the plugin from the Grafana Plugin's Catalog may be possible in exceptional cases, such as security concerns. However, we do not have control over the specific instances where the plugin is installed.
- In the event of a bug, unlisting the plugin from the Grafana Plugin's Catalog may be possible in exceptional cases, such as security concerns.
However, we do not have control over the specific instances where the plugin is installed.
**Can I distribute my plugin somewhere else than the Grafana Catalog?**
- The official method for distributing Grafana plugins is through the Grafana Catalog. Alternative methods, such as installing private or development plugins on local Grafana instances, are available as per the guidelines provided in [this guide](https://grafana.com/docs/grafana/latest/administration/plugin-management/#install-plugin-on-local-grafana).
- The official method for distributing Grafana plugins is through the Grafana Catalog.
Alternative methods, such as installing private or development plugins on local Grafana instances, are available as per the guidelines provided in [this guide]({{< relref "../../administration/plugin-management#install-plugin-on-local-grafana" >}}).
**Can I still use Angular for my plugin?**
- No. We will not accept any new plugin submissions written in angular. Please take a look at our [angular support deprecation documentation](https://grafana.com/docs/grafana/latest/developers/angular_deprecation/).
- No. We will not accept any new plugin submissions written in angular.
Please take a look at our [angular support deprecation documentation]({{< relref "../angular_deprecation" >}}).
## Publishing your plugin for the first time
### Publishing your plugin for the first time
**Do plugin signatures expire?**
@@ -133,36 +142,43 @@ To speed up the time it takes to review your plugin:
{{< figure src="/static/img/docs/plugins/plugins-submission-create2.png" class="docs-image--no-shadow" max-width="650px" >}}
1. [Sign in](https://grafana.com/auth/sign-in) to your Grafana Cloud account.
1. [Sign in](/auth/sign-in) to your Grafana Cloud account.
1. In the left menu, under **Org settings**, click **My Plugins**.
1. Click **Submit Plugin**.
1. Enter the information requested by the form.
- **OS & Architecture:**
- Select **Single** if your plugin archive contains binaries for multiple architectures.
- Select **Multiple** if you'd like to submit separate plugin archives for each architecture. This can lead to faster downloads since users can select the specific architecture on which they want to install the plugin.
- Select **Multiple** if you'd like to submit separate plugin archives for each architecture.
This can lead to faster downloads since users can select the specific architecture on which they want to install the plugin.
- **URL:** A URL that points to a ZIP archive of your packaged plugin.
- **Source Code URL:** A URL that points to a public git repository or ZIP archive of your complete plugin source code.
- **MD5:** The MD5 hash of the plugin specified by the **URL**.
- The remaining questions help us determine the [signature level](https://grafana.com/docs/grafana/latest/plugins/plugin-signatures/#plugin-signature-levels) for your plugin.
- The remaining questions help us determine the [signature level]({{< relref "./sign-a-plugin#plugin-signature-levels" >}}) for your plugin.
1. Click **Submit**.
After you have submitted your plugin, we run an automated validation to make sure it adheres to our guidelines. Once your submission passes the validation, it's placed in a review queue.
After you have submitted your plugin, we run an automated validation to make sure it adheres to our guidelines.
Once your submission passes the validation, it's placed in a review queue.
All submissions are manually inspected by a plugin reviewer. For every new plugin, we perform a manual review that includes the following checks:
All submissions are manually inspected by a plugin reviewer.
For every new plugin, we perform a manual review that includes the following checks:
- **Code review:** For quality and security purposes, we review the source code for the plugin. If you're unable to make the source code publicly available, let us know in a comment on your plugin submission.
- **Tests:** We install your plugin on one of our Grafana instances to test it for basic use. For more advanced plugins, we may ask you to assist us in configuring a test environment for the plugin. This test environment will be used whenever you submit an plugin update.
- **Code review:** For quality and security purposes, we review the source code for the plugin.
If you're unable to make the source code publicly available, let us know in a comment on your plugin submission.
- **Tests:** We install your plugin on one of our Grafana instances to test it for basic use.
For more advanced plugins, we may ask you to assist us in configuring a test environment for the plugin.
This test environment will be used whenever you submit an plugin update.
## Submit a plugin update
### Submit a plugin update
To submit an **update** for an already published plugin:
1. [Sign in](https://grafana.com/auth/sign-in) to your Grafana Cloud account.
1. [Sign in](/auth/sign-in) to your Grafana Cloud account.
1. In the left menu, under **Org settings**, click **My Plugins**.
1. Click **Submit Update** for the plugin you want to update.
1. Enter the information requested by the form.
- **OS & Architecture:**
- Select **Single** if your plugin archive contains binaries for multiple architectures.
- Select **Multiple** if you'd like to submit separate plugin archives for each architecture. This can lead to faster downloads since users can select the specific architecture they want to install the plugin on.
- Select **Multiple** if you'd like to submit separate plugin archives for each architecture.
This can lead to faster downloads since users can select the specific architecture they want to install the plugin on.
- **URL:** A URL that points to a ZIP archive of your packaged plugin.
- **Source Code URL:** A URL that points to a public git repository or ZIP archive of your complete plugin source code.
- **MD5:** The MD5 hash of the plugin specified by the **URL**.

View File

@@ -1,6 +1,12 @@
---
aliases:
- features/explore/
cascade:
labels:
products:
- cloud
- enterprise
- oss
keywords:
- explore
- loki

View File

@@ -1,6 +1,12 @@
---
aliases:
- basics/
cascade:
labels:
products:
- cloud
- enterprise
- oss
title: Fundamentals
weight: 8
---

View File

@@ -22,7 +22,7 @@ To identify the factors that are contributing to the latency, you must compare a
Use exemplars to help isolate problems within your data distribution by pinpointing query traces exhibiting high latency within a time interval. Once you localize the latency problem to a few exemplar traces, you can combine it with additional system based information or location properties to perform a root cause analysis faster, leading to quick resolutions to performance issues.
Support for exemplars is available for the Prometheus data source only. Once you enable the functionality, exemplars data is available by default. For more information on exemplar configuration and how to enable exemplars, refer to [configuring exemplars in Prometheus data source]({{< relref "../../datasources/prometheus/#configuring-exemplars" >}}).
Support for exemplars is available for the Prometheus data source only. Once you enable the functionality, exemplar data is available by default. For more information on exemplar configuration and how to enable exemplars, refer to [configuring exemplars in the Prometheus data source]({{< relref "../../datasources/prometheus/#configure-exemplars" >}}).
Grafana shows exemplars alongside a metric in the Explore view and in dashboards. Each exemplar displays as a highlighted star. You can hover your cursor over an exemplar to view the unique traceID, which is a combination of a key value pair. To investigate further, click the blue button next to the `traceID` property.

View File

@@ -10,7 +10,7 @@ weight: 200
# Build your first dashboard
This topic helps you get started with Grafana and build your first dashboard. To learn more about Grafana, refer to [What is Grafana?]({{< relref "_index.md" >}}).
This topic helps you get started with Grafana and build your first dashboard using the built-in `Grafana` data source. To learn more about Grafana, refer to [Introduction to Grafana]({{< relref "../introduction/" >}}).
> **Note:** Grafana also offers a [free account with Grafana Cloud](https://grafana.com/signup/cloud/connect-account?pg=gsdocs) to help getting started even easier and faster. You can install Grafana to self-host or get a free Grafana Cloud account.
@@ -37,7 +37,9 @@ To sign in to Grafana for the first time:
#### Create a dashboard
To create your first dashboard:
If you've already set up a data source that you know how to query, refer to [Create a dashboard]({{< relref "../dashboards/build-dashboards/create-dashboard/" >}}) instead.
To create your first dashboard using the built-in `Grafana` data source:
1. Click the **New dashboard** item under the **Dashboards** icon in the side menu.
1. On the dashboard, click **Add a new panel**.
@@ -46,8 +48,15 @@ To create your first dashboard:
This generates the Random Walk dashboard.
1. Click the **Save** icon in the top right corner of your screen to save the dashboard.
1. Add a descriptive name, and then click **Save**.
1. Click the Refresh dashboard icon to query the data source.
![Refresh dashboard icon](/media/docs/grafana/dashboards/screenshot-refresh-dashboard-9.5.png)
1. When you've finished editing your panel, click **Save** to save the dashboard.
Alternatively, click **Apply** if you want to see your changes applied to the dashboard first. Then click the save icon in the dashboard header.
1. Add a descriptive name for the dashboard, and then click **Save**.
Congratulations, you have created your first dashboard and it is displaying results.

View File

@@ -10,9 +10,7 @@ weight: 500
# Get started with Grafana and MS SQL Server
Microsoft SQL Server is a popular relational database management system that is widely used in development and production environments. This topic walks you through the steps to create a series of dashboards in Grafana to display metrics from a MS SQL Server database. You can also configure the MS SQL Server data source on a [Grafana Cloud](/docs/grafana-cloud/) instance without having to host Grafana yourself.
> **Note:** You must install Grafana 5.1+ in order to use the integrated MS SQL data source.
Microsoft SQL Server is a popular relational database management system that is widely used in development and production environments. This topic walks you through the steps to create a series of dashboards in Grafana to display metrics from a MS SQL Server database.
#### Download MS SQL Server
@@ -53,7 +51,7 @@ Optionally, play around this dashboard and customize it to:
#### Start building dashboards
Now that you have gained some idea of using the pre-packaged MS SQL data source and some test data, the next step is to setup your own instance of MS SQL Server database and data your development or sandbox area. In the previous steps, if you followed along the path of deploying your own instance of MS SQL Server, you are already on your way.
Now that you have gained some idea of using the pre-packaged MS SQL data source and some test data, the next step is to setup your own instance of MS SQL Server database and data your development or sandbox area.
To fetch data from your own instance of MS SQL Server, add the data source using instructions in Step 4 of this topic. In Grafana [Explore]({{< relref "../explore/" >}}) build queries to experiment with the metrics you want to monitor.

View File

@@ -8,7 +8,7 @@ weight: 5
# Grafana OSS
[Grafana open source software](https://grafana.com/oss/) enables you to query, visualize, alert on, and explore your metrics, logs, and traces wherever they are stored. Grafana OSS provides you with tools to turn your time-series database (TSDB) data into insightful graphs and visualizations.
[Grafana open source software](https://grafana.com/oss/) enables you to query, visualize, alert on, and explore your metrics, logs, and traces wherever they are stored. Grafana OSS provides you with tools to turn your time-series database (TSDB) data into insightful graphs and visualizations. The Grafana OSS plugin framework also enables you to connect other data sources like NoSQL/SQL databases, ticketing tools like Jira or ServiceNow, and CI/CD tooling like GitLab.
After you have [installed Grafana]({{< relref "../setup-grafana/installation/" >}}) and set up your first dashboard using instructions in [Getting started with Grafana]({{< relref "../getting-started/build-first-dashboard.md" >}}), you will have many options to choose from depending on your requirements. For example, if you want to view weather data and statistics about your smart home, then you can create a [playlist]({{< relref "../dashboards/create-manage-playlists/" >}}). If you are the administrator for an enterprise and are managing Grafana for multiple teams, then you can set up [provisioning]({{< relref "../administration/provisioning/" >}}) and [authentication]({{< relref "../setup-grafana/configure-security/configure-authentication/" >}}).
@@ -71,3 +71,5 @@ In addition to Grafana, Grafana Labs also provides the following open source pro
**Grafana Tempo:** Grafana Tempo is an open source, easy-to-use and high-volume distributed tracing backend. For more information, refer to [Grafana Tempo documentation](https://grafana.com/docs/tempo/latest/?pg=oss-tempo&plcmt=hero-txt/).
**Grafana Mimir:** Grafana Mimir is an open source software project that provides a scalable long-term storage for Prometheus. For more information about Grafana Mimir, refer to [Grafana Mimir documentation](https://grafana.com/docs/mimir/latest/).
**Grafana Phlare:** Grafana Phlare is an open-source software project for aggregating continuous profiling data. Continuous profiling is an observability signal that enables you to understand your workload's resource (CPU, memory, etc.) usage to the exact line number. For more information about using Grafana Phlare, refer to [Grafana Phlare documentation](https://grafana.com/docs/phlare/latest/).

View File

@@ -19,7 +19,7 @@ To learn more about Grafana Enterprise, refer to [our product page](https://graf
## Enterprise features in Grafana Cloud
Many Grafana Enterprise features are also available in [Grafana Cloud](/docs/grafana-cloud) Pro and Advanced accounts. For details, refer to [the Grafana Cloud features table](https://grafana.com/pricing/#featuresTable).
Many Grafana Enterprise features are also available in [Grafana Cloud](/docs/grafana-cloud) Free, Pro, and Advanced accounts. For details, refer to [the Grafana Cloud features table](https://grafana.com/pricing/#featuresTable).
## Authentication

View File

@@ -3,6 +3,12 @@ aliases:
- dashboards/configure-panels-visualizations/
- features/panels/panels/
- panels/
cascade:
labels:
products:
- cloud
- enterprise
- oss
keywords:
- grafana
- configure

View File

@@ -1,9 +1,9 @@
---
aliases:
- ../../panels/working-with-panels/configure-legend/
- ../../visualizations/configure-legend/
- ../panels/working-with-panels/configure-legend/
- visualizations/configure-legend/
title: Configure a legend
weight: 1300
weight: 400
---
# Configure a legend

View File

@@ -117,17 +117,23 @@ Select one of the following palettes:
<div class="clearfix"></div>
| Color mode | Description |
| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Single color** | Specify a single color, useful in an override rule |
| **From thresholds** | Informs Grafana to take the color from the matching threshold |
| **Classic palette** | Grafana will assign color by looking up a color in a palette by series index. Useful for Graphs and pie charts and other categorical data visualizations |
| **Green-Yellow-Red (by value)** | Continuous color scheme |
| **Blue-Yellow-Red (by value)** | Continuous color scheme |
| **Blues (by value)** | Continuous color scheme (panel background to blue) |
| **Reds (by value)** | Continuous color scheme (panel background color to blue) |
| **Greens (by value)** | Continuous color scheme (panel background color to blue) |
| **Purple (by value)** | Continuous color scheme (panel background color to blue) |
| Color mode | Description |
| ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Single color** | Specify a single color, useful in an override rule |
| **Shades of a color** | Selects shades of a single color, useful in an override rule |
| **From thresholds** | Informs Grafana to take the color from the matching threshold |
| **Classic palette** | Grafana will assign color by looking up a color in a palette by series index. Useful for Graphs and pie charts and other categorical data visualizations |
| **Classic palette (by series name)** | Grafana will assign color based on the name of the series. Useful when the series names to be visualized depend on the available data. |
| **Green-Yellow-Red (by value)** | Continuous color scheme |
| **Red-Yellow-Green (by value)** | Continuous color scheme |
| **Blue-Yellow-Red (by value)** | Continuous color scheme |
| **Yellow-Red (by value)** | Continuous color scheme |
| **Blue-Purple (by value)** | Continuous color scheme |
| **Yellow-Blue (by value)** | Continuous color scheme |
| **Blues (by value)** | Continuous color scheme (panel background to blue) |
| **Reds (by value)** | Continuous color scheme (panel background color to red) |
| **Greens (by value)** | Continuous color scheme (panel background color to green) |
| **Purples (by value)** | Continuous color scheme (panel background color to purple) |
{{< figure src="/static/img/docs/v73/color_scheme_dropdown.png" max-width="350px" caption="Color scheme" >}}

View File

@@ -6,6 +6,7 @@ aliases:
- ../panels/add-panels-dynamically/about-repeating-panels-rows/
- ../panels/add-panels-dynamically/configure-repeating-panels/
- ../panels/add-panels-dynamically/configure-repeating-rows/
- ../panels/working-with-panels/
- ../panels/working-with-panels/add-panel/
- ../panels/working-with-panels/navigate-inspector-panel/
- ../panels/working-with-panels/navigate-panel-editor/

View File

@@ -23,4 +23,4 @@ For more information about traces and how to use them, refer to the following do
- [Tracing in Explore]({{< relref "../../../explore/trace-integration/" >}})
- [Getting started with Tempo](/docs/tempo/latest/getting-started)
{{< figure src="/static/img/docs/explore/explore-trace-view-full-8-0.png" class="docs-image--no-shadow" max-width= "900px" caption="Screenshot of the trace view" >}}
{{< figure src="/static/img/docs/explore/trace-view-9-4.png" class="docs-image--no-shadow" max-width= "900px" caption="Screenshot of the trace view" >}}

View File

@@ -1,4 +1,10 @@
---
cascade:
labels:
products:
- cloud
- enterprise
- oss
title: Release notes
weight: 10000
---

View File

@@ -1,6 +1,12 @@
---
aliases:
- ./
cascade:
labels:
products:
- cloud
- enterprise
- oss
description: Learn how to search for Grafana dashboards
keywords:
- search

View File

@@ -191,7 +191,9 @@ Folder that contains [provisioning]({{< relref "../../administration/provisionin
### http_addr
The IP address to bind to. If empty will bind to all interfaces
The host for the server to listen on. If your machine has more than one network interface, you can use this setting to expose the Grafana service on only one network interface and not have it available on others, such as the loopback interface. An empty value is equivalent to setting the value to `0.0.0.0`, which means the Grafana service binds to all interfaces.
In environments where network address translation (NAT) is used, ensure you use the network interface address and not a final public address; otherwise, you might see errors such as `bind: cannot assign requested address` in the logs.
### http_port
@@ -1450,7 +1452,7 @@ The interval string is a possibly signed sequence of decimal numbers, followed b
## [unified_alerting.screenshots]
For more information about screenshots, refer to [Images in notifications(https://grafana.com/docs/grafana/next/alerting/manage-notifications/images-in-notifications)].
For more information about screenshots, refer to [Images in notifications]({{< relref "../../alerting/manage-notifications/images-in-notifications">}}).
### capture

View File

@@ -9,12 +9,12 @@ weight: 200
# Configure tracing to troubleshoot Grafana
You can set up the `grafana-server` process to enable certain diagnostics when it starts. This can be helpful
You can set up the `grafana-server` process to enable certain diagnostics when it starts. This can be useful
when investigating certain performance problems. It's _not_ recommended to have these enabled by default.
## Turn on profiling
The `grafana-server` can be started with the arguments `-profile` to enable profiling, `-profile-addr` to override the default HTTP address (`localhost`), and
The `grafana-server` can be started with the command-line option `-profile` to enable profiling, `-profile-addr` to override the default HTTP address (`localhost`), and
`-profile-port` to override the default HTTP port (`6060`) where the `pprof` debugging endpoints are available. For example:
```bash

View File

@@ -102,6 +102,10 @@ Set the address for writing logs to Loki (format must be host:port).
Decide whether or not to enable the TLS (Transport Layer Security) protocol when establishing the connection to Loki. Defaults to true.
### tenant_id
Set the tenant ID for Loki communication, which is disabled by default. The tenant ID is required to interact with Loki running in [multi-tenant mode](/docs/loki/latest/operations/multi-tenancy/).
## [analytics.summaries]
### buffer_write_interval
@@ -212,6 +216,10 @@ Set the URL for writing logs to Loki.
If true, it establishes a secure connection to Loki. Defaults to true.
### tenant_id
Set the tenant ID for Loki communication, which is disabled by default. The tenant ID is required to interact with Loki running in [multi-tenant mode](/docs/loki/latest/operations/multi-tenancy/).
## [auth.saml]
### enabled

View File

@@ -98,8 +98,12 @@ Alpha features might be changed or removed without prior notice.
| `alertingBacktesting` | Rule backtesting API for alerting |
| `editPanelCSVDragAndDrop` | Enables drag and drop for CSV and Excel files |
| `logsContextDatasourceUi` | Allow datasource to provide custom UI for context view |
| `onlyExternalOrgRoleSync` | Prohibits a user from changing organization roles synced with external auth providers |
| `prometheusMetricEncyclopedia` | Replaces the Prometheus query builder metric select option with a paginated and filterable component |
| `influxdbBackendMigration` | Query InfluxDB InfluxQL without the proxy |
| `alertStateHistoryLokiSecondary` | Enable Grafana to write alert state history to an external Loki instance in addition to Grafana annotations. |
| `alertStateHistoryLokiPrimary` | Enable a remote Loki instance as the primary source for state history reads. |
| `alertStateHistoryLokiOnly` | Disable Grafana alerts from emitting annotations when a remote Loki instance is available. |
## Development feature toggles

View File

@@ -17,11 +17,10 @@ weight: 500
By updating settings at runtime, you can update Grafana settings without needing to restart the Grafana server.
Updates that happen at runtime are stored in the database and override
[settings from the other sources]({{< relref "../../configure-grafana/" >}})
[settings from other sources]({{< relref "../../configure-grafana/" >}})
(arguments, environment variables, settings file, etc). Therefore, every time a specific setting key is removed at runtime,
the value used for that key is the inherited one from the other sources in the reverse order of precedence
(`arguments > environment variables > settings file`), being the application default the value used when no one provided
through one of these, at least.
(`arguments > environment variables > settings file`). When no value is provided through any of these options, then the value used will be the application default
Currently, **it only supports updates on the `auth.saml` section.**
@@ -55,7 +54,9 @@ it would enable SAML and disable single logouts. And, if you provide the followi
```json
{
"auth.saml": ["allow_idp_initiated"]
"removals": {
"auth.saml": ["allow_idp_initiated"]
}
}
```
@@ -87,7 +88,7 @@ won't be persisted into the database.
Grafana Enterprise has a built-in scheduled background job that looks into the database every minute for
settings updates. If there are updates, it reloads the Grafana services affected by the detected changes.
The background job synchronizes settings between instances in high availability set-ups. So, after you perform some changes through the
The background job synchronizes settings between instances in a highly available set-up. So, after you perform some changes through the
HTTP API, then the other instances are synchronized through the database and the background job.
## Control access with role-based access control

View File

@@ -7,6 +7,10 @@ keywords:
- auditing
- audit
- logs
labels:
products:
- cloud
- enterprise
title: Audit a Grafana instance
weight: 800
---
@@ -420,6 +424,9 @@ type = grpc
url = localhost:9095
# Defaults to true. If true, it establishes a secure connection to Loki
tls = true
# Set the tenant ID for Loki communication, which is disabled by default.
# The tenant ID is required to interact with Loki running in multi-tenant mode.
tenant_id =
```
If you have multiple Grafana instances sending logs to the same Loki service or if you are using Loki for non-audit logs, audit logs come with additional labels to help identifying them:

View File

@@ -2,6 +2,12 @@
aliases:
- ../../auth/
- ../../auth/overview/
cascade:
labels:
products:
- cloud
- enterprise
- oss
description: Learn about all the ways in which you can configure Grafana to authenticate
users.
title: Configure authentication

View File

@@ -1,7 +1,7 @@
---
aliases:
- ../../../enterprise/enhanced_ldap/
- enhanced_ldap/
- ../../../auth/enhanced_ldap/
description: Grafana Enhanced LDAP Integration Guide
keywords:
- grafana
@@ -19,6 +19,7 @@ weight: 900
The enhanced LDAP integration adds additional functionality on top of the [LDAP integration]({{< relref "ldap/" >}}) available in the open source edition of Grafana.
> **Note:** Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud Advanced](/docs/grafana-cloud).
> If you are a Grafana Cloud customer, please [open a support ticket in the Cloud Portal](/profile/org#support) to request this feature.
> To control user access with role-based permissions, refer to [role-based access control]({{< relref "../../../../administration/roles-and-permissions/access-control/" >}}).
@@ -67,3 +68,17 @@ active_sync_enabled = true # enabled by default
```
Single bind configuration (as in the [Single bind example]({{< relref "ldap/#single-bind-example" >}})) is not supported with active LDAP synchronization because Grafana needs user information to perform LDAP searches.
For the synchronization to work, the `servers.search_filter` and `servers.attributes.username` in the ldap.toml config file must match. By default, the `servers.attributes.username` is `cn`, so if you use another attribute as the search filter, you must also update the username attribute.
For example:
```
[[servers]]
search_filter = "(sAMAccountName=%s)"
[servers.attributes]
username = "sAMAccountName"
```
If the attributes aren't the same, the users' sessions will be terminated after each synchronization. That's because the search will be done using the username's value, and that value doesn't exist for the attribute used in the search filter.

View File

@@ -4,6 +4,11 @@ aliases:
description: Request security enables you to limit requests from the Grafana server
by targeting requests generated by users, such as data source metric queries and
alert notifications.
labels:
products:
- cloud
- enterprise
- oss
title: Configure request security
weight: 1100
---

View File

@@ -1,10 +1,13 @@
---
aliases:
- ../../auth/saml/
- ../../auth/team-sync/
- ../../enterprise/team-sync/
description: Learn how to use Team Sync to synchronize between your authentication
provider teams and Grafana teams.
labels:
products:
- cloud
- enterprise
title: Configure Team Sync
weight: 1000
---

View File

@@ -7,6 +7,10 @@ keywords:
- export
- usage-insights
- enterprise
labels:
products:
- cloud
- oss
title: Export logs of usage insights
weight: 900
---
@@ -81,6 +85,9 @@ type = grpc
url = localhost:9095
# Defaults to true. If true, it establishes a secure connection to Loki
tls = true
# Set the tenant ID for Loki communication, which is disabled by default.
# The tenant ID is required to interact with Loki running in multi-tenant mode.
tenant_id =
```
Using `logger` will print usage insights to your [Grafana server log]({{< relref "../../setup-grafana/configure-grafana/#log" >}}).

View File

@@ -114,7 +114,7 @@ If this happens, then you have to add the certificate to the trust store. If you
```
[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 ~]# 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
```

View File

@@ -16,27 +16,27 @@ This page lists the minimum hardware and software requirements to install Grafan
To run Grafana, you must have a supported operating system, hardware that meets or exceeds minimum requirements, a supported database, and a supported browser.
Grafana uses other open source software. Refer to [package.json](https://github.com/grafana/grafana/blob/main/package.json) for a complete list.
Grafana relies on other open source software to operate. For a list of open source software that Grafana uses, refer to [package.json](https://github.com/grafana/grafana/blob/main/package.json).
## Supported operating systems
The following operating systems are supported for Grafana installation:
Grafana supports the following operating systems:
- [Debian / Ubuntu]({{< relref "debian/" >}})
- [RPM-based Linux (CentOS, Fedora, OpenSuse, RedHat)]({{< relref "rpm/" >}})
- [RPM-based Linux (Fedora, SUSE/OpenSUSE, RedHat)]({{< relref "rpm/" >}})
- [macOS]({{< relref "mac/" >}})
- [Windows]({{< relref "windows/" >}})
Installation of Grafana on other operating systems is possible, but it is neither recommended nor supported.
> **Note:** Installation of Grafana on other operating systems is possible, but is not recommended or supported.
## Hardware recommendations
Grafana does not use a lot of resources and is very lightweight in use of memory and CPU.
Grafana requires the minimum system resources:
Minimum recommended memory: 255 MB
Minimum recommended CPU: 1
- Minimum recommended memory: 255 MB
- Minimum recommended CPU: 1
Some features might require more memory or CPUs. Features require more resources include:
Some features might require more memory or CPUs, including:
- [Server side rendering of images](https://grafana.com/grafana/plugins/grafana-image-renderer#requirements)
- [Alerting]({{< relref "../../alerting/" >}})
@@ -44,7 +44,7 @@ Some features might require more memory or CPUs. Features require more resources
## Supported databases
Grafana requires a database to store its configuration data, such as users, data sources, and dashboards. The exact requirements depend on the size of the Grafana installation and features used.
Grafana requires a database to store its configuration data, such as users, data sources, and dashboards. The exact requirements depend on the size of the Grafana installation and the features you use.
Grafana supports the following databases:
@@ -52,21 +52,23 @@ Grafana supports the following databases:
- [MySQL 5.7+](https://www.mysql.com/support/supportedplatforms/database.html)
- [PostgreSQL 10+](https://www.postgresql.org/support/versioning/)
By default, Grafana installs with and uses SQLite, which is an embedded database stored in the Grafana installation location.
By default Grafana uses an embedded SQLite database, which is stored in the Grafana installation location.
Grafana will support the versions of these databases that are officially supported by the project at the time of a Grafana version's release. When a version becomes unsupported, Grafana may also drop support for that version. See the links above for the support policies for each project.
> **Note:** SQLite works well if your environment is small, but is not recommended when your environment starts growing. For more information about the limitations of SQLite, refer to [Appropriate Uses For SQLite](https://www.sqlite.org/whentouse.html). If you want high availability, you must use a MySQL or PostgreSQL database. For information about how to define the database configuration parameters inside the `grafana.ini` file, refer to [[database]](https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#database).
Grafana supports the versions of these databases that are officially supported by the project at the time a version of Grafana is released. When a Grafana version becomes unsupported, Grafana Labs might also drop support for that database version. See the links above for the support policies for each project.
> **Note:** PostgreSQL versions 10.9, 11.4, and 12-beta2 are affected by a bug (tracked by the PostgreSQL project as [bug #15865](https://www.postgresql.org/message-id/flat/15865-17940eacc8f8b081%40postgresql.org)) which prevents those versions from being used with Grafana. The bug has been fixed in more recent versions of PostgreSQL.
> Grafana can report errors when relying on read-only MySQL servers, such as in high-availability failover scenarios or serverless AWS Aurora MySQL. This is a known issue; for more information, see [issue #13399](https://github.com/grafana/grafana/issues/13399).
## Supported web browsers
Grafana is supported in the current version of the following browsers. Older versions of these browsers might not be supported, so you should always upgrade to the latest version when using Grafana.
Grafana supports the current version of the following browsers. Older versions of these browsers might not be supported, so you should always upgrade to the latest browser version when using Grafana.
> **Note:** Enable JavaScript in your browser. Running Grafana without JavaScript enabled in the browser is not supported.
- Chrome/Chromium
- Firefox
- Safari
- Microsoft Edge
- Internet Explorer 11 is only fully supported in Grafana versions prior v6.0.
> **Note:** Always enable JavaScript in your browser. Running Grafana without JavaScript enabled in the browser is not supported.

View File

@@ -3,31 +3,22 @@ aliases:
- ../../installation/debian/
- ../../installation/installation/debian/
description: Install guide for Grafana on Debian or Ubuntu
title: Install on Debian or Ubuntu
title: Install Grafana on Debian or Ubuntu
menutitle: Debian or Ubuntu
weight: 100
---
# Install on Debian or Ubuntu
# Install Grafana on Debian or Ubuntu
This page explains how to install Grafana dependencies, download and install Grafana, get the service up and running on your Debian or Ubuntu system, and also describes the installation package details.
This topic explains how to install Grafana dependencies, install Grafana on Linux Debian or Ubuntu, and start the Grafana server on your Debian or Ubuntu system.
## Repository migration (November 8th 2022)
There are multiple ways to install Grafana: using the Grafana Labs APT repository, by downloading a `.deb` package, or by downloading a binary `.tar.gz` file. Choose only one of the methods below that best suits your needs.
From that date, Grafana packages will be served from a new repository (<packages.grafana.com/deb/{product}> -> <apt.grafana.com>). The new repository serves, from a single APT configuration, all Grafana OSS products, as well as Grafana Enterprise.
> **Note:** If you install via the `.deb` package or `.tar.gz` file, then you must manually update Grafana for each new version.
The old URLs will still work, serving the content from the new repository, but you may encounter warnings about some repository attributes changing (e.g. `Origin` and `Label`).
## Install from APT repository
## Note on upgrading
While the process for upgrading Grafana is very similar to installing Grafana, there are some key backup steps you should perform. Read [Upgrading Grafana]({{< relref "../../../upgrade-guide/" >}}) for tips and guidance on updating an existing installation.
## 1. Download and install
You can install Grafana using our official APT repository, by downloading a `.deb` package, or by downloading a binary `.tar.gz` file.
### Install from APT repository
If you install from the APT repository, then Grafana is automatically updated every time you run `apt-get update`.
If you install from the APT repository, Grafana automatically updates when you run `apt-get update`.
| Grafana Version | Package | Repository |
| ------------------------- | ------------------ | ------------------------------------- |
@@ -38,132 +29,130 @@ If you install from the APT repository, then Grafana is automatically updated ev
> **Note:** Grafana Enterprise is the recommended and default edition. It is available for free and includes all the features of the OSS edition. You can also upgrade to the [full Enterprise feature set](https://grafana.com/products/enterprise/?utm_source=grafana-install-page), which has support for [Enterprise plugins](https://grafana.com/grafana/plugins/?enterprise=1&utcm_source=grafana-install-page).
#### To install the latest release:
Complete the following steps to install Grafana from the APT repository:
```bash
sudo apt-get install -y apt-transport-https
sudo apt-get install -y software-properties-common wget
sudo wget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key
```
1. To install required packages and download the Grafana repository signing key, run the following commands:
Add this repository for stable releases:
```bash
sudo apt-get install -y apt-transport-https
sudo apt-get install -y software-properties-common wget
sudo wget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key
```
```bash
echo "deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
```
1. To add a repository for stable releases, run the following command:
Add this repository if you want beta releases:
```bash
echo "deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
```
```bash
echo "deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com beta main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
```
1. To add a repository for beta releases, run the following command:
After you add the repository:
```bash
echo "deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com beta main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
```
```bash
sudo apt-get update
1. After you add the repository, run the following commands to install the OSS or Enterprise release:
# Install the latest OSS release:
sudo apt-get install grafana
```bash
# Update the list of available packages
sudo apt-get update
# Install the latest Enterprise release:
sudo apt-get install grafana-enterprise
```
# Install the latest OSS release:
sudo apt-get install grafana
### Install .deb package
# Install the latest Enterprise release:
sudo apt-get install grafana-enterprise
```
If you install the `.deb` package, then you will need to manually update Grafana for each new version.
## Install Grafana using a deb package or as a standalone binary
1. On the [Grafana download page](https://grafana.com/grafana/download), select the Grafana version you want to install.
If you choose not to install Grafana using APT, you can download and install Grafana using the deb package or as a standalone binary.
Complete the following steps to install Grafana using DEB or the standalone binaries:
1. Navigate to the [Grafana download page](https://grafana.com/grafana/download).
1. Select the Grafana version you want to install.
- The most recent Grafana version is selected by default.
- The **Version** field displays only finished releases. If you want to install a beta version, click **Nightly Builds** and then select a version.
- The **Version** field displays only tagged releases. If you want to install a nightly build, click **Nightly Builds** and then select a version.
1. Select an **Edition**.
- **Enterprise** - Recommended download. Functionally identical to the open source version, but includes features you can unlock with a license if you so choose.
- **Open Source** - Functionally identical to the Enterprise version, but you will need to download the Enterprise version if you want Enterprise features.
1. Depending on which system you are running, click **Linux** or **ARM**.
1. Copy and paste the code from the installation page into your command line and run. It follows the pattern shown below.
```bash
sudo apt-get install -y adduser
wget <.deb package url>
sudo dpkg -i grafana<edition>_<version>_amd64.deb
```
## Install from binary .tar.gz file
Download the latest [`.tar.gz` file](https://grafana.com/grafana/download?platform=linux) and extract it. The files extract into a folder named after the Grafana version downloaded. This folder contains all files required to run Grafana. There are no init scripts or install scripts in this package.
```bash
wget <tar.gz package url>
sudo tar -zxvf <tar.gz package>
```
- **Enterprise:** This is the recommended version. It is functionally identical to the open source version, but includes features you can unlock with a license, if you so choose.
- **Open Source:** This version is functionally identical to the Enterprise version, but you will need to download the Enterprise version if you want Enterprise features.
1. Depending on which system you are running, click the **Linux** or **ARM** tab on the download page.
1. Copy and paste the code from the installation page into your command line and run.
## 2. Start the server
This starts the `grafana-server` process as the `grafana` user, which was created during the package installation.
The following sections provide instructions for starting the `grafana-server` process as the `grafana` user, which was created during the package installation.
If you installed with the APT repository or `.deb` package, then you can start the server using `systemd` or `init.d`. If you installed a binary `.tar.gz` file, then you need to execute the binary.
### Start the server with systemd
> **Note:** The following subsections describe three methods of starting the Grafana server: with systemd, initd, or by directly running the binary. You should follow only one set of instructions, depending on how your machine is configured.
To start the service and verify that the service has started:
### Start the Grafana server with systemd
```bash
sudo systemctl daemon-reload
sudo systemctl start grafana-server
sudo systemctl status grafana-server
```
Complete the following steps to start the Grafana server with systemd and verify that it is running:
Configure the Grafana server to start at boot:
1. To start the service, run the following commands:
```bash
sudo systemctl enable grafana-server.service
```
```bash
sudo systemctl daemon-reload
sudo systemctl start grafana-server
sudo systemctl status grafana-server
```
#### Serving Grafana on a port < 1024
1. To verify that the service is running, run the following command:
```
sudo systemctl status grafana-server
```
1. To configure the Grafana server to start at boot, run the following command:
```bash
sudo systemctl enable grafana-server.service
```
#### Serve Grafana on a port < 1024
{{< docs/shared "systemd/bind-net-capabilities.md" >}}
### Start the server with init.d
To start the service and verify that the service has started:
Complete the following steps to start the Grafana service and verify that it is running:
```bash
sudo service grafana-server start
sudo service grafana-server status
```
1. To start the Grafana server, run the following commands:
Configure the Grafana server to start at boot:
```bash
sudo service grafana-server start
sudo service grafana-server status
```
```bash
sudo update-rc.d grafana-server defaults
```
1. To verify that the service is running, run the following command:
### Execute the binary
```
sudo service grafana-server status
```
1. To configure the Grafana server to start at boot, run the following command:
```bash
sudo update-rc.d grafana-server defaults
```
### Start the server using the binary
The `grafana-server` binary .tar.gz needs the working directory to be the root install directory where the binary and the `public` folder are located.
Start Grafana by running:
To start the Grafana server, run the following command:
```bash
./bin/grafana-server web
./bin/grafana-server
```
## Package details
## Upgrade Grafana
- Installs binary to `/usr/sbin/grafana-server`
- Installs Init.d script to `/etc/init.d/grafana-server`
- Creates default file (environment vars) to `/etc/default/grafana-server`
- Installs configuration file to `/etc/grafana/grafana.ini`
- Installs systemd service (if systemd is available) name `grafana-server.service`
- The default configuration sets the log file at `/var/log/grafana/grafana.log`
- The default configuration specifies a SQLite3 db at `/var/lib/grafana/grafana.db`
- Installs HTML/JS/CSS and other Grafana files at `/usr/share/grafana`
While the process for upgrading Grafana is similar to installing Grafana, there are important backup tasks you should perform. Refer to [Upgrade Grafana]({{< relref "../../../upgrade-guide/" >}}) for guidance on updating an existing installation.
## Next steps
Refer to the [Getting Started]({{< relref "../../../getting-started/build-first-dashboard/" >}}) guide for information about logging in, setting up data sources, and so on.
## Configure Grafana
Refer to the [Configuration]({{< relref "../../configure-grafana/" >}}) page for details on options for customizing your environment, logging, database, and so on.
- [Start the Grafana server]({{< relref "../../start-restart-grafana/" >}})

View File

@@ -1,23 +1,25 @@
---
aliases:
- ../../installation/mac/
description: Installing Grafana on macOS
title: Install on macOS
description: How to install Grafana OSS or Enterprise on macOS
title: Install Grafana on macOS
menuTitle: macOS
weight: 600
---
# Install on macOS
# Install Grafana on macOS
This page explains how to install Grafana and get the service running on your macOS.
This page explains how to install Grafana on macOS.
**Note on upgrading:** While the process for upgrading Grafana is very similar to installing Grafana, there are some key backup steps you should perform. Before you perform an upgrade, read [Upgrading Grafana]({{< relref "../../../upgrade-guide/" >}}) for tips and guidance on updating an existing installation.
## Install Grafana on macOS using Homebrew
## Install with Homebrew
To install Grafana on macOS using Homebrew, complete the following steps:
Use [Homebrew](http://brew.sh/) to install the most recent released version of Grafana using Homebrew package.
1. On the [Homebrew](http://brew.sh/) homepage, search for Grafana.
1. On the Homebrew homepage, search for Grafana. The last stable and released version is listed.
1. Open a terminal and enter:
The last stable and released version is listed.
1. Open a terminal and run the following commands:
```
brew update
@@ -26,47 +28,39 @@ Use [Homebrew](http://brew.sh/) to install the most recent released version of G
The brew page downloads and untars the files into:
- `/usr/local/Cellar/grafana/[version]` (Homebrew v2)
- `/opt/homebrew/Cellar/grafana/[version]` (Homebrew v3)
- `/usr/local/Cellar/grafana/[version]` (Intel Silicon)
- `/opt/homebrew/Cellar/grafana/[version]` (Apple Silicon)
1. To start Grafana, run the following command:
1. Start Grafana using the command:
```bash
brew services start grafana
```
## Install standalone macOS binaries
To install a nightly build, or to install the latest version of Grafana without Homebrew, go to the [Grafana download page](https://grafana.com/grafana/download?platform=mac).
1. Select the Grafana version you want to install. By default, the most recent released version is selected.
> **Note:** The downloads page lists only finished releases. If you want to install a beta version, click [Nightly ] **Nightly Builds** and then select a version.
To install Grafana on macOS using the standalone binaries, complete the following steps:
1. Navigate to the [Grafana download page](https://grafana.com/grafana/download).
1. Select the Grafana version you want to install.
- The most recent Grafana version is selected by default.
- The **Version** field displays only tagged releases. If you want to install a nightly build, click **Nightly Builds** and then select a version.
1. Select an **Edition**.
- **Open Source** - Functionally identical to the enterprise version, but you will need to download the enterprise version if you want enterprise features.
- **Enterprise** - Recommended download. Functionally identical to the open source version, but includes features you can unlock with a license if you so choose.
- **Enterprise:** This is the recommended version. It is functionally identical to the open source version, but includes features you can unlock with a license, if you so choose.
- **Open Source:** This version is functionally identical to the Enterprise version, but you will need to download the Enterprise version if you want Enterprise features.
1. Click **Mac**.
1. Open a terminal and download the binary using the cURL command. The following example shows Grafana 7.1.5 version:
```bash
curl -O https://dl.grafana.com/oss/release/grafana-7.1.5.darwin-amd64.tar.gz
```
1. Untar the gz file and copy the files to the location of your preference.
1. Copy and paste the code from the installation page into your command line and run.
1. Untar the `gz` file and copy the files to the location of your preference.
1. To start Grafana service, go to the directory and run the command:
```bash
./bin/grafana-server web
./bin/grafana-server
```
## Upgrade Grafana
While the process for upgrading Grafana is very similar to installing Grafana, there are important backup tasks you should perform. Refer to [Upgrade Grafana]({{< relref "../../../upgrade-guide/" >}}) for guidance on updating an existing installation.
## Next steps
Refer to the [Getting Started]({{< relref "../../../getting-started/build-first-dashboard/" >}}) guide for information about logging in, setting up data sources, and so on. Also, refer to the [Configuration]({{< relref "../../configure-grafana/" >}}) page for details on options for customizing your environment, logging, database, and so on.
## Upgrade
**Using Homebrew**
To upgrade Grafana, use the reinstall command:
```bash
brew update
brew reinstall grafana
```
- [Start the Grafana server]({{< relref "../../start-restart-grafana/" >}})

View File

@@ -0,0 +1,102 @@
---
description: Install guide for Grafana on Red Hat, RHEL, and Fedora.
title: Install Grafana on Red Hat, RHEL, or Fedora
menuTitle: Redhat, RHEL, or Fedora
weight: 400
---
# Install Grafana on Red Hat, RHEL, or Fedora
This topic explains how to install Grafana dependencies, install Grafana on Redhat, RHEL, or Fedora, and start the Grafana server on your system.
You can install Grafana using a YUM repository, using RPM, or by downloading a binary `.tar.gz` file.
If you install via RPM or the `.tar.gz` file, then you must manually update Grafana for each new version.
## Install Grafana from the YUM repository
If you install from the YUM repository, then Grafana is automatically updated every time you run `sudo yum update`.
| Grafana Version | Package | Repository |
| ------------------ | ------------------ | ------------------------- |
| Grafana Enterprise | grafana-enterprise | `https://rpm.grafana.com` |
| Grafana OSS | grafana | `https://rpm.grafana.com` |
> **Note:** Grafana Enterprise is the recommended and default edition. It is available for free and includes all the features of the OSS edition. You can also upgrade to the [full Enterprise feature set](https://grafana.com/products/enterprise/?utm_source=grafana-install-page), which has support for [Enterprise plugins](https://grafana.com/grafana/plugins/?enterprise=1&utcm_source=grafana-install-page).
To install Grafana using a YUM repository, complete the following steps:
1. Add a file to your YUM repository using the method of your choice.
The following example uses `nano` to add a file to the YUM repo.
```bash
sudo nano /etc/yum.repos.d/grafana.repo
```
```bash
[grafana]
name=grafana
baseurl=https://rpm.grafana.com
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://rpm.grafana.com/gpg.key
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
```
1. To prevent beta versions from being installed, add the following exclude line to your `.repo` file.
```bash
exclude=*beta*
```
1. To install Grafana OSS, run the following command:
```bash
sudo yum install grafana
```
1. To install Grafana Enterprise, run the following command:
```bash
sudo yum install grafana-enterprise
```
## Install the Grafana RPM package manually
If you install Grafana manually using YUM or RPM, then you must manually update Grafana for each new version. This method varies according to which Linux OS you are running.
**Note:** The RPM files are signed. You can verify the signature with this [public GPG key](https://rpm.grafana.com/gpg.key).
1. On the [Grafana download page](https://grafana.com/grafana/download), select the Grafana version you want to install.
- The most recent Grafana version is selected by default.
- The **Version** field displays only finished releases. If you want to install a beta version, click **Nightly Builds** and then select a version.
1. Select an **Edition**.
- **Enterprise** - Recommended download. Functionally identical to the open source version, but includes features you can unlock with a license if you so choose.
- **Open Source** - Functionally identical to the Enterprise version, but you will need to download the Enterprise version if you want Enterprise features.
1. Depending on which system you are running, click **Linux** or **ARM**.
1. Copy and paste the RPM package URL and the local RPM package information from the installation page into the pattern shown below, then run the commands.
```bash
sudo yum install -y <rpm package url>
```
## Install Grafana as a standalone binary
Complete the following steps to install Grafana using the standalone binaries:
1. Navigate to the [Grafana download page](https://grafana.com/grafana/download).
1. Select the Grafana version you want to install.
- The most recent Grafana version is selected by default.
- The **Version** field displays only tagged releases. If you want to install a nightly build, click **Nightly Builds** and then select a version.
1. Select an **Edition**.
- **Enterprise:** This is the recommended version. It is functionally identical to the open-source version but includes features you can unlock with a license if you so choose.
- **Open Source:** This version is functionally identical to the Enterprise version, but you will need to download the Enterprise version if you want Enterprise features.
1. Depending on which system you are running, click the **Linux** or **ARM** tab on the download page.
1. Copy and paste the code from the installation page into your command line and run.
## Next steps
Refer to [Start the Grafana server]({{< relref "../start-restart-grafana/" >}}).

View File

@@ -1,232 +0,0 @@
---
aliases:
- ../../installation/installation/rpm/
- ../../installation/rpm/
description: Grafana Installation guide for RPM-based Linux, such as Centos, Fedora,
OpenSuse, and Red Hat.
title: Install on RPM-based Linux
weight: 400
---
# Install on RPM-based Linux (CentOS, Fedora, OpenSuse, Red Hat)
This topic explains how to install Grafana dependencies, download and install Grafana, get the service up and running on your RPM-based Linux system, and the installation package details.
## Repository migration (November 8th 2022)
From that date, Grafana packages will be served from a new repository (<packages.grafana.com/rpm/{product}> -> <rpm.grafana.com>). The new repository serves, from a single YUM/DNF configuration, all Grafana OSS products, as well as Grafana Enterprise.
The old URLs will still work, serving the content from the new repository, but you may encounter warnings about some repository attributes changing.
## Note on upgrading
While the process for upgrading Grafana is very similar to installing Grafana, there are some key backup steps you should perform. Read [Upgrading Grafana]({{< relref "../../../upgrade-guide/" >}}) for tips and guidance on updating an existing installation.
## 1. Download and install
You can install Grafana from a YUM repository, manually using YUM, manually using RPM, or by downloading a binary `.tar.gz` file.
### Install from YUM repository
If you install from the YUM repository, then Grafana is automatically updated every time you run `sudo yum update`.
| Grafana Version | Package | Repository |
| ------------------ | ------------------ | ------------------------- |
| Grafana Enterprise | grafana-enterprise | `https://rpm.grafana.com` |
| Grafana OSS | grafana | `https://rpm.grafana.com` |
> **Note:** Grafana Enterprise is the recommended and default edition. It is available for free and includes all the features of the OSS Edition. You can also upgrade to the [full Enterprise feature set](https://grafana.com/products/enterprise/?utm_source=grafana-install-page) and has support for [Enterprise plugins](https://grafana.com/grafana/plugins/?enterprise=1&utcm_source=grafana-install-page).
Add a new file to your YUM repo using the method of your choice. The command below uses `nano`.
```bash
sudo nano /etc/yum.repos.d/grafana.repo
```
```bash
[grafana]
name=grafana
baseurl=https://rpm.grafana.com
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://rpm.grafana.com/gpg.key
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
```
Optionally, add an exclude line to your `.repo` file to prevent beta versions from being installed.
```bash
exclude=*beta*
```
Install Grafana with one of the following commands
> We recommend all users to install the Enterprise Edition of Grafana, which can be seamlessly upgraded with a Grafana Enterprise [subscription](https://grafana.com/products/enterprise/?utm_source=grafana-install-page).
```bash
sudo yum install grafana
# or
sudo yum install grafana-enterprise
```
### Install manually with YUM
If you install manually with YUM, then you will need to manually update Grafana for each new version. To enable automatic updates for your Grafana installation please use the instructions below to install via our YUM repository.
1. On the [Grafana download page](https://grafana.com/grafana/download), select the Grafana version you want to install.
- The most recent Grafana version is selected by default.
- The **Version** field displays only finished releases. If you want to install a beta version, click **Nightly Builds** and then select a version.
1. Select an **Edition**.
- **Enterprise** - Recommended download. Functionally identical to the open source version, but includes features you can unlock with a license if you so choose.
- **Open Source** - Functionally identical to the Enterprise version, but you will need to download the Enterprise version if you want enterprise features.
1. Depending on which system you are running, click **Linux** or **ARM**.
1. Copy and paste the code from the installation page into your command line and run. It follows the pattern shown below.
```bash
wget <rpm package url>
sudo yum localinstall <local rpm package>
```
You can also install Grafana using YUM directly:
```bash
sudo yum install <rpm package url>
```
### Install with RPM
If you install with RPM, then you will need to manually update Grafana for each new version. This method varies according to which Linux OS you are running. Read the instructions fully before you begin.
**Note:** The .rpm files are signed, you can verify the signature with this [public GPG key](https://rpm.grafana.com/gpg.key).
1. On the [Grafana download page](https://grafana.com/grafana/download), select the Grafana version you want to install.
- The most recent Grafana version is selected by default.
- The **Version** field displays only finished releases. If you want to install a beta version, click **Nightly Builds** and then select a version.
1. Select an **Edition**.
- **Enterprise** - Recommended download. Functionally identical to the open source version, but includes features you can unlock with a license if you so choose.
- **Open Source** - Functionally identical to the Enterprise version, but you will need to download the Enterprise version if you want Enterprise features.
1. Depending on which system you are running, click **Linux** or **ARM**.
1. Copy and paste the .rpm package URL and the local .rpm package information from the installation page into the pattern shown below, then run the commands.
**On CentOS, Fedora, Red Hat, or RHEL:**
```bash
sudo yum install initscripts urw-fonts wget
wget <rpm package url>
sudo rpm -Uvh <local rpm package>
```
**On OpenSUSE or SUSE:**
```bash
wget <rpm package url>
sudo rpm -i --nodeps <local rpm package>
```
### Install from binary .tar.gz file
Download the latest [`.tar.gz` file](https://grafana.com/grafana/download?platform=linux) and extract it. The files are extracted into a folder named after the Grafana version that you downloaded. This folder contains all files required to run Grafana. There are no init scripts or install scripts in this package.
```bash
wget <tar.gz package url>
sudo tar -zxvf <tar.gz package>
```
## 2. Start the server
This starts the `grafana-server` process as the `grafana` user, which was created during the package installation. The systemd commands work in most cases, but some older Linux systems might require init.d. The installer should prompt you with the correct commands.
If you installed with an `.rpm` package, then you can start the server using `systemd` or `init.d`. If you installed a binary `.tar.gz` file, then you need to execute the binary.
### Start the server with systemd
To start the service and verify that the service has started:
```bash
sudo systemctl daemon-reload
sudo systemctl start grafana-server
sudo systemctl status grafana-server
```
Configure the Grafana server to start at boot:
```bash
sudo systemctl enable grafana-server
```
> **SUSE or OpenSUSE users:** You might need to start the server with the systemd method, then use the init.d method to configure Grafana to start at boot.
#### Serving Grafana on a port < 1024
{{< docs/shared "systemd/bind-net-capabilities.md" >}}
#### Serving Grafana behind a proxy
When serving Grafana behind a proxy, you need to configure the `http_proxy` and `https_proxy` environment variables.
##### Centos 6
If you are on Centos 6, add the following lines to the `/etc/sysconfig/grafana-server` file.
```
export no_proxy=internal.domain,127.0.0.1
export http_proxy=http://proxy.domain:3128/
export https_proxy=http://proxy.domain:3128/
```
##### Centos 7
If you are on Centos 7, add the following lines to the `/etc/sysconfig/grafana-server` file.
```
http_proxy=http://proxy.domain:3128/
https_proxy=http://proxy.domain:3128/
no_proxy=internal.domain,127.0.0.1
```
### Start the server with init.d
To start the service and verify that the service has started:
```bash
sudo service grafana-server start
sudo service grafana-server status
```
Configure the Grafana server to start at boot:
```bash
sudo /sbin/chkconfig --add grafana-server
```
### Execute the binary
The `grafana-server` binary needs the working directory to be the root install directory where the binary and the `public` folder are located.
Start Grafana by running:
```bash
./bin/grafana-server web
```
## Package details
- Installs binary to `/usr/sbin/grafana-server`
- Copies init.d script to `/etc/init.d/grafana-server`
- Installs default file (environment vars) to `/etc/sysconfig/grafana-server`
- Copies configuration file to `/etc/grafana/grafana.ini`
- Installs systemd service (if systemd is available) name `grafana-server.service`
- The default configuration uses a log file at `/var/log/grafana/grafana.log`
- The default configuration specifies an sqlite3 database at `/var/lib/grafana/grafana.db`
## Next steps
Refer to the [Getting Started]({{< relref "../../../getting-started/build-first-dashboard/" >}}) guide for information about logging in, setting up data sources, and so on.
## Configure Grafana
Refer to the [Configuration]({{< relref "../../configure-grafana/" >}}) page for details on options for customizing your environment, logging, database, and so on.

View File

@@ -0,0 +1,84 @@
---
description: Install guide for Grafana on SUSE or OpenSUSE.
title: Install Grafana on SUSE or OpenSUSE
menuTitle: Redhat, RHEL, or Fedora
weight: 450
---
# Install Grafana on SUSE or OpenSUSE
This topic explains how to install Grafana dependencies, install Grafana on SUSE or OpenSUSE and start the Grafana server on your system.
You can install Grafana using a YUM repository, using RPM, or by downloading a binary `.tar.gz` file.
If you install via RPM or the `.tar.gz` file, then you must manually update Grafana for each new version.
## Install Grafana from the YUM repository
If you install from the YUM repository, then Grafana is automatically updated every time you run `sudo zypper update`.
| Grafana Version | Package | Repository |
| ------------------ | ------------------ | ------------------------- |
| Grafana Enterprise | grafana-enterprise | `https://rpm.grafana.com` |
| Grafana OSS | grafana | `https://rpm.grafana.com` |
> **Note:** Grafana Enterprise is the recommended and default edition. It is available for free and includes all the features of the OSS edition. You can also upgrade to the [full Enterprise feature set](https://grafana.com/products/enterprise/?utm_source=grafana-install-page), which has support for [Enterprise plugins](https://grafana.com/grafana/plugins/?enterprise=1&utcm_source=grafana-install-page).
To install Grafana using a YUM repository, complete the following steps:
1. Use zypper to add the grafana repo.
```bash
sudo zypper addrepo https://rpm.grafana.com grafana
```
1. To install Grafana OSS, run the following command:
```bash
sudo zypper install grafana
```
1. To install Grafana Enterprise, run the following command:
```bash
sudo zypper install grafana-enterprise
```
## Install the Grafana RPM package manually
If you install Grafana manually using YUM or RPM, then you must manually update Grafana for each new version. This method varies according to which Linux OS you are running.
**Note:** The RPM files are signed. You can verify the signature with this [public GPG key](https://rpm.grafana.com/gpg.key).
1. On the [Grafana download page](https://grafana.com/grafana/download), select the Grafana version you want to install.
- The most recent Grafana version is selected by default.
- The **Version** field displays only finished releases. If you want to install a beta version, click **Nightly Builds** and then select a version.
1. Select an **Edition**.
- **Enterprise** - Recommended download. Functionally identical to the open source version, but includes features you can unlock with a license if you so choose.
- **Open Source** - Functionally identical to the Enterprise version, but you will need to download the Enterprise version if you want Enterprise features.
1. Depending on which system you are running, click **Linux** or **ARM**.
1. Copy and paste the RPM package URL and the local RPM package information from the installation page into the pattern shown below, then run the commands.
```bash
sudo zypper install initscripts urw-fonts wget
wget <rpm package url>
sudo rpm -Uvh <local rpm package>
```
## Install Grafana as a standalone binary
Complete the following steps to install Grafana using the standalone binaries:
1. Navigate to the [Grafana download page](https://grafana.com/grafana/download).
1. Select the Grafana version you want to install.
- The most recent Grafana version is selected by default.
- The **Version** field displays only tagged releases. If you want to install a nightly build, click **Nightly Builds** and then select a version.
1. Select an **Edition**.
- **Enterprise:** This is the recommended version. It is functionally identical to the open-source version but includes features you can unlock with a license if you so choose.
- **Open Source:** This version is functionally identical to the Enterprise version, but you will need to download the Enterprise version if you want Enterprise features.
1. Depending on which system you are running, click the **Linux** or **ARM** tab on the download page.
1. Copy and paste the code from the installation page into your command line and run.
## Next steps
Refer to [Start the Grafana server]({{< relref "../start-restart-grafana/" >}}).

View File

@@ -1,49 +1,63 @@
---
aliases:
- ../../installation/windows/
description: Install Grafana on Windows
title: Install on Windows
description: How to install Grafana OSS or Enterprise on Windows
title: Install Grafana on Windows
menutitle: Windows
weight: 500
---
# Install on Windows
# Install Grafana on Windows
You can either download the Windows installer package or a standalone Windows binary file.
You install Grafana using the Windows installer or using the standalone Windows binary file.
Read [Upgrading Grafana]({{< relref "../../../upgrade-guide/" >}}) for tips and guidance on updating an existing installation.
1. Navigate to [Download Grafana](https://grafana.com/grafana/download?platform=windows).
1. Select a Grafana version you want to install.
1. Navigate to the [Grafana download page](https://grafana.com/grafana/download).
1. Select the Grafana version you want to install.
- The most recent Grafana version is selected by default.
- The **Version** field displays only finished releases. If you want to install a beta version, click **Nightly Builds** and then select a version.
- The **Version** field displays only tagged releases. If you want to install a nightly build, click **Nightly Builds** and then select a version.
1. Select an **Edition**.
- **Enterprise** - Recommended download. Functionally identical to the open source version, but includes features you can unlock with a license if you so choose.
- **Open Source** - Functionally identical to the enterprise version, but you will need to download the enterprise version if you want enterprise features.
- **Enterprise:** This is the recommended version. It is functionally identical to the open source version, but includes features you can unlock with a license, if you so choose.
- **Open Source:** This version is functionally identical to the Enterprise version, but you will need to download the Enterprise version if you want Enterprise features.
1. Click **Windows**.
1. To use the Windows installer, complete the following steps:
You can either use the Windows installer or you can install a standalone Windows binary.
a. Click **Download the installer**.
## Install with Windows installer (recommended)
b. Open and run the installer.
1. Click **Download the installer**.
1. Open and run the installer.
1. To install the standalone Windows binary, complete the following steps:
To run Grafana, open your browser and go to the Grafana port (http://localhost:3000/ is default) and then follow the instructions in [Getting Started]({{< relref "../../../getting-started/build-first-dashboard/" >}}).
a. Click **Download the zip file**.
## Install standalone Windows binary
b. Right-click the downloaded file, select **Properties**, select the `unblock` checkbox, and click `OK`.
1. Click **Download the zip file**.
**Important:** After you've downloaded the zip file and before extracting it, make sure to open the properties for that file (right-click **Properties**) and select the `unblock` check box and then click `Ok`.
c. Extract the ZIP file to any folder.
1. Extract this folder to anywhere you want Grafana to run from.
Start Grafana by executing `grafana-server.exe`, located in the `bin` directory, preferably from the command line. If you want to run Grafana as a Windows service, then download
[NSSM](https://nssm.cc/). It is very easy to add Grafana as a Windows service using that tool.
1. Start Grafana by executing `grafana-server.exe`, located in the `bin` directory, preferably from the command line. If you want to run Grafana as a Windows service, then download
[NSSM](https://nssm.cc/). It is very easy to add Grafana as a Windows service using that tool.
1. To run Grafana, open your browser and go to the Grafana port (http://localhost:3000/ is default) and then follow the instructions in [Getting Started]({{< relref "../../../getting-started/build-first-dashboard/" >}}).
To run Grafana, open your browser and go to the Grafana port (http://localhost:3000/ is default) and then follow the instructions in [Getting Started]({{< relref "../../../getting-started/build-first-dashboard/" >}}).
> **Note:** The default Grafana port is `3000`. This port might require extra permissions on Windows. If it does not appear in the default port, you can change the port number.
> **Note:** The default Grafana port is `3000`. This port might require extra permissions on Windows. If it does not appear in the default port, you can try changing to a different port.
>
> 1. Go into the `conf` directory and copy `sample.ini` to `custom.ini`. **Note:** You should edit `custom.ini`, never `defaults.ini`.
> 1. Edit `custom.ini` and uncomment the `http_port` configuration option (`;` is the comment character in ini files) and change it to something like `8080` or similar. That port should not require extra Windows privileges.
> Read more about the [configuration options]({{< relref "../../configure-grafana/" >}}).
1. To change the port, perform the following steps:
a. Open the `conf` directory and copy `sample.ini` to `custom.ini`.
> **Note:** You should edit `custom.ini`, never `defaults.ini`.
b. Edit `custom.ini` and uncomment the `http_port` configuration option.
`;` is the comment character in ini files.
c. Change the port to `8080` or something similar.
Port `8080` should not require extra Windows privileges.
## Upgrade Grafana
While the process for upgrading Grafana is very similar to installing Grafana, there are important backup tasks you should perform. Refer to [Upgrade Grafana]({{< relref "../../../upgrade-guide/" >}}) for guidance on updating an existing installation.
## Next steps
- [Start the Grafana server]({{< relref "../../start-restart-grafana/" >}})

View File

@@ -1,132 +0,0 @@
---
aliases:
- ../installation/restart-grafana/
description: Instructions for restarting Grafana
title: Restart Grafana
weight: 300
---
# Restart Grafana
Users often need to restart Grafana after they have made configuration changes. This topic provides detailed instructions on how to restart Grafana supported operating systems.
- [Windows](#windows)
- [MacOS](#macos)
- [Linux](#linux)
- [Docker](#docker)
## Windows
To restart Grafana:
1. Open the Services app.
1. Right-click on the **Grafana** service.
1. In the context menu, click **Restart**.
## macOS
Restart methods differ depending on whether you installed Grafana using Homebrew or as standalone macOS binaries.
### Restart Grafana using Homebrew
Use the [Homebrew](http://brew.sh/) restart command:
```bash
brew services restart grafana
```
### Restart standalone macOS binaries
To restart Grafana:
1. Open a terminal and go to the directory where you copied the install setup files.
1. Run the command:
```bash
./bin/grafana-server web
```
## Linux
Restart methods differ depending on whether your Linux system uses `systemd` or `init.d`.
### Restart the server with systemd
To restart the service and verify that the service has started, run the following commands:
```bash
sudo systemctl restart grafana-server
sudo systemctl status grafana-server
```
Alternately, you can configure the Grafana server to restart at boot:
```bash
sudo systemctl enable grafana-server.service
```
> **Note:** SUSE or OpenSUSE users may need to start the server with the systemd method, then use the init.d method to configure Grafana to start at boot.
### Restart the server with init.d
To restart the service, run the following command:
```bash
sudo service grafana-server restart
```
or
```bash
sudo /etc/init.d/grafana-server restart
```
Verify the status:
```bash
sudo service grafana-server status
```
or
```bash
sudo /etc/init.d/grafana-server status
```
Alternately, you can configure the Grafana server to restart at boot:
```bash
sudo update-rc.d grafana-server defaults
```
## Docker
To restart the Grafana service, use the `docker restart` command.
`docker restart grafana`
Alternately, you can use the `docker compose restart` command to restart Grafana. For more information, refer to [docker compose documentation](https://docs.docker.com/compose/).
### Docker compose example
Configure your `docker-compose.yml` file. For example:
```bash
grafana:
image: grafana/grafana:latest
ports:
- "3000:3000"
environment:
- TERM=linux
- GF_INSTALL_PLUGINS=grafana-clock-panel,grafana-piechart-panel,grafana-polystat-panel
```
Start the Grafana server:
`docker-compose up`
This starts the Grafana server along with the three plugins specified in the YAML file.
To restart the running container, use this command:
`docker-compose restart grafana`

View File

@@ -0,0 +1,276 @@
---
keywords:
- grafana
- https
- ssl
- certificates
title: Set up Grafana HTTPS for secure web traffic
menuTitle: Set up HTTPS
weight: 900
---
# Set up Grafana HTTPS for secure web traffic
When accessing the Grafana UI through the web, it is important to set up HTTPS to ensure the communication between Grafana and the end user is encrypted, including login credentials and retrieved metric data.
In order to ensure secure traffic over the internet, Grafana must have a key for encryption and a [Secure Socket Layer (SSL) Certificate](https://www.kaspersky.com/resource-center/definitions/what-is-a-ssl-certificate) to verify the identity of the site.
The following image shows a browser lock icon which confirms the connection is safe.
{{< figure src="/media/docs/grafana/https-config/screenshot-secure-https.png" max-width="500px" caption="Secure HTTPS connection" >}}
This topic shows you how to:
1. Obtain a certificate and key
2. Configure Grafana HTTPS
3. Restart the Grafana server
## Before you begin
To follow these instructions, you need:
- You must have shell access to the system and `sudo` access to perform actions as root or administrator.
- For the CA-signed option, you need a domain name that you possess and that is associated with the machine you are using.
## Obtain a certificate and key
You can use one of two methods to obtain a certificate and a key. The faster and easier _self-signed_ option might show browser warnings to the user that they will have to accept each time they visit the site. Alternatively, the Certificate Authority (CA) signed option requires more steps to complete, but it enables full trust with the browser. To learn more about the difference between these options, refer to [Difference between self-signed CA and self-signed certificate](https://www.baeldung.com/cs/self-signed-ca-vs-certificate).
### Generate a self-signed certificate
This section shows you how to use `openssl` tooling to generate all necessary files from the command line.
1. Run the following command to generate a 2048-bit RSA private key, which is used to decrypt traffic:
```bash
$ sudo openssl genrsa -out /etc/grafana/grafana.key 2048
```
1. Run the following command to generate a certificate, using the private key from the previous step.
```bash
$ sudo openssl req -new -key /etc/grafana/grafana.key -out /etc/grafana/grafana.csr
```
When prompted, answer the questions, which might include your fully-qualified domain name, email address, country code, and others. The following example is similar to the prompts you will see.
```
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:US
State or Province Name (full name) [Some-State]:Virginia
Locality Name (eg, city) []:Richmond
Organization Name (eg, company) [Internet Widgits Pty Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (e.g. server FQDN or YOUR name) []:subdomain.mysite.com
Email Address []:me@mysite.com
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
```
1. Run the following command to self-sign the certificate with the private key, for a period of validity of 365 days:
```bash
sudo openssl x509 -req -days 365 -in grafana.csr -signkey /etc/grafana/grafana.key -out /etc/grafana/grafana.crt
```
1. Run the following commands to set the appropriate permissions for the files:
```bash
sudo chown grafana:grafana /etc/grafana/grafana.crt
sudo chown grafana:grafana /etc/grafana/grafana.key
sudo chmod 400 grafana.key /etc/grafana/grafana.crt
```
**Note**: When using these files, browsers might provide warnings for the resulting website because a third-party source does not trust the certificate. Browsers will show trust warnings; however, the connection will remain encrypted.
The following image shows an insecure HTTP connection.
{{< figure src="/media/docs/grafana/https-config/screenshot-insecure-https.png" max-width="750px" caption="Insecure HTTPS connection" >}}
### Obtain a signed certificate from LetsEncrypt
[LetsEncrypt](https://letsencrypt.org/) is a nonprofit certificate authority that provides certificates without any charge. For signed certificates, there are multiple companies and certificate authorities (CAs) available. The principles for generating the certificates might vary slightly in accordance with the provider but will generally remain the same.
The examples in this section use LetsEncrypt because it is free.
> **Note**: The instructions provided in this section are for a Debian-based Linux system. For other distributions and operating systems, please refer to the [certbot instructions](https://certbot.eff.org/instructions). Also, these instructions require you to have a domain name that you are in control of. Dynamic domain names like those from Amazon EC2 or DynDNS providers will not function.
#### Install `snapd` and `certbot`
`certbot` is an open-source program used to manage LetsEncrypt certificates, and `snapd` is a tool that assists in running `certbot` and installing the certificates.
1. To install `snapd`, run the following commands:
```bash
sudo apt-get install snapd
sudo snap install core; sudo snap refresh core
```
1. Run the following commands to install:
```bash
sudo apt-get remove certbot
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
```
These commands:
- Uninstall `certbot` from your system if it has been installed using a package manager
- Install `certbot` using `snapd`
#### Generate certificates using `certbot`
The `sudo certbot certonly --standalone` command prompts you to answer questions before it generates a certificate. This process temporarily opens a service on port `80` that LetsEncrypt uses to verify communication with your host.
To generate certificates using `certbot`, complete the following steps:
1. Ensure that port `80` traffic is permitted by applicable firewall rules.
1. Run the following command to generate certificates:
```bash
$ sudo certbot certonly --standalone
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Enter email address (used for urgent renewal and security notices)
(Enter 'c' to cancel): me@mysite.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.3-September-21-2022.pdf. You must
agree in order to register with the ACME server. Do you agree?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: y
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing, once your first certificate is successfully issued, to
share your email address with the Electronic Frontier Foundation, a founding
partner of the Lets Encrypt project and the non-profit organization that
develops Certbot? Wed like to send you email about our work encrypting the web,
EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: n
Account registered.
Please enter the domain name(s) you would like on your certificate (comma and/or
space separated) (Enter 'c' to cancel): subdomain.mysite.com
Requesting a certificate for subdomain.mysite.com
Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/subdomain.mysite.com/fullchain.pem
Key is saved at: /etc/letsencrypt/live/subdomain.mysite.com/privkey.pem
This certificate expires on 2023-06-20.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you like Certbot, please consider supporting our work by:
* Donating to ISRG / Lets Encrypt: https://letsencrypt.org/donate
* Donating to EFF: https://eff.org/donate-le
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
```
#### Set up symlinks to Grafana
Symbolic links, also known as symlinks, enable you to create pointers to existing LetsEncrypt files in the `/etc/grafana` directory. By using symlinks rather than copying files, you can use `certbot` to refresh or request updated certificates from LetsEncrypt without the need to reconfigure the Grafana settings.
To set up symlinks to Grafana, run the following commands:
```bash
$ sudo ln -s /etc/letsencrypt/live/subdomain.mysite.com/privkey.pem /etc/grafana/grafana.key
$ sudo ln -s /etc/letsencrypt/live/subdomain.mysite.com/fullchain.pem /etc/grafana/grafana.crt
```
#### Adjust permissions
Grafana usually runs under the `grafana` Linux group, and you must ensure that the Grafana server process has permission to read the relevant files. Without read access, the HTTPS server fails to start properly.
To adjust permissions, perform the following steps:
1. Run the following commands to set the appropriate permissions and groups for the files:
```bash
$ sudo chgrp -R grafana /etc/letsencrypt/*
$ sudo chmod -R g+rx /etc/letsencrypt/*
$ sudo chgrp -R grafana /etc/grafana/grafana.crt /etc/grafana/grafana.key
$ sudo chmod 400 /etc/grafana/grafana.crt /etc/grafana/grafana.key
```
1. Run the following command to verify that the `grafana` group can read the symlinks:
```bash
$ $ ls -l /etc/grafana/grafana.*
lrwxrwxrwx 1 root grafana 67 Mar 22 14:15 /etc/grafana/grafana.crt -> /etc/letsencrypt/live/subdomain.mysite.com/fullchain.pem
-rw-r----- 1 root grafana 54554 Mar 22 14:13 /etc/grafana/grafana.ini
lrwxrwxrwx 1 root grafana 65 Mar 22 14:15 /etc/grafana/grafana.key -> /etc/letsencrypt/live/subdomain.mysite.com/privkey.pem
```
## Configure Grafana HTTPS and restart Grafana
In this section you edit the `grafana.ini` file so that it includes the certificate you created. If you need help identifying where to find this file, or what each key means, refer to [Configuration file location]({{< relref "./configure-grafana#configuration-file-location" >}}).
To configure Grafana HTTPS and restart Grafana, complete the following steps.
1. Open the `grafana.ini` file and edit the following configuration parameters:
```
[server]
http_addr =
http_port = 3000
domain = mysite.com
root_url = https://subdomain.mysite.com:3000
cert_key = /etc/grafana/grafana.key
cert_file = /etc/grafana/grafana.crt
enforce_domain = False
protocol = https
```
> **Note**: The standard port for SSL traffic is 443, which you can use instead of Grafana's default port 3000. This change might require additional operating system privileges or configuration to bind to lower-numbered privileged ports.
1. [Restart the Grafana server]({{< relref "./start-restart-grafana/#linux" >}}) using `systemd`, `init.d`, or the binary as appropriate for your environment.
## Troubleshooting
Refer to the following troubleshooting tips as required.
### Failure to obtain a certificate
The following reasons explain why the `certbot` process might fail:
- To make sure you can get a certificate from LetsEncrypt, you need to ensure that port 80 is open so that LetsEncrypt can communicate with your machine. If port 80 is blocked or firewall is enabled, the exchange will fail and you won't be able to receive a certificate.
- LetsEncrypt requires proof that you control the domain, so attempts to obtain certificates for domains you do not
control might be rejected.
### Grafana starts, but HTTPS is unavailable
When you configure HTTPS, the following errors might appear in Grafana's logs.
#### Permission denied
```
level=error msg="Stopped background service" service=*api.HTTPServer reason="open /etc/grafana/grafana.crt: permission denied"
```
##### Resolution
To ensure secure HTTPS setup, it is essential that the cryptographic keys and certificates are as restricted as possible. However, if the file permissions are too restricted, the Grafana process may not have access to the necessary files, thus impeding a successful HTTPS setup. Please re-examine the listed instructions to double check the file permissions and try again.
#### Cannot assign requested address
```
listen tcp 34.148.30.243:3000: bind: cannot assign requested address
```
##### Resolution
Check the config to ensure the `http_addr` is left blank, allowing Grafana to bind to all interfaces. If you have set `http_addr` to a specific subdomain, such as `subdomain.mysite.com`, this might prevent the Grafana process from binding to an external address, due to network address translation layers being present.

View File

@@ -0,0 +1,194 @@
---
aliases:
- ../installation/restart-grafana/
- ./restart-grafana/
description: How to start the Grafana server
title: Start the Grafana server
menuTitle: Start Grafana
weight: 300
---
# Start the Grafana server
This topic includes instructions for starting the Grafana server. For certain configuration changes, you might have to restart the Grafana server for them to take effect.
The following instructions start the `grafana-server` process as the `grafana` user, which was created during the package installation.
If you installed with the APT repository or `.deb` package, then you can start the server using `systemd` or `init.d`. If you installed a binary `.tar.gz` file, then you execute the binary.
## Linux
The following subsections describe three methods of starting and restarting the Grafana server: with systemd, initd, or by directly running the binary. You should follow only one set of instructions, depending on how your machine is configured.
### Start the Grafana server with systemd
Complete the following steps to start the Grafana server using systemd and verify that it is running:
1. To start the service, run the following commands:
```bash
sudo systemctl daemon-reload
sudo systemctl start grafana-server
sudo systemctl status grafana-server
```
1. To verify that the service is running, run the following command:
```
sudo systemctl status grafana-server
```
### Configure the Grafana server to start at boot using systemd
To configure the Grafana server to start at boot, run the following command:
```bash
sudo systemctl enable grafana-server.service
```
#### Serve Grafana on a port < 1024
{{< docs/shared "systemd/bind-net-capabilities.md" >}}
### Restart the Grafana server using systemd
To restart the Grafana server, run the following commands:
```bash
sudo systemctl restart grafana-server
```
> **Note:** SUSE or OpenSUSE users might need to start the server with the systemd method, then use the init.d method to configure Grafana to start at boot.
### Start the Grafana server using init.d
Complete the following steps to start the Grafana server using init.d and verify that it is running:
1. To start the Grafana server, run the following commands:
```bash
sudo service grafana-server start
sudo service grafana-server status
```
1. To verify that the service is running, run the following command:
```
sudo service grafana-server status
```
### Configure the Grafana server to start at boot using init.d
To configure the Grafana server to start at boot, run the following command:
```bash
sudo update-rc.d grafana-server defaults
```
#### Restart the Grafana server using init.d
To restart the Grafana server, run the following commands:
```bash
sudo service grafana-server restart
```
### Start the server using the binary
The `grafana-server` binary .tar.gz needs the working directory to be the root install directory where the binary and the `public` folder are located.
To start the Grafana server, run the following command:
```bash
./bin/grafana-server
```
## Docker
To restart the Grafana service, use the `docker restart` command.
`docker restart grafana`
Alternately, you can use the `docker compose restart` command to restart Grafana. For more information, refer to [docker compose documentation](https://docs.docker.com/compose/).
### Docker compose example
Configure your `docker-compose.yml` file. For example:
```bash
grafana:
image: grafana/grafana:latest
ports:
- "3000:3000"
environment:
- TERM=linux
- GF_INSTALL_PLUGINS=grafana-clock-panel,grafana-piechart-panel,grafana-polystat-panel
```
Start the Grafana server:
`docker-compose up`
This starts the Grafana server along with the three plugins specified in the YAML file.
To restart the running container, use this command:
`docker-compose restart grafana`
## Windows
Complete the following steps to start the Grafana server on Windows:
1. Execute `grafana-server.exe`, which is located in the `bin` directory.
We recommend that you run `grafana-server.exe` from the command line.
If you want to run Grafana as a Windows service, you can download [NSSM](https://nssm.cc/).
1. To run Grafana, open your browser and go to the Grafana port (http://localhost:3000/ is default).
> **Note:** The default Grafana port is `3000`. This port might require extra permissions on Windows. If it does not appear in the default port, you can try changing to a different port.
1. If you need to change the port, complete the following steps:
a. In the `conf` directory, copy `sample.ini` to `custom.ini`.
> **Note:** You should edit `custom.ini`, never `defaults.ini`.
b. Edit `custom.ini` and uncomment the `http_port` configuration option (`;` is the comment character in ini files) and change it to something similar to `8080`, which should not require extra Windows privileges.
To restart the Grafana server, complete the following steps:
1. Open the **Services** app.
1. Right-click on the **Grafana** service.
1. In the context menu, click **Restart**.
## macOS
Restart methods differ depending on whether you installed Grafana using Homebrew or as standalone macOS binaries.
### Restart Grafana using Homebrew
Use the [Homebrew](http://brew.sh/) restart command:
```bash
brew services restart grafana
```
### Restart standalone macOS binaries
To restart Grafana:
1. Open a terminal and go to the directory where you copied the install setup files.
1. Run the command:
```bash
./bin/grafana-server
```
## Next steps
After the Grafana server is up and running, consider taking the next steps:
- Refer to [Get Started]({{< relref "../getting-started/" >}}) to learn how to build your first dashboard.
- Refer to [Configuration]({{< relref "./configure-grafana/" >}}) to learn about how you can customize your environment.

View File

@@ -2,24 +2,26 @@
title: Serving Grafana on a port < 1024
---
If you are using `systemd` and want to start Grafana on a port that is less than 1024, then you must add a `systemd` unit override.
If you are using `systemd` and want to start Grafana on a port that is lower than 1024, you must add a `systemd` unit override.
1. The following command creates an override file in your configured editor:
1. Run the following command to create an override file in your configured editor.
```bash
# Alternatively, create a file in /etc/systemd/system/grafana-server.service.d/override.conf
systemctl edit grafana-server.service
```
```bash
# Alternatively, create a file in /etc/systemd/system/grafana-server.service.d/override.conf
systemctl edit grafana-server.service
```
1 Add these additional settings to grant the `CAP_NET_BIND_SERVICE` capability. To read more about capabilities, see [the manual page on capabilities.](https://man7.org/linux/man-pages/man7/capabilities.7.html)
1. Add the following additional settings to grant the `CAP_NET_BIND_SERVICE` capability.
```
[Service]
# Give the CAP_NET_BIND_SERVICE capability
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_BIND_SERVICE
To learn more about capabilities, refer to [capabilities(7) — Linux manual page](https://man7.org/linux/man-pages/man7/capabilities.7.html).
# A private user cannot have process capabilities on the host's user
# namespace and thus CAP_NET_BIND_SERVICE has no effect.
PrivateUsers=false
```
```
[Service]
# Give the CAP_NET_BIND_SERVICE capability
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_BIND_SERVICE
# A private user cannot have process capabilities on the host's user
# namespace and thus CAP_NET_BIND_SERVICE has no effect.
PrivateUsers=false
```

View File

@@ -105,9 +105,9 @@ To upgrade Grafana installed from the binary `.tar.gz` package, complete the fol
1. Extract the downloaded package and overwrite the existing files.
### CentOS or RHEL
### RPM or YUM
To upgrade Grafana running on CentOS or RHEL, complete the following steps:
To upgrade Grafana installed using RPM or YUM complete the following steps:
1. In your current installation of Grafana, save your custom configuration changes to a file named `<grafana_install_dir>/conf/custom.ini`.
@@ -115,13 +115,19 @@ To upgrade Grafana running on CentOS or RHEL, complete the following steps:
1. Perform one of the following steps based on your installation.
- If you [downloaded an RPM package](https://grafana.com/grafana/download) to install Grafana, then complete the steps documented in [Install on RPM-based Linux]({{< relref "../../setup-grafana/installation/rpm/" >}}) to upgrade Grafana.
- If you [downloaded an RPM package](https://grafana.com/grafana/download) to install Grafana, then complete the steps documented in [Install Grafana on Red Hat, RHEL, or Fedora]({{< relref "../../setup-grafana/installation/redhat-rhel-fedora/" >}}) or [Install Grafana on SUSE or OpenSUSE]({{< relref "../../setup-grafana/installation/suse-opensuse/" >}}) to upgrade Grafana.
- If you used the Grafana YUM repository, run the following command:
```bash
sudo yum update grafana
```
- If you installed Grafana on OpenSUSE or SUSE, run the following command:
```bash
sudo zypper update
```
### Docker
To upgrade Grafana running in a Docker container, complete the following steps:

View File

@@ -1,6 +1,12 @@
---
aliases:
- troubleshoot-dashboards/
cascade:
labels:
products:
- cloud
- enterprise
- oss
description: Guide to troubleshooting Grafana problems
keywords:
- grafana
@@ -45,7 +51,6 @@ sudo yum install freetype*
sudo yum install urw-fonts
```
## FAQs
## More help
Check out the [FAQ section](https://community.grafana.com/c/howto/faq) on the Grafana Community page for answers to frequently
asked questions.
Check out the [Grafana Community](https://community.grafana.com/) for more troubleshooting help (you must be logged in to post or comment).

View File

@@ -16,4 +16,4 @@ weight: 1995
## Technical notes
There are no additional upgrade steps to complete for this version of Grafana.
The upgrade to Grafana v9.4 includes changes to the Grafana database for Grafana alerting that are not backward compatible. As a result, when you upgrade to Grafana v9.4, do not downgrade your Grafana instance to an earlier version. Doing so might cause issues with managing your Grafana alerts.

View File

@@ -53,6 +53,11 @@ aliases:
- whats-new-in-v6-5/
- whats-new-in-v6-6/
- whats-new-in-v6-7/
cascade:
labels:
products:
- cloud
- oss
title: What's new
weight: 1
---

View File

@@ -140,8 +140,8 @@ For details on using this functionality, see [GitHub pull request #55313](https:
## Transformations: INNER JOINs
Transformations allow you to shape raw data from data sources, like metrics series or GitHub issues, into a format that's appropriate for the chosen visualization.
We have extended the Join transformation to support INNER JOINs in addition to OUTER JOINs. These work similarly to SQL JOINs.
[Transformations]({{< relref "../panels-visualizations/query-transform-data/transform-data/" >}}) allow you to shape raw data from data sources, like metrics series or GitHub issues, into a format that's appropriate for the chosen visualization.
We have extended the [Join transformation]({{< relref "../panels-visualizations/query-transform-data/transform-data/#join-by-field" >}}) to support INNER JOINs in addition to OUTER JOINs. These work similarly to SQL JOINs.
{{< figure src="/static/img/docs/transformations/transform-outer-join-9-2.png" max-width="750px" caption="Query builder groupings for Google Cloud monitoring" >}}

View File

@@ -9,7 +9,7 @@ keywords:
- '9.3'
- release notes
title: What's new in Grafana v9.3
weight: -33
weight: -34
---
# Whats new in Grafana v9.3

View File

@@ -7,7 +7,7 @@ keywords:
- '9.4'
- release notes
title: What's new in Grafana v9.4
weight: -33
weight: -35
---
# Whats new in Grafana v9.4
@@ -296,6 +296,10 @@ We've added support for JWT authentication.
We've added support for custom session parameters.
## Postgres, MySQL, and MSSQL data sources
The `database` property is now under the `jsonData` key in the data source configuration. This change is backward compatible, and existing configurations will continue to work.
## Before you upgrade
There are no known breaking changes associated with this version of Grafana.

View File

@@ -44,7 +44,7 @@ function provisionAzureMonitorDatasources(datasources: AzureMonitorProvision[])
e2eSelectors.configEditor.loadSubscriptions.button().click().wait('@subscriptions').wait(500);
e2eSelectors.configEditor.defaultSubscription.input().find('input').type('datasources{enter}');
// Wait for 15s so that credentials are ready. 5s has been tested locally before and seemed insufficient.
e2e().wait(15000);
e2e().wait(30000);
},
expectedAlertMessage: 'Successfully connected to all Azure Monitor endpoints',
// Reduce the timeout from 30s to error faster when an invalid alert message is presented

View File

@@ -1,14 +1,18 @@
build: build-html build-txt
build: clean build-mjml build-grunt
build-html:
clean:
rm -rf dist/
mkdir dist/
build-mjml:
npx mjml \
--config.beautify true \
--config.minify false \
--config.validationLevel=strict \
--config.keepComments=false \
./templates/*.mjml --output ../public/emails/
./templates/*.mjml --output ./dist/
build-txt:
build-grunt:
npx grunt
.PHONY: build build-html build-txt
.PHONY: clean build build-mjml build-grunt

View File

@@ -1,5 +1,4 @@
default:
- 'clean'
- 'assemble'
- 'replace'
- 'copy'

View File

@@ -1,5 +0,0 @@
module.exports = function (config) {
return {
dist: ['dist'],
};
};

View File

@@ -7,5 +7,11 @@ module.exports = function () {
src: ['**.txt'],
dest: '../public/emails/',
},
html: {
expand: true,
cwd: 'dist',
src: ['**.html'],
dest: '../public/emails/',
},
};
};

View File

@@ -1,16 +1,45 @@
module.exports = {
dist: {
overwrite: true,
src: ['dist/*.txt'],
replacements: [
{
from: '[[',
to: '{{',
},
{
from: ']]',
to: '}}',
},
],
},
module.exports = function () {
'use strict';
return {
txt,
comments,
};
};
const txt = {
overwrite: true,
src: ['dist/*.txt'],
replacements: [
{
from: '[[',
to: '{{',
},
{
from: ']]',
to: '}}',
},
],
};
/**
* Replace all instances of HTML comments with {{ __dangerouslyInjectHTML "<!-- my comment -->" }}.
*
* MJML will output <!--[if !mso]><!--> comments which are specific to MS Outlook.
*
* Go's template/html package will strip all HTML comments and we need them to be preserved
* to work with MS Outlook on the Desktop.
*/
const HTML_SAFE_FUNC = '__dangerouslyInjectHTML';
const commentBlock = /(<!--[\s\S]*?-->)/g;
const comments = {
overwrite: true,
src: ['dist/*.html'],
replacements: [
{
from: commentBlock,
to: `{{ ${HTML_SAFE_FUNC} \`$1\` }}`,
},
],
};

View File

@@ -7,7 +7,6 @@
"grunt": "1.0.1",
"grunt-assemble": "0.6.3",
"grunt-cli": "^1.4.3",
"grunt-contrib-clean": "2.0.0",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-watch": "1.1.0",
"grunt-text-replace": "0.4.0",

16
go.mod
View File

@@ -59,7 +59,7 @@ require (
github.com/google/uuid v1.3.0
github.com/google/wire v0.5.0
github.com/gorilla/websocket v1.5.0
github.com/grafana/alerting v0.0.0-20230209203114-508391225cd4
github.com/grafana/alerting v0.0.0-20230328192025-518e63bb07c5
github.com/grafana/cuetsy v0.1.5
github.com/grafana/grafana-aws-sdk v0.12.0
github.com/grafana/grafana-azure-sdk-go v1.5.1
@@ -98,7 +98,7 @@ require (
github.com/uber/jaeger-client-go v2.29.1+incompatible
github.com/urfave/cli/v2 v2.3.0
github.com/vectordotdev/go-datemath v0.1.1-0.20220323213446-f3954d0b18ae
github.com/weaveworks/common v0.0.0-20210913144402-035033b78a78 // indirect
github.com/weaveworks/common v0.0.0-20210913144402-035033b78a78
github.com/xorcare/pointer v1.1.0
github.com/yalue/merged_fs v1.2.2
github.com/yudai/gojsondiff v1.0.0
@@ -110,7 +110,7 @@ require (
go.opentelemetry.io/otel/trace v1.11.2
golang.org/x/crypto v0.4.0
golang.org/x/exp v0.0.0-20221211140036-ad323defaf05
golang.org/x/net v0.4.0
golang.org/x/net v0.7.0
golang.org/x/oauth2 v0.3.0
golang.org/x/sync v0.1.0
golang.org/x/time v0.2.0
@@ -126,7 +126,7 @@ require (
gopkg.in/square/go-jose.v2 v2.5.1
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1
xorm.io/builder v0.3.6
xorm.io/builder v0.3.6 // indirect
xorm.io/core v0.7.3
xorm.io/xorm v0.8.2
)
@@ -232,8 +232,8 @@ require (
go.opencensus.io v0.24.0 // indirect
go.uber.org/atomic v1.10.0
go.uber.org/goleak v1.2.0 // indirect
golang.org/x/sys v0.3.0 // indirect
golang.org/x/text v0.5.0
golang.org/x/sys v0.5.0 // indirect
golang.org/x/text v0.7.0
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef
@@ -340,7 +340,7 @@ require (
github.com/unknwon/log v0.0.0-20150304194804-e617c87089d3 // indirect
go.opentelemetry.io/otel/metric v0.34.0 // indirect
go.starlark.net v0.0.0-20221020143700-22309ac47eac // indirect
golang.org/x/term v0.3.0 // indirect
golang.org/x/term v0.5.0 // indirect
gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
k8s.io/api v0.25.3 // indirect
@@ -408,7 +408,7 @@ require (
)
// Use fork of crewjam/saml with fixes for some issues until changes get merged into upstream
replace github.com/crewjam/saml => github.com/grafana/saml v0.4.13-0.20230203140620-5f476db5c00a
replace github.com/crewjam/saml => github.com/grafana/saml v0.4.13-0.20230331080031-67cbfa09c7b6
// Thema's thema CLI requires cobra, which eventually works its way down to go-hclog@v1.0.0.
// Upgrading affects backend plugins: https://github.com/grafana/grafana/pull/47653#discussion_r850508593

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