* Remove absolute alias
It is causing a redirect from latest to v8.4 documentation.
* Actually remove alias because it isn't needed in v8.4.x
The page /docs/grafana/v8.4/auth/saml/ exists.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
---------
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* 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)
# Conflicts:
# pkg/services/sqlstore/migrations/ualert/migration_test.go
# pkg/services/sqlstore/migrations/ualert/ualert.go
* lint
When there is a single frame with no fields (e.g. splunk datasource) SSE errors when trying to figure out the data type. This frame needs to exist since this is where the executedQueryString metadata exists.
This adds a new return type to SSE to represent no data, so the original frame with its metadata can still be maintained.
(cherry picked from commit 05fd7eb047)
(backported from commit ef6d73e575)
(cherry picked from commit c0913ce718)
---------
Co-authored-by: Kyle Brandt <kyle@grafana.com>
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
CloudWatch: Remove error for multi-value variable in logs runner (#63522)
Remove error for multi template variable in CW logs runner
(cherry picked from commit 3a57304ef0)
Update publishing workflows to use organization secret (#63001)
The new tokens are managed centrally and have a longer expiry.
Administrators of the grafanabot account will be
notified of the pending expiry and the secret can be rotated centrally
without the need for a repository administrator to update their
secrets.
The existing repository secrets can safely be removed. The tokens for
those secrets will be removed by the end of this week.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit ba9bdf3455)
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Remove packages path from branch filter (#60128)
That directory is no longer used in published docs and causes this
workflow to fail when changes only affect the packages directory.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 1516aa2762)
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Fix branch filter for release workflows (#59963)
Ensures the workflow is run on every push to all version branches.
This was thought to be working because it was tested with a manual
dispatch, however, that trigger does not consider filters and was not
an accurate test.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 6f9ee7acf9)
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Trim leading and trailing whitespaces from email and username on signup
* Check whether the provided email address is the same as where the invitation sent
Co-authored-by: Mihaly Gyongyosi <mgyongyosi@users.noreply.github.com>
* Security: Make proxy endpoints not leak sensitive HTTP headers
Fixes CVE-2022-31130
* remove support for v1 manifests
* Security: Fix do not forward login cookie in outgoing requests
Co-authored-by: Will Browne <will.browne@grafana.com>
* Alerting: Remove double quotes from matchers
With #38629 a new Alertmanager configuration object was introduced with `object_matchers`, it was meant to circumvent around the fact that Prometheus label names don't support a set of characters that Grafana needs to support for alerts, silences, matchers, etc. (with a common example being elasticsearch's `.`).
This new object does not include the label of sanitzation or validation that its Prometheus equivalent supports in `matchers` and therefore are semantically not equivalent.
This triggered the problem that when the migration is run, we use `matchers` as the object to populate in configuration for routing policies, but when the UI does its first save this object is transformed to `object_matchers`.
Matchers that were previously running just fine would immediately stop working as soon as the configuration is saved.
This problem surfaced with the introduction of #49952 where we stopped stripping double quotes from matchers (not just regex but _all_ of them).
* Add comment explaining rationale and future removal
Co-authored-by: Alex Weaver <weaver.alex.d@gmail.com>
(cherry picked from commit 1a50b0dbb7)
Co-authored-by: gotjosh <josue.abreu@gmail.com>
* If GroupMemver.Read.All permissions is not configured return no groups
* fix log
(cherry picked from commit 624f8ef40d)
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
* FileUpload: associate the label with the input
* generate a unique id and set the correct role
* add a test to prevent regressions
(cherry picked from commit 10db618204)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* Remove makefile (it's not used anymore)
* Directly download and install nodejs package
The Packages file for deb.nodesource.com/node_16.x doesn't list older
versions, so only the most recent version of nodejs is available. We
don't want to require every update to the build container to have to
update nodejs if a never version is available, so I manually download
the deb and install it with dpkg.
* Update Go version
* Update lib.star
* Generate new .drone.yml
(cherry picked from commit 24038d9985)
* Additional logic to handle quoted values
* Simple test with quoted values that include spaces
* Update test description
* Updating logic to account for nested quotes
- Adding additional test for nested quotes
* Strip out line breaks and carriage returns pre-processing
* Fix typo in test result
* Update key-value logic to avoid regexp
- Minor changes to account for null values
* Correct escaping on test
* Additional tests
- Test for null values
- Test for nested separator characters
- Update quoting
(cherry picked from commit d0b41f882e)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* CI: Update `grabpl` version - remove `--no-pull-enterprise` flag (#47013)
* Update grabpl version
* Sign drone
* Remove --no-pull-enterprise flag
* Sign drone
* Update grabpl
(cherry picked from commit 65b0bd3017)
* Add dependencies (#47126)
(cherry picked from commit ee92af8ebe)
* Run slack notify on OSS repo only (#47194)
(cherry picked from commit 305530224a)
* CI: Run publishing steps only on OSS repo for main/version branches (#47315)
* Convert steps to run on OSS repo only
* Exclude versioned branches from publishing artifacts
* Change trigger -> when
* Add trigger to upload_* steps
* Add conditions to remaining steps
* Exclude release steps
* Bring back exclusion for release builds
(cherry picked from commit bd386df617)
(cherry picked from commit 7da876684b)
* Storybook: Replace `gsutil rsync` with `gsutil cp` when copying artifacts (#47335)
* Replace gsutil rsync with cp
* Sync drone
* Remove folder before uploading artifacts
(cherry picked from commit 25e04d77be)
* Update grabpl version (#47375)
(cherry picked from commit c72881a8b1)
* Make gsutil command don't fail if dir doesn't exist (#47394)
(cherry picked from commit 0845ba1abb)
* Replace with secret (#47488)
(cherry picked from commit ce2a9252c2)
And $__interval_ms too
These docs were added in PR #13148 over 3 years ago, but since then the
content has moved without the links being updated to match.
(cherry picked from commit bc28e36089)
Co-authored-by: Sam Jewell <2903904+samjewell@users.noreply.github.com>
FilterInput escapes all input strings for special characters that might
be used in a RegExp by calling escapeStringForRegex, and using
unEscapeStringFromRegex for display. Both of these functions used
string.prototype.replace() for escaping. replace() only replaces the
first occurence of a search string unless called with a global RegExp.
The output of these functions was not necessarily safe to compile into a
RegExp literal.
This change creates RegExps for escapeStringForRegex and
unEscapeStringFromRegex to match all occurrences of the special
characters instead of just their first occurrence. This makes a variety
of strings safe for RegExp compilation.
(cherry picked from commit c5cfc1645a)
Co-authored-by: Joe Blubaugh <joe.blubaugh@grafana.com>
* Datasource: Fixes changing default data source causes inconsistency between panel data source and query data source (#46167)
* Datasource: Fixes changing default data source causes inconsistency between panel data source and query data source
* Fix unit tests
(cherry picked from commit a404dba29d)
* updated test
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Plugins: Don't start runner ticker for Core plugins
* add test
* correct start check in test
(cherry picked from commit 23dde457ef)
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
* Initial commit.
* Update version number
* Initial commit.
* More formatting changes. Also added URL links.
* Ran prettier.
(cherry picked from commit c42b0d7498)
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
* AccessControl: Handle ':' in attribute resolution
* Simplify based on assumption that prefixes will have maximum 2 parts
(cherry picked from commit ff3c1e3144)
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* Plugins: Make plugin loading from file system deterministic
* fix test name
* flip assertion arg order
(cherry picked from commit 5e18293f88)
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
* fix multiple non-grouped groupings
* drop duplicate alerts
* add test for multiple groups without labels
Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
(cherry picked from commit e814e7364b)
Co-authored-by: Nathan Rodman <nathanrodman@gmail.com>
* Validate refId when generating id for cloudwatch query
* add test case when refId is a valid metric data id
(cherry picked from commit 99b4dfc27d)
Co-authored-by: Kevin Yu <kevinwcyu@users.noreply.github.com>
* Search: sort results correctly when using postgres
postgresql puts nulls first while both mysql and sqlite puts them last
* linting
(cherry picked from commit f46038ed3a)
Co-authored-by: Leonard Gram <leo@xlson.com>
* Fix data source scope resolver
* Adding ds UID scope resolver
* Register UID resolver
* use package full name
* even if it cannot be empty as of now and is also checked by store, better safe than sorry
(cherry picked from commit bd918927b4)
* use default http client from aws-sdk-go
* temp comment out line and link to issue
(cherry picked from commit 6670257c5e)
Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
* fix StreamingFrameAction.replace
* simplify
* beautify
* cover `streamingDataFrame.ts` changes with unit tests
* formatting
* cover `LiveDataStream.ts` changes with unit tests
* update frame length after pushing new values
(cherry picked from commit bdbb9ed54a)
Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>
* fix: make it possible to use both class and functional components for plugins
* fix: accept both class and functional components as plugin root pages
* refactor: import types by name
* refactor: use `ComponentType`
(cherry picked from commit c331af93b9)
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* Separate metrics and logs policies
* Update policy examples
Removes GetMetricStatistics which is no longer used
* WIP for testDatasource
* WIP add datasource health check test
* Undo changes on imports
(cherry picked from commit e39d5382cf)
Co-authored-by: Shirley <4163034+fridgepoet@users.noreply.github.com>
* Sanitize after markdown has been rendered to html
* Update e2e test
(cherry picked from commit b1125c0ba3)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* Update silence url generation
* Update tests
* Update test to the new silence params format
* Fix tests
(cherry picked from commit aeec087065)
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
- Fixes duration in StateTimeline appearing incorrectly when "merge consecutive values" is enabled.
(cherry picked from commit 5aab0063c7)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
* Swap out Select component for AsyncSelect to Jaeger search panel
(cherry picked from commit 83664121bc)
Co-authored-by: Cat Perry <000.perry@gmail.com>
* CloudWatch: Add test to executeStartQuery
* Add test for absence of limit
* Restrict assertions to limit in some tests
(cherry picked from commit a68a570e92)
Co-authored-by: Shirley <4163034+fridgepoet@users.noreply.github.com>
This commit changes staleResultsHandler to create an annotation if the current state is Alerting and the result is being removed from the state cache as it has not been updated since 2x the evaluation interval.
(cherry picked from commit feae959c9d)
* allow log queries to be executed also without a resource
* add unit tests
(cherry picked from commit b7a2fda2ae)
Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
* add field for custom slack endpoint
* add test for using custom endpoint
* Update pkg/services/ngalert/notifier/channels/slack.go
Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
* specify description for endpoint
* remove brittle string constants
Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
(cherry picked from commit f9701d78b1)
Co-authored-by: Nathan Rodman <nathanrodman@gmail.com>
* CLI: Adjust 're-encrypt-data-keys' command
* CLI: Adjust 're-encrypt' command
* Multiple improvements on re-encrypt secrets migration
* Another bunch of code improvements
* Lint fixes
(cherry picked from commit e6a85826e9)
Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
* Add mapped tags input to allow renaming tags in trace to logs settings
* Use mappedTags in createSpanLink
* Update traceToLogs docs
* Show 'add kv' button if no tags
* Update docs
* Default mappedTags to tag values
(cherry picked from commit af2d19b02e)
Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
* UI: Improve modal a11y by setting role & using title as label
* remove wrapping div for cutom title components
* Fix typo
(cherry picked from commit 9307cc86f2)
Update default port which is used to host alertmanager.
Official port is 9093.
9090 is used officially by Prometheus.
(cherry picked from commit 68ef0e1f84)
Co-authored-by: Michał Sochoń <kaszpir@gmail.com>
* Chore: add setting to skip org assignment for external users
Introduce 'skip_org_role_update_sync' setting to skip any kind of org assignment during the login of external users.
As a consequence manual organization assignments won't be overridden during the upsert of an external user.
Part of #22605
* Chore: Rename skip_org_role_update_sync to oauth_skip_org_role_update_sync and relocate it to auth section
* Chore: replace global setting access where possible
(cherry picked from commit 6beba5a049)
Co-authored-by: baez90 <peter.kurfer@googlemail.com>
cleaned up feature description (there were some leftovers from when the text was last edited)
(cherry picked from commit 34ae28846e)
Co-authored-by: juschm <juschm@users.noreply.github.com>
* set missing meta data for distribution type metrics
* add test
* add test
* simplify custom set
* add test for executedQueryString
* add test data
* fix tests
* check group by
(cherry picked from commit 0fb490c00d)
Co-authored-by: Mitsuhiro Tanda <mitsuhiro.tanda@gmail.com>
* fix(plugins/state): console log errors during install / uninstall
* fix(backend_srv): catch JSON parse errors
Sometimes it can happen that a backend API responses says that it's
returning with a JSON content-type, however it actually returns an invalid
JSON (e.g. an empty body) - in which case the backendSrv() request errors out.
(cherry picked from commit 1e21184f65)
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* make send_alerts_to field nullable
* set nullable to true since we have a default value
(cherry picked from commit a9de33601c)
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
* Chore: Clean up logs and deprecated library in tracing tests (#45486)
* Fix logs and errors from tracing tests
* Refactor SpanBar to remove recompose
* Fix NodeGraph tests
(cherry picked from commit 6e07b30048)
The problem here is that without the orgID we ignore the lookup of the existing notification channel just before updating and end up failing the update because there is no channel available.
(cherry picked from commit 8bf2e642aa)
Co-authored-by: gotjosh <josue.abreu@gmail.com>
* Loki: Fix using of Explore editor in Explore
* Add test and remove Explore fields in module
* Update tests
(cherry picked from commit e7a0e69153)
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
* Explore: avoid locking timepicker when range is inverted
* Explore: prevent time picker to lock if from & to search parameters are present
(cherry picked from commit 6415b9a54d)
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
Changed the swagger ui feature flag to the actual feature flag.
(cherry picked from commit 77a0a71929)
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
* Update access_controls.md
Update the parameter table for deleting custom roles to make it explicit that the `global` query parameter is handled by this endpoint/should be specified when deleting a globally-scoped role.
* Update docs/sources/http_api/access_control.md
Co-authored-by: Karl Persson <kalle.persson92@gmail.com>
Co-authored-by: achatterjee-grafana <aparajita.chatterjee@grafana.com>
(cherry picked from commit 1239911b5b)
Co-authored-by: Roberto Acevedo <rxacevedo@users.noreply.github.com>
* show teams page for user who can't list teams but can create teams
* Fixing buttons and routes
* Small refactor
Co-authored-by: gamab <gabi.mabs@gmail.com>
(cherry picked from commit 6fb3aac2e1)
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
* AccessControl: Filter team members
* Modify GetTeamMembersByUser comment
* Fix postgres failing test due to quoting
* Rename GetTeamMembersByUser to GetUserTeamMemberships
* Update TeamStore interface
(cherry picked from commit 78fc0258b1)
* Popovers: Improve contrast by darkening shadow and changing border to medium
* Updated sass theme
* Revert back to weak border
(cherry picked from commit 374681b546)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Fixes a problem where server hangs if setting
GF_DATABASE_LOG_QUERIES=true.
Ref #44925
(cherry picked from commit ca311bf94f)
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Fixes log filters that contains comments should not be enabled
(cherry picked from commit 2082eeb72f)
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* Revert fixed roles and service accounts
* Leave the fixed role for service accounts
(cherry picked from commit f38f10416a)
Co-authored-by: Vardan Torosyan <vardants@gmail.com>
* Security: Sync security changes on main (#45083)
* * Teams: Appropriately apply user id filter in /api/teams/:id and /api/teams/search
* Teams: Ensure that users searching for teams are only able see teams they have access to
* Teams: Require teamGuardian admin privileges to list team members
* Teams: Prevent org viewers from administering teams
* Teams: Add org_id condition to team count query
* Teams: clarify permission requirements in teams api docs
* Teams: expand scenarios for team search tests
* Teams: mock teamGuardian in tests
Co-authored-by: Dan Cech <dcech@grafana.com>
* remove duplicate WHERE statement
* Fix for CVE-2022-21702
(cherry picked from commit 202d7c190082c094bc1dc13f7fe9464746c37f9e)
* Lint and test fixes
(cherry picked from commit 3e6b67d5504abf4a1d7b8d621f04d062c048e981)
* check content type properly
(cherry picked from commit 70b4458892bf2f776302720c10d24c9ff34edd98)
* basic csrf origin check
(cherry picked from commit 3adaa5ff39832364f6390881fb5b42ad47df92e1)
* compare origin to host
(cherry picked from commit 5443892699e8ed42836bb2b9a44744ff3e970f42)
* simplify url parsing
(cherry picked from commit b2ffbc9513fed75468628370a48b929d30af2b1d)
* check csrf for GET requests, only compare origin
(cherry picked from commit 8b81dc12d8f8a1f07852809c5b4d44f0f0b1d709)
* parse content type properly
(cherry picked from commit 16f76f4902e6f2188bea9606c68b551af186bdc0)
* mentioned get in the comment
(cherry picked from commit a7e61811ef8ae558ce721e2e3fed04ce7a5a5345)
* add content-type: application/json to test HTTP requests
* fix pluginproxy test
* Fix linter when comparing errors
Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
Co-authored-by: Dan Cech <dcech@grafana.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Serge Zaitsev <serge.zaitsev@grafana.com>
Co-authored-by: Vardan Torosyan <vardants@gmail.com>
(cherry picked from commit 605d056136)
* Apply suggestions from code review
* remove uneeded test fix from patch
Co-authored-by: Dimitris Sotirakis <sotirakis.dim@gmail.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: jguer <joao.guerreiro@grafana.com>
* logs-volume: remove custom timeout
* make error message a little better
(cherry picked from commit 2c0030b1b4)
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
* Checking in changes from gdoc.
* New more changes.
* Added links to images.
* Added 8-4 link to the What's new index page.
(cherry picked from commit 065819b707)
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
* hide team role column
* hide or disable the role picker as needed
* add SWL filtering for role listing
(cherry picked from commit 4f4b1cb5ea)
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
* add negative y config
* Handle negative y and constant transform in Timeseries panel
* Typechecks
* Add migration from old graph panel
* Docs update
* Revert "Add migration from old graph panel"
This reverts commit 33b5a90b66.
* Revert VizLegendItem changes
* Automatically separate positive and negative stacks within a group
* Update packages/grafana-ui/src/components/VizLegend/VizLegend.story.tsx
* Remove SeriesLabel component
* Update docs/sources/visualizations/time-series/_index.md
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
* Update docs/sources/visualizations/time-series/_index.md
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
* Leftover reverts
* Don't crate bands (for now0 for negative -y stack
* Add docs note about transform being only available as an override
* Fill negative bands in reversed direction
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit ffea53f2f6)
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
* use latest sigv4 changes
* update configuration docs
* lint
* reformat lint ignore
* specific version for docs
(cherry picked from commit fc42dfe396)
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
* API: Using go-swagger for extracting OpenAPI specification from source code
* Merge Grafana Alerting spec
* Include enterprise endpoints (if enabled)
* Serve SwaggerUI under feature flag
* Fix building dev docker images
* Configure swaggerUI
* Add missing json tags
Co-authored-by: Ying WANG <ying.wang@grafana.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
(cherry picked from commit 35fe58de37)
* fix(detect-breaking-changes): use the base.ref for backport compatibility
* chore(check-breaking-changes): update path to previous package dist directory
(cherry picked from commit f885c2ede9)
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
* Remove UpgradeBox from report nav
* Add children prop
* Update icon
* Update styles
* Update text
* Add pro badge to main nav
* Remove redundant span
* Update secondaryAction
(cherry picked from commit d21abdfe77)
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Fixing a couple bugs, adds some tests and hopefully decrease
lock contention when logging.
Switching from using sync.RWMutex to go-kit SwapLogger.
Fixes bug when creating a new logger from an existing one that
screwed up the keyvals and/or lost the logger name.
Ref #44681
(cherry picked from commit 05ea825c76)
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* Fix evaluation of alert rules for datasources with custom headers
* Fix unit tests
* Fix integration tests
* Evaluator fields should be package private
(cherry picked from commit 9df43abbb5)
Co-authored-by: George Robinson <george.robinson@grafana.com>
* Add tabIndex={-1} to places using focusScope to allow for text highlighting
* use useDialog
* don't need explicit tabIndex anymore
* remove duplicate spreading of props
(cherry picked from commit 9e52361c1e)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Re-adding back Azure authentication support to Prometheus datasource
after the datasource query logic was rewritten from plugin.json routes to
Go backend.
Ref #35857
(cherry picked from commit 85ea1a5d64)
Co-authored-by: Sergey Kostrukov <sekost@microsoft.com>
* AccessControl: Show UserPicker based on canListUser
* Update public/app/core/components/AccessControl/AddPermission.tsx
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
(cherry picked from commit 6d931226d8)
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* add actions for team group sync
* extend the hook to allow specifying whether the user is external
* move user struct to type package
* interface for permission service to allow mocking it
* reuse existing permissions
* test fix
* refactor
* linting
(cherry picked from commit 602d62ebcc)
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
* loki: refactor: return dataframes instead of timeseries
* fixed unit test
* removed unused import
(cherry picked from commit 0c2ba819a7)
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
* remove link to docs site
* extract tooltip to component
* text and formatting
* use div instead of p
(cherry picked from commit 3314178a0a)
Co-authored-by: Peter Holmberg <peterholmberg@users.noreply.github.com>
* Encryption: Add support for data keys re-encryption
* Add tests for data keys re-encryption
* Update code after refactorings
Co-authored-by: Leonard Gram <leo@xlson.com>
(cherry picked from commit b2655750e8)
Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
* Encryption: CLI rollback command
* Update flag reference to 'featuremgmt' pkg
* Update feature toggles usage
* Clean up data keys table after envelope encryption rollback
(cherry picked from commit f8105efff3)
Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
* do not store evaluation string in Evaluation.
* reduce number of buckets to store for a single state
(cherry picked from commit 984c95de63)
Co-authored-by: Yuriy Tseretyan <tceretian@gmail.com>
Moves the request tracing middleware earlier in the chain, just after the tracing middleware
and before the log middleware. With these changes we'll be able to track
authentication/authorization status failures that currently exits early and don't execute the
request tracing middleware. In addition, there might be some other routes now being tracked
with this that we didn't do before.
Fixes#39590
(cherry picked from commit 0092d10764)
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-02-02 19:07:37 +01:00
1267 changed files with 58829 additions and 15212 deletions
- **Security:** Fixes for CVE-2022-31107 and CVE-2022-31097. [#52218](https://github.com/grafana/grafana/pull/52218), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **Histogram Panel:** Take decimal into consideration. [#47330](https://github.com/grafana/grafana/pull/47330), [@mdvictor](https://github.com/mdvictor)
- **TimeSeries:** Sort tooltip values based on raw values. [#46738](https://github.com/grafana/grafana/pull/46738), [@dprokop](https://github.com/dprokop)
### Bug fixes
- **API:** Include userId, orgId, uname in request logging middleware. [#47183](https://github.com/grafana/grafana/pull/47183), [@marefr](https://github.com/marefr)
- **Security:** Fixes CVE-2022-24812. For more information, see our [blog](https://grafana.com/blog/2022/04/12/grafana-enterprise-8.4.6-released-with-high-severity-security-fix/)
<!-- 8.4.6 END -->
<!-- 8.4.5 START -->
# 8.4.5 (2022-03-31)
### Features and enhancements
- **Instrumentation:** Make backend plugin metrics endpoints available with optional authentication. [#46467](https://github.com/grafana/grafana/pull/46467), [@marefr](https://github.com/marefr)
- **Table panel:** Show datalinks for cell display modes JSON View and Gauge derivates. [#46020](https://github.com/grafana/grafana/pull/46020), [@mdvictor](https://github.com/mdvictor)
### Bug fixes
- **Azure Monitor:** Small bug fixes for Resource Picker. [#46665](https://github.com/grafana/grafana/pull/46665), [@sarahzinger](https://github.com/sarahzinger)
- **Logger:** Use specified format for file logger. [#46970](https://github.com/grafana/grafana/pull/46970), [@sakjur](https://github.com/sakjur)
- **Logs:** Handle missing fields in dataframes better. [#46963](https://github.com/grafana/grafana/pull/46963), [@gabor](https://github.com/gabor)
- **ManageDashboards:** Fix error when deleting all dashboards from folder view. [#46877](https://github.com/grafana/grafana/pull/46877), [@joshhunt](https://github.com/joshhunt)
<!-- 8.4.5 END -->
<!-- 8.4.4 START -->
# 8.4.4 (2022-03-16)
### Features and enhancements
- **Loki:** Add unpack to autocomplete suggestions (#44623). [#46573](https://github.com/grafana/grafana/pull/46573), [@glintik](https://github.com/glintik)
- **Plugins:** allow using both Function and Class components for app plugins. [#46148](https://github.com/grafana/grafana/pull/46148), [@leventebalogh](https://github.com/leventebalogh)
- **TimeSeries:** Add migration for Graph panel's transform series override. [#46577](https://github.com/grafana/grafana/pull/46577), [@dprokop](https://github.com/dprokop)
- **TimeSeries:** Preserve null/undefined values when performing negative y transform. [#46584](https://github.com/grafana/grafana/pull/46584), [@dprokop](https://github.com/dprokop)
### Bug fixes
- **CloudWatch:** Use default http client from aws-sdk-go. [#46370](https://github.com/grafana/grafana/pull/46370), [@sunker](https://github.com/sunker)
- **Dashboards:** Fixes repeating by row and no refresh. [#46565](https://github.com/grafana/grafana/pull/46565), [@torkelo](https://github.com/torkelo)
- **Gauge:** Fixes blank viz when data link exists and orientation was horizontal. [#46335](https://github.com/grafana/grafana/pull/46335), [@torkelo](https://github.com/torkelo)
- **Search:** sort results correctly when using postgres. [#46466](https://github.com/grafana/grafana/pull/46466), [@xlson](https://github.com/xlson)
- **TextPanel:** Sanitize after markdown has been rendered to html. [#46166](https://github.com/grafana/grafana/pull/46166), [@ashharrison90](https://github.com/ashharrison90)
<!-- 8.4.4 END -->
<!-- 8.4.3 START -->
# 8.4.3 (2022-03-02)
### Features and enhancements
- **Alerting:** Grafana uses > instead of >= when checking the For duration. [#46010](https://github.com/grafana/grafana/issues/46010)
- **Alerting:** Use expanded labels in dashboard annotations. [#45726](https://github.com/grafana/grafana/pull/45726), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Logs:** Escape windows newline into single newline. [#45771](https://github.com/grafana/grafana/pull/45771), [@perosb](https://github.com/perosb)
### Bug fixes
- **Alerting:** Fix use of > instead of >= when checking the For duration. [#46011](https://github.com/grafana/grafana/pull/46011), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Azure Monitor:** Fixes broken log queries that use workspace. [#45820](https://github.com/grafana/grafana/pull/45820), [@sunker](https://github.com/sunker)
- **CloudWatch:** Remove error message when using multi-valued template vars in region field. [#45886](https://github.com/grafana/grafana/pull/45886), [@sunker](https://github.com/sunker)
- **ClipboardButton:** Use a fallback when the Clipboard API is unavailable. [#45831](https://github.com/grafana/grafana/pull/45831), [@ashharrison90](https://github.com/ashharrison90)
<!-- 8.4.3 END -->
<!-- 8.4.2 START -->
# 8.4.2 (2022-02-23)
### Features and enhancements
- **OAuth:** Add setting to skip org assignment for external users. [#34834](https://github.com/grafana/grafana/pull/34834), [@baez90](https://github.com/baez90)
- **Tracing:** Add option to map tag names to log label names in trace to logs settings. [#45178](https://github.com/grafana/grafana/pull/45178), [@connorlindsey](https://github.com/connorlindsey)
### Bug fixes
- **Explore:** Fix closing split pane when logs panel is used. [#45602](https://github.com/grafana/grafana/pull/45602), [@ifrost](https://github.com/ifrost)
<!-- 8.4.2 END -->
<!-- 8.4.1 START -->
# 8.4.1 (2022-02-18)
### Features and enhancements
- **Cloudwatch:** Add support for AWS/PrivateLink\* metrics and dimensions. [#45515](https://github.com/grafana/grafana/pull/45515), [@szymonpk](https://github.com/szymonpk)
- **Configuration:** Add ability to customize okta login button name and icon. [#44079](https://github.com/grafana/grafana/pull/44079), [@DanCech](https://github.com/DanCech)
- **Tempo:** Switch out Select with AsyncSelect component to get loading state in Tempo Search. [#45110](https://github.com/grafana/grafana/pull/45110), [@CatPerry](https://github.com/CatPerry)
### Bug fixes
- **Alerting:** Fix migrations by making send_alerts_to field nullable. [#45572](https://github.com/grafana/grafana/pull/45572), [@santihernandezc](https://github.com/santihernandezc)
<!-- 8.4.1 END -->
<!-- 8.4.0 START -->
# 8.4.0 (2022-02-16)
### Features and enhancements
- **API:** Extract OpenAPI specification from source code using go-swagger. [#40528](https://github.com/grafana/grafana/pull/40528), [@papagian](https://github.com/papagian)
- **AccessControl:** Disable user remove and user update roles when they do not have the permissions. [#43429](https://github.com/grafana/grafana/pull/43429), [@Jguer](https://github.com/Jguer)
- **AccessControl:** Provisioning for teams. [#43767](https://github.com/grafana/grafana/pull/43767), [@gamab](https://github.com/gamab)
- **Alerting:** Move slow queries in the scheduler to another goroutine. [#44423](https://github.com/grafana/grafana/pull/44423), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** Use time.Ticker instead of alerting.Ticker in ngalert. [#44395](https://github.com/grafana/grafana/pull/44395), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** add custom grouping to Alert Panel. [#44559](https://github.com/grafana/grafana/pull/44559), [@gillesdemey](https://github.com/gillesdemey)
- **Analytics:** Add user id tracking to google analytics. [#42763](https://github.com/grafana/grafana/pull/42763), [@autoric](https://github.com/autoric)
- **Angular:** Add AngularJS plugin support deprecation plan to docs site. [#45149](https://github.com/grafana/grafana/pull/45149), [@torkelo](https://github.com/torkelo)
- **Auth:** implement auto_sign_up for auth.jwt. [#43502](https://github.com/grafana/grafana/pull/43502), [@sakjur](https://github.com/sakjur)
- **Azure Monitor Logs:** Order subscriptions in resource picker by name. [#45228](https://github.com/grafana/grafana/pull/45228), [@sunker](https://github.com/sunker)
- **Azure monitor Logs:** Optimize data fetching in resource picker. [#44549](https://github.com/grafana/grafana/pull/44549), [@sunker](https://github.com/sunker)
- **AzureMonitor:** Filter list of resources by resourceType. [#43522](https://github.com/grafana/grafana/pull/43522), [@andresmgot](https://github.com/andresmgot)
- **BarChart:** color by field, x time field, bar radius, label skipping. [#43257](https://github.com/grafana/grafana/pull/43257), [@leeoniya](https://github.com/leeoniya)
- **Chore:** Implement OpenTelemetry in Grafana. [#42674](https://github.com/grafana/grafana/pull/42674), [@idafurjes](https://github.com/idafurjes)
- **Cloud Monitoring:** Adds metric type to Metric drop down options. [#43268](https://github.com/grafana/grafana/pull/43268), [@tw1nk](https://github.com/tw1nk)
- **CloudWatch:** Add Data Lifecycle Manager metrics and dimension. [#43310](https://github.com/grafana/grafana/pull/43310), [@ilyastoli](https://github.com/ilyastoli)
- **CloudWatch:** Add all ElastiCache Redis Metrics. [#43336](https://github.com/grafana/grafana/pull/43336), [@siavashs](https://github.com/siavashs)
- **CloudWatch:** Add new AWS/ES metrics. [#43034](https://github.com/grafana/grafana/pull/43034), [@sunker](https://github.com/sunker)
- **Cloudwatch:** Add syntax highlighting and autocomplete for "Metric Search". [#43985](https://github.com/grafana/grafana/pull/43985), [@sarahzinger](https://github.com/sarahzinger)
- **Explore:** Support custom display label for exemplar links for Prometheus datasource. [#42732](https://github.com/grafana/grafana/pull/42732), [@JokerQueue](https://github.com/JokerQueue)
- **Hotkeys:** Make time range absolute/permanent. [#43802](https://github.com/grafana/grafana/pull/43802), [@davkal](https://github.com/davkal)
- **Playlists:** Enable sharing direct links to playlists. [#44161](https://github.com/grafana/grafana/pull/44161), [@ashharrison90](https://github.com/ashharrison90)
- **SSE:** Add Mode to drop NaN/Inf/Null in Reduction operations. [#43583](https://github.com/grafana/grafana/pull/43583), [@kylebrandt](https://github.com/kylebrandt)
- **Setting:** Support configuring feature toggles with bools instead of just passing an array. [#43326](https://github.com/grafana/grafana/pull/43326), [@bergquist](https://github.com/bergquist)
- **TimeSeries:** Add support for negative Y and constant transform. [#44774](https://github.com/grafana/grafana/pull/44774), [@dprokop](https://github.com/dprokop)
- **Transformations:** Add 'JSON' field type to ConvertFieldTypeTransformer. [#42624](https://github.com/grafana/grafana/pull/42624), [@sd2k](https://github.com/sd2k)
### Bug fixes
- **Auth:** Guarantee consistency of signed SigV4 headers. [#45054](https://github.com/grafana/grafana/pull/45054), [@wbrowne](https://github.com/wbrowne)
- **CloudWatch:** Fix MetricName resetting on Namespace change. [#44165](https://github.com/grafana/grafana/pull/44165), [@yaelleC](https://github.com/yaelleC)
- **Cloudwatch :** Fixed resetting metric name when changing namespace in Metric Query. [#44612](https://github.com/grafana/grafana/pull/44612), [@yaelleC](https://github.com/yaelleC)
- **Explore:** Avoid locking timepicker when range is inverted. [#44790](https://github.com/grafana/grafana/pull/44790), [@Elfo404](https://github.com/Elfo404)
- **LibraryPanels:** Prevent long descriptions and names from obscuring the delete button. [#45190](https://github.com/grafana/grafana/pull/45190), [@zuchka](https://github.com/zuchka)
- **OAuth:** Fix parsing of ID token if header contains non-string value. [#44159](https://github.com/grafana/grafana/pull/44159), [@marefr](https://github.com/marefr)
- **Panel Edit:** Visualization search now works correctly with special characters. [#45137](https://github.com/grafana/grafana/pull/45137), [@ashharrison90](https://github.com/ashharrison90)
- **Provisioning:** Fix duplicate validation when multiple organizations have been configured. [#44151](https://github.com/grafana/grafana/pull/44151), [@marefr](https://github.com/marefr)
- **QueryField:** Fix issue with undo history when suggestion is inserted (#28656). [#39114](https://github.com/grafana/grafana/pull/39114), [@glintik](https://github.com/glintik)
- **TablePanel:** Do not prefix columns with frame name if multiple frames and override active. [#45174](https://github.com/grafana/grafana/pull/45174), [@mdvictor](https://github.com/mdvictor)
### Deprecations
AngularJS plugin support is now in a deprecated state, meaning it will be removed in a future release. Currently, that is planned for version 10 (in 2023). The documentation site has an [article](https://grafana.com/docs/grafana/next/developers/angular_deprecation/) with more details on why, when, and how. Issue [#45149](https://github.com/grafana/grafana/issues/45149)
<!-- 8.4.0 END -->
<!-- 8.4.0-beta1 START -->
# 8.4.0-beta1 (2022-02-02)
### Features and enhancements
- **Alerting:** Support WeCom as a contact point type. [#40975](https://github.com/grafana/grafana/pull/40975), [@smallpath](https://github.com/smallpath)
- **Alerting:** UI for mute timings. [#41578](https://github.com/grafana/grafana/pull/41578), [@nathanrodman](https://github.com/nathanrodman)
- **Alerting:** add settings for peer reconnection in HA mode. [#42300](https://github.com/grafana/grafana/pull/42300), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
- **Auth:** implement auto_sign_up for auth.jwt. [#37040](https://github.com/grafana/grafana/pull/37040), [@Roguelazer](https://github.com/Roguelazer)
- **Dashboard:** Add Show unknown variables toggle to dashboard settings. [#41854](https://github.com/grafana/grafana/pull/41854), [@hugohaggmark](https://github.com/hugohaggmark)
- **Instrumentation:** Logger migration from log15 to gokit/log. [#41636](https://github.com/grafana/grafana/pull/41636), [@ying-jeanne](https://github.com/ying-jeanne)
- **MSSQL:** Configuration of certificate verification for TLS connection. [#31865](https://github.com/grafana/grafana/pull/31865), [@mortenaa](https://github.com/mortenaa)
- **Middleware:** Don't require HTTPS for HSTS headers to be emitted. [#35147](https://github.com/grafana/grafana/pull/35147), [@alexmv](https://github.com/alexmv)
- **News:** Reload feed when changing the time range or refreshing. [#42217](https://github.com/grafana/grafana/pull/42217), [@ashharrison90](https://github.com/ashharrison90)
- **UI/Plot:** Implement keyboard controls for plot cursor. [#42244](https://github.com/grafana/grafana/pull/42244), [@kaydelaney](https://github.com/kaydelaney)
<!-- 8.4.0-beta1 END -->
<!-- 8.3.5 START -->
# 8.3.5 (2022-02-08)
- **Security**: Fixes CVE-2022-21702. For more information, see our [blog](https://grafana.com/blog/2022/02/08/grafana-7.5.15-and-8.3.5-released-with-moderate-severity-security-fixes/)
- **Security**: Fixes CVE-2022-21703. For more information, see our [blog](https://grafana.com/blog/2022/02/08/grafana-7.5.15-and-8.3.5-released-with-moderate-severity-security-fixes/)
- **Security**: Fixes CVE-2022-21713. For more information, see our [blog](https://grafana.com/blog/2022/02/08/grafana-7.5.15-and-8.3.5-released-with-moderate-severity-security-fixes/)
- **AGPL License:** Update license from Apache 2.0 to the GNU Affero General Public License (AGPL). [#33184](https://github.com/grafana/grafana/pull/33184)
<!-- 8.0.0-beta1 END -->
<!-- 7.5.15 START -->
# 7.5.15 (2022-02-08)
- **Security**: Fixes CVE-2022-21702. For more information, see our [blog](https://grafana.com/blog/2022/02/08/grafana-7.5.15-and-8.3.5-released-with-moderate-severity-security-fixes/)
- **Security**: Fixes CVE-2022-21703. For more information, see our [blog](https://grafana.com/blog/2022/02/08/grafana-7.5.15-and-8.3.5-released-with-moderate-severity-security-fixes/)
- **Security**: Fixes CVE-2022-21713. For more information, see our [blog](https://grafana.com/blog/2022/02/08/grafana-7.5.15-and-8.3.5-released-with-moderate-severity-security-fixes/)
# For "sqlite3" only. cache mode setting used for connecting to the database
cache_mode=private
# For "mysql" only if lockingMigration feature toggle is set. How many seconds to wait before failing to lock the database for the migrations, default is 0.
locking_attempt_timeout_sec=0
#################################### Cache server #############################
[remote_cache]
# Either "redis", "memcached" or "database" default is "database"
@@ -397,12 +400,18 @@ oauth_auto_login = false
# OAuth state max age cookie duration in seconds. Defaults to 600 seconds.
oauth_state_cookie_max_age=600
# Skip forced assignment of OrgID 1 or 'auto_assign_org_id' for social logins
oauth_skip_org_role_update_sync=false
# limit of api_key seconds to live before expiration
api_key_max_seconds_to_live=-1
# Set to true to enable SigV4 authentication option for HTTP-based datasources
sigv4_auth_enabled=false
# Set to true to enable verbose logging of SigV4 request signing
# Metrics available at HTTP URL /metrics and /metrics/plugins/:pluginId
[metrics]
enabled=true
interval_seconds=10
# Disable total stats (stat_totals_*) metrics to be generated
disable_total_stats=false
#If both are set, basic auth will be required for the metrics endpoint.
#If both are set, basic auth will be required for the metrics endpoints.
basic_auth_username=
basic_auth_password=
@@ -972,6 +984,8 @@ container_name =
server_url=
# If the remote HTTP image renderer service runs on a different server than the Grafana server you may have to configure this to a URL where Grafana is reachable, e.g. http://grafana.domain/.
callback_url=
# An auth token that will be sent to and verified by the renderer. The renderer will deny any request without an auth token matching the one configured on the renderer side.
renderer_token=-
# Concurrent render request limit affects when the /render HTTP endpoint is used. Rendering many images at the same time can overload the server,
# which this setting can help protect against by only allowing a certain amount of concurrent requests.
# For "sqlite3" only. cache mode setting used for connecting to the database. (private, shared)
;cache_mode = private
# For "mysql" only if lockingMigration feature toggle is set. How many seconds to wait before failing to lock the database for the migrations, default is 0.
;locking_attempt_timeout_sec = 0
################################### Data sources #########################
[datasources]
# Upper limit of data sources that Grafana will return. This limit is a temporary configuration and it will be deprecated when pagination will be introduced on the list data sources API.
@@ -391,12 +394,18 @@
# OAuth state max age cookie duration in seconds. Defaults to 600 seconds.
;oauth_state_cookie_max_age = 600
# Skip forced assignment of OrgID 1 or 'auto_assign_org_id' for social logins
;oauth_skip_org_role_update_sync = false
# limit of api_key seconds to live before expiration
;api_key_max_seconds_to_live = -1
# Set to true to enable SigV4 authentication option for HTTP-based datasources.
;sigv4_auth_enabled = false
# Set to true to enable verbose logging of SigV4 request signing
# Metrics available at HTTP URL /metrics and /metrics/plugins/:pluginId
[metrics]
# Disable / Enable internal metrics
;enabled = true
@@ -863,7 +874,7 @@
# Disable total stats (stat_totals_*) metrics to be generated
;disable_total_stats = false
#If both are set, basic auth will be required for the metrics endpoint.
#If both are set, basic auth will be required for the metrics endpoints.
; basic_auth_username =
; basic_auth_password =
@@ -952,6 +963,8 @@
;server_url =
# If the remote HTTP image renderer service runs on a different server than the Grafana server you may have to configure this to a URL where Grafana is reachable, e.g. http://grafana.domain/.
;callback_url =
# An auth token that will be sent to and verified by the renderer. The renderer will deny any request without an auth token matching the one configured on the renderer side.
;renderer_token = -
# Concurrent render request limit affects when the /render HTTP endpoint is used. Rendering many images at the same time can overload the server,
# which this setting can help protect against by only allowing a certain amount of concurrent requests.
@@ -14,7 +18,7 @@ Grafana has default and custom configuration files. You can customize your Grafa
## Configuration file location
The default settings for a Grafana instance are stored in the `$WORKING_DIR/conf/defaults.ini` file. _Do not_ change the location in this file.
The default settings for a Grafana instance are stored in the `$WORKING_DIR/conf/defaults.ini` file. _Do not_ change this file.
Depending on your OS, your custom configuration file is either the `$WORKING_DIR/conf/defaults.ini` file or the `/usr/local/etc/grafana/grafana.ini` file. The custom configuration file path can be overridden using the `--config` parameter.
@@ -202,6 +206,8 @@ Another way is to put a web server like Nginx or Apache in front of Grafana and
### domain
This setting is only used in as a part of the `root_url` setting (see below). Important if you use GitHub or Google OAuth.
### enforce_domain
Redirect to correct domain if the host header does not match the domain. Prevents DNS rebinding attacks. Default is `false`.
@@ -314,6 +320,10 @@ The maximum number of open connections to the database.
Sets the maximum amount of time a connection may be reused. The default is 14400 (which means 14400 seconds or 4 hours). For MySQL, this setting should be shorter than the [`wait_timeout`](https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_wait_timeout) variable.
### locking_attempt_timeout_sec
For "mysql", if `lockingMigration` feature toggle is set, specify the time (in seconds) to wait before failing to lock the database for the migrations. Default is 0.
### log_queries
Set to `true` to log the sql calls and execution times.
@@ -357,6 +367,8 @@ Defaults to `private`.
## [remote_cache]
Caches authentication details and session information in the configured database, Redis or Memcached. This setting does not configure [Query Caching in Grafana Enterprise]({{< relref "../enterprise/query-caching.md" >}}).
### type
Either `redis`, `memcached`, or `database`. Defaults to `database`
@@ -747,6 +759,12 @@ This setting is ignored if multiple OAuth providers are configured. Default is `
How many seconds the OAuth state cookie lives before being deleted. Default is `600` (seconds)
Administrators can increase this if they experience OAuth login state mismatch errors.
### oauth_skip_org_role_update_sync
Skip forced assignment of OrgID `1` or `auto_assign_org_id` for external logins. Default is `false`.
Use this setting to distribute users with external login to multiple organizations.
Otherwise, the users' organization would get reset on every new login, for example, via AzureAD.
### api_key_max_seconds_to_live
Limit of API key seconds to live before expiration. Default is -1 (unlimited).
@@ -757,6 +775,12 @@ Limit of API key seconds to live before expiration. Default is -1 (unlimited).
Set to `true` to enable the AWS Signature Version 4 Authentication option for HTTP-based datasources. Default is `false`.
### sigv4_verbose_logging
> Only available in Grafana 8.4+.
Set to `true` to enable verbose request signature logging when AWS Signature Version 4 Authentication is enabled. Default is `false`.
In Grafana, you can change your names and emails associated with groups or accounts in the Settings or Preferences. This topic provides instructions for each task.
In Grafana, you can modify the UI theme configured in the Settings or Preferences. Set the UI theme for the server, an organization, a team, or your personal user account using the instructions in this topic.
By default, Grafana uses the timezone in your web browser. However, you can override this setting at the server, organization, team, or individual user level. This topic provides instructions for each task.
description: How to replace the default home dashboard
keywords:
- grafana
- configuration
- documentation
- home
title: Change home dashboard
weight: 300
---
# Change the default home dashboard
The home dashboard you set is the one all users will see by default when they log in. You can set the home dashboard for the server, an organization, a team, or your personal user account. This topic provides instructions for each task.
@@ -30,7 +34,7 @@ These instructions assume you have already added Prometheus as a data source in
1. Enable Prometheus to scrape metrics from Grafana. In your configuration file (`grafana.ini` or `custom.ini` depending on your operating system) remove the semicolon to enable the following configuration options:
```
# Metrics available at HTTP API Url /metrics
# Metrics available at HTTP URL /metrics and /metrics/plugins/:pluginId
[metrics]
# Disable / Enable internal metrics
enabled = true
@@ -39,7 +43,7 @@ These instructions assume you have already added Prometheus as a data source in
disable_total_stats = false
```
1. (optional) If you want to require authorization to view the metrics endpoint, then uncomment and set the following options:
1. (optional) If you want to require authorization to view the metrics endpoints, then uncomment and set the following options:
```
basic_auth_username =
@@ -92,3 +96,48 @@ These instructions assume you have already added Graphite as a data source in Gr
```
1. Restart Grafana. Grafana now exposes metrics at http://localhost:3000/metrics and sends them to the Graphite location you specified.
## Pull metrics from Grafana backend plugin into Prometheus
Any installed [backend plugin](https://grafana.com/developers/plugin-tools/introduction/backend-plugins) exposes a metrics endpoint through Grafana that you can configure Prometheus to scrape.
These instructions assume you have already added Prometheus as a data source in Grafana.
1. Enable Prometheus to scrape backend plugin metrics from Grafana. In your configuration file (`grafana.ini` or `custom.ini` depending on your operating system) remove the semicolon to enable the following configuration options:
```
# Metrics available at HTTP URL /metrics and /metrics/plugins/:pluginId
[metrics]
# Disable / Enable internal metrics
enabled = true
# Disable total stats (stat_totals_*) metrics to be generated
disable_total_stats = false
```
1. (optional) If you want to require authorization to view the metrics endpoints, then uncomment and set the following options:
```
basic_auth_username =
basic_auth_password =
```
1. Restart Grafana. Grafana now exposes metrics at `http://localhost:3000/metrics/plugins/<plugin id>`, e.g. http://localhost:3000/metrics/plugins/grafana-github-datasource if you have the [Grafana GitHub datasource](https://grafana.com/grafana/plugins/grafana-github-datasource/) installed.
@@ -15,10 +15,11 @@ Grafana 8.0 introduced new and improved alerting that centralizes alerting infor
Grafana alerting is enabled by default for new OSS installations. For older installations, it is still an [opt-in]({{< relref "./unified-alerting/opt-in.md" >}}) feature.
Grafana alerting is enabled by default for new OSS installations. For older installations, it is still an [opt-in]({{< relref "../unified-alerting/opt-in.md" >}}) feature.
> **Note**: Legacy dashboard alerts is deprecated and will be removed in a future release. We encourage you to migrate to [Grafana alerting]({{< relref "../unified-alerting/_index.md" >}}) for all existing installations.
> **Note**: Legacy dashboard alerts are deprecated and will be removed in Grafana 9. We encourage you to migrate to [Grafana alerting]({{< relref "../unified-alerting/_index.md" >}}) for all existing installations.
Legacy dashboard alerts have two main components:
@@ -23,4 +23,4 @@ You can perform the following tasks for alerts:
- [Test alert rules and troubleshoot]({{< relref "troubleshoot-alerts.md" >}})
- [Add or edit an alert contact point]({{< relref "notifications.md" >}})
@@ -11,7 +16,7 @@ Annotations and labels are key value pairs associated with alerts originating fr
## Annotations
Annotations are key-value pairs that provide additional meta-information about an alert. For example: a description, a summary, and runbook URL. These are displayed in rule and alert details in the UI and can be used in contact point message templates.
Annotations are key-value pairs that provide additional meta-information about an alert. You can use the following annotations: `description`, `summary`, `runbook_url`, `alertId`, `dashboardUid`, and `panelId`. For example, a description, a summary, and a runbook URL. These are displayed in rule and alert details in the UI and can be used in contact point message templates.
## Labels
@@ -20,7 +25,7 @@ Labels are key-value pairs that contain information about, and are used to uniqu
### How are labels used?
- The complete set of labels for an alert is what uniquely identifies an alert within Grafana Alerts.
- The Alertmanager uses labels to match alerts for [silences]({{< relref "../silences/" >}}) and [alert groups]({{< relref "../alert-groups/" >}}) in [notification policies]({{< relref "../notification-policies/" >}}).
- The Alertmanager uses labels to match alerts for [silences]({{< relref "../silences/" >}}) and [alert groups]({{< relref "../alert-groups/" >}}) in [notification policies]({{< relref "../notifications/_index.md" >}}).
- The alerting UI displays labels for every alert instance generated by the evaluation of that rule.
- Contact points can access labels to dynamically generate notifications that contain information specific to the alert that is resulting in a notification.
- Labels can be added to an [alerting rule]({{< relref "../alerting-rules/" >}}). These manually configured labels are able to use template functions and reference other labels. Labels added to an alerting rule here take precedence in the event of a collision between labels.
description: Create Cortex or Loki managed recording rule
keywords:
- grafana
- alerting
- guide
- rules
- recording rules
- create
title: Create Cortex or Loki managed recording rule
weight: 400
---
# Create a Cortex or Loki managed recording rule
@@ -29,10 +35,10 @@ For Cortex and Loki data sources to work with Grafana 8.0 alerting, enable the r
- From the **Select data source** drop-down, select an external Prometheus, an external Loki, or a Grafana Cloud data source.
- From the **Namespace** drop-down, select an existing rule namespace. Otherwise, click **Add new** and enter a name to create a new one. Namespaces can contain one or more rule groups and only have an organizational purpose.
- From the **Group** drop-down, select an existing group within the selected namespace. Otherwise, click **Add new** and enter a name to create a new one. Newly created rules are appended to the end of the group. Rules within a group are run sequentially at a regular interval, with the same evaluation time.
- Enter a PromQL or LogQL expression. The rule fires if the evaluation result has at least one series with a value that is greater than 0. An alert is created for each series.
1. In Step 3, add additional metadata associated with the rule.
- Add a description and summary to customize alert messages. Use the guidelines in [Annotations and labels for alerting]({{< relref "./alert-annotation-label.md" >}}).
- Add Runbook URL, panel, dashboard, and alert IDs.
description: Create Cortex or Loki managed alerting rule
keywords:
- grafana
- alerting
- guide
- rules
- create
title: Create Cortex or Loki managed alert rule
weight: 400
---
# Create a Cortex or Loki managed alerting rule
@@ -31,10 +36,10 @@ Grafana allows you to create alerting rules for an external Cortex or Loki insta
- From the **Select data source** drop-down, select an external Prometheus, an external Loki, or a Grafana Cloud data source.
- From the **Namespace** drop-down, select an existing rule namespace. Otherwise, click **Add new** and enter a name to create a new one. Namespaces can contain one or more rule groups and only have an organizational purpose. For more information, see [Cortex or Loki rule groups and namespaces]({{< relref "./edit-cortex-loki-namespace-group.md" >}}).
- From the **Group** drop-down, select an existing group within the selected namespace. Otherwise, click **Add new** and enter a name to create a new one. Newly created rules are appended to the end of the group. Rules within a group are run sequentially at a regular interval, with the same evaluation time.
- Enter a PromQL or LogQL expression. The rule fires if the evaluation result has at least one series with a value that is greater than 0. An alert is created for each series.
- In the **For** text box, specify the duration for which the condition must be true before an alert fires. If you specify `5m`, the condition must be true for 5 minutes before the alert fires.
> **Note:** Once a condition is met, the alert goes into the `Pending` state. If the condition remains active for the duration specified, the alert transitions to the `Firing` state, else it reverts to the `Normal` state.
description: Edit Cortex or Loki rule groups and namespaces
keywords:
- grafana
- alerting
- guide
- group
- namespace
- cortex
- loki
title: Cortex or Loki rule groups and namespaces
weight: 405
---
# Cortex or Loki rule groups and namespaces
A namespace contains one or more groups. The rules within a group are run sequentially at a regular interval. The default interval is one (1) minute. You can rename Cortex or Loki rule namespaces and groups, and edit group evaluation intervals.


"message":"**Firing**\n\nLabels:\n - alertname = T2\n - team = blue\n - zone = us-1\nAnnotations:\n - description = This is the alert rule checking the second system\n - runbook_url = https://myrunbook.com\n - summary = This is my summary\nSource: https://play.grafana.org/alerting/1afz29v7z/edit\nSilence: https://play.grafana.org/alerting/silence/new?alertmanager=grafana&matchers=alertname%3DT2%2Cteam%3Dblue%2Czone%3Dus-1\n\nLabels:\n - alertname = T1\n - team = blue\n - zone = eu-1\nAnnotations:\nSource: https://play.grafana.org/alerting/d1rdpdv7k/edit\nSilence: https://play.grafana.org/alerting/silence/new?alertmanager=grafana&matchers=alertname%3DT1%2Cteam%3Dblue%2Czone%3Deu-1\n"
- community developed backend data sources with alerting enabled (`backend` and `alerting` properties are set in the [plugin.json]({{< relref "../../../developers/plugins/metadata.md" >}}))
- community developed backend data sources with alerting enabled (`backend` and `alerting` properties are set in the [plugin.json](https://grafana.com/developers/plugin-tools/reference-plugin-json))
@@ -11,25 +16,7 @@ The Grafana alerting system has two main components: a `Scheduler` and an intern
When it comes to running Grafana alerting in high availability the operational mode of the scheduler is unaffected such that all alerts continue be evaluated in each Grafana instance. Rather the operational change happens in the Alertmanager which **deduplicates** alert notifications across Grafana instances.
```
.─────.
╱ ╲ ┌────────────────┐
( User )──────┐ ┌──────────────────────────────────┐ │ │
The coordination between Grafana instances happens via [a Gossip protocol](https://en.wikipedia.org/wiki/Gossip_protocol). Alerts are not gossiped between instances. It is expected that each scheduler delivers the same alerts to each Alertmanager.
Notification policies determine how alerts are routed to contact points. Policies have a tree structure, where each policy can have one or more child policies. Each policy, except for the root policy, can also match specific alert labels. Each alert is evaluated by the root policy and subsequently by each child policy. If you enable the `Continue matching subsequent sibling nodes` option is enabled for a specific policy, then evaluation continues even after one or more matches. A parent policy’s configuration settings and contact point information govern the behavior of an alert that does not match any of the child policies. A root policy governs any alert that does not match a specific policy.
You can configure Grafana managed notification policies as well as notification policies for an [external Alertmanager data source]({{< relref "../../datasources/alertmanager.md" >}}). For more information, see [Alertmanager]({{< relref "./fundamentals/alertmanager.md" >}}).
You can configure Grafana managed notification policies as well as notification policies for an [external Alertmanager data source]({{< relref "../../../datasources/alertmanager.md" >}}). For more information, see [Alertmanager]({{< relref "../fundamentals/alertmanager.md" >}}).
## Grouping
@@ -33,7 +38,7 @@ You can configure grouping to be `group_by: [alertname]` (take note that the `en
1. Click **Notification policies**.
1. From the **Alertmanager** dropdown, select an external Alertmanager. By default, the Grafana Alertmanager is selected.
1. In the Root policy section, click **Edit** (pen icon).
1. In **Default contact point**, update the [contact point]({{< relref "./contact-points.md" >}}) to whom notifications should be sent for rules when alert rules do not match any specific policy.
1. In **Default contact point**, update the [contact point]({{< relref "../contact-points.md" >}}) to whom notifications should be sent for rules when alert rules do not match any specific policy.
1. In **Group by**, choose labels to group alerts by. If multiple alerts are matched for this policy, then they are grouped by these labels. A notification is sent per group. If the field is empty (default), then all notifications are sent in a single group. Use a special label `...` to group alerts by all labels (which effectively disables grouping).
1. In **Timing options**, select from the following options:
- **Group wait** Time to wait to buffer alerts of the same group before sending an initial notification. Default is 30 seconds.
@@ -48,7 +53,7 @@ You can configure grouping to be `group_by: [alertname]` (take note that the `en
1. From the **Alertmanager** dropdown, select an Alertmanager. By default, the Grafana Alertmanager is selected.
1. To add a top level specific policy, go to the **Specific routing** section and click **New specific policy**.
1. In **Matching labels** section, add one or more rules for matching alert labels. For more information, see ["How label matching works"](#how-label-matching-works).
1. In **Contact point**, add the [contact point]({{< relref "./contact-points.md" >}}) to send notification to if alert matches only this specific policy and not any of the nested policies.
1. In **Contact point**, add the [contact point]({{< relref "../contact-points.md" >}}) to send notification to if alert matches only this specific policy and not any of the nested policies.
1. Optionally, enable **Continue matching subsequent sibling nodes** to continue matching nested policies even after the alert matched the parent policy. When this option is enabled, you can get more than one notification. Use it to send notification to a catch-all contact point as well as to one of more specific contact points handled by nested policies.
1. Optionally, enable **Override grouping** to specify the same grouping as the root policy. If this option is not enabled, the root policy grouping is used.
1. Optionally, enable **Override general timings** to override the timing options configured in the group notification policy.
A mute timing is a recurring interval of time when no new notifications for a policy are generated or sent. are sent for a policy. Use them to prevent alerts from firing a specific and reoccurring period, for example, a regular maintenance period.
A mute timing is a recurring interval of time when no new notifications for a policy are generated or sent. Use them to prevent alerts from firing a specific and reoccurring period, for example, a regular maintenance period.
Similar to silences, mute timings do not prevent alert rules from being evaluated, nor do they stop alert instances from being shown in the user interface. They only prevent notifications from being created.
You can configure Grafana managed mute timings as well as mute timings for an [external Alertmanager data source]({{< relref "../../datasources/alertmanager.md" >}}). For more information, see [Alertmanager]({{< relref "./fundamentals/alertmanager.md" >}}).
You can configure Grafana managed mute timings as well as mute timings for an [external Alertmanager data source]({{< relref "../../../datasources/alertmanager.md" >}}). For more information, see [Alertmanager]({{< relref "../fundamentals/alertmanager.md" >}}).
@@ -19,4 +21,4 @@ This mechanism allows Grafana to remove an existing synchronized user from a tea
<div class="clearfix"></div>
> Team Sync is available in Grafana Enterprise Cloud Pro and Advanced and in Grafana Enterprise. For more information, refer to [Team sync]({{< relref "../enterprise/team-sync.md" >}}) in [Grafana Enterprise]({{< relref "../enterprise" >}}).
> Team Sync is available in both Grafana Enterprise and Grafana Cloud Advanced. For more information, refer to [Team sync]({{< relref "../enterprise/team-sync.md" >}}) in [Grafana Enterprise]({{< relref "../enterprise" >}}).
This section provides basic information about observability topics in general and Grafana in particular. These topics will help people who are just starting out with observability and monitoring.
@@ -82,4 +90,4 @@ In this case the labels that represent the dimensions will have two keys based o
In the case of SQL-like data sources, more than one numeric column can be selected, with or without additional string columns to be used as dimensions. For example, `AVG(Temperature) AS AvgTemp, MAX(Temperature) AS MaxTemp`. This, if combined with multiple dimensions, can result in a lot of series. Selecting multiple values is currently only designed to be used with visualization.
Additional technical information on tabular time series formats and how dimensions are extracted can be found in [the developer documentation on data frames as time series]({{< relref "../developers/plugins/data-frames.md#data-frames-as-time-series" >}}).
Additional technical information on tabular time series formats and how dimensions are extracted can be found in [the developer documentation on data frames as time series](https://grafana.com/developers/plugin-tools/introduction/data-frames#data-frames-as-time-series).
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.